You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by dh...@apache.org on 2016/03/05 00:23:55 UTC
[1/3] incubator-beam git commit: [BEAM-95] Add dependency explicitly
to SDK pom
Repository: incubator-beam
Updated Branches:
refs/heads/master 5fe73eee2 -> 9be294458
[BEAM-95] Add dependency explicitly to SDK pom
Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/a0f08bef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/a0f08bef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/a0f08bef
Branch: refs/heads/master
Commit: a0f08befd4913885305a5e01a421f57b61e00072
Parents: aa1d7e5
Author: Luke Cwik <lc...@google.com>
Authored: Fri Mar 4 10:15:59 2016 -0800
Committer: Dan Halperin <dh...@google.com>
Committed: Fri Mar 4 15:16:29 2016 -0800
----------------------------------------------------------------------
sdk/pom.xml | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/a0f08bef/sdk/pom.xml
----------------------------------------------------------------------
diff --git a/sdk/pom.xml b/sdk/pom.xml
index c49c175..5c6553b 100644
--- a/sdk/pom.xml
+++ b/sdk/pom.xml
@@ -720,6 +720,12 @@
</dependency>
<dependency>
+ <groupId>org.xerial.snappy</groupId>
+ <artifactId>snappy-java</artifactId>
+ <version>1.1.2.1</version>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.9</version>
[3/3] incubator-beam git commit: Closes #22
Posted by dh...@apache.org.
Closes #22
Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/9be29445
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/9be29445
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/9be29445
Branch: refs/heads/master
Commit: 9be29445835ee32a40edb9838d8e2b8b8f8297d9
Parents: 5fe73ee a0f08be
Author: Dan Halperin <dh...@google.com>
Authored: Fri Mar 4 15:17:10 2016 -0800
Committer: Dan Halperin <dh...@google.com>
Committed: Fri Mar 4 15:17:10 2016 -0800
----------------------------------------------------------------------
sdk/pom.xml | 6 ++++++
.../com/google/cloud/dataflow/sdk/util/SerializableUtils.java | 7 +++++--
2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
[2/3] incubator-beam git commit: [BEAM-95] Use snappy compression on
objects serialized via SerializableUtils
Posted by dh...@apache.org.
[BEAM-95] Use snappy compression on objects serialized via SerializableUtils
Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/aa1d7e5d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/aa1d7e5d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/aa1d7e5d
Branch: refs/heads/master
Commit: aa1d7e5dfe0737fa4fd0be21d9b097b6f12f9794
Parents: 5fe73ee
Author: Luke Cwik <lc...@google.com>
Authored: Fri Mar 4 10:13:15 2016 -0800
Committer: Dan Halperin <dh...@google.com>
Committed: Fri Mar 4 15:16:29 2016 -0800
----------------------------------------------------------------------
.../com/google/cloud/dataflow/sdk/util/SerializableUtils.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/aa1d7e5d/sdk/src/main/java/com/google/cloud/dataflow/sdk/util/SerializableUtils.java
----------------------------------------------------------------------
diff --git a/sdk/src/main/java/com/google/cloud/dataflow/sdk/util/SerializableUtils.java b/sdk/src/main/java/com/google/cloud/dataflow/sdk/util/SerializableUtils.java
index cacba0e..501b430 100644
--- a/sdk/src/main/java/com/google/cloud/dataflow/sdk/util/SerializableUtils.java
+++ b/sdk/src/main/java/com/google/cloud/dataflow/sdk/util/SerializableUtils.java
@@ -23,6 +23,9 @@ import com.google.cloud.dataflow.sdk.coders.Coder;
import com.google.cloud.dataflow.sdk.coders.CoderException;
import com.google.common.base.Preconditions;
+import org.xerial.snappy.SnappyInputStream;
+import org.xerial.snappy.SnappyOutputStream;
+
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -43,7 +46,7 @@ public class SerializableUtils {
public static byte[] serializeToByteArray(Serializable value) {
try {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
- try (ObjectOutputStream oos = new ObjectOutputStream(buffer)) {
+ try (ObjectOutputStream oos = new ObjectOutputStream(new SnappyOutputStream(buffer))) {
oos.writeObject(value);
}
return buffer.toByteArray();
@@ -66,7 +69,7 @@ public class SerializableUtils {
String description) {
try {
try (ObjectInputStream ois = new ObjectInputStream(
- new ByteArrayInputStream(encodedValue))) {
+ new SnappyInputStream(new ByteArrayInputStream(encodedValue)))) {
return ois.readObject();
}
} catch (IOException | ClassNotFoundException exn) {