aboutsummaryrefslogtreecommitdiff
path: root/graphx
diff options
context:
space:
mode:
authorLeolh <leosandylh@gmail.com>2015-02-06 09:01:53 +0000
committerSean Owen <sowen@cloudera.com>2015-02-06 09:01:53 +0000
commit575d2df350e32964fffb02536cb0587a92ef20e9 (patch)
tree4f89692e95619a8bcbe14f0e768e38ed10211685 /graphx
parentdc0c4490a12ecedd8ca5a1bb256c7ccbdf0be04f (diff)
downloadspark-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.scala2
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