git commit: SLIDER-144. Functional test fails with [Permission denied] on cluster - additional test fixes

2014-06-17 Thread smohanty
Repository: incubator-slider
Updated Branches:
  refs/heads/develop 1bbeebedb -> 7003c06eb


SLIDER-144. Functional test fails with [Permission denied] on cluster - 
additional test fixes


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

Branch: refs/heads/develop
Commit: 7003c06eb4b6f372a99b84695f127d3410635ab9
Parents: 1bbeebe
Author: Sumit Mohanty 
Authored: Tue Jun 17 23:34:54 2014 -0700
Committer: Sumit Mohanty 
Committed: Tue Jun 17 23:34:54 2014 -0700

--
 slider-funtest/pom.xml  |  4 
 .../funtest/framework/CommandTestBase.groovy|  1 -
 .../funtest/framework/FuntestProperties.groovy  |  5 -
 .../lifecycle/AgentCommandTestBase.groovy   | 19 +
 .../lifecycle/TestAgentClusterLifecycle.groovy  |  8 +++
 .../lifecycle/TestAppsThroughAgent.groovy   | 22 ++--
 6 files changed, 24 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/7003c06e/slider-funtest/pom.xml
--
diff --git a/slider-funtest/pom.xml b/slider-funtest/pom.xml
index a2231d5..e56b19d 100644
--- a/slider-funtest/pom.xml
+++ b/slider-funtest/pom.xml
@@ -27,9 +27,6 @@
 slider
 0.31.0-incubating-SNAPSHOT
   
-  
-false
-  
 
   
 
@@ -115,7 +112,6 @@
 
${slider.test.java.security.krb5.kdc}
 
 ${slider.conf.dir}
-
${slider.disable.cleanup}
 
../slider-assembly/target/slider-${project.version}-all/slider-${project.version}
   
   

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/7003c06e/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
--
diff --git 
a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
 
b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
index b95972a..d2accbb 100644
--- 
a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
+++ 
b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
@@ -51,7 +51,6 @@ abstract class CommandTestBase extends SliderTestUtils {
 
   public static final String SLIDER_CONF_DIR = sysprop(SLIDER_CONF_DIR_PROP)
   public static final String SLIDER_BIN_DIR = sysprop(SLIDER_BIN_DIR_PROP)
-  public static final String DISABLE_CLEAN_UP = sysprop(DISABLE_CLEAN_UP_PROP)
   public static final File SLIDER_BIN_DIRECTORY = new File(
   SLIDER_BIN_DIR).canonicalFile
   public static final File SLIDER_SCRIPT = new File(

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/7003c06e/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FuntestProperties.groovy
--
diff --git 
a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FuntestProperties.groovy
 
b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FuntestProperties.groovy
index a6772b4..8cbc098 100644
--- 
a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FuntestProperties.groovy
+++ 
b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FuntestProperties.groovy
@@ -37,11 +37,6 @@ public interface FuntestProperties extends 
SliderXMLConfKeysForTesting {
*/
   String SLIDER_BIN_DIR_PROP = "slider.bin.dir"
 
-  /**
-   * Maven Property to disable test cleanup
-   */
-  String DISABLE_CLEAN_UP_PROP = "slider.disable.cleanup"
-
   String KEY_SLIDER_TEST_NUM_WORKERS = "slider.test.cluster.size"
   int DEFAULT_SLIDER_NUM_WORKERS = 1
 

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/7003c06e/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentCommandTestBase.groovy
--
diff --git 
a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentCommandTestBase.groovy
 
b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentCommandTestBase.groovy
index 56cc4be..d5a91f0 100644
--- 
a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentCommandTestBase.groovy
+++ 
b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentCommandTestBase.groovy
@@ -161,6 +161,25 @@ class AgentCommandTestBase extends CommandTestBase
 return exists
   }
 
+  protected static void ensureApplicationIsUp(String clusterName, int 
maxAttem

[1/2] git commit: SLIDER-141. Functional test fails with [Permission denied] on cluster

2014-06-17 Thread smohanty
Repository: incubator-slider
Updated Branches:
  refs/heads/develop 3b2f5f6bb -> 1bbeebedb


SLIDER-141. Functional test fails with [Permission denied] on cluster


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

Branch: refs/heads/develop
Commit: 716cdeb3b7508de81b9e53ab7c45d0055e1386bd
Parents: 3b2f5f6
Author: Sumit Mohanty 
Authored: Tue Jun 17 17:46:29 2014 -0700
Committer: Sumit Mohanty 
Committed: Tue Jun 17 17:46:29 2014 -0700

--
 .../test_command_log/appConfig.json |  4 +--
 .../lifecycle/AgentCommandTestBase.groovy   | 35 
 .../lifecycle/TestClusterBuildDestroy.groovy|  3 ++
 3 files changed, 27 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/716cdeb3/slider-core/src/test/app_packages/test_command_log/appConfig.json
--
diff --git a/slider-core/src/test/app_packages/test_command_log/appConfig.json 
b/slider-core/src/test/app_packages/test_command_log/appConfig.json
index 0bace19..bd76c05 100644
--- a/slider-core/src/test/app_packages/test_command_log/appConfig.json
+++ b/slider-core/src/test/app_packages/test_command_log/appConfig.json
@@ -3,8 +3,8 @@
 "metadata": {
 },
 "global": {
-"agent.conf": "/slider/agent/conf/agent.ini",
-"application.def": "/slider/cmd_log_app_pkg.zip",
+"agent.conf": "agent.ini",
+"application.def": "cmd_log_app_pkg.zip",
 "config_types": "cl-site",
 "java_home": "/usr/jdk64/jdk1.7.0_45",
 "package_list": "files/command_log_10.tar",

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/716cdeb3/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentCommandTestBase.groovy
--
diff --git 
a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentCommandTestBase.groovy
 
b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentCommandTestBase.groovy
index d1d6f07..56cc4be 100644
--- 
a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentCommandTestBase.groovy
+++ 
b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentCommandTestBase.groovy
@@ -29,11 +29,14 @@ import org.apache.slider.funtest.framework.SliderShell
 import org.apache.tools.zip.ZipEntry
 import org.apache.tools.zip.ZipOutputStream
 import org.junit.Assert
+import org.junit.Assume
 import org.junit.Before
 import org.junit.BeforeClass
 import org.junit.rules.TemporaryFolder
 import org.junit.Rule
 
+import org.apache.hadoop.security.AccessControlException
+
 
 @Slf4j
 class AgentCommandTestBase extends CommandTestBase
@@ -67,23 +70,29 @@ class AgentCommandTestBase extends CommandTestBase
   public static void setupAgent() {
 assumeAgentTestsEnabled()
 
-// Upload the agent tarball
-assume(LOCAL_SLIDER_AGENT_TARGZ.exists(), "Slider agent not found at 
$LOCAL_SLIDER_AGENT_TARGZ")
-agentTarballPath = new Path(clusterFS.homeDirectory, 
"/slider/agent/slider-agent.tar.gz")
-Path localTarball = new Path(LOCAL_SLIDER_AGENT_TARGZ.toURI());
-clusterFS.copyFromLocalFile(false, true, localTarball, agentTarballPath)
-
-// Upload the agent.ini
-assume(LOCAL_AGENT_CONF.exists(), "Agent config not found at 
$LOCAL_AGENT_CONF")
-agtIniPath = new Path(clusterFS.homeDirectory, 
"/slider/agent/conf/agent.ini")
-Path localAgtIni = new Path(LOCAL_AGENT_CONF.toURI());
-clusterFS.copyFromLocalFile(false, true, localAgtIni, agtIniPath)
+try {
+  // Upload the agent tarball
+  assume(LOCAL_SLIDER_AGENT_TARGZ.exists(), "Slider agent not found at 
$LOCAL_SLIDER_AGENT_TARGZ")
+  agentTarballPath = new Path(clusterFS.homeDirectory, 
"slider-agent.tar.gz")
+  Path localTarball = new Path(LOCAL_SLIDER_AGENT_TARGZ.toURI());
+  clusterFS.copyFromLocalFile(false, true, localTarball, agentTarballPath)
+
+  // Upload the agent.ini
+  assume(LOCAL_AGENT_CONF.exists(), "Agent config not found at 
$LOCAL_AGENT_CONF")
+  agtIniPath = new Path(clusterFS.homeDirectory, "agent.ini")
+  Path localAgtIni = new Path(LOCAL_AGENT_CONF.toURI());
+  clusterFS.copyFromLocalFile(false, true, localAgtIni, agtIniPath)
+} catch (AccessControlException ace) {
+  log.info "No write access to test user home directory. " +
+   "Ensure home directory exists and has correct permissions." + 
ace.getMessage()
+  Assume.assumeTrue("Ensure home directory exists and has correct 
permissions for test 

[2/2] git commit: SLIDER-141. Functional test fails with [Permission denied] on cluster - additional test fixes

2014-06-17 Thread smohanty
SLIDER-141. Functional test fails with [Permission denied] on cluster - 
additional test fixes


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

Branch: refs/heads/develop
Commit: 1bbeebedb891eda043f17b1c997b630770d52067
Parents: 716cdeb
Author: Sumit Mohanty 
Authored: Tue Jun 17 19:23:26 2014 -0700
Committer: Sumit Mohanty 
Committed: Tue Jun 17 19:23:26 2014 -0700

--
 .../test_command_log/resources_no_role.json | 15 
 slider-funtest/pom.xml  |  4 +
 .../funtest/framework/CommandTestBase.groovy|  1 +
 .../funtest/framework/FuntestProperties.groovy  |  5 ++
 .../lifecycle/TestAgentClusterLifecycle.groovy  | 84 +++-
 .../lifecycle/TestAppsThroughAgent.groovy   | 53 ++--
 6 files changed, 96 insertions(+), 66 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/1bbeebed/slider-core/src/test/app_packages/test_command_log/resources_no_role.json
--
diff --git 
a/slider-core/src/test/app_packages/test_command_log/resources_no_role.json 
b/slider-core/src/test/app_packages/test_command_log/resources_no_role.json
new file mode 100644
index 000..7913fe2
--- /dev/null
+++ b/slider-core/src/test/app_packages/test_command_log/resources_no_role.json
@@ -0,0 +1,15 @@
+{
+"schema": "http://example.org/specification/v2.0.0";,
+"metadata": {
+},
+"global": {
+},
+"components": {
+"COMMAND_LOGGER": {
+"yarn.role.priority": "1",
+"yarn.component.instances": "0"
+},
+"slider-appmaster": {
+}
+}
+}

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/1bbeebed/slider-funtest/pom.xml
--
diff --git a/slider-funtest/pom.xml b/slider-funtest/pom.xml
index e56b19d..a2231d5 100644
--- a/slider-funtest/pom.xml
+++ b/slider-funtest/pom.xml
@@ -27,6 +27,9 @@
 slider
 0.31.0-incubating-SNAPSHOT
   
+  
+false
+  
 
   
 
@@ -112,6 +115,7 @@
 
${slider.test.java.security.krb5.kdc}
 
 ${slider.conf.dir}
+
${slider.disable.cleanup}
 
../slider-assembly/target/slider-${project.version}-all/slider-${project.version}
   
   

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/1bbeebed/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
--
diff --git 
a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
 
b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
index d2accbb..b95972a 100644
--- 
a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
+++ 
b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
@@ -51,6 +51,7 @@ abstract class CommandTestBase extends SliderTestUtils {
 
   public static final String SLIDER_CONF_DIR = sysprop(SLIDER_CONF_DIR_PROP)
   public static final String SLIDER_BIN_DIR = sysprop(SLIDER_BIN_DIR_PROP)
+  public static final String DISABLE_CLEAN_UP = sysprop(DISABLE_CLEAN_UP_PROP)
   public static final File SLIDER_BIN_DIRECTORY = new File(
   SLIDER_BIN_DIR).canonicalFile
   public static final File SLIDER_SCRIPT = new File(

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/1bbeebed/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FuntestProperties.groovy
--
diff --git 
a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FuntestProperties.groovy
 
b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FuntestProperties.groovy
index 8cbc098..a6772b4 100644
--- 
a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FuntestProperties.groovy
+++ 
b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FuntestProperties.groovy
@@ -37,6 +37,11 @@ public interface FuntestProperties extends 
SliderXMLConfKeysForTesting {
*/
   String SLIDER_BIN_DIR_PROP = "slider.bin.dir"
 
+  /**
+   * Maven Property to disable test cleanup
+   */
+  String DISABLE_CLEAN_UP_PROP = "slider.disable.cleanup"
+
   String KEY_SLIDER_TEST_NUM_WORKERS = "slider.test.cluster.size"
   int DEFAULT_SLIDER_NUM_WORKERS = 1
 

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/1bbeebed/slider-funtest/src/test/groovy/org/apache/sl

git commit: SLIDER-139. Ensure python unit tests use the correct version of python

2014-06-17 Thread smohanty
Repository: incubator-slider
Updated Branches:
  refs/heads/develop 055ed0b07 -> 3b2f5f6bb


SLIDER-139. Ensure python unit tests use the correct version of python


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

Branch: refs/heads/develop
Commit: 3b2f5f6bbd56c485b6dbbd37f19ee1872dc6fbb7
Parents: 055ed0b
Author: Sumit Mohanty 
Authored: Tue Jun 17 16:11:06 2014 -0700
Committer: Sumit Mohanty 
Committed: Tue Jun 17 16:11:06 2014 -0700

--
 slider-agent/pom.xml|   2 +-
 .../libraries/functions/os_check.py | 172 ++-
 .../libraries/script/hook.py|   2 +-
 .../src/test/python/agent/TestPythonExecutor.py |   2 +-
 slider-agent/src/test/python/python-wrap|  40 +
 .../TestPropertiesFileResource.py   |   2 +-
 .../apache/slider/common/tools/SliderUtils.java |  29 +++-
 7 files changed, 191 insertions(+), 58 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/3b2f5f6b/slider-agent/pom.xml
--
diff --git a/slider-agent/pom.xml b/slider-agent/pom.xml
index 06f99b5..efc61ef 100644
--- a/slider-agent/pom.xml
+++ b/slider-agent/pom.xml
@@ -67,7 +67,7 @@
 
   
 
-  python
+  
${project.basedir}/src/test/python/python-wrap
   src/test/python
   
 unitTests.py

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/3b2f5f6b/slider-agent/src/main/python/resource_management/libraries/functions/os_check.py
--
diff --git 
a/slider-agent/src/main/python/resource_management/libraries/functions/os_check.py
 
b/slider-agent/src/main/python/resource_management/libraries/functions/os_check.py
index 7a72bc8..abfceb8 100644
--- 
a/slider-agent/src/main/python/resource_management/libraries/functions/os_check.py
+++ 
b/slider-agent/src/main/python/resource_management/libraries/functions/os_check.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.6
+#!/usr/bin/env python
 
 '''
 Licensed to the Apache Software Foundation (ASF) under one
@@ -26,11 +26,70 @@ __all__ = [
 'OSCheck',
 ]
 
-class OSCheck(object):
-  def __init__(self):
-pass
 
-  def get_os_type(self):
+def linux_distribution():
+  PYTHON_VER = sys.version_info[0] * 10 + sys.version_info[1]
+
+  if PYTHON_VER < 26:
+linux_distribution = platform.dist()
+  else:
+linux_distribution = platform.linux_distribution()
+
+  return linux_distribution
+
+
+class OS_CONST_TYPE(type):
+  # os families
+  REDHAT_FAMILY = 'redhat'
+  DEBIAN_FAMILY = 'debian'
+  SUSE_FAMILY = 'suse'
+
+  # Declare here os type mapping
+  OS_FAMILY_COLLECTION = [
+{'name': REDHAT_FAMILY,
+ 'os_list':
+   ['redhat', 'fedora', 'centos', 'oraclelinux',
+'ascendos', 'amazon', 'xenserver', 'oel', 'ovs',
+'cloudlinux', 'slc', 'scientific', 'psbm',
+'centos linux']
+},
+{'name': DEBIAN_FAMILY,
+ 'os_list': ['ubuntu', 'debian']
+},
+{'name': SUSE_FAMILY,
+ 'os_list': ['sles', 'sled', 'opensuse', 'suse']
+}
+  ]
+  # Would be generated from Family collection definition
+  OS_COLLECTION = []
+
+  def __init__(cls, name, bases, dct):
+for item in cls.OS_FAMILY_COLLECTION:
+  cls.OS_COLLECTION += item['os_list']
+
+  def __getattr__(cls, name):
+"""
+  Added support of class.OS_ properties defined in OS_COLLECTION
+  Example:
+  OSConst.OS_CENTOS would return centos
+  OSConst.OS_OTHEROS would triger an error, coz
+   that os is not present in OS_FAMILY_COLLECTION map
+"""
+name = name.lower()
+if "os_" in name and name[3:] in cls.OS_COLLECTION:
+  return name[3:]
+else:
+  raise Exception("Unknown class property '%s'" % name)
+
+
+class OSConst:
+  __metaclass__ = OS_CONST_TYPE
+
+
+class OSCheck:
+
+  @staticmethod
+  def get_os_type():
 """
 Return values:
 redhat, fedora, centos, oraclelinux, ascendos,
@@ -41,7 +100,7 @@ class OSCheck(object):
 """
 # Read content from /etc/*-release file
 # Full release name
-dist = platform.linux_distribution()
+dist = linux_distribution()
 operatingSystem = dist[0].lower()
 
 # special cases
@@ -55,31 +114,26 @@ class OSCheck(object):
 if operatingSystem != '':
   return operatingSystem
 else:
-  print "Cannot detect os type. Exiting..."
-  sys.exit(1)
-
+  raise Exception("Cannot detect os type. Exiting...")
 
-  def get_os_f

git commit: SLIDER-142. Have the agent functional test create the app pkg dynamically

2014-06-17 Thread smohanty
Repository: incubator-slider
Updated Branches:
  refs/heads/develop e2440c32d -> 055ed0b07


SLIDER-142. Have the agent functional test create the app pkg dynamically


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

Branch: refs/heads/develop
Commit: 055ed0b076fca892e4c8df32afc2a4fcc65259b4
Parents: e2440c3
Author: Sumit Mohanty 
Authored: Tue Jun 17 15:45:24 2014 -0700
Committer: Sumit Mohanty 
Committed: Tue Jun 17 15:45:24 2014 -0700

--
 .../test_command_log/cmd_log_app_pkg.zip| Bin 6676 -> 0 bytes
 .../lifecycle/AgentCommandTestBase.groovy   |  63 ---
 2 files changed, 54 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/055ed0b0/slider-core/src/test/app_packages/test_command_log/cmd_log_app_pkg.zip
--
diff --git 
a/slider-core/src/test/app_packages/test_command_log/cmd_log_app_pkg.zip 
b/slider-core/src/test/app_packages/test_command_log/cmd_log_app_pkg.zip
deleted file mode 100644
index e44907a..000
Binary files 
a/slider-core/src/test/app_packages/test_command_log/cmd_log_app_pkg.zip and 
/dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/055ed0b0/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentCommandTestBase.groovy
--
diff --git 
a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentCommandTestBase.groovy
 
b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentCommandTestBase.groovy
index daf091c..d1d6f07 100644
--- 
a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentCommandTestBase.groovy
+++ 
b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentCommandTestBase.groovy
@@ -26,8 +26,13 @@ import org.apache.slider.common.params.SliderActions
 import org.apache.slider.funtest.framework.CommandTestBase
 import org.apache.slider.funtest.framework.FuntestProperties
 import org.apache.slider.funtest.framework.SliderShell
+import org.apache.tools.zip.ZipEntry
+import org.apache.tools.zip.ZipOutputStream
+import org.junit.Assert
 import org.junit.Before
 import org.junit.BeforeClass
+import org.junit.rules.TemporaryFolder
+import org.junit.Rule
 
 
 @Slf4j
@@ -38,10 +43,9 @@ class AgentCommandTestBase extends CommandTestBase
   
   protected static String APP_RESOURCE = 
"../slider-core/src/test/app_packages/test_command_log/resources.json"
   protected static String APP_TEMPLATE = 
"../slider-core/src/test/app_packages/test_command_log/appConfig.json"
-  protected static String APP_PKG = 
"../slider-core/src/test/app_packages/test_command_log/cmd_log_app_pkg.zip"
+  protected static String APP_PKG_DIR = 
"../slider-core/src/test/app_packages/test_command_log/"
   protected static String AGENT_CONF = "../slider-agent/conf/agent.ini"
   protected static final File LOCAL_SLIDER_AGENT_TARGZ
-  protected static final File LOCAL_APP_PKZ
   protected static final File LOCAL_AGENT_CONF
 
   protected static Path agentTarballPath;
@@ -53,10 +57,12 @@ class AgentCommandTestBase extends CommandTestBase
 LOCAL_SLIDER_AGENT_TARGZ = new File(
 SLIDER_BIN_DIRECTORY,
 AGENT_SLIDER_GZ).canonicalFile
-LOCAL_APP_PKZ = new File(APP_PKG).canonicalFile
 LOCAL_AGENT_CONF = new File(AGENT_CONF).canonicalFile
   }
 
+  @Rule
+  public TemporaryFolder folder = new TemporaryFolder();
+
   @BeforeClass
   public static void setupAgent() {
 assumeAgentTestsEnabled()
@@ -67,12 +73,6 @@ class AgentCommandTestBase extends CommandTestBase
 Path localTarball = new Path(LOCAL_SLIDER_AGENT_TARGZ.toURI());
 clusterFS.copyFromLocalFile(false, true, localTarball, agentTarballPath)
 
-// Upload the app pkg
-assume(LOCAL_APP_PKZ.exists(), "App pkg not found at $LOCAL_APP_PKZ")
-appPkgPath = new Path(clusterFS.homeDirectory, 
"/slider/cmd_log_app_pkg.zip")
-Path localAppPkg = new Path(LOCAL_APP_PKZ.toURI());
-clusterFS.copyFromLocalFile(false, true, localAppPkg, appPkgPath)
-
 // Upload the agent.ini
 assume(LOCAL_AGENT_CONF.exists(), "Agent config not found at 
$LOCAL_AGENT_CONF")
 agtIniPath = new Path(clusterFS.homeDirectory, 
"/slider/agent/conf/agent.ini")
@@ -80,6 +80,26 @@ class AgentCommandTestBase extends CommandTestBase
 clusterFS.copyFromLocalFile(false, true, localAgtIni, agtIniPath)
   }
 
+
+  @Before
+  public void specificSetupForTest() {
+appPkgPath = new Path(clusterFS.homeDirectory, 
"/slider/cmd_log_app_pkg.zip")
+i

[3/5] git commit: SLIDER-3 : service registry

2014-06-17 Thread stevel
SLIDER-3 : service registry


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

Branch: refs/heads/develop
Commit: 9b7000fab354460a36c2af751e7697c643dbe414
Parents: 93c1b3b
Author: Steve Loughran 
Authored: Mon Jun 16 16:58:02 2014 -0700
Committer: Steve Loughran 
Committed: Mon Jun 16 16:58:02 2014 -0700

--
 .../registry/a_YARN_service_registry.md |   1 -
 .../markdown/registry/p2p_service_registries.md |  78 ++
 ...lication_registration_and_binding_problem.md | 107 +--
 3 files changed, 135 insertions(+), 51 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/9b7000fa/src/site/markdown/registry/a_YARN_service_registry.md
--
diff --git a/src/site/markdown/registry/a_YARN_service_registry.md 
b/src/site/markdown/registry/a_YARN_service_registry.md
index 23cfce9..b695106 100644
--- a/src/site/markdown/registry/a_YARN_service_registry.md
+++ b/src/site/markdown/registry/a_YARN_service_registry.md
@@ -224,4 +224,3 @@ This isn't a registry service directly, though LDAP queries 
do make enumeration
 
 If service information were to be published via LDAP, then it should allow 
IT-managed LDAP services to both host this information, and publish 
configuration data. This would be relevant for classic Hadoop applications if 
we were to move the Configuration class to support back-end configuration 
sources beyond XML files on the classpath.
 
-# Proposal

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/9b7000fa/src/site/markdown/registry/p2p_service_registries.md
--
diff --git a/src/site/markdown/registry/p2p_service_registries.md 
b/src/site/markdown/registry/p2p_service_registries.md
index 2cf953c..eaf5097 100644
--- a/src/site/markdown/registry/p2p_service_registries.md
+++ b/src/site/markdown/registry/p2p_service_registries.md
@@ -17,9 +17,11 @@
   
 # P2P Service Registries for Apache Slider
 
-Alongside the centralized service registries, there's much prior work on P2P 
discovery systems, especially for mobile and consumer devices.
+Alongside the centralized service registries, there's much prior work on
+P2P discovery systems, especially for mobile and consumer devices.
 
-They perform some multicast- or distributed hash table-based lookup, and tend 
to have common limitations:
+They perform some multicast- or distributed hash table-based lookup,
+and tend to have common limitations:
 
 * scalability
 
@@ -29,15 +31,29 @@ They perform some multicast- or distributed hash 
table-based lookup, and tend to
 
 * consistency: can you trust the results to be complete and current?
 
-Bootstrapping is usually done via multicast, possibly then switching to 
unicast for better scale. As multicasting doesn't work in cloud 
infrastructures, none of the services work unmodified  in public clouds. 
There's multiple anecdotes of [Amazon's SimpleDB 
service](http://aws.amazon.com/simpledb/) being used as a registry for in-EC2 
applications. At the very least, this service and its equivalents in other 
cloud providers could be used to bootstrap ZK client bindings in cloud 
environments. 
+Bootstrapping is usually done via multicast, possibly then switching
+to unicast for better scale. As multicasting doesn't work in cloud
+infrastructures, none of the services work unmodified  in public
+clouds. There's multiple anecdotes of
+[Amazon's SimpleDB service](http://aws.amazon.com/simpledb/) being used as a
+registry for in-EC2 applications. At the very least, this service and its
+equivalents in other cloud providers could be used to bootstrap ZK client
+bindings in cloud environments. 
 
 ## Service Location Protocol 
 
-Service Location Protocol is a protocol for discovery services that came out 
of Sun, Novell and others -it is still available for printer discovery and 
suchlike
+Service Location Protocol is a protocol for discovery services that came out
+of Sun, Novell and others -it is still available for printer discovery and
+suchlike
 
-It supports both a multicast discovery mechanism, and a unicast protocol to 
talk to a Directory Agent -an agent that is itself discovered by multicast 
requests, or by listening for the agent's intermittent multicast announcements.
+It supports both a multicast discovery mechanism, and a unicast protocol
+to talk to a Directory Agent -an agent that is itself discovered by multicast
+requests, or by listening for the agent's intermittent multicast announcements.
 
-There's an extension to DHCP, RFC

[5/5] git commit: SLIDER-140 test against hadoop 2.4.1 RC

2014-06-17 Thread stevel
SLIDER-140 test against hadoop 2.4.1 RC


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

Branch: refs/heads/develop
Commit: e2440c32d70d68289d7312357b8fbe082f847ea9
Parents: 33778c3
Author: Steve Loughran 
Authored: Tue Jun 17 15:31:24 2014 -0700
Committer: Steve Loughran 
Committed: Tue Jun 17 15:31:24 2014 -0700

--
 pom.xml  | 19 +--
 .../flexing/TestClusterFlex0To1.groovy   |  2 +-
 2 files changed, 18 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/e2440c32/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 262d194..ae92769 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1331,10 +1331,25 @@
 
 
 
-  
+  
+  hadoop-2.4.1
+  
+2.4.1
+  
+
+
+  
   branch-2
   
-2.4.0
+2.5.0-SNAPSHOT
+  
+
+
+
+  
+  hadoop-trunk
+  
+3.0.0-SNAPSHOT
   
 
 

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/e2440c32/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/flexing/TestClusterFlex0To1.groovy
--
diff --git 
a/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/flexing/TestClusterFlex0To1.groovy
 
b/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/flexing/TestClusterFlex0To1.groovy
index 587e41f..3a66873 100644
--- 
a/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/flexing/TestClusterFlex0To1.groovy
+++ 
b/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/flexing/TestClusterFlex0To1.groovy
@@ -30,7 +30,7 @@ class TestClusterFlex0To1 extends HBaseMiniClusterTestBase {
 
   @Test
   public void testClusterFlex0To1() throws Throwable {
-assert flexHBaseClusterTestRun("test_cluster_flex_0To1", 1, 1, 0, 1, false)
+assert flexHBaseClusterTestRun("test_cluster_flex_0to1", 1, 1, 0, 1, false)
   }
 
 }



[2/5] git commit: rm duplicate ASF headers that have crept into a log4j.properties file


2014-06-17 Thread stevel
rm duplicate ASF headers that have crept into a log4j.properties file



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

Branch: refs/heads/develop
Commit: 93c1b3bc91d13ae206a647df70c38d4b1e02109c
Parents: fc96255
Author: Steve Loughran 
Authored: Mon Jun 16 16:57:23 2014 -0700
Committer: Steve Loughran 
Committed: Mon Jun 16 16:57:23 2014 -0700

--
 .../ubuntu-secure/slider/log4j.properties   | 25 
 1 file changed, 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/93c1b3bc/src/test/clusters/ubuntu-secure/slider/log4j.properties
--
diff --git a/src/test/clusters/ubuntu-secure/slider/log4j.properties 
b/src/test/clusters/ubuntu-secure/slider/log4j.properties
index c99d4a3..1bea885 100644
--- a/src/test/clusters/ubuntu-secure/slider/log4j.properties
+++ b/src/test/clusters/ubuntu-secure/slider/log4j.properties
@@ -1,16 +1,3 @@
-#
-# 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.
-#
 
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -29,18 +16,6 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 #
-
-#   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.
 # log4j configuration used during build and unit tests
 
 log4j.rootLogger=INFO,stdout



[4/5] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-slider into develop

2014-06-17 Thread stevel
Merge branch 'develop' of 
https://git-wip-us.apache.org/repos/asf/incubator-slider into develop


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

Branch: refs/heads/develop
Commit: 33778c346caaee9976a39fe395595c0492f7929a
Parents: 9b7000f 4b6d956
Author: Steve Loughran 
Authored: Tue Jun 17 15:30:38 2014 -0700
Committer: Steve Loughran 
Committed: Tue Jun 17 15:30:38 2014 -0700

--
 slider-agent/pom.xml  |  2 +-
 .../services/workflow/ForkedProcessService.java   | 18 ++
 .../services/workflow/LongLivedProcess.java   |  6 ++
 .../TestWorkflowForkedProcessService.java |  2 +-
 4 files changed, 26 insertions(+), 2 deletions(-)
--




[1/5] git commit: SLIDER-75 push back slider shell enhancements into bigtop

2014-06-17 Thread stevel
Repository: incubator-slider
Updated Branches:
  refs/heads/develop 4b6d95652 -> e2440c32d


SLIDER-75 push back slider shell enhancements into bigtop


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

Branch: refs/heads/develop
Commit: fc962556d3ebd344d81aa2bbdc922e2e734db40b
Parents: c61e390
Author: Steve Loughran 
Authored: Mon Jun 16 16:56:53 2014 -0700
Committer: Steve Loughran 
Committed: Mon Jun 16 16:56:53 2014 -0700

--
 .../funtest/framework/CommandTestBase.groovy|  3 +-
 .../slider/funtest/framework/SliderShell.groovy | 68 ++--
 2 files changed, 35 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/fc962556/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
--
diff --git 
a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
 
b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
index d0d7fc9..d2accbb 100644
--- 
a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
+++ 
b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
@@ -30,7 +30,6 @@ import org.apache.slider.common.SliderXmlConfKeys
 import org.apache.slider.api.ClusterDescription
 import org.apache.slider.core.exceptions.SliderException
 import org.apache.slider.common.tools.SliderUtils
-import org.apache.slider.common.params.Arguments
 import org.apache.slider.client.SliderClient
 import org.apache.slider.test.SliderTestUtils
 import org.junit.Before
@@ -164,7 +163,7 @@ abstract class CommandTestBase extends SliderTestUtils {
* @return
*/
   public static SliderShell slider(int exitCode, Collection commands) {
-return SliderShell.run(commands, exitCode)
+return SliderShell.run(exitCode, commands)
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/fc962556/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/SliderShell.groovy
--
diff --git 
a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/SliderShell.groovy
 
b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/SliderShell.groovy
index 068c330..804e791 100644
--- 
a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/SliderShell.groovy
+++ 
b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/SliderShell.groovy
@@ -18,14 +18,15 @@
 
 package org.apache.slider.funtest.framework
 
-import groovy.util.logging.Slf4j
 import org.apache.bigtop.itest.shell.Shell
 import org.apache.slider.core.exceptions.SliderException
 import org.apache.slider.common.tools.SliderUtils
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
 
-@Slf4j
 
 class SliderShell extends Shell {
+  private static final Logger log = LoggerFactory.getLogger(SliderShell.class);
 
 
   public static final String BASH = '/bin/bash -s'
@@ -86,10 +87,14 @@ class SliderShell extends Shell {
int signCorrectReturnCode() {
  ret = signCorrect(ret)
}
-  
-  int execute(int expectedExitCode) {
+
+  /**
+   * Execute expecting a specific exit code
+   * @param expectedExitCode the expected exit code
+   */
+  void execute(int expectedExitCode) {
 execute()
-return assertExitCode(expectedExitCode)
+assertExitCode(expectedExitCode)
   }
   
   /**
@@ -98,14 +103,19 @@ class SliderShell extends Shell {
* @param commands
* @return the shell
*/
-  public static SliderShell run(Collection commands, int exitCode) {
+  public static SliderShell run(int exitCode, Collection commands) {
 SliderShell shell = new SliderShell(commands)
 shell.execute(exitCode);
 return shell
   }
 
-  public static int signCorrect(int u) {
-return (u << 24) >> 24;
+  /**
+   * Sign-correct a process exit code
+   * @param exitCode the incoming exit code
+   * @return the sign-corrected version
+   */
+  public static int signCorrect(int exitCode) {
+return (exitCode << 24) >> 24;
   }
   
   @Override
@@ -113,9 +123,13 @@ class SliderShell extends Shell {
 return ret + " =>" + command
   }
 
-  public void dump() {
+  /**
+   * Dump the command, return code and outputs to the log.
+   * stdout is logged at info; stderr at error.
+   */
+  public void dumpOutput() {
 log.error(toString())
-log.error("return code = $ret")
+log.error("return code = ${signCorrectReturnCode()}")
 if (out.size() != 0) {

git commit: SLIDER-138 Do not specify python2.6 as executable

2014-06-17 Thread tedyu
Repository: incubator-slider
Updated Branches:
  refs/heads/develop 32b39cffc -> 4b6d95652


SLIDER-138 Do not specify python2.6 as executable


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

Branch: refs/heads/develop
Commit: 4b6d95652c7ed6aacf5c766f792aa4a7a85e9357
Parents: 32b39cf
Author: tedyu 
Authored: Tue Jun 17 13:48:07 2014 -0700
Committer: tedyu 
Committed: Tue Jun 17 13:48:07 2014 -0700

--
 slider-agent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/4b6d9565/slider-agent/pom.xml
--
diff --git a/slider-agent/pom.xml b/slider-agent/pom.xml
index f508fdf..06f99b5 100644
--- a/slider-agent/pom.xml
+++ b/slider-agent/pom.xml
@@ -67,7 +67,7 @@
 
   
 
-  python2.6
+  python
   src/test/python
   
 unitTests.py



git commit: SLIDER-137 Include quick sleep when getting final output

2014-06-17 Thread tedyu
Repository: incubator-slider
Updated Branches:
  refs/heads/develop c61e39013 -> 32b39cffc


SLIDER-137 Include quick sleep when getting final output


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

Branch: refs/heads/develop
Commit: 32b39cffcdea15d8683066693585f57562c3a695
Parents: c61e390
Author: tedyu 
Authored: Tue Jun 17 10:29:54 2014 -0700
Committer: tedyu 
Committed: Tue Jun 17 10:29:54 2014 -0700

--
 .../services/workflow/ForkedProcessService.java   | 18 ++
 .../services/workflow/LongLivedProcess.java   |  6 ++
 .../TestWorkflowForkedProcessService.java |  2 +-
 3 files changed, 25 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/32b39cff/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java
--
diff --git 
a/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java
 
b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java
index 13ed783..b0c503d 100644
--- 
a/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java
+++ 
b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java
@@ -267,4 +267,22 @@ public class ForkedProcessService extends 
AbstractWorkflowExecutorService implem
: new LinkedList();
   }
 
+  /**
+   * Get the recent output from the process, or [] if not defined
+   * @param duration the duration, in ms, which we wait for recent output to 
become non-empty
+   * @return a possibly empty list
+   */
+  public List getRecentOutput(int duration) {
+if (process == null) return new LinkedList();
+long start = System.currentTimeMillis();
+while (process.isRecentOutputEmpty() && System.currentTimeMillis() - start 
<= duration) {
+  try {
+Thread.sleep(20);
+  } catch (InterruptedException ie) {
+Thread.currentThread().interrupt();
+break;
+  }
+}
+return process.getRecentOutput();
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/32b39cff/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java
--
diff --git 
a/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java
 
b/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java
index a1db64f..7b9863f 100644
--- 
a/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java
+++ 
b/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java
@@ -339,6 +339,12 @@ public class LongLivedProcess implements Runnable {
 return new ArrayList(recentLines);
   }
 
+  /*
+   * @return whether lines of recent output are empty
+   */
+  public synchronized boolean isRecentOutputEmpty() {
+return recentLines.isEmpty();
+  }
 
   /**
* add the recent line to the list of recent lines; deleting

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/32b39cff/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestWorkflowForkedProcessService.java
--
diff --git 
a/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestWorkflowForkedProcessService.java
 
b/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestWorkflowForkedProcessService.java
index 29d5578..d46f07c 100644
--- 
a/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestWorkflowForkedProcessService.java
+++ 
b/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestWorkflowForkedProcessService.java
@@ -118,7 +118,7 @@ public class TestWorkflowForkedProcessService extends 
WorkflowServiceTestBase {
* @return the last output
*/
   private List getFinalOutput() {
-return process.getRecentOutput();
+return process.getRecentOutput(2000);
   }
 
   private ForkedProcessService initProcess(List commands) throws