Fixed output index issue.
Support Mahout KMeans clustering.