You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by tg...@apache.org on 2017/08/14 21:28:12 UTC

[1/2] beam git commit: Throw an Exception if no files are found to stage

Repository: beam
Updated Branches:
  refs/heads/master b0b642182 -> 0f8e8dd70


Throw an Exception if no files are found to stage

We should always stage the user's JAR. If we don't find any files and
none were specified, then the pipeline will not execute, and this should
fail early rather than later.


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

Branch: refs/heads/master
Commit: e73ae399fcda37ad33dd0e1c04cf0eb3c0548473
Parents: b0b6421
Author: Kamil Szewczyk <sz...@gmail.com>
Authored: Mon Jul 17 13:54:10 2017 +0200
Committer: Thomas Groh <tg...@google.com>
Committed: Mon Aug 14 13:46:32 2017 -0700

----------------------------------------------------------------------
 .../apache/beam/runners/dataflow/DataflowRunner.java  | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/e73ae399/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowRunner.java
----------------------------------------------------------------------
diff --git a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowRunner.java b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowRunner.java
index 6999616..496681e 100644
--- a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowRunner.java
+++ b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowRunner.java
@@ -243,11 +243,15 @@ public class DataflowRunner extends PipelineRunner<DataflowPipelineJob> {
     if (dataflowOptions.getFilesToStage() == null) {
       dataflowOptions.setFilesToStage(detectClassPathResourcesToStage(
           DataflowRunner.class.getClassLoader()));
-      LOG.info("PipelineOptions.filesToStage was not specified. "
-          + "Defaulting to files from the classpath: will stage {} files. "
-          + "Enable logging at DEBUG level to see which files will be staged.",
-          dataflowOptions.getFilesToStage().size());
-      LOG.debug("Classpath elements: {}", dataflowOptions.getFilesToStage());
+      if (dataflowOptions.getFilesToStage().isEmpty()) {
+        throw new IllegalArgumentException("No files to stage has been found.");
+      } else {
+        LOG.info("PipelineOptions.filesToStage was not specified. "
+                        + "Defaulting to files from the classpath: will stage {} files. "
+                        + "Enable logging at DEBUG level to see which files will be staged.",
+                dataflowOptions.getFilesToStage().size());
+        LOG.debug("Classpath elements: {}", dataflowOptions.getFilesToStage());
+      }
     }
 
     // Verify jobName according to service requirements, truncating converting to lowercase if


[2/2] beam git commit: This closes #3572

Posted by tg...@apache.org.
This closes #3572


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

Branch: refs/heads/master
Commit: 0f8e8dd70da2e9d03f2266ee302ad75e586a55fe
Parents: b0b6421 e73ae39
Author: Thomas Groh <tg...@google.com>
Authored: Mon Aug 14 14:27:52 2017 -0700
Committer: Thomas Groh <tg...@google.com>
Committed: Mon Aug 14 14:27:52 2017 -0700

----------------------------------------------------------------------
 .../apache/beam/runners/dataflow/DataflowRunner.java  | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------