-
- Downloads
[SPARK-19646][CORE][STREAMING] binaryRecords replicates records in scala API
## What changes were proposed in this pull request? Use `BytesWritable.copyBytes`, not `getBytes`, because `getBytes` returns the underlying array, which may be reused when repeated reads don't need a different size, as is the case with binaryRecords APIs ## How was this patch tested? Existing tests Author: Sean Owen <sowen@cloudera.com> Closes #16974 from srowen/SPARK-19646. (cherry picked from commit d0ecca60) Signed-off-by:Sean Owen <sowen@cloudera.com>
Showing
- core/src/main/scala/org/apache/spark/SparkContext.scala 2 additions, 3 deletionscore/src/main/scala/org/apache/spark/SparkContext.scala
- core/src/test/scala/org/apache/spark/FileSuite.scala 38 additions, 140 deletionscore/src/test/scala/org/apache/spark/FileSuite.scala
- streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala 2 additions, 3 deletions...n/scala/org/apache/spark/streaming/StreamingContext.scala
- streaming/src/test/scala/org/apache/spark/streaming/InputStreamsSuite.scala 11 additions, 10 deletions.../scala/org/apache/spark/streaming/InputStreamsSuite.scala
Loading
Please register or sign in to comment