beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhalp...@apache.org
Subject [2/2] incubator-beam git commit: Checkstyle: require assignment operator on same line
Date Tue, 02 Aug 2016 16:51:44 GMT
Checkstyle: require assignment operator on same line


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

Branch: refs/heads/master
Commit: 203f2b7d6aa0c5894e67ba6b4252cd40525d91a9
Parents: bef1a69
Author: Dan Halperin <dhalperi@google.com>
Authored: Tue Aug 2 08:39:28 2016 -0700
Committer: Dan Halperin <dhalperi@google.com>
Committed: Tue Aug 2 09:51:27 2016 -0700

----------------------------------------------------------------------
 .../beam/runners/core/UnboundedReadFromBoundedSource.java    | 4 ++--
 .../org/apache/beam/runners/dataflow/DataflowRunner.java     | 8 ++++----
 .../internal/DataflowUnboundedReadFromBoundedSource.java     | 4 ++--
 sdks/java/build-tools/src/main/resources/beam/checkstyle.xml | 6 ++++++
 .../main/java/org/apache/beam/sdk/transforms/CombineFns.java | 4 ++--
 .../src/main/java/org/apache/beam/sdk/util/CoderUtils.java   | 4 ++--
 6 files changed, 18 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/203f2b7d/runners/core-java/src/main/java/org/apache/beam/runners/core/UnboundedReadFromBoundedSource.java
----------------------------------------------------------------------
diff --git a/runners/core-java/src/main/java/org/apache/beam/runners/core/UnboundedReadFromBoundedSource.java
b/runners/core-java/src/main/java/org/apache/beam/runners/core/UnboundedReadFromBoundedSource.java
index f54af3b..5821e73 100644
--- a/runners/core-java/src/main/java/org/apache/beam/runners/core/UnboundedReadFromBoundedSource.java
+++ b/runners/core-java/src/main/java/org/apache/beam/runners/core/UnboundedReadFromBoundedSource.java
@@ -144,8 +144,8 @@ public class UnboundedReadFromBoundedSource<T> extends PTransform<PInput,
PColle
               boundedSource);
           return ImmutableList.of(this);
         }
-        List<? extends BoundedSource<T>> splits
-            = boundedSource.splitIntoBundles(desiredBundleSize, options);
+        List<? extends BoundedSource<T>> splits =
+            boundedSource.splitIntoBundles(desiredBundleSize, options);
         if (splits == null) {
           LOG.warn("BoundedSource cannot split {}, skips the initial splits.", boundedSource);
           return ImmutableList.of(this);

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/203f2b7d/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 7191fe8..e7cc20e 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
@@ -213,10 +213,10 @@ public class DataflowRunner extends PipelineRunner<DataflowPipelineJob>
{
 
   // Default Docker container images that execute Dataflow worker harness, residing in Google
   // Container Registry, separately for Batch and Streaming.
-  public static final String BATCH_WORKER_HARNESS_CONTAINER_IMAGE
-      = "dataflow.gcr.io/v1beta3/beam-java-batch:beam-master-20160714";
-  public static final String STREAMING_WORKER_HARNESS_CONTAINER_IMAGE
-      = "dataflow.gcr.io/v1beta3/beam-java-streaming:beam-master-20160714";
+  public static final String BATCH_WORKER_HARNESS_CONTAINER_IMAGE =
+      "dataflow.gcr.io/v1beta3/beam-java-batch:beam-master-20160714";
+  public static final String STREAMING_WORKER_HARNESS_CONTAINER_IMAGE =
+      "dataflow.gcr.io/v1beta3/beam-java-streaming:beam-master-20160714";
 
   // The limit of CreateJob request size.
   private static final int CREATE_JOB_REQUEST_LIMIT_BYTES = 10 * 1024 * 1024;

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/203f2b7d/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/internal/DataflowUnboundedReadFromBoundedSource.java
----------------------------------------------------------------------
diff --git a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/internal/DataflowUnboundedReadFromBoundedSource.java
b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/internal/DataflowUnboundedReadFromBoundedSource.java
index 5e035bc..283f012 100644
--- a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/internal/DataflowUnboundedReadFromBoundedSource.java
+++ b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/internal/DataflowUnboundedReadFromBoundedSource.java
@@ -149,8 +149,8 @@ public class DataflowUnboundedReadFromBoundedSource<T> extends PTransform<PInput
               boundedSource);
           return ImmutableList.of(this);
         }
-        List<? extends BoundedSource<T>> splits
-            = boundedSource.splitIntoBundles(desiredBundleSize, options);
+        List<? extends BoundedSource<T>> splits =
+            boundedSource.splitIntoBundles(desiredBundleSize, options);
         if (splits == null) {
           LOG.warn("BoundedSource cannot split {}, skips the initial splits.", boundedSource);
           return ImmutableList.of(this);

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/203f2b7d/sdks/java/build-tools/src/main/resources/beam/checkstyle.xml
----------------------------------------------------------------------
diff --git a/sdks/java/build-tools/src/main/resources/beam/checkstyle.xml b/sdks/java/build-tools/src/main/resources/beam/checkstyle.xml
index eb09145..a437561 100644
--- a/sdks/java/build-tools/src/main/resources/beam/checkstyle.xml
+++ b/sdks/java/build-tools/src/main/resources/beam/checkstyle.xml
@@ -390,6 +390,12 @@ page at http://checkstyle.sourceforge.net/config.html -->
         NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR "/>
     </module>
 
+    <module name="OperatorWrap">
+      <!-- Checks that assignment operators are at the end of the line. -->
+      <property name="option" value="eol"/>
+      <property name="tokens" value="ASSIGN"/>
+    </module>
+
     <module name="ParenPad">
       <!-- Checks that there is no whitespace before close parens or after
            open parens.

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/203f2b7d/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/CombineFns.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/CombineFns.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/CombineFns.java
index d0a8909..f2ed5e1 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/CombineFns.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/CombineFns.java
@@ -503,8 +503,8 @@ public class CombineFns {
       this.extractInputFns = castedExtractInputFns;
 
       @SuppressWarnings({"rawtypes", "unchecked"})
-      List<CombineFnWithContext<Object, Object, Object>> castedCombineFnWithContexts
-          = (List) combineFnWithContexts;
+      List<CombineFnWithContext<Object, Object, Object>> castedCombineFnWithContexts
=
+          (List) combineFnWithContexts;
       this.combineFnWithContexts = castedCombineFnWithContexts;
 
       this.outputTags = outputTags;

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/203f2b7d/sdks/java/core/src/main/java/org/apache/beam/sdk/util/CoderUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/util/CoderUtils.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/util/CoderUtils.java
index 18afe09..520ba4a 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/util/CoderUtils.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/util/CoderUtils.java
@@ -64,8 +64,8 @@ public final class CoderUtils {
    */
   public static final String KIND_STREAM = "kind:stream";
 
-  private static ThreadLocal<SoftReference<ExposedByteArrayOutputStream>> threadLocalOutputStream
-      = new ThreadLocal<>();
+  private static ThreadLocal<SoftReference<ExposedByteArrayOutputStream>>
+      threadLocalOutputStream = new ThreadLocal<>();
 
   /**
    * If true, a call to {@code encodeToByteArray} is already on the call stack.


Mime
View raw message