diff options
author | Shixiong Zhu <shixiong@databricks.com> | 2015-12-17 13:23:48 -0800 |
---|---|---|
committer | Shixiong Zhu <shixiong@databricks.com> | 2015-12-17 13:23:48 -0800 |
commit | 540b5aeadc84d1a5d61bda4414abd6bf35dc7ff9 (patch) | |
tree | a04de7b7d914b3583d1fdb49a8ea3a05490e7519 /examples/src | |
parent | 8184568810e8a2e7d5371db2c6a0366ef4841f70 (diff) | |
download | spark-540b5aeadc84d1a5d61bda4414abd6bf35dc7ff9.tar.gz spark-540b5aeadc84d1a5d61bda4414abd6bf35dc7ff9.tar.bz2 spark-540b5aeadc84d1a5d61bda4414abd6bf35dc7ff9.zip |
[SPARK-12410][STREAMING] Fix places that use '.' and '|' directly in split
String.split accepts a regular expression, so we should escape "." and "|".
Author: Shixiong Zhu <shixiong@databricks.com>
Closes #10361 from zsxwing/reg-bug.
Diffstat (limited to 'examples/src')
-rw-r--r-- | examples/src/main/scala/org/apache/spark/examples/ml/MovieLensALS.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/src/main/scala/org/apache/spark/examples/ml/MovieLensALS.scala b/examples/src/main/scala/org/apache/spark/examples/ml/MovieLensALS.scala index 3ae53e57db..02ed746954 100644 --- a/examples/src/main/scala/org/apache/spark/examples/ml/MovieLensALS.scala +++ b/examples/src/main/scala/org/apache/spark/examples/ml/MovieLensALS.scala @@ -50,7 +50,7 @@ object MovieLensALS { def parseMovie(str: String): Movie = { val fields = str.split("::") assert(fields.size == 3) - Movie(fields(0).toInt, fields(1), fields(2).split("|")) + Movie(fields(0).toInt, fields(1), fields(2).split("\\|")) } } |