зеркало из https://github.com/microsoft/spark.git
[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
This commit is contained in:
Родитель
dc0c4490a1
Коммит
575d2df350
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче