diff options
author | WangTao <barneystinson@aliyun.com> | 2014-04-29 22:07:20 -0700 |
---|---|---|
committer | Reynold Xin <rxin@apache.org> | 2014-04-29 22:07:20 -0700 |
commit | 7025dda8fa84b57d6f12bc770df2fa10eef21d88 (patch) | |
tree | 8dff2915eccf9e56b8ed7dd85d83e89cbf0b672e /examples/src/main/java/org | |
parent | b3d2ab6b35b31b79ded2a1361f0d4eb17ab78b08 (diff) | |
download | spark-7025dda8fa84b57d6f12bc770df2fa10eef21d88.tar.gz spark-7025dda8fa84b57d6f12bc770df2fa10eef21d88.tar.bz2 spark-7025dda8fa84b57d6f12bc770df2fa10eef21d88.zip |
Handle the vals that never used
In XORShiftRandom.scala, use val "million" instead of constant "1e6.toInt".
Delete vals that never used in other files.
Author: WangTao <barneystinson@aliyun.com>
Closes #565 from WangTaoTheTonic/master and squashes the following commits:
17cacfc [WangTao] Handle the unused assignment, method parameters and symbol inspected by Intellij IDEA
37b4090 [WangTao] Handle the vals that never used
Diffstat (limited to 'examples/src/main/java/org')
3 files changed, 1 insertions, 3 deletions
diff --git a/examples/src/main/java/org/apache/spark/examples/JavaLogQuery.java b/examples/src/main/java/org/apache/spark/examples/JavaLogQuery.java index 2a4278d3c3..3f7a879538 100644 --- a/examples/src/main/java/org/apache/spark/examples/JavaLogQuery.java +++ b/examples/src/main/java/org/apache/spark/examples/JavaLogQuery.java @@ -75,7 +75,6 @@ public final class JavaLogQuery { public static Tuple3<String, String, String> extractKey(String line) { Matcher m = apacheLogRegex.matcher(line); - List<String> key = Collections.emptyList(); if (m.find()) { String ip = m.group(1); String user = m.group(3); diff --git a/examples/src/main/java/org/apache/spark/examples/JavaTC.java b/examples/src/main/java/org/apache/spark/examples/JavaTC.java index 1d776940f0..d66b9ba265 100644 --- a/examples/src/main/java/org/apache/spark/examples/JavaTC.java +++ b/examples/src/main/java/org/apache/spark/examples/JavaTC.java @@ -85,7 +85,7 @@ public final class JavaTC { } }); - long oldCount = 0; + long oldCount; long nextCount = tc.count(); do { oldCount = nextCount; diff --git a/examples/src/main/java/org/apache/spark/examples/sql/JavaSparkSQL.java b/examples/src/main/java/org/apache/spark/examples/sql/JavaSparkSQL.java index b5b438e975..d62a72f534 100644 --- a/examples/src/main/java/org/apache/spark/examples/sql/JavaSparkSQL.java +++ b/examples/src/main/java/org/apache/spark/examples/sql/JavaSparkSQL.java @@ -23,7 +23,6 @@ import java.util.List; import org.apache.spark.api.java.JavaRDD; import org.apache.spark.api.java.JavaSparkContext; import org.apache.spark.api.java.function.Function; -import org.apache.spark.api.java.function.VoidFunction; import org.apache.spark.sql.api.java.JavaSQLContext; import org.apache.spark.sql.api.java.JavaSchemaRDD; |