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/24 20:35:53 UTC

[2/2] beam git commit: Expand SdkComponents Visibility

Expand SdkComponents Visibility

Make the register, toComponents, and create methods public.


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

Branch: refs/heads/master
Commit: 885758247d572447dc402a3ef2c45462223e88a2
Parents: 260c4fc
Author: Thomas Groh <tg...@google.com>
Authored: Thu Aug 24 09:39:31 2017 -0700
Committer: Thomas Groh <tg...@google.com>
Committed: Thu Aug 24 13:35:39 2017 -0700

----------------------------------------------------------------------
 .../beam/runners/core/construction/SdkComponents.java  | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/88575824/runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/SdkComponents.java
----------------------------------------------------------------------
diff --git a/runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/SdkComponents.java b/runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/SdkComponents.java
index 54d2e9d..c2267dd 100644
--- a/runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/SdkComponents.java
+++ b/runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/SdkComponents.java
@@ -50,7 +50,7 @@ public class SdkComponents {
   // TODO: Specify environments
 
   /** Create a new {@link SdkComponents} with no components. */
-  static SdkComponents create() {
+  public static SdkComponents create() {
     return new SdkComponents();
   }
 
@@ -69,7 +69,7 @@ public class SdkComponents {
    *
    * <p>All of the children must already be registered within this {@link SdkComponents}.
    */
-  String registerPTransform(
+  public String registerPTransform(
       AppliedPTransform<?, ?, ?> appliedPTransform, List<AppliedPTransform<?, ?, ?>> children)
       throws IOException {
     String name = getApplicationName(appliedPTransform);
@@ -118,7 +118,7 @@ public class SdkComponents {
    * ID for the {@link PCollection}. Multiple registrations of the same {@link PCollection} will
    * return the same unique ID.
    */
-  String registerPCollection(PCollection<?> pCollection) throws IOException {
+  public String registerPCollection(PCollection<?> pCollection) throws IOException {
     String existing = pCollectionIds.get(pCollection);
     if (existing != null) {
       return existing;
@@ -135,7 +135,8 @@ public class SdkComponents {
    * unique ID for the {@link WindowingStrategy}. Multiple registrations of the same {@link
    * WindowingStrategy} will return the same unique ID.
    */
-  String registerWindowingStrategy(WindowingStrategy<?, ?> windowingStrategy) throws IOException {
+  public String registerWindowingStrategy(WindowingStrategy<?, ?> windowingStrategy)
+      throws IOException {
     String existing = windowingStrategyIds.get(windowingStrategy);
     if (existing != null) {
       return existing;
@@ -162,7 +163,7 @@ public class SdkComponents {
    * #equals(Object)} and {@link #hashCode()} but incompatible binary formats are not considered the
    * same coder.
    */
-  String registerCoder(Coder<?> coder) throws IOException {
+  public String registerCoder(Coder<?> coder) throws IOException {
     String existing = coderIds.get(Equivalence.identity().wrap(coder));
     if (existing != null) {
       return existing;
@@ -191,7 +192,7 @@ public class SdkComponents {
    * PCollection PCollections}, and {@link PTransform PTransforms}.
    */
   @Experimental
-  RunnerApi.Components toComponents() {
+  public RunnerApi.Components toComponents() {
     return componentsBuilder.build();
   }
 }