beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [1/6] beam git commit: Removes unused validation parameter
Date Tue, 18 Apr 2017 21:21:27 GMT
Repository: beam
Updated Branches:
  refs/heads/master 0be61dbb5 -> 3076c8695


Removes unused validation parameter


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

Branch: refs/heads/master
Commit: 88ae3b7911e4e634e4c13996572ea61cf2de71b2
Parents: b77b6fb
Author: Eugene Kirpichov <kirpichov@google.com>
Authored: Tue Apr 18 14:03:13 2017 -0700
Committer: Eugene Kirpichov <kirpichov@google.com>
Committed: Tue Apr 18 14:03:42 2017 -0700

----------------------------------------------------------------------
 .../java/org/apache/beam/sdk/io/TFRecordIO.java  | 19 -------------------
 .../org/apache/beam/sdk/io/TFRecordIOTest.java   |  4 +---
 2 files changed, 1 insertion(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/88ae3b79/sdks/java/core/src/main/java/org/apache/beam/sdk/io/TFRecordIO.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/TFRecordIO.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/TFRecordIO.java
index 2e01a80..748086d 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/TFRecordIO.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/TFRecordIO.java
@@ -75,7 +75,6 @@ public class TFRecordIO {
     return new AutoValue_TFRecordIO_Write.Builder()
         .setFilenameSuffix("")
         .setNumShards(0)
-        .setValidate(true)
         .setShardTemplate(Write.DEFAULT_SHARD_TEMPLATE)
         .setCompressionType(CompressionType.NONE)
         .build();
@@ -237,9 +236,6 @@ public class TFRecordIO {
     /** The shard template of each file written, combined with prefix and suffix. */
     abstract String getShardTemplate();
 
-    /** An option to indicate if output validation is desired. Default is true. */
-    abstract boolean getValidate();
-
     /** Option to indicate the output sink's compression type. Default is NONE. */
     abstract CompressionType getCompressionType();
 
@@ -255,8 +251,6 @@ public class TFRecordIO {
 
       abstract Builder setShardTemplate(String shardTemplate);
 
-      abstract Builder setValidate(boolean validate);
-
       abstract Builder setCompressionType(CompressionType compressionType);
 
       abstract Write build();
@@ -334,17 +328,6 @@ public class TFRecordIO {
     }
 
     /**
-     * Disables GCS output path validation on pipeline creation.
-     *
-     * <p>This can be useful in the case where the GCS output location does
-     * not exist at the pipeline creation time, but is expected to be
-     * available at execution time.
-     */
-    public Write withoutValidation() {
-      return toBuilder().setValidate(false).build();
-    }
-
-    /**
      * Writes to output files using the specified compression type.
      *
      * <p>If no compression type is specified, the default is
@@ -388,8 +371,6 @@ public class TFRecordIO {
           .addIfNotDefault(DisplayData.item("shardNameTemplate", getShardTemplate())
                   .withLabel("Output Shard Name Template"),
               DEFAULT_SHARD_TEMPLATE)
-          .addIfNotDefault(DisplayData.item("validation", getValidate())
-              .withLabel("Validation Enabled"), true)
           .addIfNotDefault(DisplayData.item("numShards", getNumShards())
               .withLabel("Maximum Output Shards"), 0)
           .add(DisplayData

http://git-wip-us.apache.org/repos/asf/beam/blob/88ae3b79/sdks/java/core/src/test/java/org/apache/beam/sdk/io/TFRecordIOTest.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/test/java/org/apache/beam/sdk/io/TFRecordIOTest.java b/sdks/java/core/src/test/java/org/apache/beam/sdk/io/TFRecordIOTest.java
index 9511c2a..ae3a50d 100644
--- a/sdks/java/core/src/test/java/org/apache/beam/sdk/io/TFRecordIOTest.java
+++ b/sdks/java/core/src/test/java/org/apache/beam/sdk/io/TFRecordIOTest.java
@@ -163,8 +163,7 @@ public class TFRecordIOTest {
         .withSuffix("bar")
         .withShardNameTemplate("-SS-of-NN-")
         .withNumShards(100)
-        .withCompressionType(GZIP)
-        .withoutValidation();
+        .withCompressionType(GZIP);
 
     DisplayData displayData = DisplayData.from(write);
 
@@ -173,7 +172,6 @@ public class TFRecordIOTest {
     assertThat(displayData, hasDisplayItem("shardNameTemplate", "-SS-of-NN-"));
     assertThat(displayData, hasDisplayItem("numShards", 100));
     assertThat(displayData, hasDisplayItem("compressionType", GZIP.toString()));
-    assertThat(displayData, hasDisplayItem("validation", false));
   }
 
   @Test


Mime
View raw message