You are viewing a plain text version of this content. The canonical link for it is here.
Posted to submarine-dev@hadoop.apache.org by zh...@apache.org on 2019/10/25 03:27:55 UTC
[hadoop-submarine] branch master updated: SUBMARINE-255. [PoC]
Rename the submitter package name
This is an automated email from the ASF dual-hosted git repository.
zhouquan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-submarine.git
The following commit(s) were added to refs/heads/master by this push:
new ebad135 SUBMARINE-255. [PoC] Rename the submitter package name
ebad135 is described below
commit ebad135c1e44bc75f76c41fbaaeece87ed65d144
Author: Wanqiang Ji <wa...@gmail.com>
AuthorDate: Thu Oct 24 00:04:49 2019 +0800
SUBMARINE-255. [PoC] Rename the submitter package name
### What is this PR for?
1. rename the package `org.apache.submarine.runtime.tony` to `org.apache.submarine.server.submitter.yarn`
2. rename the package `org.apache.submarine.runtime.yarnservice` to `org.apache.submarine.server.submitter.yarnservice`
3. update the conf in mini-submarine
4. update the mini-submarine's doc
### What type of PR is it?
[Refactoring]
### Todos
### What is the Jira issue?
https://issues.apache.org/jira/browse/SUBMARINE-255
### How should this be tested?
https://travis-ci.org/jiwq/hadoop-submarine/builds/601290863
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: Wanqiang Ji <wa...@gmail.com>
Closes #57 from jiwq/SUBMARINE-255 and squashes the following commits:
c67db3c [Wanqiang Ji] SUBMARINE-255. [PoC] Rename the submitter package name
---
.travis.yml | 2 +-
dev-support/mini-submarine/README.md | 2 +-
dev-support/mini-submarine/conf/submarine.xml | 4 +-
pom.xml | 25 ++----
submarine-all/pom.xml | 27 +++++-
submarine-commons/commons-cluster/pom.xml | 18 ++++
submarine-commons/commons-runtime/pom.xml | 18 +++-
submarine-commons/commons-utils/pom.xml | 7 ++
submarine-dist/pom.xml | 23 +++++-
submarine-server/pom.xml | 9 ++
.../server-submitter/submitter-yarn/pom.xml | 7 +-
.../submitter/yarn}/JobStatusBuilder.java | 2 +-
.../submitter/yarn/YarnJobMonitor.java} | 6 +-
.../submitter/yarn/YarnJobSubmitter.java} | 12 +--
.../submitter/yarn/YarnRuntimeFactory.java} | 14 ++--
.../submitter/yarn/YarnUtils.java} | 10 +--
.../{TestTonyUtils.java => TestYarnUtils.java} | 24 +-----
.../server-submitter/submitter-yarnservice/pom.xml | 96 ++++++++++++++++++----
.../yarnservice/YarnServiceRuntimeFactory.java | 44 ----------
.../builder/JobComponentStatusBuilder.java | 44 ----------
.../runtimes/yarnservice/command/package-info.java | 19 -----
.../yarnservice/pytorch/command/package-info.java | 19 -----
.../pytorch/component/package-info.java | 20 -----
.../runtimes/yarnservice/pytorch/package-info.java | 20 -----
.../tensorflow/command/package-info.java | 19 -----
.../tensorflow/component/package-info.java | 20 -----
.../yarnservice/tensorflow/package-info.java | 20 -----
.../submitter}/yarnservice/AbstractComponent.java | 41 ++++-----
.../yarnservice/AbstractServiceSpec.java | 45 +++++-----
.../yarnservice/FileSystemOperations.java | 27 +++---
.../yarnservice/HadoopEnvironmentSetup.java | 29 ++++---
.../submitter}/yarnservice/ServiceSpec.java | 17 ++--
.../yarnservice/ServiceSpecFileGenerator.java | 17 ++--
.../submitter}/yarnservice/ServiceWrapper.java | 17 ++--
.../yarnservice/WorkerComponentFactory.java | 33 ++++----
.../yarnservice/YarnServiceJobMonitor.java | 39 +++++----
.../yarnservice/YarnServiceJobSubmitter.java | 45 +++++-----
.../yarnservice/YarnServiceRuntimeFactory.java} | 22 ++---
.../submitter}/yarnservice/YarnServiceUtils.java | 25 +++---
.../builder/JobComponentStatusBuilder.java | 46 +++++++++++
.../yarnservice/builder/JobStatusBuilder.java | 38 +++++----
.../yarnservice/command/AbstractLaunchCommand.java | 19 +++--
.../yarnservice/command/LaunchCommandFactory.java | 19 +++--
.../yarnservice/command/LaunchScriptBuilder.java | 19 +++--
.../command/PyTorchLaunchCommandFactory.java | 25 +++---
.../command/TensorFlowLaunchCommandFactory.java | 29 ++++---
.../yarnservice/pytorch/PyTorchServiceSpec.java | 31 +++----
.../command/PyTorchWorkerLaunchCommand.java | 27 +++---
.../pytorch/component/PyTorchWorkerComponent.java | 27 +++---
.../yarnservice/tensorflow/TensorFlowCommons.java | 23 +++---
.../tensorflow/TensorFlowServiceSpec.java | 39 ++++-----
.../command/TensorBoardLaunchCommand.java | 23 +++---
.../command/TensorFlowLaunchCommand.java | 27 +++---
.../command/TensorFlowPsLaunchCommand.java | 23 +++---
.../command/TensorFlowWorkerLaunchCommand.java | 23 +++---
.../tensorflow/component/TensorBoardComponent.java | 35 ++++----
.../component/TensorFlowPsComponent.java | 33 ++++----
.../component/TensorFlowWorkerComponent.java | 27 +++---
.../yarnservice}/utils/ClassPathUtilities.java | 17 ++--
.../yarnservice}/utils/DockerUtilities.java | 17 ++--
.../yarnservice}/utils/EnvironmentUtilities.java | 17 ++--
.../utils/KerberosPrincipalFactory.java | 21 +++--
.../submitter/yarnservice}/utils/Localizer.java | 25 +++---
.../yarnservice}/utils/SubmarineResourceUtils.java | 17 ++--
.../submitter/yarnservice}/utils/ZipUtilities.java | 17 ++--
.../org/apache/submarine/utils/package-info.java | 19 -----
.../apache/submarine/FileUtilitiesForTests.java | 15 ++--
.../cli/yarnservice/ParamBuilderForTest.java | 15 ++--
.../cli/yarnservice/TestYarnServiceRunJobCli.java | 41 ++++-----
.../TestYarnServiceRunJobCliCommons.java | 23 +++---
.../TestYarnServiceRunJobCliLocalization.java | 23 +++---
.../cli/yarnservice/YarnServiceCliTestUtils.java | 27 +++---
.../submitter}/yarnservice/TestServiceWrapper.java | 17 ++--
.../yarnservice/TestTFConfigGenerator.java | 33 ++++----
.../command/AbstractTFLaunchCommandTestHelper.java | 31 +++----
.../command/TestLaunchCommandFactory.java | 27 +++---
.../pytorch/TestPyTorchServiceSpec.java | 35 ++++----
.../command/TestTensorBoardLaunchCommand.java | 27 +++---
.../command/TestTensorFlowLaunchCommand.java | 27 +++---
.../tensorflow/component/ComponentTestCommons.java | 35 ++++----
.../component/TestTensorBoardComponent.java | 21 +++--
.../component/TestTensorFlowPsComponent.java | 21 +++--
.../component/TestTensorFlowWorkerComponent.java | 21 +++--
.../yarnservice}/utils/TestClassPathUtilities.java | 17 ++--
.../utils/TestEnvironmentUtilities.java | 17 ++--
.../utils/TestKerberosPrincipalFactory.java | 21 +++--
.../utils/TestSubmarineResourceUtils.java | 17 ++--
87 files changed, 1090 insertions(+), 992 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 2839c24..b08bcfa 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -39,7 +39,7 @@ services:
env:
global:
# submarine core does not required by workbench-server integration tests
- # If you need to compile Phadoop-3.1 or Phadoop-3.2, you need to add `!submarine-runtime/yarnservice-runtime` in EXCLUDE_SUBMARINE
+ # If you need to compile Phadoop-3.1 or Phadoop-3.2, you need to add `!submarine-server/server-submitter/submitter-yarnservice` in EXCLUDE_SUBMARINE
- EXCLUDE_SUBMARINE="!submarine-all,!submarine-client,!submarine-commons,!submarine-commons/commons-runtime,!submarine-dist,!submarine-server/server-submitter/submitter-yarn"
- EXCLUDE_WORKBENCH="!submarine-workbench,!submarine-workbench/workbench-web,!submarine-workbench/workbench-server"
- EXCLUDE_INTERPRETER="!submarine-workbench/interpreter,!submarine-workbench/interpreter/interpreter-engine,!submarine-workbench/interpreter/python-interpreter"
diff --git a/dev-support/mini-submarine/README.md b/dev-support/mini-submarine/README.md
index bb9560a..faaae88 100644
--- a/dev-support/mini-submarine/README.md
+++ b/dev-support/mini-submarine/README.md
@@ -253,7 +253,7 @@ cd && cd spark-script && ./run_spark.sh
<configuration>
<property>
<name>submarine.runtime.class</name>
- <value>org.apache.submarine.runtimes.tony.TonyRuntimeFactory</value>
+ <value>org.apache.submarine.server.submitter.yarn.YarnRuntimeFactory</value>
</property>
</configuration>
```
diff --git a/dev-support/mini-submarine/conf/submarine.xml b/dev-support/mini-submarine/conf/submarine.xml
index 7d7fb85..785f115 100644
--- a/dev-support/mini-submarine/conf/submarine.xml
+++ b/dev-support/mini-submarine/conf/submarine.xml
@@ -19,9 +19,9 @@
<configuration>
<property>
<name>submarine.runtime.class</name>
- <value>org.apache.submarine.runtimes.tony.TonyRuntimeFactory</value>
+ <value>org.apache.submarine.server.submitter.yarn.YarnRuntimeFactory</value>
<!--
- <value>org.apache.submarine.runtimes.yarnservice.YarnServiceRuntimeFactory</value>
+ <value>org.apache.submarine.server.submitter.yarnservice.YarnServiceRuntimeFactory</value>
-->
</property>
</configuration>
diff --git a/pom.xml b/pom.xml
index fbc6852..70c31fa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -82,7 +82,7 @@
<yarn.version>v1.10.1</yarn.version>
<hadoop.common.build.dir>${basedir}/../hadoop-common-project/hadoop-common/target</hadoop.common.build.dir>
- <slf4j.version>1.7.7</slf4j.version>
+ <slf4j.version>1.7.25</slf4j.version>
<log4j.version>1.2.17</log4j.version>
<commons.logging.version>1.1.3</commons.logging.version>
<commons.cli.version>1.2</commons.cli.version>
@@ -247,15 +247,18 @@
<guice.version>4.0</guice.version>
<zookeeper.version>3.4.13</zookeeper.version>
<guava.version>27.0-jre</guava.version>
+ <jsr305.version>3.0.2</jsr305.version>
<profile-id>hadoop-3.2</profile-id>
</properties>
+ <modules>
+ <module>submarine-server/server-submitter/submitter-yarnservice</module>
+ </modules>
</profile>
- <!-- Default profile-->
<profile>
<id>hadoop-3.1</id>
<properties>
- <hadoop.version>3.1.2</hadoop.version>
+ <hadoop.version>3.1.3</hadoop.version>
<jaxb-api.version>2.2.11</jaxb-api.version>
<commons-compress.version>1.19</commons-compress.version>
<guice-servlet.version>4.0</guice-servlet.version>
@@ -263,6 +266,9 @@
<zookeeper.version>3.4.13</zookeeper.version>
<profile-id>hadoop-3.1</profile-id>
</properties>
+ <modules>
+ <module>submarine-server/server-submitter/submitter-yarnservice</module>
+ </modules>
</profile>
<profile>
@@ -425,19 +431,6 @@
</excludes>
</configuration>
</plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>3.1.2</version>
- <executions>
- <execution>
- <goals>
- <goal>test-jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
</project>
diff --git a/submarine-all/pom.xml b/submarine-all/pom.xml
index 5671945..952709a 100644
--- a/submarine-all/pom.xml
+++ b/submarine-all/pom.xml
@@ -77,6 +77,21 @@
<id>hadoop-3.2</id>
<dependencies>
<dependency>
+ <groupId>org.apache.submarine</groupId>
+ <artifactId>submitter-yarnservice</artifactId>
+ <version>${project.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.avro</groupId>
+ <artifactId>avro</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs-client</artifactId>
<version>${hadoop.version}</version>
@@ -95,11 +110,21 @@
</dependencies>
</profile>
- <!-- Default profile-->
<profile>
<id>hadoop-3.1</id>
<dependencies>
<dependency>
+ <groupId>org.apache.submarine</groupId>
+ <artifactId>submitter-yarnservice</artifactId>
+ <version>${project.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.avro</groupId>
+ <artifactId>avro</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs-client</artifactId>
<version>${hadoop.version}</version>
diff --git a/submarine-commons/commons-cluster/pom.xml b/submarine-commons/commons-cluster/pom.xml
index 8d4f9c7..1978a73 100644
--- a/submarine-commons/commons-cluster/pom.xml
+++ b/submarine-commons/commons-cluster/pom.xml
@@ -41,18 +41,36 @@
<groupId>io.atomix</groupId>
<artifactId>atomix</artifactId>
<version>${atomix.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>io.atomix</groupId>
<artifactId>atomix-raft</artifactId>
<version>${atomix.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>io.atomix</groupId>
<artifactId>atomix-primary-backup</artifactId>
<version>${atomix.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
diff --git a/submarine-commons/commons-runtime/pom.xml b/submarine-commons/commons-runtime/pom.xml
index 6716cad..9fd089c 100644
--- a/submarine-commons/commons-runtime/pom.xml
+++ b/submarine-commons/commons-runtime/pom.xml
@@ -180,6 +180,22 @@
</exclusion>
</exclusions>
</dependency>
-
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>3.1.2</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/submarine-commons/commons-utils/pom.xml b/submarine-commons/commons-utils/pom.xml
index 0453160..fd5a700 100644
--- a/submarine-commons/commons-utils/pom.xml
+++ b/submarine-commons/commons-utils/pom.xml
@@ -90,6 +90,13 @@
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/submarine-dist/pom.xml b/submarine-dist/pom.xml
index 2ca3a62..9ce39a4 100644
--- a/submarine-dist/pom.xml
+++ b/submarine-dist/pom.xml
@@ -71,13 +71,34 @@
<profile>
<id>hadoop-3.2</id>
<dependencies>
+ <dependency>
+ <groupId>org.apache.submarine</groupId>
+ <artifactId>submitter-yarnservice</artifactId>
+ <version>${project.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.avro</groupId>
+ <artifactId>avro</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
</dependencies>
</profile>
- <!-- Default profile-->
<profile>
<id>hadoop-3.1</id>
<dependencies>
+ <dependency>
+ <groupId>org.apache.submarine</groupId>
+ <artifactId>submitter-yarnservice</artifactId>
+ <version>${project.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.avro</groupId>
+ <artifactId>avro</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
</dependencies>
</profile>
diff --git a/submarine-server/pom.xml b/submarine-server/pom.xml
index 8a49dee..0e7629a 100644
--- a/submarine-server/pom.xml
+++ b/submarine-server/pom.xml
@@ -37,4 +37,13 @@
<module>server-submitter</module>
</modules>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.submarine</groupId>
+ <artifactId>commons-runtime</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
</project>
diff --git a/submarine-server/server-submitter/submitter-yarn/pom.xml b/submarine-server/server-submitter/submitter-yarn/pom.xml
index f710afa..77da805 100644
--- a/submarine-server/server-submitter/submitter-yarn/pom.xml
+++ b/submarine-server/server-submitter/submitter-yarn/pom.xml
@@ -26,12 +26,13 @@
<artifactId>submitter-yarn</artifactId>
<version>0.3.0-SNAPSHOT</version>
- <name>Submarine: Server Submitter YARN</name>
+ <name>Submarine: Server Submitter for YARN</name>
+
<dependencies>
<dependency>
<groupId>org.apache.submarine</groupId>
<artifactId>submarine-client</artifactId>
- <version>${submarine.version}</version>
+ <version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
<exclusions>
@@ -202,7 +203,7 @@
<artifactId>commons-runtime</artifactId>
<type>test-jar</type>
<scope>test</scope>
- <version>${submarine.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
diff --git a/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/runtimes/tony/JobStatusBuilder.java b/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/JobStatusBuilder.java
similarity index 97%
rename from submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/runtimes/tony/JobStatusBuilder.java
rename to submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/JobStatusBuilder.java
index 210ecd8..397f87a 100644
--- a/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/runtimes/tony/JobStatusBuilder.java
+++ b/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/JobStatusBuilder.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.submarine.runtimes.tony;
+package org.apache.submarine.server.submitter.yarn;
import com.linkedin.tony.rpc.TaskInfo;
import org.apache.submarine.commons.runtime.api.JobComponentStatus;
diff --git a/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/runtimes/tony/TonyJobMonitor.java b/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/YarnJobMonitor.java
similarity index 90%
rename from submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/runtimes/tony/TonyJobMonitor.java
rename to submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/YarnJobMonitor.java
index ce1466f..d67f385 100644
--- a/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/runtimes/tony/TonyJobMonitor.java
+++ b/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/YarnJobMonitor.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.submarine.runtimes.tony;
+package org.apache.submarine.server.submitter.yarn;
import com.linkedin.tony.TonyClient;
import com.linkedin.tony.client.TaskUpdateListener;
@@ -34,10 +34,10 @@ import java.util.Set;
/**
* An implementation of JobMonitor with TonY library.
*/
-public class TonyJobMonitor extends JobMonitor implements TaskUpdateListener {
+public class YarnJobMonitor extends JobMonitor implements TaskUpdateListener {
private Set<TaskInfo> taskInfos = new HashSet<>();
- public TonyJobMonitor(ClientContext clientContext, TonyClient client) {
+ public YarnJobMonitor(ClientContext clientContext, TonyClient client) {
super(clientContext);
client.addListener(this);
}
diff --git a/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/runtimes/tony/TonyJobSubmitter.java b/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/YarnJobSubmitter.java
similarity index 91%
rename from submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/runtimes/tony/TonyJobSubmitter.java
rename to submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/YarnJobSubmitter.java
index 1762634..8e1ef08 100644
--- a/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/runtimes/tony/TonyJobSubmitter.java
+++ b/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/YarnJobSubmitter.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.submarine.runtimes.tony;
+package org.apache.submarine.server.submitter.yarn;
import com.linkedin.tony.Constants;
import com.linkedin.tony.TonyClient;
@@ -38,15 +38,15 @@ import java.io.IOException;
import java.io.OutputStream;
/**
- * Implementation of JobSumitter with TonY runtime.
+ * Implementation of JobSubmitter with TonY runtime.
*/
-public class TonyJobSubmitter implements JobSubmitter, CallbackHandler {
+public class YarnJobSubmitter implements JobSubmitter, CallbackHandler {
- private static final Log LOG = LogFactory.getLog(TonyJobSubmitter.class);
+ private static final Log LOG = LogFactory.getLog(YarnJobSubmitter.class);
private ApplicationId applicationId;
private TonyClient tonyClient;
- public TonyJobSubmitter() { }
+ public YarnJobSubmitter() { }
public void setTonyClient(TonyClient client) {
this.tonyClient = client;
}
@@ -68,7 +68,7 @@ public class TonyJobSubmitter implements JobSubmitter, CallbackHandler {
File tonyFinalConfPath = File.createTempFile("temp",
Constants.TONY_FINAL_XML);
// Write user's overridden conf to an xml to be localized.
- Configuration tonyConf = TonyUtils.tonyConfFromClientContext(
+ Configuration tonyConf = YarnUtils.tonyConfFromClientContext(
(TensorFlowRunJobParameters) parameters.getParameters());
try (OutputStream os = new FileOutputStream(tonyFinalConfPath)) {
tonyConf.writeXml(os);
diff --git a/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/runtimes/tony/TonyRuntimeFactory.java b/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/YarnRuntimeFactory.java
similarity index 84%
copy from submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/runtimes/tony/TonyRuntimeFactory.java
copy to submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/YarnRuntimeFactory.java
index 42e8c9a..2b0a290 100644
--- a/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/runtimes/tony/TonyRuntimeFactory.java
+++ b/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/YarnRuntimeFactory.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.submarine.runtimes.tony;
+package org.apache.submarine.server.submitter.yarn;
import com.linkedin.tony.TonyClient;
import org.apache.hadoop.conf.Configuration;
@@ -31,16 +31,16 @@ import org.apache.submarine.commons.runtime.fs.SubmarineStorage;
/**
* Implementation of RuntimeFactory with Tony Runtime
*/
-public class TonyRuntimeFactory extends RuntimeFactory {
+public class YarnRuntimeFactory extends RuntimeFactory {
private TonyClient tonyClient;
- private TonyJobSubmitter submitter;
- private TonyJobMonitor monitor;
+ private YarnJobSubmitter submitter;
+ private YarnJobMonitor monitor;
- public TonyRuntimeFactory(ClientContext clientContext) {
+ public YarnRuntimeFactory(ClientContext clientContext) {
super(clientContext);
- submitter = new TonyJobSubmitter();
+ submitter = new YarnJobSubmitter();
tonyClient = new TonyClient(submitter, new Configuration());
- monitor = new TonyJobMonitor(clientContext, tonyClient);
+ monitor = new YarnJobMonitor(clientContext, tonyClient);
submitter.setTonyClient(tonyClient);
}
diff --git a/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/runtimes/tony/TonyUtils.java b/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/YarnUtils.java
similarity index 96%
rename from submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/runtimes/tony/TonyUtils.java
rename to submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/YarnUtils.java
index dc4c465..277c585 100644
--- a/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/runtimes/tony/TonyUtils.java
+++ b/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/YarnUtils.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.submarine.runtimes.tony;
+package org.apache.submarine.server.submitter.yarn;
import com.linkedin.tony.Constants;
import com.linkedin.tony.TonyConfigurationKeys;
@@ -36,10 +36,10 @@ import java.util.Map;
import static org.apache.submarine.commons.runtime.conf.SubmarineConfiguration.SUBMARINE_RUNTIME_APP_TYPE;
/**
- * Utilities for Tony Runtime.
+ * Utilities for YARN Runtime.
*/
-public final class TonyUtils {
- private static final Log LOG = LogFactory.getLog(TonyUtils.class);
+public final class YarnUtils {
+ private static final Log LOG = LogFactory.getLog(YarnUtils.class);
public static Configuration tonyConfFromClientContext(
TensorFlowRunJobParameters parameters) {
@@ -165,6 +165,6 @@ public final class TonyUtils {
return tonyConf;
}
- private TonyUtils() {
+ private YarnUtils() {
}
}
diff --git a/submarine-server/server-submitter/submitter-yarn/src/test/java/TestTonyUtils.java b/submarine-server/server-submitter/submitter-yarn/src/test/java/TestYarnUtils.java
similarity index 84%
rename from submarine-server/server-submitter/submitter-yarn/src/test/java/TestTonyUtils.java
rename to submarine-server/server-submitter/submitter-yarn/src/test/java/TestYarnUtils.java
index cbc2b5e..5658d80 100644
--- a/submarine-server/server-submitter/submitter-yarn/src/test/java/TestTonyUtils.java
+++ b/submarine-server/server-submitter/submitter-yarn/src/test/java/TestYarnUtils.java
@@ -32,7 +32,7 @@ import org.apache.submarine.commons.runtime.RuntimeFactory;
import org.apache.submarine.commons.runtime.JobMonitor;
import org.apache.submarine.commons.runtime.JobSubmitter;
import org.apache.submarine.commons.runtime.fs.SubmarineStorage;
-import org.apache.submarine.runtimes.tony.TonyUtils;
+import org.apache.submarine.server.submitter.yarn.YarnUtils;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -44,25 +44,7 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.
- */
-
-public class TestTonyUtils {
+public class TestYarnUtils {
private MockClientContext getMockClientContext()
throws IOException, YarnException {
@@ -107,7 +89,7 @@ public class TestTonyUtils {
TensorFlowRunJobParameters tensorFlowParams =
(TensorFlowRunJobParameters) jobRunParameters;
- Configuration tonyConf = TonyUtils
+ Configuration tonyConf = YarnUtils
.tonyConfFromClientContext(tensorFlowParams);
Assert.assertEquals(jobRunParameters.getDockerImageName(),
tonyConf.get(TonyConfigurationKeys.getContainerDockerKey()));
diff --git a/submarine-server/server-submitter/submitter-yarnservice/pom.xml b/submarine-server/server-submitter/submitter-yarnservice/pom.xml
index fb0d155..4617dbe 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/pom.xml
+++ b/submarine-server/server-submitter/submitter-yarnservice/pom.xml
@@ -1,17 +1,22 @@
<?xml version="1.0"?>
<!--
- Licensed 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
+ 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. See accompanying LICENSE file.
--->
+ 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
@@ -19,13 +24,13 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.submarine</groupId>
- <artifactId>submarine-runtime</artifactId>
+ <artifactId>server-submitter</artifactId>
<version>0.3.0-SNAPSHOT</version>
- <relativePath>../../../submarine-runtime/pom.xml</relativePath>
</parent>
+
<artifactId>submitter-yarnservice</artifactId>
<version>0.3.0-SNAPSHOT</version>
- <name>Submarine: Server Submitter YARN Service</name>
+ <name>Submarine: Server Submitter for YARN Service</name>
<properties>
<!-- Needed for generating FindBugs warnings using parent pom -->
@@ -33,8 +38,25 @@
</properties>
<dependencies>
+ <dependency>
+ <groupId>org.apache.submarine</groupId>
+ <artifactId>commons-runtime</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.submarine</groupId>
+ <artifactId>submarine-client</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
+ <groupId>org.apache.submarine</groupId>
+ <artifactId>commons-runtime</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
@@ -73,6 +95,16 @@
<artifactId>hadoop-common</artifactId>
<version>${hadoop.version}</version>
<scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
@@ -87,14 +119,22 @@
<version>${hadoop.version}</version>
<exclusions>
<exclusion>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
</exclusion>
@@ -142,19 +182,19 @@
<dependency>
<groupId>org.apache.submarine</groupId>
<artifactId>commons-runtime</artifactId>
- <version>${submarine.version}</version>
+ <version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.submarine</groupId>
<artifactId>submarine-client</artifactId>
- <version>${submarine.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.submarine</groupId>
<artifactId>commons-runtime</artifactId>
- <version>${submarine.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
@@ -166,6 +206,14 @@
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
@@ -189,6 +237,10 @@
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
@@ -212,6 +264,16 @@
<version>${hadoop.version}</version>
<type>test-jar</type>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/YarnServiceRuntimeFactory.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/YarnServiceRuntimeFactory.java
deleted file mode 100644
index 0d7124f..0000000
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/YarnServiceRuntimeFactory.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Licensed 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. See accompanying LICENSE file.
- */
-
-package org.apache.submarine.runtimes.yarnservice;
-
-import org.apache.submarine.common.ClientContext;
-import org.apache.submarine.runtimes.RuntimeFactory;
-import org.apache.submarine.runtimes.common.FSBasedSubmarineStorageImpl;
-import org.apache.submarine.runtimes.common.JobMonitor;
-import org.apache.submarine.runtimes.common.JobSubmitter;
-import org.apache.submarine.runtimes.common.SubmarineStorage;
-
-public class YarnServiceRuntimeFactory extends RuntimeFactory {
-
- public YarnServiceRuntimeFactory(ClientContext clientContext) {
- super(clientContext);
- }
-
- @Override
- protected JobSubmitter internalCreateJobSubmitter() {
- return new YarnServiceJobSubmitter(super.clientContext);
- }
-
- @Override
- protected JobMonitor internalCreateJobMonitor() {
- return new YarnServiceJobMonitor(super.clientContext);
- }
-
- @Override
- protected SubmarineStorage internalCreateSubmarineStorage() {
- return new FSBasedSubmarineStorageImpl(super.clientContext);
- }
-}
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/builder/JobComponentStatusBuilder.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/builder/JobComponentStatusBuilder.java
deleted file mode 100644
index 833c494..0000000
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/builder/JobComponentStatusBuilder.java
+++ /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.
- */
-
-package org.apache.submarine.runtimes.yarnservice.builder;
-
-import org.apache.hadoop.yarn.service.api.records.Component;
-import org.apache.hadoop.yarn.service.api.records.Container;
-import org.apache.hadoop.yarn.service.api.records.ContainerState;
-import org.apache.submarine.common.api.JobComponentStatus;
-
-public class JobComponentStatusBuilder {
- public static JobComponentStatus fromServiceComponent(Component component) {
- long totalAskedContainers = component.getNumberOfContainers();
- int numReadyContainers = 0;
- int numRunningButUnreadyContainers = 0;
- String compName = component.getName();
-
- for (Container c : component.getContainers()) {
- if (c.getState() == ContainerState.READY) {
- numReadyContainers++;
- } else if (c.getState() == ContainerState.RUNNING_BUT_UNREADY) {
- numRunningButUnreadyContainers++;
- }
- }
-
- return new JobComponentStatus(compName, numReadyContainers,
- numRunningButUnreadyContainers, totalAskedContainers);
- }
-
-}
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/command/package-info.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/command/package-info.java
deleted file mode 100644
index 3c7c887..0000000
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/command/package-info.java
+++ /dev/null
@@ -1,19 +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.
- */
-/**
- * This package contains classes to produce launch commands and scripts.
- */
-package org.apache.submarine.runtimes.yarnservice.command;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/pytorch/command/package-info.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/pytorch/command/package-info.java
deleted file mode 100644
index d69c807..0000000
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/pytorch/command/package-info.java
+++ /dev/null
@@ -1,19 +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.
- */
-/**
- * This package contains classes to generate PyTorch launch commands.
- */
-package org.apache.submarine.runtimes.yarnservice.pytorch.command;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/pytorch/component/package-info.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/pytorch/component/package-info.java
deleted file mode 100644
index 420f640..0000000
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/pytorch/component/package-info.java
+++ /dev/null
@@ -1,20 +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.
- */
-/**
- * This package contains classes to generate
- * PyTorch Native Service components.
- */
-package org.apache.submarine.runtimes.yarnservice.pytorch.component;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/pytorch/package-info.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/pytorch/package-info.java
deleted file mode 100644
index cbc95a5..0000000
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/pytorch/package-info.java
+++ /dev/null
@@ -1,20 +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.
- */
-/**
- * This package contains classes to generate
- * PyTorch-related Native Service runtime artifacts.
- */
-package org.apache.submarine.runtimes.yarnservice.pytorch;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/package-info.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/package-info.java
deleted file mode 100644
index 479f228..0000000
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/package-info.java
+++ /dev/null
@@ -1,19 +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.
- */
-/**
- * This package contains classes to generate TensorFlow launch commands.
- */
-package org.apache.submarine.runtimes.yarnservice.tensorflow.command;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/package-info.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/package-info.java
deleted file mode 100644
index efb9242..0000000
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/package-info.java
+++ /dev/null
@@ -1,20 +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.
- */
-/**
- * This package contains classes to generate
- * TensorFlow Native Service components.
- */
-package org.apache.submarine.runtimes.yarnservice.tensorflow.component;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/package-info.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/package-info.java
deleted file mode 100644
index 9345b2c..0000000
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/package-info.java
+++ /dev/null
@@ -1,20 +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.
- */
-/**
- * This package contains classes to generate
- * TensorFlow-related Native Service runtime artifacts.
- */
-package org.apache.submarine.runtimes.yarnservice.tensorflow;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/AbstractComponent.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/AbstractComponent.java
similarity index 77%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/AbstractComponent.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/AbstractComponent.java
index 1b42106..e0c7fd7 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/AbstractComponent.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/AbstractComponent.java
@@ -6,35 +6,36 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice;
+package org.apache.submarine.server.submitter.yarnservice;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.submarine.client.cli.param.runjob.RunJobParameters;
-import org.apache.submarine.common.api.PyTorchRole;
-import org.apache.submarine.common.api.Role;
-import org.apache.submarine.common.api.TensorFlowRole;
-import org.apache.submarine.common.fs.RemoteDirectoryManager;
-import org.apache.submarine.runtimes.yarnservice.command.AbstractLaunchCommand;
-import org.apache.submarine.runtimes.yarnservice.command.LaunchCommandFactory;
-import org.apache.submarine.commons.utils.DockerUtilities;
-import org.apache.submarine.commons.utils.SubmarineResourceUtils;
+import org.apache.submarine.commons.runtime.api.PyTorchRole;
+import org.apache.submarine.commons.runtime.api.Role;
+import org.apache.submarine.commons.runtime.api.TensorFlowRole;
+import org.apache.submarine.commons.runtime.fs.RemoteDirectoryManager;
+import org.apache.submarine.server.submitter.yarnservice.command.AbstractLaunchCommand;
+import org.apache.submarine.server.submitter.yarnservice.command.LaunchCommandFactory;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.TensorFlowCommons;
+import org.apache.submarine.server.submitter.yarnservice.utils.DockerUtilities;
+import org.apache.submarine.server.submitter.yarnservice.utils.SubmarineResourceUtils;
import java.io.IOException;
import java.util.Objects;
-import static org.apache.submarine.runtimes.yarnservice.tensorflow.TensorFlowCommons.addCommonEnvironments;
-import static org.apache.submarine.runtimes.yarnservice.tensorflow.TensorFlowCommons.getScriptFileName;
-
/**
* Abstract base class for Component classes.
* The implementations of this class are act like factories for
@@ -103,7 +104,7 @@ public abstract class AbstractComponent {
parameters.getWorkerResource()));
component.setRestartPolicy(Component.RestartPolicyEnum.NEVER);
- addCommonEnvironments(component, role);
+ TensorFlowCommons.addCommonEnvironments(component, role);
generateLaunchCommand(component);
return component;
@@ -130,7 +131,7 @@ public abstract class AbstractComponent {
Path stagingDir =
remoteDirectoryManager.getJobStagingArea(parameters.getName(), true);
- String destScriptFileName = getScriptFileName(role);
+ String destScriptFileName = TensorFlowCommons.getScriptFileName(role);
fsOperations.uploadToRemoteFileAndLocalizeToContainerWorkDir(stagingDir,
localScriptFile, destScriptFileName, component);
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/AbstractServiceSpec.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/AbstractServiceSpec.java
similarity index 78%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/AbstractServiceSpec.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/AbstractServiceSpec.java
index ea6b667..ad7a071 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/AbstractServiceSpec.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/AbstractServiceSpec.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice;
+package org.apache.submarine.server.submitter.yarnservice;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.service.api.records.Component;
@@ -22,18 +25,18 @@ import org.apache.hadoop.yarn.service.api.records.KerberosPrincipal;
import org.apache.hadoop.yarn.service.api.records.Service;
import org.apache.submarine.client.cli.param.Quicklink;
import org.apache.submarine.client.cli.param.runjob.RunJobParameters;
-import org.apache.submarine.client.cli.runjob.Framework;
-import org.apache.submarine.common.ClientContext;
-import org.apache.submarine.common.api.PyTorchRole;
-import org.apache.submarine.common.api.Role;
-import org.apache.submarine.common.api.TensorFlowRole;
-import org.apache.submarine.common.conf.SubmarineLogs;
-import org.apache.submarine.common.fs.RemoteDirectoryManager;
-import org.apache.submarine.runtimes.yarnservice.command.LaunchCommandFactory;
-import org.apache.submarine.commons.utils.KerberosPrincipalFactory;
-import org.apache.submarine.commons.utils.Localizer;
-import org.apache.submarine.commons.utils.DockerUtilities;
-import org.apache.submarine.commons.utils.EnvironmentUtilities;
+import org.apache.submarine.commons.runtime.Framework;
+import org.apache.submarine.commons.runtime.ClientContext;
+import org.apache.submarine.commons.runtime.api.PyTorchRole;
+import org.apache.submarine.commons.runtime.api.Role;
+import org.apache.submarine.commons.runtime.api.TensorFlowRole;
+import org.apache.submarine.commons.runtime.conf.SubmarineLogs;
+import org.apache.submarine.commons.runtime.fs.RemoteDirectoryManager;
+import org.apache.submarine.server.submitter.yarnservice.command.LaunchCommandFactory;
+import org.apache.submarine.server.submitter.yarnservice.utils.KerberosPrincipalFactory;
+import org.apache.submarine.server.submitter.yarnservice.utils.Localizer;
+import org.apache.submarine.server.submitter.yarnservice.utils.DockerUtilities;
+import org.apache.submarine.server.submitter.yarnservice.utils.EnvironmentUtilities;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -42,8 +45,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import static org.apache.submarine.runtimes.yarnservice.tensorflow.TensorFlowCommons.getDNSDomain;
-import static org.apache.submarine.runtimes.yarnservice.tensorflow.TensorFlowCommons.getUserName;
+import static org.apache.submarine.server.submitter.yarnservice.tensorflow.TensorFlowCommons.getDNSDomain;
+import static org.apache.submarine.server.submitter.yarnservice.tensorflow.TensorFlowCommons.getUserName;
/**
* Abstract base class that supports creating service specs for Native Service.
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/FileSystemOperations.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/FileSystemOperations.java
similarity index 90%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/FileSystemOperations.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/FileSystemOperations.java
index b0af145..261286e 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/FileSystemOperations.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/FileSystemOperations.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice;
+package org.apache.submarine.server.submitter.yarnservice;
import com.google.common.annotations.VisibleForTesting;
import org.apache.hadoop.conf.Configuration;
@@ -25,11 +28,11 @@ import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.hadoop.yarn.service.api.records.ConfigFile;
-import org.apache.submarine.common.ClientContext;
-import org.apache.submarine.common.conf.SubmarineConfiguration;
-import org.apache.submarine.common.conf.SubmarineLogs;
-import org.apache.submarine.common.fs.RemoteDirectoryManager;
-import org.apache.submarine.commons.utils.ZipUtilities;
+import org.apache.submarine.commons.runtime.ClientContext;
+import org.apache.submarine.commons.runtime.conf.SubmarineConfiguration;
+import org.apache.submarine.commons.runtime.conf.SubmarineLogs;
+import org.apache.submarine.commons.runtime.fs.RemoteDirectoryManager;
+import org.apache.submarine.server.submitter.yarnservice.utils.ZipUtilities;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/HadoopEnvironmentSetup.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/HadoopEnvironmentSetup.java
similarity index 87%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/HadoopEnvironmentSetup.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/HadoopEnvironmentSetup.java
index 6c7ab9a..ae64f10 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/HadoopEnvironmentSetup.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/HadoopEnvironmentSetup.java
@@ -6,25 +6,28 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice;
+package org.apache.submarine.server.submitter.yarnservice;
import org.apache.curator.shaded.com.google.common.collect.ImmutableList;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.submarine.client.cli.param.runjob.RunJobParameters;
-import org.apache.submarine.common.ClientContext;
-import org.apache.submarine.common.conf.SubmarineLogs;
-import org.apache.submarine.common.fs.RemoteDirectoryManager;
-import org.apache.submarine.commons.utils.ClassPathUtilities;
-import org.apache.submarine.commons.utils.EnvironmentUtilities;
+import org.apache.submarine.commons.runtime.ClientContext;
+import org.apache.submarine.commons.runtime.conf.SubmarineLogs;
+import org.apache.submarine.commons.runtime.fs.RemoteDirectoryManager;
+import org.apache.submarine.server.submitter.yarnservice.utils.ClassPathUtilities;
+import org.apache.submarine.server.submitter.yarnservice.utils.EnvironmentUtilities;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -34,7 +37,7 @@ import java.io.PrintWriter;
import java.util.List;
import java.util.Objects;
-import static org.apache.submarine.runtimes.yarnservice.FileSystemOperations.needHdfs;
+import static org.apache.submarine.server.submitter.yarnservice.FileSystemOperations.needHdfs;
/**
* This class contains helper methods to fill HDFS and Java environment
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/ServiceSpec.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/ServiceSpec.java
similarity index 61%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/ServiceSpec.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/ServiceSpec.java
index 0331695..e81c5ce 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/ServiceSpec.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/ServiceSpec.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice;
+package org.apache.submarine.server.submitter.yarnservice;
import java.io.IOException;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/ServiceSpecFileGenerator.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/ServiceSpecFileGenerator.java
similarity index 77%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/ServiceSpecFileGenerator.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/ServiceSpecFileGenerator.java
index b15765f..3433419 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/ServiceSpecFileGenerator.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/ServiceSpecFileGenerator.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice;
+package org.apache.submarine.server.submitter.yarnservice;
import org.apache.hadoop.yarn.service.api.records.Service;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/ServiceWrapper.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/ServiceWrapper.java
similarity index 80%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/ServiceWrapper.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/ServiceWrapper.java
index 7f10577..7d22d38 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/ServiceWrapper.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/ServiceWrapper.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice;
+package org.apache.submarine.server.submitter.yarnservice;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.Maps;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/WorkerComponentFactory.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/WorkerComponentFactory.java
similarity index 68%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/WorkerComponentFactory.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/WorkerComponentFactory.java
index 5c4950c..ffb1d9b 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/WorkerComponentFactory.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/WorkerComponentFactory.java
@@ -6,28 +6,31 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice;
+package org.apache.submarine.server.submitter.yarnservice;
import org.apache.hadoop.conf.Configuration;
import org.apache.submarine.client.cli.param.runjob.PyTorchRunJobParameters;
import org.apache.submarine.client.cli.param.runjob.RunJobParameters;
import org.apache.submarine.client.cli.param.runjob.TensorFlowRunJobParameters;
-import org.apache.submarine.client.cli.runjob.Framework;
-import org.apache.submarine.common.api.Role;
-import org.apache.submarine.common.fs.RemoteDirectoryManager;
-import org.apache.submarine.runtimes.yarnservice.command.LaunchCommandFactory;
-import org.apache.submarine.runtimes.yarnservice.command.PyTorchLaunchCommandFactory;
-import org.apache.submarine.runtimes.yarnservice.command.TensorFlowLaunchCommandFactory;
-import org.apache.submarine.runtimes.yarnservice.pytorch.component.PyTorchWorkerComponent;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.component.TensorFlowWorkerComponent;
+import org.apache.submarine.commons.runtime.Framework;
+import org.apache.submarine.commons.runtime.api.Role;
+import org.apache.submarine.commons.runtime.fs.RemoteDirectoryManager;
+import org.apache.submarine.server.submitter.yarnservice.pytorch.component.PyTorchWorkerComponent;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.component.TensorFlowWorkerComponent;
+import org.apache.submarine.server.submitter.yarnservice.command.LaunchCommandFactory;
+import org.apache.submarine.server.submitter.yarnservice.command.PyTorchLaunchCommandFactory;
+import org.apache.submarine.server.submitter.yarnservice.command.TensorFlowLaunchCommandFactory;
/**
* Factory class that helps creating Native Service components.
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/YarnServiceJobMonitor.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/YarnServiceJobMonitor.java
similarity index 51%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/YarnServiceJobMonitor.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/YarnServiceJobMonitor.java
index 90ee9b2..ab36ae0 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/YarnServiceJobMonitor.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/YarnServiceJobMonitor.java
@@ -1,27 +1,32 @@
-/**
- * Licensed 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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. See accompanying LICENSE file.
+/*
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice;
+package org.apache.submarine.server.submitter.yarnservice;
import org.apache.hadoop.yarn.client.api.AppAdminClient;
import org.apache.hadoop.yarn.exceptions.YarnException;
import org.apache.hadoop.yarn.service.api.records.Service;
import org.apache.hadoop.yarn.service.utils.ServiceApiUtil;
-import org.apache.submarine.common.ClientContext;
-import org.apache.submarine.common.api.JobStatus;
-import org.apache.submarine.runtimes.common.JobMonitor;
-import org.apache.submarine.runtimes.yarnservice.builder.JobStatusBuilder;
+import org.apache.submarine.commons.runtime.ClientContext;
+import org.apache.submarine.commons.runtime.api.JobStatus;
+import org.apache.submarine.commons.runtime.JobMonitor;
+import org.apache.submarine.server.submitter.yarnservice.builder.JobStatusBuilder;
import java.io.IOException;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/YarnServiceJobSubmitter.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/YarnServiceJobSubmitter.java
similarity index 79%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/YarnServiceJobSubmitter.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/YarnServiceJobSubmitter.java
index 1898f8c..aea511d 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/YarnServiceJobSubmitter.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/YarnServiceJobSubmitter.java
@@ -1,18 +1,23 @@
-/**
- * Licensed 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
+/*
+ * 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. See accompanying LICENSE file.
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice;
+package org.apache.submarine.server.submitter.yarnservice;
import com.google.common.annotations.VisibleForTesting;
import org.apache.hadoop.yarn.api.records.ApplicationId;
@@ -20,18 +25,18 @@ import org.apache.hadoop.yarn.client.api.AppAdminClient;
import org.apache.hadoop.yarn.exceptions.YarnException;
import org.apache.hadoop.yarn.service.api.records.Service;
import org.apache.hadoop.yarn.service.utils.ServiceApiUtil;
-import org.apache.submarine.client.cli.param.ParametersHolder;
import org.apache.submarine.client.cli.param.runjob.PyTorchRunJobParameters;
import org.apache.submarine.client.cli.param.runjob.RunJobParameters;
import org.apache.submarine.client.cli.param.runjob.TensorFlowRunJobParameters;
-import org.apache.submarine.client.cli.runjob.Framework;
-import org.apache.submarine.common.ClientContext;
-import org.apache.submarine.runtimes.common.JobSubmitter;
-import org.apache.submarine.runtimes.yarnservice.command.PyTorchLaunchCommandFactory;
-import org.apache.submarine.runtimes.yarnservice.command.TensorFlowLaunchCommandFactory;
-import org.apache.submarine.runtimes.yarnservice.pytorch.PyTorchServiceSpec;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.TensorFlowServiceSpec;
-import org.apache.submarine.commons.utils.Localizer;
+import org.apache.submarine.commons.runtime.Framework;
+import org.apache.submarine.commons.runtime.ClientContext;
+import org.apache.submarine.commons.runtime.JobSubmitter;
+import org.apache.submarine.commons.runtime.param.Parameter;
+import org.apache.submarine.server.submitter.yarnservice.command.PyTorchLaunchCommandFactory;
+import org.apache.submarine.server.submitter.yarnservice.command.TensorFlowLaunchCommandFactory;
+import org.apache.submarine.server.submitter.yarnservice.pytorch.PyTorchServiceSpec;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.TensorFlowServiceSpec;
+import org.apache.submarine.server.submitter.yarnservice.utils.Localizer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -58,7 +63,7 @@ public class YarnServiceJobSubmitter implements JobSubmitter {
* {@inheritDoc}
*/
@Override
- public ApplicationId submitJob(ParametersHolder paramsHolder)
+ public ApplicationId submitJob(Parameter paramsHolder)
throws IOException, YarnException {
Framework framework = paramsHolder.getFramework();
RunJobParameters parameters =
diff --git a/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/runtimes/tony/TonyRuntimeFactory.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/YarnServiceRuntimeFactory.java
similarity index 69%
rename from submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/runtimes/tony/TonyRuntimeFactory.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/YarnServiceRuntimeFactory.java
index 42e8c9a..0976d64 100644
--- a/submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/runtimes/tony/TonyRuntimeFactory.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/YarnServiceRuntimeFactory.java
@@ -17,10 +17,8 @@
* under the License.
*/
-package org.apache.submarine.runtimes.tony;
+package org.apache.submarine.server.submitter.yarnservice;
-import com.linkedin.tony.TonyClient;
-import org.apache.hadoop.conf.Configuration;
import org.apache.submarine.commons.runtime.ClientContext;
import org.apache.submarine.commons.runtime.RuntimeFactory;
import org.apache.submarine.commons.runtime.fs.FSBasedSubmarineStorageImpl;
@@ -28,30 +26,20 @@ import org.apache.submarine.commons.runtime.JobMonitor;
import org.apache.submarine.commons.runtime.JobSubmitter;
import org.apache.submarine.commons.runtime.fs.SubmarineStorage;
-/**
- * Implementation of RuntimeFactory with Tony Runtime
- */
-public class TonyRuntimeFactory extends RuntimeFactory {
- private TonyClient tonyClient;
- private TonyJobSubmitter submitter;
- private TonyJobMonitor monitor;
+public class YarnServiceRuntimeFactory extends RuntimeFactory {
- public TonyRuntimeFactory(ClientContext clientContext) {
+ public YarnServiceRuntimeFactory(ClientContext clientContext) {
super(clientContext);
- submitter = new TonyJobSubmitter();
- tonyClient = new TonyClient(submitter, new Configuration());
- monitor = new TonyJobMonitor(clientContext, tonyClient);
- submitter.setTonyClient(tonyClient);
}
@Override
protected JobSubmitter internalCreateJobSubmitter() {
- return submitter;
+ return new YarnServiceJobSubmitter(super.clientContext);
}
@Override
protected JobMonitor internalCreateJobMonitor() {
- return monitor;
+ return new YarnServiceJobMonitor(super.clientContext);
}
@Override
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/YarnServiceUtils.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/YarnServiceUtils.java
similarity index 63%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/YarnServiceUtils.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/YarnServiceUtils.java
index 15382b6..018cbcf 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/YarnServiceUtils.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/YarnServiceUtils.java
@@ -1,18 +1,23 @@
-/**
- * Licensed 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
+/*
+ * 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. See accompanying LICENSE file.
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice;
+package org.apache.submarine.server.submitter.yarnservice;
import com.google.common.annotations.VisibleForTesting;
import org.apache.hadoop.conf.Configuration;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/builder/JobComponentStatusBuilder.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/builder/JobComponentStatusBuilder.java
new file mode 100644
index 0000000..d883f11
--- /dev/null
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/builder/JobComponentStatusBuilder.java
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+package org.apache.submarine.server.submitter.yarnservice.builder;
+
+import org.apache.hadoop.yarn.service.api.records.Component;
+import org.apache.hadoop.yarn.service.api.records.Container;
+import org.apache.hadoop.yarn.service.api.records.ContainerState;
+import org.apache.submarine.commons.runtime.api.JobComponentStatus;
+
+public class JobComponentStatusBuilder {
+ public static JobComponentStatus fromServiceComponent(Component component) {
+ long totalAskedContainers = component.getNumberOfContainers();
+ int numReadyContainers = 0;
+ int numRunningButUnreadyContainers = 0;
+ String compName = component.getName();
+
+ for (Container c : component.getContainers()) {
+ if (c.getState() == ContainerState.READY) {
+ numReadyContainers++;
+ } else if (c.getState() == ContainerState.RUNNING_BUT_UNREADY) {
+ numRunningButUnreadyContainers++;
+ }
+ }
+
+ return new JobComponentStatus(compName, numReadyContainers,
+ numRunningButUnreadyContainers, totalAskedContainers);
+ }
+
+}
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/builder/JobStatusBuilder.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/builder/JobStatusBuilder.java
similarity index 56%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/builder/JobStatusBuilder.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/builder/JobStatusBuilder.java
index fc2101a..5d175af 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/builder/JobStatusBuilder.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/builder/JobStatusBuilder.java
@@ -1,24 +1,30 @@
-/**
- * Licensed 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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. See accompanying LICENSE file.
+/*
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.builder;
+
+package org.apache.submarine.server.submitter.yarnservice.builder;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.hadoop.yarn.service.api.records.Service;
import org.apache.hadoop.yarn.service.api.records.ServiceState;
-import org.apache.submarine.common.api.JobComponentStatus;
-import org.apache.submarine.common.api.JobState;
-import org.apache.submarine.common.api.JobStatus;
+import org.apache.submarine.commons.runtime.api.JobComponentStatus;
+import org.apache.submarine.commons.runtime.api.JobState;
+import org.apache.submarine.commons.runtime.api.JobStatus;
import java.util.ArrayList;
import java.util.List;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/command/AbstractLaunchCommand.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/command/AbstractLaunchCommand.java
similarity index 78%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/command/AbstractLaunchCommand.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/command/AbstractLaunchCommand.java
index 736b772..eac9cb4 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/command/AbstractLaunchCommand.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/command/AbstractLaunchCommand.java
@@ -6,19 +6,22 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.command;
+package org.apache.submarine.server.submitter.yarnservice.command;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.submarine.client.cli.param.runjob.RunJobParameters;
-import org.apache.submarine.runtimes.yarnservice.HadoopEnvironmentSetup;
+import org.apache.submarine.server.submitter.yarnservice.HadoopEnvironmentSetup;
import java.io.IOException;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/command/LaunchCommandFactory.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/command/LaunchCommandFactory.java
similarity index 58%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/command/LaunchCommandFactory.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/command/LaunchCommandFactory.java
index a85e661..071c6a8 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/command/LaunchCommandFactory.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/command/LaunchCommandFactory.java
@@ -6,18 +6,21 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.command;
+package org.apache.submarine.server.submitter.yarnservice.command;
import org.apache.hadoop.yarn.service.api.records.Component;
-import org.apache.submarine.common.api.Role;
+import org.apache.submarine.commons.runtime.api.Role;
import java.io.IOException;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/command/LaunchScriptBuilder.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/command/LaunchScriptBuilder.java
similarity index 85%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/command/LaunchScriptBuilder.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/command/LaunchScriptBuilder.java
index 6b6ab74..9ec4b2f 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/command/LaunchScriptBuilder.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/command/LaunchScriptBuilder.java
@@ -6,19 +6,22 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.command;
+package org.apache.submarine.server.submitter.yarnservice.command;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.submarine.client.cli.param.runjob.RunJobParameters;
-import org.apache.submarine.runtimes.yarnservice.HadoopEnvironmentSetup;
+import org.apache.submarine.server.submitter.yarnservice.HadoopEnvironmentSetup;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/command/PyTorchLaunchCommandFactory.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/command/PyTorchLaunchCommandFactory.java
similarity index 71%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/command/PyTorchLaunchCommandFactory.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/command/PyTorchLaunchCommandFactory.java
index 0f1437f..84e5a8f 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/command/PyTorchLaunchCommandFactory.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/command/PyTorchLaunchCommandFactory.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.command;
+package org.apache.submarine.server.submitter.yarnservice.command;
import java.io.IOException;
import java.util.Objects;
@@ -22,10 +25,10 @@ import java.util.Objects;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.submarine.client.cli.param.runjob.PyTorchRunJobParameters;
-import org.apache.submarine.common.api.PyTorchRole;
-import org.apache.submarine.common.api.Role;
-import org.apache.submarine.runtimes.yarnservice.HadoopEnvironmentSetup;
-import org.apache.submarine.runtimes.yarnservice.pytorch.command.PyTorchWorkerLaunchCommand;
+import org.apache.submarine.commons.runtime.api.PyTorchRole;
+import org.apache.submarine.commons.runtime.api.Role;
+import org.apache.submarine.server.submitter.yarnservice.HadoopEnvironmentSetup;
+import org.apache.submarine.server.submitter.yarnservice.pytorch.command.PyTorchWorkerLaunchCommand;
/**
* Simple factory to create instances of {@link AbstractLaunchCommand}
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/command/TensorFlowLaunchCommandFactory.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/command/TensorFlowLaunchCommandFactory.java
similarity index 69%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/command/TensorFlowLaunchCommandFactory.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/command/TensorFlowLaunchCommandFactory.java
index 7bc5aa2..c853a00 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/command/TensorFlowLaunchCommandFactory.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/command/TensorFlowLaunchCommandFactory.java
@@ -6,25 +6,28 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.command;
+package org.apache.submarine.server.submitter.yarnservice.command;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.submarine.client.cli.param.runjob.TensorFlowRunJobParameters;
-import org.apache.submarine.common.api.Role;
-import org.apache.submarine.common.api.TensorFlowRole;
-import org.apache.submarine.runtimes.yarnservice.HadoopEnvironmentSetup;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.command.TensorBoardLaunchCommand;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.command.TensorFlowPsLaunchCommand;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.command.TensorFlowWorkerLaunchCommand;
+import org.apache.submarine.commons.runtime.api.Role;
+import org.apache.submarine.commons.runtime.api.TensorFlowRole;
+import org.apache.submarine.server.submitter.yarnservice.HadoopEnvironmentSetup;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.command.TensorBoardLaunchCommand;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.command.TensorFlowPsLaunchCommand;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.command.TensorFlowWorkerLaunchCommand;
import java.io.IOException;
import java.util.Objects;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/pytorch/PyTorchServiceSpec.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/pytorch/PyTorchServiceSpec.java
similarity index 66%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/pytorch/PyTorchServiceSpec.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/pytorch/PyTorchServiceSpec.java
index e147928..1b471f7 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/pytorch/PyTorchServiceSpec.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/pytorch/PyTorchServiceSpec.java
@@ -6,26 +6,29 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.pytorch;
+package org.apache.submarine.server.submitter.yarnservice.pytorch;
import java.io.IOException;
import org.apache.submarine.client.cli.param.runjob.PyTorchRunJobParameters;
-import org.apache.submarine.client.cli.runjob.Framework;
-import org.apache.submarine.common.ClientContext;
-import org.apache.submarine.runtimes.yarnservice.AbstractServiceSpec;
-import org.apache.submarine.runtimes.yarnservice.FileSystemOperations;
-import org.apache.submarine.runtimes.yarnservice.ServiceWrapper;
-import org.apache.submarine.runtimes.yarnservice.command.PyTorchLaunchCommandFactory;
-import org.apache.submarine.commons.utils.Localizer;
+import org.apache.submarine.commons.runtime.Framework;
+import org.apache.submarine.commons.runtime.ClientContext;
+import org.apache.submarine.server.submitter.yarnservice.AbstractServiceSpec;
+import org.apache.submarine.server.submitter.yarnservice.ServiceWrapper;
+import org.apache.submarine.server.submitter.yarnservice.FileSystemOperations;
+import org.apache.submarine.server.submitter.yarnservice.command.PyTorchLaunchCommandFactory;
+import org.apache.submarine.server.submitter.yarnservice.utils.Localizer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/pytorch/command/PyTorchWorkerLaunchCommand.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/pytorch/command/PyTorchWorkerLaunchCommand.java
similarity index 75%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/pytorch/command/PyTorchWorkerLaunchCommand.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/pytorch/command/PyTorchWorkerLaunchCommand.java
index 70a6d41..9eefa2d 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/pytorch/command/PyTorchWorkerLaunchCommand.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/pytorch/command/PyTorchWorkerLaunchCommand.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.pytorch.command;
+package org.apache.submarine.server.submitter.yarnservice.pytorch.command;
import java.io.IOException;
@@ -22,11 +25,11 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.submarine.client.cli.param.runjob.PyTorchRunJobParameters;
-import org.apache.submarine.common.api.Role;
-import org.apache.submarine.common.conf.SubmarineLogs;
-import org.apache.submarine.runtimes.yarnservice.HadoopEnvironmentSetup;
-import org.apache.submarine.runtimes.yarnservice.command.AbstractLaunchCommand;
-import org.apache.submarine.runtimes.yarnservice.command.LaunchScriptBuilder;
+import org.apache.submarine.commons.runtime.api.Role;
+import org.apache.submarine.commons.runtime.conf.SubmarineLogs;
+import org.apache.submarine.server.submitter.yarnservice.HadoopEnvironmentSetup;
+import org.apache.submarine.server.submitter.yarnservice.command.AbstractLaunchCommand;
+import org.apache.submarine.server.submitter.yarnservice.command.LaunchScriptBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/pytorch/component/PyTorchWorkerComponent.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/pytorch/component/PyTorchWorkerComponent.java
similarity index 62%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/pytorch/component/PyTorchWorkerComponent.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/pytorch/component/PyTorchWorkerComponent.java
index 5961634..c785a25 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/pytorch/component/PyTorchWorkerComponent.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/pytorch/component/PyTorchWorkerComponent.java
@@ -6,24 +6,27 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.pytorch.component;
+package org.apache.submarine.server.submitter.yarnservice.pytorch.component;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.submarine.client.cli.param.runjob.PyTorchRunJobParameters;
-import org.apache.submarine.common.api.Role;
-import org.apache.submarine.common.fs.RemoteDirectoryManager;
-import org.apache.submarine.runtimes.yarnservice.AbstractComponent;
-import org.apache.submarine.runtimes.yarnservice.FileSystemOperations;
-import org.apache.submarine.runtimes.yarnservice.command.PyTorchLaunchCommandFactory;
+import org.apache.submarine.commons.runtime.api.Role;
+import org.apache.submarine.commons.runtime.fs.RemoteDirectoryManager;
+import org.apache.submarine.server.submitter.yarnservice.AbstractComponent;
+import org.apache.submarine.server.submitter.yarnservice.FileSystemOperations;
+import org.apache.submarine.server.submitter.yarnservice.command.PyTorchLaunchCommandFactory;
import java.io.IOException;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/TensorFlowCommons.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/TensorFlowCommons.java
similarity index 83%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/TensorFlowCommons.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/TensorFlowCommons.java
index e6a2a31..424fc6d 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/TensorFlowCommons.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/TensorFlowCommons.java
@@ -6,22 +6,25 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.tensorflow;
+package org.apache.submarine.server.submitter.yarnservice.tensorflow;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.service.api.ServiceApiConstants;
import org.apache.hadoop.yarn.service.api.records.Component;
-import org.apache.submarine.common.Envs;
-import org.apache.submarine.common.api.Role;
-import org.apache.submarine.runtimes.yarnservice.YarnServiceUtils;
+import org.apache.submarine.commons.runtime.conf.Envs;
+import org.apache.submarine.commons.runtime.api.Role;
+import org.apache.submarine.server.submitter.yarnservice.YarnServiceUtils;
import java.util.Map;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/TensorFlowServiceSpec.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/TensorFlowServiceSpec.java
similarity index 68%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/TensorFlowServiceSpec.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/TensorFlowServiceSpec.java
index e4c4930..e46b126 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/TensorFlowServiceSpec.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/TensorFlowServiceSpec.java
@@ -6,33 +6,34 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.tensorflow;
+package org.apache.submarine.server.submitter.yarnservice.tensorflow;
import org.apache.submarine.client.cli.param.runjob.TensorFlowRunJobParameters;
-import org.apache.submarine.client.cli.runjob.Framework;
-import org.apache.submarine.common.ClientContext;
-import org.apache.submarine.runtimes.yarnservice.AbstractServiceSpec;
-import org.apache.submarine.runtimes.yarnservice.FileSystemOperations;
-import org.apache.submarine.runtimes.yarnservice.ServiceWrapper;
-import org.apache.submarine.runtimes.yarnservice.command.TensorFlowLaunchCommandFactory;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.component.TensorBoardComponent;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.component.TensorFlowPsComponent;
-import org.apache.submarine.commons.utils.Localizer;
+import org.apache.submarine.commons.runtime.Framework;
+import org.apache.submarine.commons.runtime.ClientContext;
+import org.apache.submarine.server.submitter.yarnservice.AbstractServiceSpec;
+import org.apache.submarine.server.submitter.yarnservice.ServiceWrapper;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.component.TensorBoardComponent;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.component.TensorFlowPsComponent;
+import org.apache.submarine.server.submitter.yarnservice.FileSystemOperations;
+import org.apache.submarine.server.submitter.yarnservice.command.TensorFlowLaunchCommandFactory;
+import org.apache.submarine.server.submitter.yarnservice.utils.Localizer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
-import static org.apache.submarine.runtimes.yarnservice.tensorflow.component.TensorBoardComponent.TENSORBOARD_QUICKLINK_LABEL;
-
/**
* This class contains all the logic to create an instance
* of a Service object for TensorFlow.
@@ -83,7 +84,7 @@ public class TensorFlowServiceSpec extends AbstractServiceSpec {
(TensorFlowLaunchCommandFactory) launchCommandFactory, yarnConfig);
serviceWrapper.addComponent(tbComponent);
- addQuicklink(serviceWrapper.getService(), TENSORBOARD_QUICKLINK_LABEL,
+ addQuicklink(serviceWrapper.getService(), TensorBoardComponent.TENSORBOARD_QUICKLINK_LABEL,
tbComponent.getTensorboardLink());
}
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/TensorBoardLaunchCommand.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/command/TensorBoardLaunchCommand.java
similarity index 74%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/TensorBoardLaunchCommand.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/command/TensorBoardLaunchCommand.java
index 67042b4..5ddf837 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/TensorBoardLaunchCommand.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/command/TensorBoardLaunchCommand.java
@@ -6,22 +6,25 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.tensorflow.command;
+package org.apache.submarine.server.submitter.yarnservice.tensorflow.command;
import org.apache.commons.lang3.StringUtils;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.submarine.client.cli.param.runjob.RunJobParameters;
-import org.apache.submarine.common.api.Role;
-import org.apache.submarine.runtimes.yarnservice.HadoopEnvironmentSetup;
-import org.apache.submarine.runtimes.yarnservice.command.AbstractLaunchCommand;
+import org.apache.submarine.commons.runtime.api.Role;
+import org.apache.submarine.server.submitter.yarnservice.HadoopEnvironmentSetup;
+import org.apache.submarine.server.submitter.yarnservice.command.AbstractLaunchCommand;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/TensorFlowLaunchCommand.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/command/TensorFlowLaunchCommand.java
similarity index 76%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/TensorFlowLaunchCommand.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/command/TensorFlowLaunchCommand.java
index 1071e24..b88ea24 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/TensorFlowLaunchCommand.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/command/TensorFlowLaunchCommand.java
@@ -6,24 +6,27 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.tensorflow.command;
+package org.apache.submarine.server.submitter.yarnservice.tensorflow.command;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.submarine.client.cli.param.runjob.TensorFlowRunJobParameters;
-import org.apache.submarine.common.api.Role;
-import org.apache.submarine.runtimes.yarnservice.HadoopEnvironmentSetup;
-import org.apache.submarine.runtimes.yarnservice.command.AbstractLaunchCommand;
-import org.apache.submarine.runtimes.yarnservice.command.LaunchScriptBuilder;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.TensorFlowCommons;
+import org.apache.submarine.commons.runtime.api.Role;
+import org.apache.submarine.server.submitter.yarnservice.HadoopEnvironmentSetup;
+import org.apache.submarine.server.submitter.yarnservice.command.AbstractLaunchCommand;
+import org.apache.submarine.server.submitter.yarnservice.command.LaunchScriptBuilder;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.TensorFlowCommons;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/TensorFlowPsLaunchCommand.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/command/TensorFlowPsLaunchCommand.java
similarity index 73%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/TensorFlowPsLaunchCommand.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/command/TensorFlowPsLaunchCommand.java
index e8497f1..abb352e 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/TensorFlowPsLaunchCommand.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/command/TensorFlowPsLaunchCommand.java
@@ -6,23 +6,26 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.tensorflow.command;
+package org.apache.submarine.server.submitter.yarnservice.tensorflow.command;
import org.apache.commons.lang3.StringUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.submarine.client.cli.param.runjob.TensorFlowRunJobParameters;
-import org.apache.submarine.common.api.Role;
-import org.apache.submarine.common.conf.SubmarineLogs;
-import org.apache.submarine.runtimes.yarnservice.HadoopEnvironmentSetup;
+import org.apache.submarine.commons.runtime.api.Role;
+import org.apache.submarine.commons.runtime.conf.SubmarineLogs;
+import org.apache.submarine.server.submitter.yarnservice.HadoopEnvironmentSetup;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/TensorFlowWorkerLaunchCommand.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/command/TensorFlowWorkerLaunchCommand.java
similarity index 72%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/TensorFlowWorkerLaunchCommand.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/command/TensorFlowWorkerLaunchCommand.java
index 71f3bad..3c5c374 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/TensorFlowWorkerLaunchCommand.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/command/TensorFlowWorkerLaunchCommand.java
@@ -6,23 +6,26 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.tensorflow.command;
+package org.apache.submarine.server.submitter.yarnservice.tensorflow.command;
import org.apache.commons.lang3.StringUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.submarine.client.cli.param.runjob.TensorFlowRunJobParameters;
-import org.apache.submarine.common.api.Role;
-import org.apache.submarine.common.conf.SubmarineLogs;
-import org.apache.submarine.runtimes.yarnservice.HadoopEnvironmentSetup;
+import org.apache.submarine.commons.runtime.api.Role;
+import org.apache.submarine.commons.runtime.conf.SubmarineLogs;
+import org.apache.submarine.server.submitter.yarnservice.HadoopEnvironmentSetup;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/TensorBoardComponent.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/TensorBoardComponent.java
similarity index 72%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/TensorBoardComponent.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/TensorBoardComponent.java
index 5d3a41d..54c43db 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/TensorBoardComponent.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/TensorBoardComponent.java
@@ -6,30 +6,33 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.tensorflow.component;
+package org.apache.submarine.server.submitter.yarnservice.tensorflow.component;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.hadoop.yarn.service.api.records.Component.RestartPolicyEnum;
import org.apache.submarine.client.cli.param.runjob.RunJobParameters;
import org.apache.submarine.client.cli.param.runjob.TensorFlowRunJobParameters;
-import org.apache.submarine.common.api.TensorFlowRole;
-import org.apache.submarine.common.fs.RemoteDirectoryManager;
-import org.apache.submarine.runtimes.yarnservice.AbstractComponent;
-import org.apache.submarine.runtimes.yarnservice.FileSystemOperations;
-import org.apache.submarine.runtimes.yarnservice.YarnServiceUtils;
-import org.apache.submarine.runtimes.yarnservice.command.TensorFlowLaunchCommandFactory;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.TensorFlowCommons;
-import org.apache.submarine.commons.utils.DockerUtilities;
-import org.apache.submarine.commons.utils.SubmarineResourceUtils;
+import org.apache.submarine.commons.runtime.api.TensorFlowRole;
+import org.apache.submarine.commons.runtime.fs.RemoteDirectoryManager;
+import org.apache.submarine.server.submitter.yarnservice.AbstractComponent;
+import org.apache.submarine.server.submitter.yarnservice.FileSystemOperations;
+import org.apache.submarine.server.submitter.yarnservice.YarnServiceUtils;
+import org.apache.submarine.server.submitter.yarnservice.command.TensorFlowLaunchCommandFactory;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.TensorFlowCommons;
+import org.apache.submarine.server.submitter.yarnservice.utils.DockerUtilities;
+import org.apache.submarine.server.submitter.yarnservice.utils.SubmarineResourceUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/TensorFlowPsComponent.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/TensorFlowPsComponent.java
similarity index 69%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/TensorFlowPsComponent.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/TensorFlowPsComponent.java
index 4c64804..e3d3901 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/TensorFlowPsComponent.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/TensorFlowPsComponent.java
@@ -6,28 +6,31 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.tensorflow.component;
+package org.apache.submarine.server.submitter.yarnservice.tensorflow.component;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.submarine.client.cli.param.runjob.RunJobParameters;
import org.apache.submarine.client.cli.param.runjob.TensorFlowRunJobParameters;
-import org.apache.submarine.common.api.TensorFlowRole;
-import org.apache.submarine.common.fs.RemoteDirectoryManager;
-import org.apache.submarine.runtimes.yarnservice.AbstractComponent;
-import org.apache.submarine.runtimes.yarnservice.FileSystemOperations;
-import org.apache.submarine.runtimes.yarnservice.command.TensorFlowLaunchCommandFactory;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.TensorFlowCommons;
-import org.apache.submarine.commons.utils.DockerUtilities;
-import org.apache.submarine.commons.utils.SubmarineResourceUtils;
+import org.apache.submarine.commons.runtime.api.TensorFlowRole;
+import org.apache.submarine.commons.runtime.fs.RemoteDirectoryManager;
+import org.apache.submarine.server.submitter.yarnservice.AbstractComponent;
+import org.apache.submarine.server.submitter.yarnservice.FileSystemOperations;
+import org.apache.submarine.server.submitter.yarnservice.command.TensorFlowLaunchCommandFactory;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.TensorFlowCommons;
+import org.apache.submarine.server.submitter.yarnservice.utils.DockerUtilities;
+import org.apache.submarine.server.submitter.yarnservice.utils.SubmarineResourceUtils;
import java.io.IOException;
import java.util.Objects;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/TensorFlowWorkerComponent.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/TensorFlowWorkerComponent.java
similarity index 62%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/TensorFlowWorkerComponent.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/TensorFlowWorkerComponent.java
index 42e52b3..7a02084 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/TensorFlowWorkerComponent.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/TensorFlowWorkerComponent.java
@@ -6,24 +6,27 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.tensorflow.component;
+package org.apache.submarine.server.submitter.yarnservice.tensorflow.component;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.submarine.client.cli.param.runjob.TensorFlowRunJobParameters;
-import org.apache.submarine.common.api.Role;
-import org.apache.submarine.common.fs.RemoteDirectoryManager;
-import org.apache.submarine.runtimes.yarnservice.AbstractComponent;
-import org.apache.submarine.runtimes.yarnservice.FileSystemOperations;
-import org.apache.submarine.runtimes.yarnservice.command.TensorFlowLaunchCommandFactory;
+import org.apache.submarine.commons.runtime.api.Role;
+import org.apache.submarine.commons.runtime.fs.RemoteDirectoryManager;
+import org.apache.submarine.server.submitter.yarnservice.AbstractComponent;
+import org.apache.submarine.server.submitter.yarnservice.FileSystemOperations;
+import org.apache.submarine.server.submitter.yarnservice.command.TensorFlowLaunchCommandFactory;
import java.io.IOException;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/ClassPathUtilities.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/ClassPathUtilities.java
similarity index 78%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/ClassPathUtilities.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/ClassPathUtilities.java
index 24fa34c..4f095fd 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/ClassPathUtilities.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/ClassPathUtilities.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.commons.utils;
+package org.apache.submarine.server.submitter.yarnservice.utils;
import java.io.File;
import java.util.StringTokenizer;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/DockerUtilities.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/DockerUtilities.java
similarity index 66%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/DockerUtilities.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/DockerUtilities.java
index 497d03d..8542878 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/DockerUtilities.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/DockerUtilities.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.commons.utils;
+package org.apache.submarine.server.submitter.yarnservice.utils;
import org.apache.hadoop.yarn.service.api.records.Artifact;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/EnvironmentUtilities.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/EnvironmentUtilities.java
similarity index 89%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/EnvironmentUtilities.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/EnvironmentUtilities.java
index 6633ec6..aad3f64 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/EnvironmentUtilities.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/EnvironmentUtilities.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.commons.utils;
+package org.apache.submarine.server.submitter.yarnservice.utils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.service.api.records.Service;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/KerberosPrincipalFactory.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/KerberosPrincipalFactory.java
similarity index 84%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/KerberosPrincipalFactory.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/KerberosPrincipalFactory.java
index 4c8e501..17f2208 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/KerberosPrincipalFactory.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/KerberosPrincipalFactory.java
@@ -6,23 +6,26 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.commons.utils;
+package org.apache.submarine.server.submitter.yarnservice.utils;
import org.apache.commons.lang3.StringUtils;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.yarn.service.api.records.KerberosPrincipal;
import org.apache.submarine.client.cli.param.runjob.RunJobParameters;
-import org.apache.submarine.common.fs.RemoteDirectoryManager;
-import org.apache.submarine.runtimes.yarnservice.FileSystemOperations;
+import org.apache.submarine.commons.runtime.fs.RemoteDirectoryManager;
+import org.apache.submarine.server.submitter.yarnservice.FileSystemOperations;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/Localizer.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/Localizer.java
similarity index 88%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/Localizer.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/Localizer.java
index a0f8a1b..34cc0c7 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/Localizer.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/Localizer.java
@@ -6,23 +6,26 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.commons.utils;
+package org.apache.submarine.server.submitter.yarnservice.utils;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.yarn.service.api.records.ConfigFile;
import org.apache.hadoop.yarn.service.api.records.Service;
import org.apache.submarine.client.cli.param.Localization;
import org.apache.submarine.client.cli.param.runjob.RunJobParameters;
-import org.apache.submarine.common.fs.RemoteDirectoryManager;
-import org.apache.submarine.runtimes.yarnservice.FileSystemOperations;
+import org.apache.submarine.commons.runtime.fs.RemoteDirectoryManager;
+import org.apache.submarine.server.submitter.yarnservice.FileSystemOperations;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -31,8 +34,8 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
-import static org.apache.submarine.runtimes.yarnservice.FileSystemOperations.needHdfs;
-import static org.apache.submarine.commons.utils.EnvironmentUtilities.appendToEnv;
+import static org.apache.submarine.server.submitter.yarnservice.FileSystemOperations.needHdfs;
+import static org.apache.submarine.server.submitter.yarnservice.utils.EnvironmentUtilities.appendToEnv;
/**
* This class holds all dependencies in order to localize dependencies
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/SubmarineResourceUtils.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/SubmarineResourceUtils.java
similarity index 78%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/SubmarineResourceUtils.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/SubmarineResourceUtils.java
index c3aca0d..6335249 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/SubmarineResourceUtils.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/SubmarineResourceUtils.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.commons.utils;
+package org.apache.submarine.server.submitter.yarnservice.utils;
import org.apache.hadoop.yarn.service.api.records.Resource;
import org.apache.hadoop.yarn.service.api.records.ResourceInformation;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/ZipUtilities.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/ZipUtilities.java
similarity index 84%
rename from submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/ZipUtilities.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/ZipUtilities.java
index 7cdf326..51ce6a6 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/ZipUtilities.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/ZipUtilities.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.commons.utils;
+package org.apache.submarine.server.submitter.yarnservice.utils;
import com.google.common.annotations.VisibleForTesting;
import org.slf4j.Logger;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/package-info.java b/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/package-info.java
deleted file mode 100644
index c3205b6..0000000
--- a/submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/utils/package-info.java
+++ /dev/null
@@ -1,19 +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.
- */
-/**
- * This package contains classes utility classes.
- */
-package org.apache.submarine.commons.utils;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/FileUtilitiesForTests.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/FileUtilitiesForTests.java
index 49e9103..3282c32 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/FileUtilitiesForTests.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/FileUtilitiesForTests.java
@@ -6,12 +6,15 @@
* 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.
+ *
+ * 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.
*/
package org.apache.submarine;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/ParamBuilderForTest.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/ParamBuilderForTest.java
index 12ea318..74fccc9 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/ParamBuilderForTest.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/ParamBuilderForTest.java
@@ -6,12 +6,15 @@
* 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.
+ *
+ * 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.
*/
package org.apache.submarine.client.cli.yarnservice;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/TestYarnServiceRunJobCli.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/TestYarnServiceRunJobCli.java
index e1ebfb9..b347911 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/TestYarnServiceRunJobCli.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/TestYarnServiceRunJobCli.java
@@ -1,4 +1,4 @@
-/**
+/*
* 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
@@ -6,14 +6,15 @@
* 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.
+ *
+ * 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.
*/
package org.apache.submarine.client.cli.yarnservice;
@@ -27,17 +28,17 @@ import org.apache.hadoop.yarn.service.api.records.Service;
import org.apache.submarine.client.cli.param.runjob.RunJobParameters;
import org.apache.submarine.client.cli.param.runjob.TensorFlowRunJobParameters;
import org.apache.submarine.client.cli.runjob.RunJobCli;
-import org.apache.submarine.common.MockClientContext;
-import org.apache.submarine.common.api.TensorFlowRole;
-import org.apache.submarine.common.conf.SubmarineLogs;
-import org.apache.submarine.runtimes.common.JobSubmitter;
-import org.apache.submarine.runtimes.common.StorageKeyConstants;
-import org.apache.submarine.runtimes.common.SubmarineStorage;
-import org.apache.submarine.runtimes.yarnservice.ServiceSpecFileGenerator;
-import org.apache.submarine.runtimes.yarnservice.ServiceWrapper;
-import org.apache.submarine.runtimes.yarnservice.YarnServiceJobSubmitter;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.component.TensorBoardComponent;
-import org.apache.submarine.commons.utils.ZipUtilities;
+import org.apache.submarine.commons.runtime.MockClientContext;
+import org.apache.submarine.commons.runtime.api.TensorFlowRole;
+import org.apache.submarine.commons.runtime.conf.SubmarineLogs;
+import org.apache.submarine.commons.runtime.JobSubmitter;
+import org.apache.submarine.commons.runtime.fs.StorageKeyConstants;
+import org.apache.submarine.commons.runtime.fs.SubmarineStorage;
+import org.apache.submarine.server.submitter.yarnservice.ServiceSpecFileGenerator;
+import org.apache.submarine.server.submitter.yarnservice.ServiceWrapper;
+import org.apache.submarine.server.submitter.yarnservice.YarnServiceJobSubmitter;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.component.TensorBoardComponent;
+import org.apache.submarine.server.submitter.yarnservice.utils.ZipUtilities;
import org.apache.hadoop.yarn.util.resource.Resources;
import org.junit.After;
import org.junit.Assert;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/TestYarnServiceRunJobCliCommons.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/TestYarnServiceRunJobCliCommons.java
index 2eba399..eff2ad6 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/TestYarnServiceRunJobCliCommons.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/TestYarnServiceRunJobCliCommons.java
@@ -6,12 +6,15 @@
* 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.
+ *
+ * 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.
*/
package org.apache.submarine.client.cli.yarnservice;
@@ -20,10 +23,10 @@ import org.apache.hadoop.yarn.client.api.AppAdminClient;
import org.apache.hadoop.yarn.exceptions.YarnException;
import org.apache.hadoop.yarn.service.api.records.Service;
import org.apache.submarine.FileUtilitiesForTests;
-import org.apache.submarine.common.conf.SubmarineLogs;
-import org.apache.submarine.runtimes.common.JobSubmitter;
-import org.apache.submarine.runtimes.yarnservice.YarnServiceJobSubmitter;
-import org.apache.submarine.runtimes.yarnservice.YarnServiceUtils;
+import org.apache.submarine.commons.runtime.conf.SubmarineLogs;
+import org.apache.submarine.commons.runtime.JobSubmitter;
+import org.apache.submarine.server.submitter.yarnservice.YarnServiceJobSubmitter;
+import org.apache.submarine.server.submitter.yarnservice.YarnServiceUtils;
import java.io.IOException;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/TestYarnServiceRunJobCliLocalization.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/TestYarnServiceRunJobCliLocalization.java
index ee06720..a6a7731 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/TestYarnServiceRunJobCliLocalization.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/TestYarnServiceRunJobCliLocalization.java
@@ -6,12 +6,15 @@
* 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.
+ *
+ * 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.
*/
package org.apache.submarine.client.cli.yarnservice;
@@ -21,10 +24,10 @@ import org.apache.hadoop.yarn.exceptions.YarnException;
import org.apache.hadoop.yarn.service.api.records.ConfigFile;
import org.apache.hadoop.yarn.service.api.records.Service;
import org.apache.submarine.client.cli.runjob.RunJobCli;
-import org.apache.submarine.common.MockClientContext;
-import org.apache.submarine.common.conf.SubmarineConfiguration;
-import org.apache.submarine.common.conf.SubmarineLogs;
-import org.apache.submarine.common.fs.RemoteDirectoryManager;
+import org.apache.submarine.commons.runtime.MockClientContext;
+import org.apache.submarine.commons.runtime.conf.SubmarineConfiguration;
+import org.apache.submarine.commons.runtime.conf.SubmarineLogs;
+import org.apache.submarine.commons.runtime.fs.RemoteDirectoryManager;
import org.junit.After;
import org.junit.Before;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/YarnServiceCliTestUtils.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/YarnServiceCliTestUtils.java
index 0efa959..13413b8 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/YarnServiceCliTestUtils.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/client/cli/yarnservice/YarnServiceCliTestUtils.java
@@ -1,4 +1,4 @@
-/**
+/*
* 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
@@ -6,22 +6,23 @@
* 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.
+ *
+ * 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.
*/
package org.apache.submarine.client.cli.yarnservice;
-import org.apache.submarine.common.MockClientContext;
-import org.apache.submarine.runtimes.RuntimeFactory;
-import org.apache.submarine.runtimes.common.MemorySubmarineStorage;
-import org.apache.submarine.runtimes.yarnservice.YarnServiceRuntimeFactory;
+import org.apache.submarine.commons.runtime.MockClientContext;
+import org.apache.submarine.commons.runtime.RuntimeFactory;
+import org.apache.submarine.commons.runtime.fs.MemorySubmarineStorage;
+import org.apache.submarine.server.submitter.yarnservice.YarnServiceRuntimeFactory;
public class YarnServiceCliTestUtils {
public static MockClientContext getMockClientContext() {
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/TestServiceWrapper.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/TestServiceWrapper.java
similarity index 88%
rename from submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/TestServiceWrapper.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/TestServiceWrapper.java
index d12b2e0..7c96a8b 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/TestServiceWrapper.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/TestServiceWrapper.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice;
+package org.apache.submarine.server.submitter.yarnservice;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.hadoop.yarn.service.api.records.Service;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/TestTFConfigGenerator.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/TestTFConfigGenerator.java
similarity index 73%
rename from submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/TestTFConfigGenerator.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/TestTFConfigGenerator.java
index 8e11110..072eaec 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/TestTFConfigGenerator.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/TestTFConfigGenerator.java
@@ -1,20 +1,25 @@
-/**
- * Licensed 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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. See accompanying LICENSE file.
+/*
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice;
+package org.apache.submarine.server.submitter.yarnservice;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.TensorFlowCommons;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.TensorFlowCommons;
import org.codehaus.jettison.json.JSONException;
import org.junit.Assert;
import org.junit.Test;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/command/AbstractTFLaunchCommandTestHelper.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/command/AbstractTFLaunchCommandTestHelper.java
similarity index 86%
rename from submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/command/AbstractTFLaunchCommandTestHelper.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/command/AbstractTFLaunchCommandTestHelper.java
index 164cf4c..366396e 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/command/AbstractTFLaunchCommandTestHelper.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/command/AbstractTFLaunchCommandTestHelper.java
@@ -6,26 +6,29 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.command;
+package org.apache.submarine.server.submitter.yarnservice.command;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.submarine.client.cli.param.runjob.TensorFlowRunJobParameters;
-import org.apache.submarine.common.MockClientContext;
-import org.apache.submarine.common.api.TensorFlowRole;
-import org.apache.submarine.runtimes.yarnservice.FileSystemOperations;
-import org.apache.submarine.runtimes.yarnservice.HadoopEnvironmentSetup;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.command.TensorBoardLaunchCommand;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.command.TensorFlowPsLaunchCommand;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.command.TensorFlowWorkerLaunchCommand;
+import org.apache.submarine.commons.runtime.MockClientContext;
+import org.apache.submarine.commons.runtime.api.TensorFlowRole;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.command.TensorBoardLaunchCommand;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.command.TensorFlowPsLaunchCommand;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.command.TensorFlowWorkerLaunchCommand;
+import org.apache.submarine.server.submitter.yarnservice.FileSystemOperations;
+import org.apache.submarine.server.submitter.yarnservice.HadoopEnvironmentSetup;
import org.junit.Rule;
import org.junit.rules.ExpectedException;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/command/TestLaunchCommandFactory.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/command/TestLaunchCommandFactory.java
similarity index 78%
rename from submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/command/TestLaunchCommandFactory.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/command/TestLaunchCommandFactory.java
index fbcc882..f1d1aca 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/command/TestLaunchCommandFactory.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/command/TestLaunchCommandFactory.java
@@ -6,24 +6,27 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.command;
+package org.apache.submarine.server.submitter.yarnservice.command;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.submarine.client.cli.param.runjob.TensorFlowRunJobParameters;
-import org.apache.submarine.common.api.TensorFlowRole;
-import org.apache.submarine.runtimes.yarnservice.HadoopEnvironmentSetup;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.command.TensorBoardLaunchCommand;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.command.TensorFlowPsLaunchCommand;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.command.TensorFlowWorkerLaunchCommand;
+import org.apache.submarine.commons.runtime.api.TensorFlowRole;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.command.TensorBoardLaunchCommand;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.command.TensorFlowPsLaunchCommand;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.command.TensorFlowWorkerLaunchCommand;
+import org.apache.submarine.server.submitter.yarnservice.HadoopEnvironmentSetup;
import org.junit.Test;
import java.io.IOException;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/pytorch/TestPyTorchServiceSpec.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/pytorch/TestPyTorchServiceSpec.java
similarity index 70%
rename from submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/pytorch/TestPyTorchServiceSpec.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/pytorch/TestPyTorchServiceSpec.java
index b56359e..020b2af 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/pytorch/TestPyTorchServiceSpec.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/pytorch/TestPyTorchServiceSpec.java
@@ -6,29 +6,32 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.pytorch;
+package org.apache.submarine.server.submitter.yarnservice.pytorch;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.hadoop.yarn.service.api.records.Service;
import org.apache.submarine.client.cli.param.runjob.PyTorchRunJobParameters;
-import org.apache.submarine.common.MockClientContext;
-import org.apache.submarine.common.api.PyTorchRole;
-import org.apache.submarine.common.api.TensorFlowRole;
-import org.apache.submarine.runtimes.yarnservice.FileSystemOperations;
-import org.apache.submarine.runtimes.yarnservice.HadoopEnvironmentSetup;
-import org.apache.submarine.runtimes.yarnservice.ServiceWrapper;
-import org.apache.submarine.runtimes.yarnservice.command.PyTorchLaunchCommandFactory;
-import org.apache.submarine.runtimes.yarnservice.tensorflow.component.ComponentTestCommons;
-import org.apache.submarine.commons.utils.Localizer;
+import org.apache.submarine.commons.runtime.MockClientContext;
+import org.apache.submarine.commons.runtime.api.PyTorchRole;
+import org.apache.submarine.commons.runtime.api.TensorFlowRole;
+import org.apache.submarine.server.submitter.yarnservice.tensorflow.component.ComponentTestCommons;
+import org.apache.submarine.server.submitter.yarnservice.FileSystemOperations;
+import org.apache.submarine.server.submitter.yarnservice.HadoopEnvironmentSetup;
+import org.apache.submarine.server.submitter.yarnservice.ServiceWrapper;
+import org.apache.submarine.server.submitter.yarnservice.command.PyTorchLaunchCommandFactory;
+import org.apache.submarine.server.submitter.yarnservice.utils.Localizer;
import org.junit.Before;
import org.junit.Test;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/TestTensorBoardLaunchCommand.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/command/TestTensorBoardLaunchCommand.java
similarity index 80%
rename from submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/TestTensorBoardLaunchCommand.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/command/TestTensorBoardLaunchCommand.java
index bcd643e..783e3f0 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/TestTensorBoardLaunchCommand.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/command/TestTensorBoardLaunchCommand.java
@@ -6,24 +6,27 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.tensorflow.command;
+package org.apache.submarine.server.submitter.yarnservice.tensorflow.command;
import com.google.common.collect.ImmutableList;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.submarine.client.cli.param.runjob.TensorFlowRunJobParameters;
-import org.apache.submarine.common.MockClientContext;
-import org.apache.submarine.common.api.TensorFlowRole;
-import org.apache.submarine.runtimes.yarnservice.FileSystemOperations;
-import org.apache.submarine.runtimes.yarnservice.HadoopEnvironmentSetup;
-import org.apache.submarine.runtimes.yarnservice.command.AbstractTFLaunchCommandTestHelper;
+import org.apache.submarine.commons.runtime.MockClientContext;
+import org.apache.submarine.commons.runtime.api.TensorFlowRole;
+import org.apache.submarine.server.submitter.yarnservice.FileSystemOperations;
+import org.apache.submarine.server.submitter.yarnservice.HadoopEnvironmentSetup;
+import org.apache.submarine.server.submitter.yarnservice.command.AbstractTFLaunchCommandTestHelper;
import org.junit.Test;
import java.io.IOException;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/TestTensorFlowLaunchCommand.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/command/TestTensorFlowLaunchCommand.java
similarity index 91%
rename from submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/TestTensorFlowLaunchCommand.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/command/TestTensorFlowLaunchCommand.java
index 460d63c..13bb019 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/tensorflow/command/TestTensorFlowLaunchCommand.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/command/TestTensorFlowLaunchCommand.java
@@ -6,25 +6,28 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.tensorflow.command;
+package org.apache.submarine.server.submitter.yarnservice.tensorflow.command;
import com.google.common.collect.ImmutableList;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.submarine.client.cli.param.runjob.TensorFlowRunJobParameters;
-import org.apache.submarine.common.MockClientContext;
-import org.apache.submarine.common.api.TensorFlowRole;
-import org.apache.submarine.runtimes.yarnservice.FileSystemOperations;
-import org.apache.submarine.runtimes.yarnservice.HadoopEnvironmentSetup;
-import org.apache.submarine.runtimes.yarnservice.command.AbstractTFLaunchCommandTestHelper;
+import org.apache.submarine.commons.runtime.MockClientContext;
+import org.apache.submarine.commons.runtime.api.TensorFlowRole;
+import org.apache.submarine.server.submitter.yarnservice.FileSystemOperations;
+import org.apache.submarine.server.submitter.yarnservice.HadoopEnvironmentSetup;
+import org.apache.submarine.server.submitter.yarnservice.command.AbstractTFLaunchCommandTestHelper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/ComponentTestCommons.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/ComponentTestCommons.java
similarity index 74%
rename from submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/ComponentTestCommons.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/ComponentTestCommons.java
index f9f28eb..628c9a1 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/ComponentTestCommons.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/ComponentTestCommons.java
@@ -6,29 +6,32 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.tensorflow.component;
+package org.apache.submarine.server.submitter.yarnservice.tensorflow.component;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.api.records.Resource;
import org.apache.hadoop.yarn.service.api.ServiceApiConstants;
import org.apache.hadoop.yarn.service.api.records.Component;
-import org.apache.submarine.client.cli.runjob.Framework;
-import org.apache.submarine.common.Envs;
-import org.apache.submarine.common.MockClientContext;
-import org.apache.submarine.common.api.Role;
-import org.apache.submarine.runtimes.yarnservice.FileSystemOperations;
-import org.apache.submarine.runtimes.yarnservice.command.AbstractLaunchCommand;
-import org.apache.submarine.runtimes.yarnservice.command.LaunchCommandFactory;
-import org.apache.submarine.runtimes.yarnservice.command.PyTorchLaunchCommandFactory;
-import org.apache.submarine.runtimes.yarnservice.command.TensorFlowLaunchCommandFactory;
+import org.apache.submarine.commons.runtime.Framework;
+import org.apache.submarine.commons.runtime.conf.Envs;
+import org.apache.submarine.commons.runtime.MockClientContext;
+import org.apache.submarine.commons.runtime.api.Role;
+import org.apache.submarine.server.submitter.yarnservice.FileSystemOperations;
+import org.apache.submarine.server.submitter.yarnservice.command.AbstractLaunchCommand;
+import org.apache.submarine.server.submitter.yarnservice.command.LaunchCommandFactory;
+import org.apache.submarine.server.submitter.yarnservice.command.PyTorchLaunchCommandFactory;
+import org.apache.submarine.server.submitter.yarnservice.command.TensorFlowLaunchCommandFactory;
import java.io.IOException;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/TestTensorBoardComponent.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/TestTensorBoardComponent.java
similarity index 87%
rename from submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/TestTensorBoardComponent.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/TestTensorBoardComponent.java
index 03b872a..87f2c08 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/TestTensorBoardComponent.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/TestTensorBoardComponent.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.tensorflow.component;
+package org.apache.submarine.server.submitter.yarnservice.tensorflow.component;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.yarn.service.api.records.Artifact;
@@ -22,8 +25,8 @@ import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.hadoop.yarn.service.api.records.Component.RestartPolicyEnum;
import org.apache.submarine.client.cli.param.runjob.RunJobParameters;
import org.apache.submarine.client.cli.param.runjob.TensorFlowRunJobParameters;
-import org.apache.submarine.common.api.TensorFlowRole;
-import org.apache.submarine.runtimes.yarnservice.command.TensorFlowLaunchCommandFactory;
+import org.apache.submarine.commons.runtime.api.TensorFlowRole;
+import org.apache.submarine.server.submitter.yarnservice.command.TensorFlowLaunchCommandFactory;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/TestTensorFlowPsComponent.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/TestTensorFlowPsComponent.java
similarity index 90%
rename from submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/TestTensorFlowPsComponent.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/TestTensorFlowPsComponent.java
index 2b00010..523656e 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/TestTensorFlowPsComponent.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/TestTensorFlowPsComponent.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.tensorflow.component;
+package org.apache.submarine.server.submitter.yarnservice.tensorflow.component;
import static junit.framework.TestCase.assertTrue;
import static org.junit.Assert.assertEquals;
@@ -28,8 +31,8 @@ import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.hadoop.yarn.service.api.records.Component.RestartPolicyEnum;
import org.apache.submarine.client.cli.param.runjob.RunJobParameters;
import org.apache.submarine.client.cli.param.runjob.TensorFlowRunJobParameters;
-import org.apache.submarine.common.api.TensorFlowRole;
-import org.apache.submarine.runtimes.yarnservice.command.TensorFlowLaunchCommandFactory;
+import org.apache.submarine.commons.runtime.api.TensorFlowRole;
+import org.apache.submarine.server.submitter.yarnservice.command.TensorFlowLaunchCommandFactory;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/TestTensorFlowWorkerComponent.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/TestTensorFlowWorkerComponent.java
similarity index 92%
rename from submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/TestTensorFlowWorkerComponent.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/TestTensorFlowWorkerComponent.java
index 2971857..4ea46d0 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/runtimes/yarnservice/tensorflow/component/TestTensorFlowWorkerComponent.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/tensorflow/component/TestTensorFlowWorkerComponent.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.runtimes.yarnservice.tensorflow.component;
+package org.apache.submarine.server.submitter.yarnservice.tensorflow.component;
import com.google.common.collect.ImmutableMap;
import org.apache.hadoop.fs.Path;
@@ -22,8 +25,8 @@ import org.apache.hadoop.yarn.service.api.records.Artifact;
import org.apache.hadoop.yarn.service.api.records.Component;
import org.apache.hadoop.yarn.service.api.records.Component.RestartPolicyEnum;
import org.apache.submarine.client.cli.param.runjob.TensorFlowRunJobParameters;
-import org.apache.submarine.common.api.TensorFlowRole;
-import org.apache.submarine.runtimes.yarnservice.command.TensorFlowLaunchCommandFactory;
+import org.apache.submarine.commons.runtime.api.TensorFlowRole;
+import org.apache.submarine.server.submitter.yarnservice.command.TensorFlowLaunchCommandFactory;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/utils/TestClassPathUtilities.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/utils/TestClassPathUtilities.java
similarity index 84%
rename from submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/utils/TestClassPathUtilities.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/utils/TestClassPathUtilities.java
index 56a6776..6f8863a 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/utils/TestClassPathUtilities.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/utils/TestClassPathUtilities.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.commons.utils;
+package org.apache.submarine.server.submitter.yarnservice.utils;
import org.apache.submarine.FileUtilitiesForTests;
import org.junit.After;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/utils/TestEnvironmentUtilities.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/utils/TestEnvironmentUtilities.java
similarity index 95%
rename from submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/utils/TestEnvironmentUtilities.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/utils/TestEnvironmentUtilities.java
index 4710e00..711a563 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/utils/TestEnvironmentUtilities.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/utils/TestEnvironmentUtilities.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.commons.utils;
+package org.apache.submarine.server.submitter.yarnservice.utils;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/utils/TestKerberosPrincipalFactory.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/utils/TestKerberosPrincipalFactory.java
similarity index 89%
rename from submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/utils/TestKerberosPrincipalFactory.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/utils/TestKerberosPrincipalFactory.java
index 68d2304..d81acd4 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/utils/TestKerberosPrincipalFactory.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/utils/TestKerberosPrincipalFactory.java
@@ -6,22 +6,25 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.commons.utils;
+package org.apache.submarine.server.submitter.yarnservice.utils;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.yarn.service.api.records.KerberosPrincipal;
import org.apache.submarine.FileUtilitiesForTests;
import org.apache.submarine.client.cli.param.runjob.RunJobParameters;
-import org.apache.submarine.common.MockClientContext;
-import org.apache.submarine.runtimes.yarnservice.FileSystemOperations;
+import org.apache.submarine.commons.runtime.MockClientContext;
+import org.apache.submarine.server.submitter.yarnservice.FileSystemOperations;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/utils/TestSubmarineResourceUtils.java b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/utils/TestSubmarineResourceUtils.java
similarity index 90%
rename from submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/utils/TestSubmarineResourceUtils.java
rename to submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/utils/TestSubmarineResourceUtils.java
index d911087..0d6b3f5 100644
--- a/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/utils/TestSubmarineResourceUtils.java
+++ b/submarine-server/server-submitter/submitter-yarnservice/src/test/java/org/apache/submarine/server/submitter/yarnservice/utils/TestSubmarineResourceUtils.java
@@ -6,15 +6,18 @@
* 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.
+ *
+ * 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.
*/
-package org.apache.submarine.commons.utils;
+package org.apache.submarine.server.submitter.yarnservice.utils;
import com.google.common.collect.ImmutableMap;
import org.apache.hadoop.conf.Configuration;