You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@parquet.apache.org by bl...@apache.org on 2016/04/26 00:05:17 UTC
parquet-mr git commit: PARQUET-560: Synchronize writes to the
finishCalled variable
Repository: parquet-mr
Updated Branches:
refs/heads/master 2f22533ef -> 39a3cd0f4
PARQUET-560: Synchronize writes to the finishCalled variable
Reads of the `finishCalled` variable are properly synchronized, but writes are not -- so there's some sort of inconsistent synch. going on here. This PR fixes that.
/cc @rdblue can you please take a look?
Author: Nezih Yigitbasi <ny...@netflix.com>
Closes #334 from nezihyigitbasi/sc-synch-fix and squashes the following commits:
a85cf0c [Nezih Yigitbasi] Synchronize writes to the finishCalled variable
Project: http://git-wip-us.apache.org/repos/asf/parquet-mr/repo
Commit: http://git-wip-us.apache.org/repos/asf/parquet-mr/commit/39a3cd0f
Tree: http://git-wip-us.apache.org/repos/asf/parquet-mr/tree/39a3cd0f
Diff: http://git-wip-us.apache.org/repos/asf/parquet-mr/diff/39a3cd0f
Branch: refs/heads/master
Commit: 39a3cd0f4210dbec1ae8ef39a87d34b76eac91a3
Parents: 2f22533
Author: Nezih Yigitbasi <ny...@netflix.com>
Authored: Mon Apr 25 15:05:11 2016 -0700
Committer: Ryan Blue <bl...@apache.org>
Committed: Mon Apr 25 15:05:11 2016 -0700
----------------------------------------------------------------------
.../java/org/apache/parquet/hadoop/codec/SnappyCompressor.java | 2 +-
pom.xml | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/39a3cd0f/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/codec/SnappyCompressor.java
----------------------------------------------------------------------
diff --git a/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/codec/SnappyCompressor.java b/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/codec/SnappyCompressor.java
index f099896..d0270ca 100644
--- a/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/codec/SnappyCompressor.java
+++ b/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/codec/SnappyCompressor.java
@@ -113,7 +113,7 @@ public class SnappyCompressor implements Compressor {
}
@Override
- public void finish() {
+ public synchronized void finish() {
finishCalled = true;
}
http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/39a3cd0f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 9314a53..512bf37 100644
--- a/pom.xml
+++ b/pom.xml
@@ -245,6 +245,7 @@
<exclude>org/apache/parquet/avro/SpecificDataSupplier</exclude> <!-- made public -->
<exclude>org/apache/parquet/io/ColumnIOFactory$ColumnIOCreatorVisitor</exclude> <!-- removed non-API class -->
<exclude>org/apache/parquet/io/ColumnIOFactory/**</exclude> <!-- removed non-API class and methods-->
+ <exclude>org/apache/parquet/hadoop/codec/SnappyCompressor</exclude> <!-- added synchronized modifier -->
</excludes>
</requireBackwardCompatibility>
</rules>