diff options
author | Leolh <leosandylh@gmail.com> | 2015-02-06 09:01:53 +0000 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2015-02-06 09:01:53 +0000 |
commit | 575d2df350e32964fffb02536cb0587a92ef20e9 (patch) | |
tree | 4f89692e95619a8bcbe14f0e768e38ed10211685 /graphx | |
parent | dc0c4490a12ecedd8ca5a1bb256c7ccbdf0be04f (diff) | |
download | spark-575d2df350e32964fffb02536cb0587a92ef20e9.tar.gz spark-575d2df350e32964fffb02536cb0587a92ef20e9.tar.bz2 spark-575d2df350e32964fffb02536cb0587a92ef20e9.zip |
[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
Diffstat (limited to 'graphx')
-rw-r--r-- | graphx/src/main/scala/org/apache/spark/graphx/GraphLoader.scala | 2 |
1 files changed, 1 insertions, 1 deletions
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 4933aecba1..21187be767 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 |