Repository: spark Updated Branches: refs/heads/branch-1.3 f408db6a3 -> ffdb2e9b5
[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 <leosand...@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/ffdb2e9b Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/ffdb2e9b Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/ffdb2e9b Branch: refs/heads/branch-1.3 Commit: ffdb2e9b556122c046e9040e646ef0e1094875aa Parents: f408db6 Author: Leolh <leosand...@gmail.com> Authored: Fri Feb 6 09:01:53 2015 +0000 Committer: Josh Rosen <joshro...@databricks.com> Committed: Fri Feb 6 10:39:18 2015 -0800 ---------------------------------------------------------------------- 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/ffdb2e9b/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-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org