beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lc...@apache.org
Subject [12/13] beam git commit: Explicitly mark Coder context as experimental as well as deprecated.
Date Tue, 09 May 2017 04:21:32 GMT
Explicitly mark Coder context as experimental as well as deprecated.


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/fda3a43b
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/fda3a43b
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/fda3a43b

Branch: refs/heads/master
Commit: fda3a43be3277d0dca888cfa30693599d11cd5af
Parents: 43037a3
Author: Robert Bradshaw <robertwb@gmail.com>
Authored: Mon May 8 15:04:36 2017 -0700
Committer: Luke Cwik <lcwik@google.com>
Committed: Mon May 8 20:19:47 2017 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/beam/sdk/annotations/Experimental.java   | 3 +++
 .../java/core/src/main/java/org/apache/beam/sdk/coders/Coder.java | 3 +++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/fda3a43b/sdks/java/core/src/main/java/org/apache/beam/sdk/annotations/Experimental.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/annotations/Experimental.java
b/sdks/java/core/src/main/java/org/apache/beam/sdk/annotations/Experimental.java
index 7255a01..2e3a711 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/annotations/Experimental.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/annotations/Experimental.java
@@ -84,6 +84,9 @@ public @interface Experimental {
     /** Metrics-related experimental APIs. */
     METRICS,
 
+    /** Experimental feature related to alternative, unnested encodings for coders. */
+    CODER_CONTEXT,
+
     /** Experimental runner APIs. Should not be used by pipeline authors. */
     CORE_RUNNERS_ONLY,
 

http://git-wip-us.apache.org/repos/asf/beam/blob/fda3a43b/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/Coder.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/Coder.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/Coder.java
index ec8a72d..2ee532d 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/Coder.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/Coder.java
@@ -64,6 +64,7 @@ import org.apache.beam.sdk.values.TypeDescriptor;
 public abstract class Coder<T> implements Serializable {
   /** The context in which encoding or decoding is being done. */
   @Deprecated
+  @Experimental(Kind.CODER_CONTEXT)
   public static class Context {
     /**
      * The outer context: the value being encoded or decoded takes
@@ -134,6 +135,7 @@ public abstract class Coder<T> implements Serializable {
    * @throws CoderException if the value could not be encoded for some reason
    */
   @Deprecated
+  @Experimental(Kind.CODER_CONTEXT)
   public void encode(T value, OutputStream outStream, Context context)
       throws CoderException, IOException {
     encode(value, outStream);
@@ -158,6 +160,7 @@ public abstract class Coder<T> implements Serializable {
    * @throws CoderException if the value could not be decoded for some reason
    */
   @Deprecated
+  @Experimental(Kind.CODER_CONTEXT)
   public T decode(InputStream inStream, Context context)
       throws CoderException, IOException {
     return decode(inStream);


Mime
View raw message