You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by jk...@apache.org on 2017/12/06 00:29:48 UTC

[beam] 01/13: enforce fixed sharding

This is an automated email from the ASF dual-hosted git repository.

jkff pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git

commit 90402e4f21dbbf60ed498a67a5dfc3e276dcb07c
Author: Eugene Kirpichov <ki...@google.com>
AuthorDate: Wed Nov 15 18:06:39 2017 -0800

    enforce fixed sharding
---
 sdks/java/core/src/main/java/org/apache/beam/sdk/io/WriteFiles.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/WriteFiles.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/WriteFiles.java
index 8328d7b..c99abce 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/WriteFiles.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/WriteFiles.java
@@ -854,7 +854,8 @@ public class WriteFiles<UserT, DestinationT, OutputT>
         } else if (numShardsProvider != null) {
           fixedNumShards = numShardsProvider.get();
         } else {
-          fixedNumShards = null;
+          throw new IllegalStateException(
+              "When finalizing a windowed write, should have set fixed sharding");
         }
       }
     }

-- 
To stop receiving notification emails like this one, please contact
"commits@beam.apache.org" <co...@beam.apache.org>.