[ 
https://issues.apache.org/jira/browse/BEAM-2885?focusedWorklogId=105774&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-105774
 ]

ASF GitHub Bot logged work on BEAM-2885:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 24/May/18 23:20
            Start Date: 24/May/18 23:20
    Worklog Time Spent: 10m 
      Work Description: tgroh closed pull request #5370: [BEAM-2885] Move the 
ReferenceRunner Job Service, Artifact Services to the DirectRunner module
URL: https://github.com/apache/beam/pull/5370
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/runners/direct-java/build.gradle b/runners/direct-java/build.gradle
index af99b5b5bc2..893f21149b5 100644
--- a/runners/direct-java/build.gradle
+++ b/runners/direct-java/build.gradle
@@ -64,6 +64,7 @@ dependencies {
   shadow library.java.slf4j_api
   shadow library.java.hamcrest_core
   shadow library.java.junit
+  shadow library.java.args4j
   testRuntime project(path: ":beam-sdks-java-harness")
   shadowTest project(path: ":beam-sdks-java-core", configuration: "shadowTest")
   shadowTest project(path: ":beam-runners-core-java", configuration: 
"shadowTest")
diff --git 
a/runners/local-artifact-service-java/src/main/java/org/apache/beam/artifact/local/LocalArtifactStagingLocation.java
 
b/runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/artifact/LocalArtifactStagingLocation.java
similarity index 97%
rename from 
runners/local-artifact-service-java/src/main/java/org/apache/beam/artifact/local/LocalArtifactStagingLocation.java
rename to 
runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/artifact/LocalArtifactStagingLocation.java
index e11125f75a3..146a091fbbe 100644
--- 
a/runners/local-artifact-service-java/src/main/java/org/apache/beam/artifact/local/LocalArtifactStagingLocation.java
+++ 
b/runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/artifact/LocalArtifactStagingLocation.java
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package org.apache.beam.artifact.local;
+package org.apache.beam.runners.direct.portable.artifact;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkState;
@@ -29,7 +29,7 @@
  * A location where the results of an {@link 
LocalFileSystemArtifactStagerService} are stored and
  * where the retrieval service retrieves them from.
  */
-public class LocalArtifactStagingLocation {
+class LocalArtifactStagingLocation {
   /**
    * Create a new {@link LocalArtifactStagingLocation} rooted at the specified 
location, creating
    * any directories or subdirectories as necessary.
diff --git 
a/runners/local-artifact-service-java/src/main/java/org/apache/beam/artifact/local/LocalFileSystemArtifactRetrievalService.java
 
b/runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/artifact/LocalFileSystemArtifactRetrievalService.java
similarity index 98%
rename from 
runners/local-artifact-service-java/src/main/java/org/apache/beam/artifact/local/LocalFileSystemArtifactRetrievalService.java
rename to 
runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/artifact/LocalFileSystemArtifactRetrievalService.java
index 73afcdcba96..7372ce7fb39 100644
--- 
a/runners/local-artifact-service-java/src/main/java/org/apache/beam/artifact/local/LocalFileSystemArtifactRetrievalService.java
+++ 
b/runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/artifact/LocalFileSystemArtifactRetrievalService.java
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package org.apache.beam.artifact.local;
+package org.apache.beam.runners.direct.portable.artifact;
 
 import com.google.protobuf.ByteString;
 import io.grpc.Status;
diff --git 
a/runners/local-artifact-service-java/src/main/java/org/apache/beam/artifact/local/LocalFileSystemArtifactStagerService.java
 
b/runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/artifact/LocalFileSystemArtifactStagerService.java
similarity index 95%
rename from 
runners/local-artifact-service-java/src/main/java/org/apache/beam/artifact/local/LocalFileSystemArtifactStagerService.java
rename to 
runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/artifact/LocalFileSystemArtifactStagerService.java
index 049d6147633..6e72737bb84 100644
--- 
a/runners/local-artifact-service-java/src/main/java/org/apache/beam/artifact/local/LocalFileSystemArtifactStagerService.java
+++ 
b/runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/artifact/LocalFileSystemArtifactStagerService.java
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package org.apache.beam.artifact.local;
+package org.apache.beam.runners.direct.portable.artifact;
 
 import static com.google.common.base.Preconditions.checkState;
 
@@ -45,7 +45,7 @@
   private static final Logger LOG =
       LoggerFactory.getLogger(LocalFileSystemArtifactStagerService.class);
 
-  public static LocalFileSystemArtifactStagerService withRootDirectory(File 
base) {
+  public static LocalFileSystemArtifactStagerService forRootDirectory(File 
base) {
     return new LocalFileSystemArtifactStagerService(base);
   }
 
@@ -207,9 +207,13 @@ private FileWritingObserver(
     public void onNext(ArtifactApi.PutArtifactRequest value) {
       try {
         if (value.getData() == null) {
-          StatusRuntimeException e = 
Status.INVALID_ARGUMENT.withDescription(String.format(
-              "Expected all chunks in the current stream state to contain 
data, got %s",
-              value.getContentCase())).asRuntimeException();
+          StatusRuntimeException e =
+              Status.INVALID_ARGUMENT
+                  .withDescription(
+                      String.format(
+                          "Expected all chunks in the current stream state to 
contain data, got %s",
+                          value.getContentCase()))
+                  .asRuntimeException();
           throw e;
         }
         value.getData().getData().writeTo(target);
diff --git 
a/runners/local-artifact-service-java/src/main/java/org/apache/beam/artifact/local/package-info.java
 
b/runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/artifact/package-info.java
similarity index 86%
rename from 
runners/local-artifact-service-java/src/main/java/org/apache/beam/artifact/local/package-info.java
rename to 
runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/artifact/package-info.java
index 17d0943b533..1ec0da5b888 100644
--- 
a/runners/local-artifact-service-java/src/main/java/org/apache/beam/artifact/local/package-info.java
+++ 
b/runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/artifact/package-info.java
@@ -16,7 +16,5 @@
  * limitations under the License.
  */
 
-/**
- * Provides local implementations of the Artifact API services.
- */
-package org.apache.beam.artifact.local;
+/** Provides local implementations of the Artifact API services. */
+package org.apache.beam.runners.direct.portable.artifact;
diff --git 
a/runners/reference/job-server/src/main/java/org/apache/beam/runners/reference/job/PreparingJob.java
 
b/runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/job/PreparingJob.java
similarity index 92%
rename from 
runners/reference/job-server/src/main/java/org/apache/beam/runners/reference/job/PreparingJob.java
rename to 
runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/job/PreparingJob.java
index 5d441fed0df..2007619a628 100644
--- 
a/runners/reference/job-server/src/main/java/org/apache/beam/runners/reference/job/PreparingJob.java
+++ 
b/runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/job/PreparingJob.java
@@ -16,13 +16,13 @@
  * limitations under the License.
  */
 
-package org.apache.beam.runners.reference.job;
+package org.apache.beam.runners.direct.portable.job;
 
 import com.google.auto.value.AutoValue;
 import com.google.protobuf.Struct;
 import java.nio.file.Path;
-import org.apache.beam.artifact.local.LocalFileSystemArtifactStagerService;
 import org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline;
+import 
org.apache.beam.runners.direct.portable.artifact.LocalFileSystemArtifactStagerService;
 import org.apache.beam.runners.fnexecution.GrpcFnServer;
 
 /** A Job with a {@code prepare} call but no corresponding {@code run} call. */
@@ -33,8 +33,11 @@ public static Builder builder() {
   }
 
   abstract Pipeline getPipeline();
+
   abstract Struct getOptions();
+
   abstract Path getStagingLocation();
+
   abstract GrpcFnServer<LocalFileSystemArtifactStagerService> 
getArtifactStagingServer();
 
   @Override
diff --git 
a/runners/reference/job-server/src/main/java/org/apache/beam/runners/reference/job/ReferenceRunnerJobServer.java
 
b/runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/job/ReferenceRunnerJobServer.java
similarity index 72%
rename from 
runners/reference/job-server/src/main/java/org/apache/beam/runners/reference/job/ReferenceRunnerJobServer.java
rename to 
runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/job/ReferenceRunnerJobServer.java
index 494eaf22ff7..7b5258bdb07 100644
--- 
a/runners/reference/job-server/src/main/java/org/apache/beam/runners/reference/job/ReferenceRunnerJobServer.java
+++ 
b/runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/job/ReferenceRunnerJobServer.java
@@ -15,9 +15,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.beam.runners.direct.portable.job;
 
-package org.apache.beam.runners.reference.job;
-
+import java.io.IOException;
 import org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor;
 import org.apache.beam.runners.fnexecution.GrpcFnServer;
 import org.apache.beam.runners.fnexecution.ServerFactory;
@@ -49,31 +49,40 @@ private static void printUsage(CmdLineParser parser) {
     System.err.println();
   }
 
-  private static void runServer(ServerConfiguration configuration)
-      throws Exception {
+  private static void runServer(ServerConfiguration configuration) throws 
Exception {
     ServerFactory serverFactory = ServerFactory.createDefault();
     ReferenceRunnerJobService service = 
ReferenceRunnerJobService.create(serverFactory);
     try (GrpcFnServer<ReferenceRunnerJobService> server =
-        GrpcFnServer.create(
-            service,
-            ApiServiceDescriptor.newBuilder().setUrl("localhost:" + 
configuration.port).build(),
-            serverFactory)) {
+        createServer(configuration, serverFactory, service)) {
       System.out.println(
           String.format(
-              "Started %s on port %s",
-              ReferenceRunnerJobService.class.getSimpleName(), 
configuration.port));
+              "Started %s at %s",
+              ReferenceRunnerJobService.class.getSimpleName(),
+              server.getApiServiceDescriptor().getUrl()));
       server.getServer().awaitTermination();
     }
     System.out.println("Server shut down, exiting");
   }
 
+  private static GrpcFnServer<ReferenceRunnerJobService> createServer(
+      ServerConfiguration configuration,
+      ServerFactory serverFactory,
+      ReferenceRunnerJobService service)
+      throws IOException {
+    if (configuration.port < 0) {
+      return GrpcFnServer.allocatePortAndCreateFor(service, serverFactory);
+    }
+    return GrpcFnServer.create(
+        service,
+        ApiServiceDescriptor.newBuilder().setUrl("localhost:" + 
configuration.port).build(),
+        serverFactory);
+  }
+
   private static class ServerConfiguration {
     @Option(
-      name = "-p",
-      aliases = {"--port"},
-      required = true,
-      usage = "The local port to expose the server on"
-    )
+        name = "-p",
+        aliases = {"--port"},
+        usage = "The local port to expose the server on")
     private int port = -1;
   }
 }
diff --git 
a/runners/reference/job-server/src/main/java/org/apache/beam/runners/reference/job/ReferenceRunnerJobService.java
 
b/runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/job/ReferenceRunnerJobService.java
similarity index 92%
rename from 
runners/reference/job-server/src/main/java/org/apache/beam/runners/reference/job/ReferenceRunnerJobService.java
rename to 
runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/job/ReferenceRunnerJobService.java
index 97461007f75..274088e8ca2 100644
--- 
a/runners/reference/job-server/src/main/java/org/apache/beam/runners/reference/job/ReferenceRunnerJobService.java
+++ 
b/runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/job/ReferenceRunnerJobService.java
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package org.apache.beam.runners.reference.job;
+package org.apache.beam.runners.direct.portable.job;
 
 import static com.google.common.base.Preconditions.checkArgument;
 
@@ -30,7 +30,6 @@
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.ThreadLocalRandom;
-import org.apache.beam.artifact.local.LocalFileSystemArtifactStagerService;
 import org.apache.beam.model.jobmanagement.v1.JobApi;
 import org.apache.beam.model.jobmanagement.v1.JobApi.CancelJobRequest;
 import org.apache.beam.model.jobmanagement.v1.JobApi.CancelJobResponse;
@@ -40,10 +39,10 @@
 import org.apache.beam.model.jobmanagement.v1.JobApi.RunJobRequest;
 import org.apache.beam.model.jobmanagement.v1.JobApi.RunJobResponse;
 import 
org.apache.beam.model.jobmanagement.v1.JobServiceGrpc.JobServiceImplBase;
+import 
org.apache.beam.runners.direct.portable.artifact.LocalFileSystemArtifactStagerService;
 import org.apache.beam.runners.fnexecution.FnService;
 import org.apache.beam.runners.fnexecution.GrpcFnServer;
 import org.apache.beam.runners.fnexecution.ServerFactory;
-import org.apache.beam.runners.reference.ReferenceRunner;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -52,8 +51,7 @@
   private static final Logger LOG = 
LoggerFactory.getLogger(ReferenceRunnerJobService.class);
 
   public static ReferenceRunnerJobService create(final ServerFactory 
serverFactory) {
-    return new ReferenceRunnerJobService(
-        serverFactory, filesTempDirectory());
+    return new ReferenceRunnerJobService(serverFactory, filesTempDirectory());
   }
 
   private final ServerFactory serverFactory;
@@ -110,7 +108,7 @@ public void prepare(
   private GrpcFnServer<LocalFileSystemArtifactStagerService> 
createArtifactStagingService()
       throws Exception {
     LocalFileSystemArtifactStagerService service =
-        
LocalFileSystemArtifactStagerService.withRootDirectory(stagingPathSupplier.call().toFile());
+        
LocalFileSystemArtifactStagerService.forRootDirectory(stagingPathSupplier.call().toFile());
     return GrpcFnServer.allocatePortAndCreateFor(service, serverFactory);
   }
 
@@ -134,9 +132,6 @@ public void run(
       } catch (Exception e) {
         responseObserver.onError(e);
       }
-      // TODO: Return a real java 'job handle'; this gets used in getState, 
cancel, etc
-      ReferenceRunner.run(
-          preparingJob.getPipeline(), preparingJob.getOptions(), 
preparingJob.getStagingLocation());
       String jobId = preparingJob + 
Integer.toString(ThreadLocalRandom.current().nextInt());
       
responseObserver.onNext(RunJobResponse.newBuilder().setJobId(jobId).build());
       responseObserver.onCompleted();
diff --git 
a/runners/reference/job-server/src/main/java/org/apache/beam/runners/reference/job/package-info.java
 
b/runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/job/package-info.java
similarity index 94%
rename from 
runners/reference/job-server/src/main/java/org/apache/beam/runners/reference/job/package-info.java
rename to 
runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/job/package-info.java
index b6022d9c957..9de085b3e82 100644
--- 
a/runners/reference/job-server/src/main/java/org/apache/beam/runners/reference/job/package-info.java
+++ 
b/runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/job/package-info.java
@@ -20,4 +20,4 @@
  * An execution engine for Beam Pipelines that uses the Java Runner harness 
and the Fn API to
  * execute.
  */
-package org.apache.beam.runners.reference.job;
+package org.apache.beam.runners.direct.portable.job;
diff --git 
a/runners/direct-java/src/test/java/org/apache/beam/runners/direct/DirectRunnerApiSurfaceTest.java
 
b/runners/direct-java/src/test/java/org/apache/beam/runners/direct/DirectRunnerApiSurfaceTest.java
index 2493727538d..d41eaac41c7 100644
--- 
a/runners/direct-java/src/test/java/org/apache/beam/runners/direct/DirectRunnerApiSurfaceTest.java
+++ 
b/runners/direct-java/src/test/java/org/apache/beam/runners/direct/DirectRunnerApiSurfaceTest.java
@@ -46,7 +46,6 @@ public void testDirectRunnerApiSurface() throws Exception {
         ImmutableSet.of(
             "org.apache.beam.sdk",
             "org.apache.beam.runners.direct",
-            "org.apache.beam.runners.direct.portable",
             "org.joda.time",
             "javax.annotation");
 
@@ -67,6 +66,9 @@ public void testDirectRunnerApiSurface() throws Exception {
             .pruningClass(
                 WatermarkManager.class /* TODO: BEAM-4237 Consider moving to 
local-java */)
             .pruningClass(ExecutableGraphBuilder.class)
+            .pruningPattern(
+                "org[.]apache[.]beam[.]runners[.]direct[.]portable.*"
+                /* TODO: BEAM-4237 reconsider package layout with the 
ReferenceRunner */)
             .pruningPattern("org[.]apache[.]beam[.].*Test.*")
             .pruningPattern("org[.]apache[.]beam[.].*IT")
             .pruningPattern("java[.]io.*")
diff --git 
a/runners/local-artifact-service-java/src/test/java/org/apache/beam/artifact/local/LocalArtifactStagingLocationTest.java
 
b/runners/direct-java/src/test/java/org/apache/beam/runners/direct/portable/artifact/LocalArtifactStagingLocationTest.java
similarity index 98%
rename from 
runners/local-artifact-service-java/src/test/java/org/apache/beam/artifact/local/LocalArtifactStagingLocationTest.java
rename to 
runners/direct-java/src/test/java/org/apache/beam/runners/direct/portable/artifact/LocalArtifactStagingLocationTest.java
index 6da70455919..99e2cce1b09 100644
--- 
a/runners/local-artifact-service-java/src/test/java/org/apache/beam/artifact/local/LocalArtifactStagingLocationTest.java
+++ 
b/runners/direct-java/src/test/java/org/apache/beam/runners/direct/portable/artifact/LocalArtifactStagingLocationTest.java
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package org.apache.beam.artifact.local;
+package org.apache.beam.runners.direct.portable.artifact;
 
 import static com.google.common.base.Preconditions.checkState;
 import static org.hamcrest.Matchers.equalTo;
diff --git 
a/runners/local-artifact-service-java/src/test/java/org/apache/beam/artifact/local/LocalFileSystemArtifactRetrievalServiceTest.java
 
b/runners/direct-java/src/test/java/org/apache/beam/runners/direct/portable/artifact/LocalFileSystemArtifactRetrievalServiceTest.java
similarity index 98%
rename from 
runners/local-artifact-service-java/src/test/java/org/apache/beam/artifact/local/LocalFileSystemArtifactRetrievalServiceTest.java
rename to 
runners/direct-java/src/test/java/org/apache/beam/runners/direct/portable/artifact/LocalFileSystemArtifactRetrievalServiceTest.java
index 1f7a5237e9f..e49588b2776 100644
--- 
a/runners/local-artifact-service-java/src/test/java/org/apache/beam/artifact/local/LocalFileSystemArtifactRetrievalServiceTest.java
+++ 
b/runners/direct-java/src/test/java/org/apache/beam/runners/direct/portable/artifact/LocalFileSystemArtifactRetrievalServiceTest.java
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package org.apache.beam.artifact.local;
+package org.apache.beam.runners.direct.portable.artifact;
 
 import static org.hamcrest.Matchers.containsInAnyOrder;
 import static org.hamcrest.Matchers.containsString;
@@ -79,7 +79,7 @@ public void setup() throws Exception {
     root = tmp.newFolder();
     stagerServer =
         GrpcFnServer.allocatePortAndCreateFor(
-            LocalFileSystemArtifactStagerService.withRootDirectory(root), 
serverFactory);
+            LocalFileSystemArtifactStagerService.forRootDirectory(root), 
serverFactory);
   }
 
   @After
diff --git 
a/runners/local-artifact-service-java/src/test/java/org/apache/beam/artifact/local/LocalFileSystemArtifactStagerServiceTest.java
 
b/runners/direct-java/src/test/java/org/apache/beam/runners/direct/portable/artifact/LocalFileSystemArtifactStagerServiceTest.java
similarity index 98%
rename from 
runners/local-artifact-service-java/src/test/java/org/apache/beam/artifact/local/LocalFileSystemArtifactStagerServiceTest.java
rename to 
runners/direct-java/src/test/java/org/apache/beam/runners/direct/portable/artifact/LocalFileSystemArtifactStagerServiceTest.java
index 0d850960360..2bc8f1285de 100644
--- 
a/runners/local-artifact-service-java/src/test/java/org/apache/beam/artifact/local/LocalFileSystemArtifactStagerServiceTest.java
+++ 
b/runners/direct-java/src/test/java/org/apache/beam/runners/direct/portable/artifact/LocalFileSystemArtifactStagerServiceTest.java
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package org.apache.beam.artifact.local;
+package org.apache.beam.runners.direct.portable.artifact;
 
 import static org.hamcrest.Matchers.is;
 import static org.junit.Assert.assertThat;
@@ -58,7 +58,7 @@
 
   @Before
   public void setup() throws Exception {
-    stager = 
LocalFileSystemArtifactStagerService.withRootDirectory(temporaryFolder.newFolder());
+    stager = 
LocalFileSystemArtifactStagerService.forRootDirectory(temporaryFolder.newFolder());
 
     server =
         InProcessServerBuilder.forName("fs_stager")
diff --git 
a/runners/reference/job-server/src/test/java/org/apache/beam/runners/reference/job/ReferenceRunnerJobServiceTest.java
 
b/runners/direct-java/src/test/java/org/apache/beam/runners/direct/portable/job/ReferenceRunnerJobServiceTest.java
similarity index 99%
rename from 
runners/reference/job-server/src/test/java/org/apache/beam/runners/reference/job/ReferenceRunnerJobServiceTest.java
rename to 
runners/direct-java/src/test/java/org/apache/beam/runners/direct/portable/job/ReferenceRunnerJobServiceTest.java
index 6d120c532b1..9867fc0affc 100644
--- 
a/runners/reference/job-server/src/test/java/org/apache/beam/runners/reference/job/ReferenceRunnerJobServiceTest.java
+++ 
b/runners/direct-java/src/test/java/org/apache/beam/runners/direct/portable/job/ReferenceRunnerJobServiceTest.java
@@ -6,7 +6,6 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
  *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
@@ -16,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.beam.runners.reference.job;
+package org.apache.beam.runners.direct.portable.job;
 
 import static org.hamcrest.Matchers.hasItems;
 import static org.junit.Assert.assertThat;
diff --git a/runners/local-artifact-service-java/build.gradle 
b/runners/local-artifact-service-java/build.gradle
deleted file mode 100644
index d4761bd5e85..00000000000
--- a/runners/local-artifact-service-java/build.gradle
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * License); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-apply from: project(":").file("build_rules.gradle")
-applyJavaNature()
-
-description = "Apache Beam :: Runners :: Java Local Artifact Service"
-ext.summary = """The Beam Artifact Service exposes APIs to stage and retrieve
-artifacts in a manner independent of the underlying storage system, for use
-by the Beam portability framework. The local implementation uses the local
-File System as the underlying storage system."""
-
-dependencies {
-  compile library.java.guava
-  shadow project(path: ":beam-model-job-management", configuration: "shadow")
-  shadow project(path: ":beam-model-pipeline", configuration: "shadow")
-  shadow project(path: ":beam-runners-java-fn-execution", configuration: 
"shadow")
-  shadow library.java.findbugs_jsr305
-  shadow library.java.grpc_core
-  shadow library.java.grpc_stub
-  shadow library.java.protobuf_java
-  shadow library.java.slf4j_api
-  testCompile project(path: ":beam-runners-core-construction-java")
-  testCompile library.java.hamcrest_core
-  testCompile library.java.hamcrest_library
-  testCompile library.java.mockito_core
-  testCompile library.java.junit
-  testCompile library.java.slf4j_jdk14
-}
diff --git a/runners/local-artifact-service-java/pom.xml 
b/runners/local-artifact-service-java/pom.xml
deleted file mode 100644
index d68971eaae9..00000000000
--- a/runners/local-artifact-service-java/pom.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.beam</groupId>
-    <artifactId>beam-runners-parent</artifactId>
-    <version>2.5.0-SNAPSHOT</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-
-  <artifactId>beam-local-artifact-service-java</artifactId>
-  <name>Apache Beam :: Runners :: Java Local Artifact Service</name>
-  <description>The Beam Artifact Service exposes APIs to stage and retrieve
-    artifacts in a manner independent of the underlying storage system, for use
-    by the Beam portability framework. The local implementation uses the local
-    File System as the underlying storage system.</description>
-
-  <packaging>jar</packaging>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-      </plugin>
-
-      <!-- Coverage analysis for unit tests. -->
-      <plugin>
-        <groupId>org.jacoco</groupId>
-        <artifactId>jacoco-maven-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.beam</groupId>
-      <artifactId>beam-model-job-management</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.beam</groupId>
-      <artifactId>beam-model-pipeline</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.beam</groupId>
-      <artifactId>beam-runners-java-fn-execution</artifactId>
-    </dependency>
-
-    <!-- build dependencies -->
-    <dependency>
-      <groupId>com.google.code.findbugs</groupId>
-      <artifactId>jsr305</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>com.google.guava</groupId>
-      <artifactId>guava</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>io.grpc</groupId>
-      <artifactId>grpc-core</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>io.grpc</groupId>
-      <artifactId>grpc-stub</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>com.google.protobuf</groupId>
-      <artifactId>protobuf-java</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-
-    <!-- test dependencies -->
-    <dependency>
-      <groupId>org.hamcrest</groupId>
-      <artifactId>hamcrest-core</artifactId>
-      <scope>test</scope>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.hamcrest</groupId>
-      <artifactId>hamcrest-library</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-core</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-jdk14</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.beam</groupId>
-      <artifactId>beam-runners-core-construction-java</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-</project>
diff --git a/runners/reference/job-server/build.gradle 
b/runners/reference/job-server/build.gradle
deleted file mode 100644
index 614682626f6..00000000000
--- a/runners/reference/job-server/build.gradle
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * License); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-apply from: project(":").file("build_rules.gradle")
-applyJavaNature()
-
-description = "Apache Beam :: Runners :: Reference :: Job Orchestrator"
-
-dependencies {
-  shadow library.java.grpc_netty
-  shadow project(path: ":beam-model-job-management", configuration: "shadow")
-  shadow project(path: ":beam-runners-java-fn-execution", configuration: 
"shadow")
-  shadow project(path: ":beam-runners-reference-java", configuration: "shadow")
-  shadow project(path: ":beam-local-artifact-service-java", configuration: 
"shadow")
-  shadow library.java.grpc_core
-  shadow library.java.grpc_stub
-  shadow library.java.slf4j_api
-  shadow library.java.args4j
-  testCompile library.java.junit
-  shadowTest project(path: ":beam-runners-core-construction-java", 
configuration: "shadow")
-  shadowTest library.java.hamcrest_core
-  shadowTest library.java.slf4j_jdk14
-}
diff --git a/runners/reference/job-server/pom.xml 
b/runners/reference/job-server/pom.xml
deleted file mode 100644
index 0c9d4a43c24..00000000000
--- a/runners/reference/job-server/pom.xml
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.beam</groupId>
-    <artifactId>beam-runners-reference-parent</artifactId>
-    <version>2.5.0-SNAPSHOT</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-
-  <artifactId>beam-runners-reference-job-orchestrator</artifactId>
-
-  <name>Apache Beam :: Runners :: Reference :: Job Orchestrator</name>
-
-  <packaging>jar</packaging>
-
-  <build>
-    <resources>
-      <resource>
-        <directory>src/main/resources</directory>
-        <filtering>true</filtering>
-      </resource>
-    </resources>
-  </build>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.beam</groupId>
-      <artifactId>beam-model-pipeline</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.beam</groupId>
-      <artifactId>beam-model-job-management</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.beam</groupId>
-      <artifactId>beam-runners-java-fn-execution</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.beam</groupId>
-      <artifactId>beam-local-artifact-service-java</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.beam</groupId>
-      <artifactId>beam-runners-reference-java</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>com.google.protobuf</groupId>
-      <artifactId>protobuf-java</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>io.grpc</groupId>
-      <artifactId>grpc-core</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>io.grpc</groupId>
-      <artifactId>grpc-stub</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>args4j</groupId>
-      <artifactId>args4j</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>com.google.guava</groupId>
-      <artifactId>guava</artifactId>
-    </dependency>
-
-    <!-- runtime dependencies -->
-    <dependency>
-      <groupId>io.grpc</groupId>
-      <artifactId>grpc-netty</artifactId>
-      <scope>runtime</scope>
-    </dependency>
-
-    <!-- test dependencies -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>com.google.auto.value</groupId>
-      <artifactId>auto-value</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.beam</groupId>
-      <artifactId>beam-runners-core-construction-java</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-jdk14</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <!-- Stops the Maven Dependency Plugin from failing -->
-    <dependency>
-      <groupId>org.hamcrest</groupId>
-      <artifactId>hamcrest-core</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.hamcrest</groupId>
-      <artifactId>hamcrest-library</artifactId>
-      <scope>test</scope>
-    </dependency>
-    
-  </dependencies>
-</project>
diff --git a/runners/reference/pom.xml b/runners/reference/pom.xml
index 303a210b9f2..489eb577ca4 100644
--- a/runners/reference/pom.xml
+++ b/runners/reference/pom.xml
@@ -35,6 +35,5 @@
   <packaging>pom</packaging>
   <modules>
     <module>java</module>
-    <module>job-server</module>
   </modules>
 </project>
diff --git a/sdks/java/javadoc/build.gradle b/sdks/java/javadoc/build.gradle
index 395da9a4bef..70fc711792c 100644
--- a/sdks/java/javadoc/build.gradle
+++ b/sdks/java/javadoc/build.gradle
@@ -23,12 +23,10 @@ def exportedJavadocProjects = [
   ':beam-runners-apex',
   ':beam-runners-core-construction-java',
   ':beam-runners-core-java',
-  ':beam-local-artifact-service-java',
   ':beam-runners-java-fn-execution',
   ':beam-runners-local-java-core',
   ':beam-runners-direct-java',
   ':beam-runners-reference-java',
-  ':beam-runners-reference-job-server',
   ':beam-runners-flink_2.11',
   ':beam-runners-google-cloud-dataflow-java',
   ':beam-runners-spark',
diff --git a/settings.gradle b/settings.gradle
index 6636b7a92ce..5628e1666d2 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -50,8 +50,6 @@ include "beam-runners-google-cloud-dataflow-java"
 project(":beam-runners-google-cloud-dataflow-java").dir = 
file("runners/google-cloud-dataflow-java")
 include "beam-runners-java-fn-execution"
 project(":beam-runners-java-fn-execution").dir = 
file("runners/java-fn-execution")
-include "beam-local-artifact-service-java"
-project(":beam-local-artifact-service-java").dir = 
file("runners/local-artifact-service-java")
 include "beam-runners-local-java-core"
 project(":beam-runners-local-java-core").dir = file("runners/local-java")
 include "beam-runners-reference-java"


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 105774)
    Time Spent: 4h 10m  (was: 4h)

> Support job+artifact APIs locally
> ---------------------------------
>
>                 Key: BEAM-2885
>                 URL: https://issues.apache.org/jira/browse/BEAM-2885
>             Project: Beam
>          Issue Type: Sub-task
>          Components: runner-dataflow
>            Reporter: Henning Rohde
>            Assignee: Thomas Groh
>            Priority: Major
>              Labels: portability
>          Time Spent: 4h 10m
>  Remaining Estimate: 0h
>
> As per https://s.apache.org/beam-job-api, use local support for 
> submission-side. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to