Skip to content
Snippets Groups Projects
  1. Nov 09, 2015
  2. Nov 06, 2015
  3. Nov 05, 2015
    • jerryshao's avatar
      [SPARK-11457][STREAMING][YARN] Fix incorrect AM proxy filter conf recovery from checkpoint · 468ad0ae
      jerryshao authored
      Currently Yarn AM proxy filter configuration is recovered from checkpoint file when Spark Streaming application is restarted, which will lead to some unwanted behaviors:
      
      1. Wrong RM address if RM is redeployed from failure.
      2. Wrong proxyBase, since app id is updated, old app id for proxyBase is wrong.
      
      So instead of recovering from checkpoint file, these configurations should be reloaded each time when app started.
      
      This problem only exists in Yarn cluster mode, for Yarn client mode, these configurations will be updated with RPC message `AddWebUIFilter`.
      
      Please help to review tdas harishreedharan vanzin , thanks a lot.
      
      Author: jerryshao <sshao@hortonworks.com>
      
      Closes #9412 from jerryshao/SPARK-11457.
      468ad0ae
    • Sean Owen's avatar
      [SPARK-11440][CORE][STREAMING][BUILD] Declare rest of @Experimental items... · 6f81eae2
      Sean Owen authored
      [SPARK-11440][CORE][STREAMING][BUILD] Declare rest of @Experimental items non-experimental if they've existed since 1.2.0
      
      Remove `Experimental` annotations in core, streaming for items that existed in 1.2.0 or before. The changes are:
      
      * SparkContext
        * binary{Files,Records} : 1.2.0
        * submitJob : 1.0.0
      * JavaSparkContext
        * binary{Files,Records} : 1.2.0
      * DoubleRDDFunctions, JavaDoubleRDD
        * {mean,sum}Approx : 1.0.0
      * PairRDDFunctions, JavaPairRDD
        * sampleByKeyExact : 1.2.0
        * countByKeyApprox : 1.0.0
      * PairRDDFunctions
        * countApproxDistinctByKey : 1.1.0
      * RDD
        * countApprox, countByValueApprox, countApproxDistinct : 1.0.0
      * JavaRDDLike
        * countApprox : 1.0.0
      * PythonHadoopUtil.Converter : 1.1.0
      * PortableDataStream : 1.2.0 (related to binaryFiles)
      * BoundedDouble : 1.0.0
      * PartialResult : 1.0.0
      * StreamingContext, JavaStreamingContext
        * binaryRecordsStream : 1.2.0
      * HiveContext
        * analyze : 1.2.0
      
      Author: Sean Owen <sowen@cloudera.com>
      
      Closes #9396 from srowen/SPARK-11440.
      6f81eae2
  4. Oct 27, 2015
    • zsxwing's avatar
      [SPARK-11212][CORE][STREAMING] Make preferred locations support... · 9fbd75ab
      zsxwing authored
      [SPARK-11212][CORE][STREAMING] Make preferred locations support ExecutorCacheTaskLocation and update…
      
      … ReceiverTracker and ReceiverSchedulingPolicy to use it
      
      This PR includes the following changes:
      
      1. Add a new preferred location format, `executor_<host>_<executorID>` (e.g., "executor_localhost_2"), to support specifying the executor locations for RDD.
      2. Use the new preferred location format in `ReceiverTracker` to optimize the starting time of Receivers when there are multiple executors in a host.
      
      The goal of this PR is to enable the streaming scheduler to place receivers (which run as tasks) in specific executors. Basically, I want to have more control on the placement of the receivers such that they are evenly distributed among the executors. We tried to do this without changing the core scheduling logic. But it does not allow specifying particular executor as preferred location, only at the host level. So if there are two executors in the same host, and I want two receivers to run on them (one on each executor), I cannot specify that. Current code only specifies the host as preference, which may end up launching both receivers on the same executor. We try to work around it but restarting a receiver when it does not launch in the desired executor and hope that next time it will be started in the right one. But that cause lots of restarts, and delays in correctly launching the receiver.
      
      So this change, would allow the streaming scheduler to specify the exact executor as the preferred location. Also this is not exposed to the user, only the streaming scheduler uses this.
      
      Author: zsxwing <zsxwing@gmail.com>
      
      Closes #9181 from zsxwing/executor-location.
      9fbd75ab
    • Burak Yavuz's avatar
      [SPARK-11324][STREAMING] Flag for closing Write Ahead Logs after a write · 4f030b9e
      Burak Yavuz authored
      Currently the Write Ahead Log in Spark Streaming flushes data as writes need to be made. S3 does not support flushing of data, data is written once the stream is actually closed.
      In case of failure, the data for the last minute (default rolling interval) will not be properly written. Therefore we need a flag to close the stream after the write, so that we achieve read after write consistency.
      
      cc tdas zsxwing
      
      Author: Burak Yavuz <brkyvz@gmail.com>
      
      Closes #9285 from brkyvz/caw-wal.
      4f030b9e
    • maxwell's avatar
      [SPARK-5569][STREAMING] fix ObjectInputStreamWithLoader for supporting load array classes. · 17f49992
      maxwell authored
      When use Kafka DirectStream API to create checkpoint and restore saved checkpoint when restart,
      ClassNotFound exception would occur.
      
      The reason for this error is that ObjectInputStreamWithLoader extends the ObjectInputStream class and override its resolveClass method. But Instead of Using Class.forName(desc,false,loader), Spark uses loader.loadClass(desc) to instance the class, which do not works with array class.
      
      For example:
      Class.forName("[Lorg.apache.spark.streaming.kafka.OffsetRange.",false,loader) works well while loader.loadClass("[Lorg.apache.spark.streaming.kafka.OffsetRange") would throw an class not found exception.
      
      details of the difference between Class.forName and loader.loadClass can be found here.
      http://bugs.java.com/view_bug.do?bug_id=6446627
      
      Author: maxwell <maxwellzdm@gmail.com>
      Author: DEMING ZHU <deming.zhu@linecorp.com>
      
      Closes #8955 from maxwellzdm/master.
      17f49992
  5. Oct 25, 2015
    • Josh Rosen's avatar
      [SPARK-10984] Simplify *MemoryManager class structure · 85e654c5
      Josh Rosen authored
      This patch refactors the MemoryManager class structure. After #9000, Spark had the following classes:
      
      - MemoryManager
      - StaticMemoryManager
      - ExecutorMemoryManager
      - TaskMemoryManager
      - ShuffleMemoryManager
      
      This is fairly confusing. To simplify things, this patch consolidates several of these classes:
      
      - ShuffleMemoryManager and ExecutorMemoryManager were merged into MemoryManager.
      - TaskMemoryManager is moved into Spark Core.
      
      **Key changes and tasks**:
      
      - [x] Merge ExecutorMemoryManager into MemoryManager.
        - [x] Move pooling logic into Allocator.
      - [x] Move TaskMemoryManager from `spark-unsafe` to `spark-core`.
      - [x] Refactor the existing Tungsten TaskMemoryManager interactions so Tungsten code use only this and not both this and ShuffleMemoryManager.
      - [x] Refactor non-Tungsten code to use the TaskMemoryManager instead of ShuffleMemoryManager.
      - [x] Merge ShuffleMemoryManager into MemoryManager.
        - [x] Move code
        - [x] ~~Simplify 1/n calculation.~~ **Will defer to followup, since this needs more work.**
      - [x] Port ShuffleMemoryManagerSuite tests.
      - [x] Move classes from `unsafe` package to `memory` package.
      - [ ] Figure out how to handle the hacky use of the memory managers in HashedRelation's broadcast variable construction.
      - [x] Test porting and cleanup: several tests relied on mock functionality (such as `TestShuffleMemoryManager.markAsOutOfMemory`) which has been changed or broken during the memory manager consolidation
        - [x] AbstractBytesToBytesMapSuite
        - [x] UnsafeExternalSorterSuite
        - [x] UnsafeFixedWidthAggregationMapSuite
        - [x] UnsafeKVExternalSorterSuite
      
      **Compatiblity notes**:
      
      - This patch introduces breaking changes in `ExternalAppendOnlyMap`, which is marked as `DevloperAPI` (likely for legacy reasons): this class now cannot be used outside of a task.
      
      Author: Josh Rosen <joshrosen@databricks.com>
      
      Closes #9127 from JoshRosen/SPARK-10984.
      85e654c5
  6. Oct 19, 2015
    • zsxwing's avatar
      [SPARK-11063] [STREAMING] Change preferredLocations of Receiver's RDD to hosts... · 67582132
      zsxwing authored
      [SPARK-11063] [STREAMING] Change preferredLocations of Receiver's RDD to hosts rather than hostports
      
      The format of RDD's preferredLocations must be hostname but the format of Streaming Receiver's scheduling executors is hostport. So it doesn't work.
      
      This PR converts `schedulerExecutors` to `hosts` before creating Receiver's RDD.
      
      Author: zsxwing <zsxwing@gmail.com>
      
      Closes #9075 from zsxwing/SPARK-11063.
      67582132
  7. Oct 16, 2015
    • zsxwing's avatar
      [SPARK-11104] [STREAMING] Fix a deadlock in StreamingContex.stop · e1eef248
      zsxwing authored
      The following deadlock may happen if shutdownHook and StreamingContext.stop are running at the same time.
      ```
      Java stack information for the threads listed above:
      ===================================================
      "Thread-2":
      	at org.apache.spark.streaming.StreamingContext.stop(StreamingContext.scala:699)
      	- waiting to lock <0x00000005405a1680> (a org.apache.spark.streaming.StreamingContext)
      	at org.apache.spark.streaming.StreamingContext.org$apache$spark$streaming$StreamingContext$$stopOnShutdown(StreamingContext.scala:729)
      	at org.apache.spark.streaming.StreamingContext$$anonfun$start$1.apply$mcV$sp(StreamingContext.scala:625)
      	at org.apache.spark.util.SparkShutdownHook.run(ShutdownHookManager.scala:266)
      	at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(ShutdownHookManager.scala:236)
      	at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply(ShutdownHookManager.scala:236)
      	at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply(ShutdownHookManager.scala:236)
      	at org.apache.spark.util.Utils$.logUncaughtExceptions(Utils.scala:1697)
      	at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply$mcV$sp(ShutdownHookManager.scala:236)
      	at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply(ShutdownHookManager.scala:236)
      	at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply(ShutdownHookManager.scala:236)
      	at scala.util.Try$.apply(Try.scala:161)
      	at org.apache.spark.util.SparkShutdownHookManager.runAll(ShutdownHookManager.scala:236)
      	- locked <0x00000005405b6a00> (a org.apache.spark.util.SparkShutdownHookManager)
      	at org.apache.spark.util.SparkShutdownHookManager$$anon$2.run(ShutdownHookManager.scala:216)
      	at org.apache.hadoop.util.ShutdownHookManager$1.run(ShutdownHookManager.java:54)
      "main":
      	at org.apache.spark.util.SparkShutdownHookManager.remove(ShutdownHookManager.scala:248)
      	- waiting to lock <0x00000005405b6a00> (a org.apache.spark.util.SparkShutdownHookManager)
      	at org.apache.spark.util.ShutdownHookManager$.removeShutdownHook(ShutdownHookManager.scala:199)
      	at org.apache.spark.streaming.StreamingContext.stop(StreamingContext.scala:712)
      	- locked <0x00000005405a1680> (a org.apache.spark.streaming.StreamingContext)
      	at org.apache.spark.streaming.StreamingContext.stop(StreamingContext.scala:684)
      	- locked <0x00000005405a1680> (a org.apache.spark.streaming.StreamingContext)
      	at org.apache.spark.streaming.SessionByKeyBenchmark$.main(SessionByKeyBenchmark.scala:108)
      	at org.apache.spark.streaming.SessionByKeyBenchmark.main(SessionByKeyBenchmark.scala)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:680)
      	at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
      	at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
      	at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120)
      	at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
      ```
      
      This PR just moved `ShutdownHookManager.removeShutdownHook` out of `synchronized` to avoid deadlock.
      
      Author: zsxwing <zsxwing@gmail.com>
      
      Closes #9116 from zsxwing/stop-deadlock.
      e1eef248
    • zsxwing's avatar
      [SPARK-10974] [STREAMING] Add progress bar for output operation column and use... · 369d786f
      zsxwing authored
      [SPARK-10974] [STREAMING] Add progress bar for output operation column and use red dots for failed batches
      
      Screenshot:
      <img width="1363" alt="1" src="https://cloud.githubusercontent.com/assets/1000778/10342571/385d9340-6d4c-11e5-8e79-1fa4c3c98f81.png">
      
      Also fixed the description and duration for output operations that don't have spark jobs.
      <img width="1354" alt="2" src="https://cloud.githubusercontent.com/assets/1000778/10342775/4bd52a0e-6d4d-11e5-99bc-26265a9fc792.png">
      
      Author: zsxwing <zsxwing@gmail.com>
      
      Closes #9010 from zsxwing/output-op-progress-bar.
      369d786f
    • jerryshao's avatar
      [SPARK-11060] [STREAMING] Fix some potential NPE in DStream transformation · 43f5d1f3
      jerryshao authored
      This patch fixes:
      
      1. Guard out against NPEs in `TransformedDStream` when parent DStream returns None instead of empty RDD.
      2. Verify some input streams which will potentially return None.
      3. Add unit test to verify the behavior when input stream returns None.
      
      cc tdas , please help to review, thanks a lot :).
      
      Author: jerryshao <sshao@hortonworks.com>
      
      Closes #9070 from jerryshao/SPARK-11060.
      43f5d1f3
  8. Oct 14, 2015
  9. Oct 10, 2015
    • Jacker Hu's avatar
      [SPARK-10772] [STREAMING] [SCALA] NullPointerException when transform function... · a16396df
      Jacker Hu authored
      [SPARK-10772] [STREAMING] [SCALA] NullPointerException when transform function in DStream returns NULL
      
      Currently, the ```TransformedDStream``` will using ```Some(transformFunc(parentRDDs, validTime))``` as compute return value, when the ```transformFunc``` somehow returns null as return value, the followed operator will have NullPointerExeception.
      
      This fix uses the ```Option()``` instead of ```Some()``` to deal with the possible null value. When   ```transformFunc``` returns ```null```, the option will transform null to ```None```, the downstream can handle ```None``` correctly.
      
      NOTE (2015-09-25): The latest fix will check the return value of transform function, if it is ```NULL```, a spark exception will be thrown out
      
      Author: Jacker Hu <gt.hu.chang@gmail.com>
      Author: jhu-chang <gt.hu.chang@gmail.com>
      
      Closes #8881 from jhu-chang/Fix_Transform.
      a16396df
  10. Oct 08, 2015
    • Andrew Or's avatar
      [SPARK-10956] Common MemoryManager interface for storage and execution · 67fbecbf
      Andrew Or authored
      This patch introduces a `MemoryManager` that is the central arbiter of how much memory to grant to storage and execution. This patch is primarily concerned only with refactoring while preserving the existing behavior as much as possible.
      
      This is the first step away from the existing rigid separation of storage and execution memory, which has several major drawbacks discussed on the [issue](https://issues.apache.org/jira/browse/SPARK-10956). It is the precursor of a series of patches that will attempt to address those drawbacks.
      
      Author: Andrew Or <andrew@databricks.com>
      Author: Josh Rosen <joshrosen@databricks.com>
      Author: andrewor14 <andrew@databricks.com>
      
      Closes #9000 from andrewor14/memory-manager.
      67fbecbf
    • Hari Shreedharan's avatar
      [SPARK-10955] [STREAMING] Add a warning if dynamic allocation for Streaming applications · 09841290
      Hari Shreedharan authored
      Dynamic allocation can be painful for streaming apps and can lose data. Log a warning for streaming applications if dynamic allocation is enabled.
      
      Author: Hari Shreedharan <hshreedharan@apache.org>
      
      Closes #8998 from harishreedharan/ss-log-error and squashes the following commits:
      
      462b264 [Hari Shreedharan] Improve log message.
      2733d94 [Hari Shreedharan] Minor change to warning message.
      eaa48cc [Hari Shreedharan] Log a warning instead of failing the application if dynamic allocation is enabled.
      725f090 [Hari Shreedharan] Add config parameter to allow dynamic allocation if the user explicitly sets it.
      b3f9a95 [Hari Shreedharan] Disable dynamic allocation and kill app if it is enabled.
      a4a5212 [Hari Shreedharan] [streaming] SPARK-10955. Disable dynamic allocation for Streaming applications.
      09841290
  11. Oct 07, 2015
  12. Oct 06, 2015
  13. Oct 05, 2015
    • zsxwing's avatar
      [SPARK-10900] [STREAMING] Add output operation events to StreamingListener · be7c5ff1
      zsxwing authored
      Add output operation events to StreamingListener so as to implement the following UI features:
      
      1. Progress bar of a batch in the batch list.
      2. Be able to display output operation `description` and `duration` when there is no spark job in a Streaming job.
      
      Author: zsxwing <zsxwing@gmail.com>
      
      Closes #8958 from zsxwing/output-operation-events.
      be7c5ff1
  14. Oct 03, 2015
  15. Sep 24, 2015
  16. Sep 23, 2015
  17. Sep 21, 2015
    • Tathagata Das's avatar
      [SPARK-10649] [STREAMING] Prevent inheriting job group and irrelevant job... · 72869883
      Tathagata Das authored
      [SPARK-10649] [STREAMING] Prevent inheriting job group and irrelevant job description in streaming jobs
      
      The job group, and job descriptions information is passed through thread local properties, and get inherited by child threads. In case of spark streaming, the streaming jobs inherit these properties from the thread that called streamingContext.start(). This may not make sense.
      
      1. Job group: This is mainly used for cancelling a group of jobs together. It does not make sense to cancel streaming jobs like this, as the effect will be unpredictable. And its not a valid usecase any way, to cancel a streaming context, call streamingContext.stop()
      
      2. Job description: This is used to pass on nice text descriptions for jobs to show up in the UI. The job description of the thread that calls streamingContext.start() is not useful for all the streaming jobs, as it does not make sense for all of the streaming jobs to have the same description, and the description may or may not be related to streaming.
      
      The solution in this PR is meant for the Spark master branch, where local properties are inherited by cloning the properties. The job group and job description in the thread that starts the streaming scheduler are explicitly removed, so that all the subsequent child threads does not inherit them. Also, the starting is done in a new child thread, so that setting the job group and description for streaming, does not change those properties in the thread that called streamingContext.start().
      
      Author: Tathagata Das <tathagata.das1565@gmail.com>
      
      Closes #8781 from tdas/SPARK-10649.
      72869883
  18. Sep 15, 2015
  19. Sep 14, 2015
  20. Sep 12, 2015
  21. 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
  22. Sep 08, 2015
    • zsxwing's avatar
      [SPARK-10071] [STREAMING] Output a warning when writing QueueInputDStream and... · 820913f5
      zsxwing authored
      [SPARK-10071] [STREAMING] Output a warning when writing QueueInputDStream and throw a better exception when reading QueueInputDStream
      
      Output a warning when serializing QueueInputDStream rather than throwing an exception to allow unit tests use it. Moreover, this PR also throws an better exception when deserializing QueueInputDStream to make the user find out the problem easily. The previous exception is hard to understand: https://issues.apache.org/jira/browse/SPARK-8553
      
      Author: zsxwing <zsxwing@gmail.com>
      
      Closes #8624 from zsxwing/SPARK-10071 and squashes the following commits:
      
      847cfa8 [zsxwing] Output a warning when writing QueueInputDStream and throw a better exception when reading QueueInputDStream
      820913f5
  23. Sep 07, 2015
    • Reynold Xin's avatar
      [SPARK-9767] Remove ConnectionManager. · 5ffe752b
      Reynold Xin authored
      We introduced the Netty network module for shuffle in Spark 1.2, and has turned it on by default for 3 releases. The old ConnectionManager is difficult to maintain. If we merge the patch now, by the time it is released, it would be 1 yr for which ConnectionManager is off by default. It's time to remove it.
      
      Author: Reynold Xin <rxin@databricks.com>
      
      Closes #8161 from rxin/SPARK-9767.
      5ffe752b
  24. Sep 04, 2015
Loading