You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@twill.apache.org by ch...@apache.org on 2016/05/17 17:50:44 UTC

[1/4] incubator-twill git commit: Overriding toString() in FileContextLocation

Repository: incubator-twill
Updated Branches:
  refs/heads/site f66dab556 -> c7c3f774c


Overriding toString() in FileContextLocation

This closes #79 on GitHub

Signed-off-by: Terence Yim <ch...@apache.org>


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

Branch: refs/heads/site
Commit: c71f7c599d0eed9128bf11f5888567c6be26f714
Parents: 180e446
Author: CuriousVini <vi...@cask.co>
Authored: Tue Apr 19 15:39:14 2016 -0700
Committer: Terence Yim <ch...@apache.org>
Committed: Tue Apr 19 16:34:18 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/twill/filesystem/FileContextLocation.java   | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-twill/blob/c71f7c59/twill-yarn/src/main/java/org/apache/twill/filesystem/FileContextLocation.java
----------------------------------------------------------------------
diff --git a/twill-yarn/src/main/java/org/apache/twill/filesystem/FileContextLocation.java b/twill-yarn/src/main/java/org/apache/twill/filesystem/FileContextLocation.java
index f92954e..85698d0 100644
--- a/twill-yarn/src/main/java/org/apache/twill/filesystem/FileContextLocation.java
+++ b/twill-yarn/src/main/java/org/apache/twill/filesystem/FileContextLocation.java
@@ -216,4 +216,9 @@ final class FileContextLocation implements Location {
   public int hashCode() {
     return Objects.hash(path);
   }
+
+  @Override
+  public String toString() {
+    return toURI().toString();
+  }
 }


[4/4] incubator-twill git commit: Added Apache Big Data 2016 slides

Posted by ch...@apache.org.
Added Apache Big Data 2016 slides

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

Branch: refs/heads/site
Commit: c7c3f774cef2ce642bf9d4540e39f57aa943604b
Parents: 8dd1b50
Author: Terence Yim <ch...@apache.org>
Authored: Tue May 17 10:50:36 2016 -0700
Committer: Terence Yim <ch...@apache.org>
Committed: Tue May 17 10:50:36 2016 -0700

----------------------------------------------------------------------
 src/site/markdown/index.md | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-twill/blob/c7c3f774/src/site/markdown/index.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md
index 30139af..b7b8284 100644
--- a/src/site/markdown/index.md
+++ b/src/site/markdown/index.md
@@ -51,6 +51,10 @@ to find out more.
 
 Status of CI build at Travis CI: [![Build Status](https://travis-ci.org/apache/incubator-twill.svg?branch=master)](https://travis-ci.org/apache/incubator-twill)
 
+### Apache Twill Presentation in Apache: Big Data North America 2016
+
+<iframe src="http://www.slideshare.net/slideshow/embed_code/key/2bCOzXHycldrtP" width="595" height="373" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen="true"> </iframe>
+
 ### Apache Twill Presentation in ApacheCon 2014
 
 <iframe src="http://www.slideshare.net/slideshow/embed_code/33789812" width="427" height="356" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px; max-width: 100%;" allowfullscreen="true">


[3/4] incubator-twill git commit: Merge branch 'master' into site

Posted by ch...@apache.org.
Merge branch 'master' into site


Project: http://git-wip-us.apache.org/repos/asf/incubator-twill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-twill/commit/8dd1b500
Tree: http://git-wip-us.apache.org/repos/asf/incubator-twill/tree/8dd1b500
Diff: http://git-wip-us.apache.org/repos/asf/incubator-twill/diff/8dd1b500

Branch: refs/heads/site
Commit: 8dd1b500e67463148d7afbfd3318844dbe4d0fc7
Parents: f66dab5 1b6b42c
Author: Terence Yim <ch...@apache.org>
Authored: Wed May 11 23:56:37 2016 -0700
Committer: Terence Yim <ch...@apache.org>
Committed: Wed May 11 23:56:37 2016 -0700

----------------------------------------------------------------------
 .../twill/internal/DefaultResourceReport.java    |  2 +-
 .../twill/internal/logging/KafkaAppender.java    |  4 ++--
 .../twill/filesystem/FileContextLocation.java    |  5 +++++
 .../apache/twill/yarn/YarnTwillController.java   | 19 ++++++++++---------
 4 files changed, 18 insertions(+), 12 deletions(-)
----------------------------------------------------------------------



[2/4] incubator-twill git commit: Remove reference to Apache Commons Lang StopWatch and use Guava Stopwatch instead.

Posted by ch...@apache.org.
Remove reference to Apache Commons Lang StopWatch and use Guava Stopwatch instead.

This closes #81 on Github.

Signed-off-by: Terence Yim <ch...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-twill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-twill/commit/1b6b42ca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-twill/tree/1b6b42ca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-twill/diff/1b6b42ca

Branch: refs/heads/site
Commit: 1b6b42cae44e33a662d91b121bdd4796e481fe81
Parents: c71f7c5
Author: Henry Saputra <hs...@apache.org>
Authored: Wed May 11 14:34:08 2016 -0700
Committer: Terence Yim <ch...@apache.org>
Committed: Wed May 11 16:18:59 2016 -0700

----------------------------------------------------------------------
 .../twill/internal/DefaultResourceReport.java    |  2 +-
 .../twill/internal/logging/KafkaAppender.java    |  4 ++--
 .../apache/twill/yarn/YarnTwillController.java   | 19 ++++++++++---------
 3 files changed, 13 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-twill/blob/1b6b42ca/twill-core/src/main/java/org/apache/twill/internal/DefaultResourceReport.java
----------------------------------------------------------------------
diff --git a/twill-core/src/main/java/org/apache/twill/internal/DefaultResourceReport.java b/twill-core/src/main/java/org/apache/twill/internal/DefaultResourceReport.java
index 767ee45..08c6900 100644
--- a/twill-core/src/main/java/org/apache/twill/internal/DefaultResourceReport.java
+++ b/twill-core/src/main/java/org/apache/twill/internal/DefaultResourceReport.java
@@ -57,7 +57,7 @@ public final class DefaultResourceReport implements ResourceReport {
     for (Map.Entry<String, Collection<TwillRunResources>> entry : resources.entrySet()) {
       this.usedResources.putAll(entry.getKey(), entry.getValue());
     }
-    this.services = new AtomicReference<List<String>>(services);
+    this.services = new AtomicReference<>(services);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-twill/blob/1b6b42ca/twill-core/src/main/java/org/apache/twill/internal/logging/KafkaAppender.java
----------------------------------------------------------------------
diff --git a/twill-core/src/main/java/org/apache/twill/internal/logging/KafkaAppender.java b/twill-core/src/main/java/org/apache/twill/internal/logging/KafkaAppender.java
index 1f8d02d..90d7415 100644
--- a/twill-core/src/main/java/org/apache/twill/internal/logging/KafkaAppender.java
+++ b/twill-core/src/main/java/org/apache/twill/internal/logging/KafkaAppender.java
@@ -87,10 +87,10 @@ public final class KafkaAppender extends AppenderBase<ILoggingEvent> {
   private ScheduledExecutorService scheduler;
 
   public KafkaAppender() {
-    publisher = new AtomicReference<KafkaPublisher.Preparer>();
+    publisher = new AtomicReference<>();
     flushTask = createFlushTask();
     bufferedSize = new AtomicInteger();
-    buffer = new ConcurrentLinkedQueue<String>();
+    buffer = new ConcurrentLinkedQueue<>();
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-twill/blob/1b6b42ca/twill-yarn/src/main/java/org/apache/twill/yarn/YarnTwillController.java
----------------------------------------------------------------------
diff --git a/twill-yarn/src/main/java/org/apache/twill/yarn/YarnTwillController.java b/twill-yarn/src/main/java/org/apache/twill/yarn/YarnTwillController.java
index 45b8e0c..3efcda4 100644
--- a/twill-yarn/src/main/java/org/apache/twill/yarn/YarnTwillController.java
+++ b/twill-yarn/src/main/java/org/apache/twill/yarn/YarnTwillController.java
@@ -17,11 +17,11 @@
  */
 package org.apache.twill.yarn;
 
+import com.google.common.base.Stopwatch;
 import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.Uninterruptibles;
-import org.apache.commons.lang.time.StopWatch;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
 import org.apache.hadoop.yarn.api.records.FinalApplicationStatus;
 import org.apache.hadoop.yarn.api.records.YarnApplicationState;
@@ -101,18 +101,18 @@ final class YarnTwillController extends AbstractTwillController implements Twill
       LOG.debug("Application {} with id {} submitted", appName, appId);
 
       YarnApplicationState state = report.getYarnApplicationState();
-      StopWatch stopWatch = new StopWatch();
+      Stopwatch stopWatch = new Stopwatch();
       stopWatch.start();
-      stopWatch.split();
       long maxTime = TimeUnit.MILLISECONDS.convert(Constants.APPLICATION_MAX_START_SECONDS, TimeUnit.SECONDS);
 
       LOG.debug("Checking yarn application status for {} {}", appName, appId);
-      while (!hasRun(state) && stopWatch.getSplitTime() < maxTime) {
+      while (!hasRun(state) && stopWatch.elapsedTime(TimeUnit.MILLISECONDS) < maxTime) {
         report = processController.getReport();
         state = report.getYarnApplicationState();
         LOG.debug("Yarn application status for {} {}: {}", appName, appId, state);
         TimeUnit.SECONDS.sleep(1);
-        stopWatch.split();
+        stopWatch.reset();
+        stopWatch.start();
       }
       LOG.info("Yarn application {} {} is in state {}", appName, appId, state);
       if (state != YarnApplicationState.RUNNING) {
@@ -155,18 +155,19 @@ final class YarnTwillController extends AbstractTwillController implements Twill
 
     // Poll application status from yarn
     try {
-      StopWatch stopWatch = new StopWatch();
+      Stopwatch stopWatch = new Stopwatch();
       stopWatch.start();
-      stopWatch.split();
       long maxTime = TimeUnit.MILLISECONDS.convert(Constants.APPLICATION_MAX_STOP_SECONDS, TimeUnit.SECONDS);
 
       YarnApplicationReport report = processController.getReport();
       FinalApplicationStatus finalStatus = report.getFinalApplicationStatus();
       ApplicationId appId = report.getApplicationId();
-      while (finalStatus == FinalApplicationStatus.UNDEFINED && stopWatch.getSplitTime() < maxTime) {
+      while (finalStatus == FinalApplicationStatus.UNDEFINED &&
+          stopWatch.elapsedTime(TimeUnit.MILLISECONDS) < maxTime) {
         LOG.debug("Yarn application final status for {} {}: {}", appName, appId, finalStatus);
         TimeUnit.SECONDS.sleep(1);
-        stopWatch.split();
+        stopWatch.reset();
+        stopWatch.start();
         finalStatus = processController.getReport().getFinalApplicationStatus();
       }
       LOG.debug("Yarn application {} {} completed with status {}", appName, appId, finalStatus);