You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2018/11/19 16:52:08 UTC

[GitHub] mikewalch closed pull request #41: Fixed running continuous ingest in YARN

mikewalch closed pull request #41: Fixed running continuous ingest in YARN
URL: https://github.com/apache/accumulo-testing/pull/41
 
 
   

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

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

diff --git a/core/pom.xml b/core/pom.xml
index 0d03f95..d982022 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -116,6 +116,8 @@
                         <exclude>META-INF/*.SF</exclude>
                         <exclude>META-INF/*.DSA</exclude>
                         <exclude>META-INF/*.RSA</exclude>
+                        <!-- Twill 0.13 fails if shaded jar includes this directory !-->
+                        <exclude>META-INF/license/*</exclude>
                       </excludes>
                     </filter>
                   </filters>
diff --git a/pom.xml b/pom.xml
index 0de1eed..7ea2a47 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,7 +42,7 @@
     <hadoop.version>3.0.3</hadoop.version>
     <zookeeper.version>3.4.9</zookeeper.version>
     <slf4j.version>1.7.21</slf4j.version>
-    <twill.version>0.12.1</twill.version>
+    <twill.version>0.13.0</twill.version>
     <maven.compiler.source>1.8</maven.compiler.source>
     <maven.compiler.target>1.8</maven.compiler.target>
     <formatter.config>${project.parent.basedir}/contrib/Eclipse-Accumulo-Codestyle.xml</formatter.config>
diff --git a/yarn/src/main/java/org/apache/accumulo/testing/yarn/YarnAccumuloTestRunner.java b/yarn/src/main/java/org/apache/accumulo/testing/yarn/YarnAccumuloTestRunner.java
index 56fe6f3..5ac22dc 100644
--- a/yarn/src/main/java/org/apache/accumulo/testing/yarn/YarnAccumuloTestRunner.java
+++ b/yarn/src/main/java/org/apache/accumulo/testing/yarn/YarnAccumuloTestRunner.java
@@ -37,13 +37,14 @@
 import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Objects;
 import java.util.Properties;
 
 public class YarnAccumuloTestRunner {
 
   private static final Logger LOG = LoggerFactory.getLogger(YarnAccumuloTestRunner.class);
 
-  private static final String RUNNABLE_ID = "BundledJarRunnable";
+  private static final String RUNNABLE_ID = "AccumuloTest";
 
   private static class YarnTestApp implements TwillApplication {
 
@@ -111,7 +112,9 @@ private static void verifyPath(String path) {
   public static void main(String[] args) throws Exception {
 
     TestRunnerOpts opts = new TestRunnerOpts();
-    new JCommander(opts, args);
+    JCommander commander = new JCommander();
+    commander.addObject(opts);
+    commander.parse(args);
 
     verifyPath(opts.jarPath);
     verifyPath(opts.testProps);
@@ -119,10 +122,17 @@ public static void main(String[] args) throws Exception {
     verifyPath(opts.logProps);
 
     String jarFileName = Paths.get(opts.jarPath).getFileName().toString();
-
     String[] mainArgs = opts.mainArgs.stream().toArray(String[]::new);
-    BundledJarRunner.Arguments arguments = new BundledJarRunner.Arguments(jarFileName, "/lib",
-                                                                          opts.mainClass, mainArgs);
+
+    Objects.requireNonNull(jarFileName);
+    Objects.requireNonNull(opts.mainClass);
+    Objects.requireNonNull(mainArgs);
+
+    BundledJarRunner.Arguments arguments =
+        new BundledJarRunner.Arguments.Builder().setJarFileName(jarFileName)
+            .setLibFolder("lib").setMainClassName(opts.mainClass)
+            .setMainArgs(mainArgs).createArguments();
+
     TestEnv env = new TestEnv(opts.testProps, opts.clientProps);
 
     YarnConfiguration yarnConfig = new YarnConfiguration(env.getHadoopConfiguration());
@@ -131,7 +141,7 @@ public static void main(String[] args) throws Exception {
 
     twillRunner.prepare(new YarnTestApp(opts, env.getTestProperties()))
         .addJVMOptions("-Dlog4j.configuration=file:$PWD/" + new File(opts.logProps).getName())
-        .withArguments("BundledJarRunnable", arguments.toArray()).start();
+        .withArguments(RUNNABLE_ID, arguments.toArray()).start();
 
     LOG.info("{} containers will start in YARN.", opts.numContainers);
     LOG.info("Press Ctrl-C when these containers have started.");


 

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


With regards,
Apache Git Services