-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-19646][CORE][STREAMING] binaryRecords replicates records in scala API #16974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…he underlying array, which may be reused when repeated reads don't need a different size, as is the case with binaryRecords APIs
|
LGTM - pending jenkins |
|
Test build #73047 has finished for PR 16974 at commit
|
|
@srowen should we add a regression test? It seems weird that we didn't catch this in tests. |
|
Agreed, I fixed the tests to actually fix this, and generally cleaned up the relevant test code |
|
Test build #73056 has finished for PR 16974 at commit
|
|
Test build #3578 has finished for PR 16974 at commit
|
…ala 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 <[email protected]> Closes #16974 from srowen/SPARK-19646. (cherry picked from commit d0ecca6) Signed-off-by: Sean Owen <[email protected]>
…ala API 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 Existing tests Author: Sean Owen <[email protected]> Closes #16974 from srowen/SPARK-19646. (cherry picked from commit d0ecca6) Signed-off-by: Sean Owen <[email protected]>
|
Merged to master/2.1/2.0 as it's a reasonably important bug |
|
Oops, pick was clean into 2.1 but it actually resulted in an error: https://amplab.cs.berkeley.edu/jenkins/view/Spark%20QA%20Test%20(Dashboard)/job/spark-branch-2.1-test-sbt-hadoop-2.7/374/consoleFull Fixing now ... |
…ala 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 <[email protected]> Closes apache#16974 from srowen/SPARK-19646.
What changes were proposed in this pull request?
Use
BytesWritable.copyBytes, notgetBytes, becausegetBytesreturns the underlying array, which may be reused when repeated reads don't need a different size, as is the case with binaryRecords APIsHow was this patch tested?
Existing tests