spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject spark git commit: [SPARK-5380][GraphX] Solve an ArrayIndexOutOfBoundsException when build graph with a file format error
Date Fri, 06 Feb 2015 09:02:03 GMT
Repository: spark
Updated Branches:
  refs/heads/master dc0c4490a -> 575d2df35


[SPARK-5380][GraphX]  Solve an ArrayIndexOutOfBoundsException when build graph with a file
format error

When I build a graph with a file format error, there will be an ArrayIndexOutOfBoundsException

Author: Leolh <leosandylh@gmail.com>

Closes #4176 from Leolh/patch-1 and squashes the following commits:

94f6d22 [Leolh] Update GraphLoader.scala
23767f1 [Leolh] [SPARK-3650][GraphX] There will be an ArrayIndexOutOfBoundsException if the
format of the source file is wrong


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

Branch: refs/heads/master
Commit: 575d2df350e32964fffb02536cb0587a92ef20e9
Parents: dc0c449
Author: Leolh <leosandylh@gmail.com>
Authored: Fri Feb 6 09:01:53 2015 +0000
Committer: Sean Owen <sowen@cloudera.com>
Committed: Fri Feb 6 09:01:53 2015 +0000

----------------------------------------------------------------------
 graphx/src/main/scala/org/apache/spark/graphx/GraphLoader.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/575d2df3/graphx/src/main/scala/org/apache/spark/graphx/GraphLoader.scala
----------------------------------------------------------------------
diff --git a/graphx/src/main/scala/org/apache/spark/graphx/GraphLoader.scala b/graphx/src/main/scala/org/apache/spark/graphx/GraphLoader.scala
index 4933aec..21187be 100644
--- a/graphx/src/main/scala/org/apache/spark/graphx/GraphLoader.scala
+++ b/graphx/src/main/scala/org/apache/spark/graphx/GraphLoader.scala
@@ -77,7 +77,7 @@ object GraphLoader extends Logging {
         if (!line.isEmpty && line(0) != '#') {
           val lineArray = line.split("\\s+")
           if (lineArray.length < 2) {
-            logWarning("Invalid line: " + line)
+            throw new IllegalArgumentException("Invalid line: " + line)
           }
           val srcId = lineArray(0).toLong
           val dstId = lineArray(1).toLong


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


Mime
View raw message