Skip to content
Snippets Groups Projects
  1. Mar 03, 2016
    • Dongjoon Hyun's avatar
      [SPARK-13583][CORE][STREAMING] Remove unused imports and add checkstyle rule · b5f02d67
      Dongjoon Hyun authored
      ## What changes were proposed in this pull request?
      
      After SPARK-6990, `dev/lint-java` keeps Java code healthy and helps PR review by saving much time.
      This issue aims remove unused imports from Java/Scala code and add `UnusedImports` checkstyle rule to help developers.
      
      ## How was this patch tested?
      ```
      ./dev/lint-java
      ./build/sbt compile
      ```
      
      Author: Dongjoon Hyun <dongjoon@apache.org>
      
      Closes #11438 from dongjoon-hyun/SPARK-13583.
      b5f02d67
    • Sean Owen's avatar
      [SPARK-13423][WIP][CORE][SQL][STREAMING] Static analysis fixes for 2.x · e97fc7f1
      Sean Owen authored
      ## What changes were proposed in this pull request?
      
      Make some cross-cutting code improvements according to static analysis. These are individually up for discussion since they exist in separate commits that can be reverted. The changes are broadly:
      
      - Inner class should be static
      - Mismatched hashCode/equals
      - Overflow in compareTo
      - Unchecked warnings
      - Misuse of assert, vs junit.assert
      - get(a) + getOrElse(b) -> getOrElse(a,b)
      - Array/String .size -> .length (occasionally, -> .isEmpty / .nonEmpty) to avoid implicit conversions
      - Dead code
      - tailrec
      - exists(_ == ) -> contains find + nonEmpty -> exists filter + size -> count
      - reduce(_+_) -> sum map + flatten -> map
      
      The most controversial may be .size -> .length simply because of its size. It is intended to avoid implicits that might be expensive in some places.
      
      ## How was the this patch tested?
      
      Existing Jenkins unit tests.
      
      Author: Sean Owen <sowen@cloudera.com>
      
      Closes #11292 from srowen/SPARK-13423.
      e97fc7f1
  2. Feb 25, 2016
  3. Feb 22, 2016
    • Huaxin Gao's avatar
      [SPARK-13186][STREAMING] migrate away from SynchronizedMap · 8f35d3ea
      Huaxin Gao authored
      trait SynchronizedMap in package mutable is deprecated: Synchronization via traits is deprecated as it is inherently unreliable. Change to java.util.concurrent.ConcurrentHashMap instead.
      
      Author: Huaxin Gao <huaxing@us.ibm.com>
      
      Closes #11250 from huaxingao/spark__13186.
      8f35d3ea
  4. Feb 09, 2016
    • Holden Karau's avatar
      [SPARK-13165][STREAMING] Replace deprecated synchronizedBuffer in streaming · 159198ef
      Holden Karau authored
      Building with Scala 2.11 results in the warning trait SynchronizedBuffer in package mutable is deprecated: Synchronization via traits is deprecated as it is inherently unreliable. Consider java.util.concurrent.ConcurrentLinkedQueue as an alternative - we already use ConcurrentLinkedQueue elsewhere so lets replace it.
      
      Some notes about how behaviour is different for reviewers:
      The Seq from a SynchronizedBuffer that was implicitly converted would continue to receive updates - however when we do the same conversion explicitly on the ConcurrentLinkedQueue this isn't the case. Hence changing some of the (internal & test) APIs to pass an Iterable. toSeq is safe to use if there are no more updates.
      
      Author: Holden Karau <holden@us.ibm.com>
      Author: tedyu <yuzhihong@gmail.com>
      
      Closes #11067 from holdenk/SPARK-13165-replace-deprecated-synchronizedBuffer-in-streaming.
      159198ef
  5. Feb 07, 2016
  6. Jan 30, 2016
    • Josh Rosen's avatar
      [SPARK-6363][BUILD] Make Scala 2.11 the default Scala version · 289373b2
      Josh Rosen authored
      This patch changes Spark's build to make Scala 2.11 the default Scala version. To be clear, this does not mean that Spark will stop supporting Scala 2.10: users will still be able to compile Spark for Scala 2.10 by following the instructions on the "Building Spark" page; however, it does mean that Scala 2.11 will be the default Scala version used by our CI builds (including pull request builds).
      
      The Scala 2.11 compiler is faster than 2.10, so I think we'll be able to look forward to a slight speedup in our CI builds (it looks like it's about 2X faster for the Maven compile-only builds, for instance).
      
      After this patch is merged, I'll update Jenkins to add new compile-only jobs to ensure that Scala 2.10 compilation doesn't break.
      
      Author: Josh Rosen <joshrosen@databricks.com>
      
      Closes #10608 from JoshRosen/SPARK-6363.
      289373b2
  7. Jan 22, 2016
  8. Jan 20, 2016
    • Shixiong Zhu's avatar
      [SPARK-7799][SPARK-12786][STREAMING] Add "streaming-akka" project · b7d74a60
      Shixiong Zhu authored
      Include the following changes:
      
      1. Add "streaming-akka" project and org.apache.spark.streaming.akka.AkkaUtils for creating an actorStream
      2. Remove "StreamingContext.actorStream" and "JavaStreamingContext.actorStream"
      3. Update the ActorWordCount example and add the JavaActorWordCount example
      4. Make "streaming-zeromq" depend on "streaming-akka" and update the codes accordingly
      
      Author: Shixiong Zhu <shixiong@databricks.com>
      
      Closes #10744 from zsxwing/streaming-akka-2.
      b7d74a60
  9. Jan 11, 2016
  10. Jan 08, 2016
    • Josh Rosen's avatar
      [SPARK-4628][BUILD] Remove all non-Maven-Central repositories from build · 090d6913
      Josh Rosen authored
      This patch removes all non-Maven-central repositories from Spark's build, thereby avoiding any risk of future build-breaks due to us accidentally depending on an artifact which is not present in an immutable public Maven repository.
      
      I tested this by running
      
      ```
      build/mvn \
              -Phive \
              -Phive-thriftserver \
              -Pkinesis-asl \
              -Pspark-ganglia-lgpl \
              -Pyarn \
              dependency:go-offline
      ```
      
      inside of a fresh Ubuntu Docker container with no Ivy or Maven caches (I did a similar test for SBT).
      
      Author: Josh Rosen <joshrosen@databricks.com>
      
      Closes #10659 from JoshRosen/SPARK-4628.
      090d6913
    • Sean Owen's avatar
      [SPARK-12618][CORE][STREAMING][SQL] Clean up build warnings: 2.0.0 edition · b9c83533
      Sean Owen authored
      Fix most build warnings: mostly deprecated API usages. I'll annotate some of the changes below. CC rxin who is leading the charge to remove the deprecated APIs.
      
      Author: Sean Owen <sowen@cloudera.com>
      
      Closes #10570 from srowen/SPARK-12618.
      b9c83533
  11. Jan 07, 2016
    • Shixiong Zhu's avatar
      [SPARK-12510][STREAMING] Refactor ActorReceiver to support Java · c0c39750
      Shixiong Zhu authored
      This PR includes the following changes:
      
      1. Rename `ActorReceiver` to `ActorReceiverSupervisor`
      2. Remove `ActorHelper`
      3. Add a new `ActorReceiver` for Scala and `JavaActorReceiver` for Java
      4. Add `JavaActorWordCount` example
      
      Author: Shixiong Zhu <shixiong@databricks.com>
      
      Closes #10457 from zsxwing/java-actor-stream.
      c0c39750
  12. Jan 05, 2016
  13. Dec 31, 2015
  14. Dec 19, 2015
  15. Dec 08, 2015
  16. Dec 04, 2015
    • Shixiong Zhu's avatar
      [SPARK-12084][CORE] Fix codes that uses ByteBuffer.array incorrectly · 3af53e61
      Shixiong Zhu authored
      `ByteBuffer` doesn't guarantee all contents in `ByteBuffer.array` are valid. E.g, a ByteBuffer returned by `ByteBuffer.slice`. We should not use the whole content of `ByteBuffer` unless we know that's correct.
      
      This patch fixed all places that use `ByteBuffer.array` incorrectly.
      
      Author: Shixiong Zhu <shixiong@databricks.com>
      
      Closes #10083 from zsxwing/bytebuffer-array.
      3af53e61
    • Josh Rosen's avatar
      [SPARK-12112][BUILD] Upgrade to SBT 0.13.9 · b7204e1d
      Josh Rosen authored
      We should upgrade to SBT 0.13.9, since this is a requirement in order to use SBT's new Maven-style resolution features (which will be done in a separate patch, because it's blocked by some binary compatibility issues in the POM reader plugin).
      
      I also upgraded Scalastyle to version 0.8.0, which was necessary in order to fix a Scala 2.10.5 compatibility issue (see https://github.com/scalastyle/scalastyle/issues/156). The newer Scalastyle is slightly stricter about whitespace surrounding tokens, so I fixed the new style violations.
      
      Author: Josh Rosen <joshrosen@databricks.com>
      
      Closes #10112 from JoshRosen/upgrade-to-sbt-0.13.9.
      b7204e1d
  17. Dec 03, 2015
  18. Nov 30, 2015
  19. Nov 17, 2015
  20. Nov 13, 2015
  21. Nov 10, 2015
    • Tathagata Das's avatar
      [SPARK-11361][STREAMING] Show scopes of RDD operations inside... · 6600786d
      Tathagata Das authored
      [SPARK-11361][STREAMING] Show scopes of RDD operations inside DStream.foreachRDD and DStream.transform in DAG viz
      
      Currently, when a DStream sets the scope for RDD generated by it, that scope is not allowed to be overridden by the RDD operations. So in case of `DStream.foreachRDD`, all the RDDs generated inside the foreachRDD get the same scope - `foreachRDD  <time>`, as set by the `ForeachDStream`. So it is hard to debug generated RDDs in the RDD DAG viz in the Spark UI.
      
      This patch allows the RDD operations inside `DStream.transform` and `DStream.foreachRDD` to append their own scopes to the earlier DStream scope.
      
      I have also slightly tweaked how callsites are set such that the short callsite reflects the RDD operation name and line number. This tweak is necessary as callsites are not managed through scopes (which support nesting and overriding) and I didnt want to add another local property to control nesting and overriding of callsites.
      
      ## Before:
      ![image](https://cloud.githubusercontent.com/assets/663212/10808548/fa71c0c4-7da9-11e5-9af0-5737793a146f.png)
      
      ## After:
      ![image](https://cloud.githubusercontent.com/assets/663212/10808659/37bc45b6-7dab-11e5-8041-c20be6a9bc26.png)
      
      The code that was used to generate this is:
      ```
          val lines = ssc.socketTextStream(args(0), args(1).toInt, StorageLevel.MEMORY_AND_DISK_SER)
          val words = lines.flatMap(_.split(" "))
          val wordCounts = words.map(x => (x, 1)).reduceByKey(_ + _)
          wordCounts.foreachRDD { rdd =>
            val temp = rdd.map { _ -> 1 }.reduceByKey( _ + _)
            val temp2 = temp.map { _ -> 1}.reduceByKey(_ + _)
            val count = temp2.count
            println(count)
          }
      ```
      
      Note
      - The inner scopes of the RDD operations map/reduceByKey inside foreachRDD is visible
      - The short callsites of stages refers to the line number of the RDD ops rather than the same line number of foreachRDD in all three cases.
      
      Author: Tathagata Das <tathagata.das1565@gmail.com>
      
      Closes #9315 from tdas/SPARK-11361.
      6600786d
  22. Oct 24, 2015
  23. Oct 08, 2015
  24. Oct 07, 2015
  25. Sep 15, 2015
  26. Sep 12, 2015
  27. Sep 09, 2015
    • Luc Bourlier's avatar
      [SPARK-10227] fatal warnings with sbt on Scala 2.11 · c1bc4f43
      Luc Bourlier authored
      The bulk of the changes are on `transient` annotation on class parameter. Often the compiler doesn't generate a field for this parameters, so the the transient annotation would be unnecessary.
      But if the class parameter are used in methods, then fields are created. So it is safer to keep the annotations.
      
      The remainder are some potential bugs, and deprecated syntax.
      
      Author: Luc Bourlier <luc.bourlier@typesafe.com>
      
      Closes #8433 from skyluc/issue/sbt-2.11.
      c1bc4f43
  28. Aug 25, 2015
  29. Aug 24, 2015
    • Tathagata Das's avatar
      [SPARK-9791] [PACKAGE] Change private class to private class to prevent... · 7478c8b6
      Tathagata Das authored
      [SPARK-9791] [PACKAGE] Change private class to private class to prevent unnecessary classes from showing up in the docs
      
      In addition, some random cleanup of import ordering
      
      Author: Tathagata Das <tathagata.das1565@gmail.com>
      
      Closes #8387 from tdas/SPARK-9791 and squashes the following commits:
      
      67f3ee9 [Tathagata Das] Change private class to private[package] class to prevent them from showing up in the docs
      7478c8b6
    • zsxwing's avatar
      [SPARK-10168] [STREAMING] Fix the issue that maven publishes wrong artifact jars · 4e0395dd
      zsxwing authored
      This PR removed the `outputFile` configuration from pom.xml and updated `tests.py` to search jars for both sbt build and maven build.
      
      I ran ` mvn -Pkinesis-asl -DskipTests clean install` locally, and verified the jars in my local repository were correct. I also checked Python tests for maven build, and it passed all tests.
      
      Author: zsxwing <zsxwing@gmail.com>
      
      Closes #8373 from zsxwing/SPARK-10168 and squashes the following commits:
      
      e0b5818 [zsxwing] Fix the sbt build
      c697627 [zsxwing] Add the jar pathes to the exception message
      be1d8a5 [zsxwing] Fix the issue that maven publishes wrong artifact jars
      4e0395dd
  30. Aug 18, 2015
  31. Aug 12, 2015
Loading