You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by jk...@apache.org on 2016/01/07 04:49:17 UTC

spark git commit: [SPARK-12663][MLLIB] More informative error message in MLUtils.loadLibSVMFile

Repository: spark
Updated Branches:
  refs/heads/master a74d743cc -> 6b6d02be0


[SPARK-12663][MLLIB] More informative error message in MLUtils.loadLibSVMFile

This PR contains 1 commit which resolves [SPARK-12663](https://issues.apache.org/jira/browse/SPARK-12663).

For the record, I got a positive response from 2 people when I floated this idea on devspark.apache.org on 2015-10-23. [Link to archived discussion.](http://apache-spark-developers-list.1001551.n3.nabble.com/slightly-more-informative-error-message-in-MLUtils-loadLibSVMFile-td14764.html)

Author: Robert Dodier <ro...@users.sourceforge.net>

Closes #10611 from robert-dodier/loadlibsvmfile-error-msg-branch.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/6b6d02be
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/6b6d02be
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/6b6d02be

Branch: refs/heads/master
Commit: 6b6d02be0d4e2ce562dddfb391b3302f79de8276
Parents: a74d743
Author: Robert Dodier <ro...@users.sourceforge.net>
Authored: Wed Jan 6 19:49:10 2016 -0800
Committer: Joseph K. Bradley <jo...@databricks.com>
Committed: Wed Jan 6 19:49:10 2016 -0800

----------------------------------------------------------------------
 mllib/src/main/scala/org/apache/spark/mllib/util/MLUtils.scala | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/6b6d02be/mllib/src/main/scala/org/apache/spark/mllib/util/MLUtils.scala
----------------------------------------------------------------------
diff --git a/mllib/src/main/scala/org/apache/spark/mllib/util/MLUtils.scala b/mllib/src/main/scala/org/apache/spark/mllib/util/MLUtils.scala
index 89186de..74e9271 100644
--- a/mllib/src/main/scala/org/apache/spark/mllib/util/MLUtils.scala
+++ b/mllib/src/main/scala/org/apache/spark/mllib/util/MLUtils.scala
@@ -86,7 +86,8 @@ object MLUtils {
         val indicesLength = indices.length
         while (i < indicesLength) {
           val current = indices(i)
-          require(current > previous, "indices should be one-based and in ascending order" )
+          require(current > previous, s"indices should be one-based and in ascending order;"
+            + " found current=$current, previous=$previous; line=\"$line\"")
           previous = current
           i += 1
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org