Repository: incubator-slider Updated Branches: refs/heads/develop f53db8725 -> be94df3b4
SLIDER-190. Add projects to create command logger package as well as Slider app package Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/be94df3b Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/be94df3b Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/be94df3b Branch: refs/heads/develop Commit: be94df3b49051dd929dd6dbb2736f9a0daac73b4 Parents: e879109 Author: Sumit Mohanty <smoha...@hortonworks.com> Authored: Tue Jul 1 11:25:30 2014 -0700 Committer: Sumit Mohanty <smoha...@hortonworks.com> Committed: Tue Jul 1 12:56:33 2014 -0700 ---------------------------------------------------------------------- .../command-logger/application-pkg/README.txt | 24 +++++ .../command-logger/slider-pkg/metainfo.xml | 2 +- app-packages/command-logger/slider-pkg/pom.xml | 17 +++- .../test_command_log/appConfig.json | 6 +- .../test_command_log/appConfig_fast_no_reg.json | 6 +- .../test_command_log/appConfig_no_hb.json | 6 +- .../test_command_log/configuration/cl-site.xml | 34 ------- .../app_packages/test_command_log/metainfo.xml | 52 ----------- .../package/files/command_log_10.tar | Bin 2560 -> 0 bytes .../test_command_log/package/scripts/cl.py | 89 ------------------- .../test_command_log/package/scripts/params.py | 31 ------- .../package/templates/operations.log.j2 | 22 ----- slider-funtest/pom.xml | 52 ++++++++++- .../lifecycle/AgentCommandTestBase.groovy | 21 ++--- 14 files changed, 107 insertions(+), 255 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/be94df3b/app-packages/command-logger/application-pkg/README.txt ---------------------------------------------------------------------- diff --git a/app-packages/command-logger/application-pkg/README.txt b/app-packages/command-logger/application-pkg/README.txt new file mode 100644 index 0000000..5596f30 --- /dev/null +++ b/app-packages/command-logger/application-pkg/README.txt @@ -0,0 +1,24 @@ +<!--- + 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. +--> +Command logger is a simple application that does not have any moving parts yet. +Its sole purpose is to get packaged as a tarball that includes some static files +suggesting how commands may be logged. + +TODO: +* Add a daemon that gets activated when application is STARTED +* Provide hooks to validate that daemon is behaving as expected +* Provide hooks to inject failures http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/be94df3b/app-packages/command-logger/slider-pkg/metainfo.xml ---------------------------------------------------------------------- diff --git a/app-packages/command-logger/slider-pkg/metainfo.xml b/app-packages/command-logger/slider-pkg/metainfo.xml index 845ad93..e17413d 100644 --- a/app-packages/command-logger/slider-pkg/metainfo.xml +++ b/app-packages/command-logger/slider-pkg/metainfo.xml @@ -42,7 +42,7 @@ <packages> <package> <type>tarball</type> - <name>files/command_log.tar.gz</name> + <name>files/command_log.tar</name> </package> </packages> </osSpecific> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/be94df3b/app-packages/command-logger/slider-pkg/pom.xml ---------------------------------------------------------------------- diff --git a/app-packages/command-logger/slider-pkg/pom.xml b/app-packages/command-logger/slider-pkg/pom.xml index 72af03e..42ec8da 100644 --- a/app-packages/command-logger/slider-pkg/pom.xml +++ b/app-packages/command-logger/slider-pkg/pom.xml @@ -24,7 +24,7 @@ <relativePath>../../../pom.xml</relativePath> </parent> <modelVersion>4.0.0</modelVersion> - <artifactId>command-logger-app-package</artifactId> + <artifactId>apache-slider-command-logger</artifactId> <packaging>pom</packaging> <name>Slider Command Logger App Package</name> <description>Slider Command Logger App Package</description> @@ -92,6 +92,21 @@ </execution> </executions> </plugin> + + <plugin> + <groupId>org.apache.rat</groupId> + <artifactId>apache-rat-plugin</artifactId> + <version>${apache-rat-plugin.version}</version> + <executions> + <execution> + <id>check-licenses</id> + <goals> + <goal>check</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> </build> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/be94df3b/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 bd76c05..e7f9700 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 @@ -4,15 +4,15 @@ }, "global": { "agent.conf": "agent.ini", - "application.def": "cmd_log_app_pkg.zip", + "application.def": "apache-slider-command-logger.zip", "config_types": "cl-site", "java_home": "/usr/jdk64/jdk1.7.0_45", - "package_list": "files/command_log_10.tar", + "package_list": "files/command-logger.tar", "site.global.app_user": "yarn", "site.global.application_id": "CommandLogger", "site.global.app_log_dir": "${AGENT_LOG_ROOT}/app/log", "site.global.app_pid_dir": "${AGENT_WORK_ROOT}/app/run", - "site.global.app_root": "${AGENT_WORK_ROOT}/app/install/hbase-0.96.1-hadoop2", + "site.global.app_root": "${AGENT_WORK_ROOT}/app/install/command-logger", "site.global.app_install_dir": "${AGENT_WORK_ROOT}/app/install", "site.cl-site.logfile.location": "${AGENT_LOG_ROOT}/app/log/operations.log", "site.cl-site.datetime.format": "%A, %d. %B %Y %I:%M%p" http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/be94df3b/slider-core/src/test/app_packages/test_command_log/appConfig_fast_no_reg.json ---------------------------------------------------------------------- diff --git a/slider-core/src/test/app_packages/test_command_log/appConfig_fast_no_reg.json b/slider-core/src/test/app_packages/test_command_log/appConfig_fast_no_reg.json index 1f495c6..57c935c 100644 --- a/slider-core/src/test/app_packages/test_command_log/appConfig_fast_no_reg.json +++ b/slider-core/src/test/app_packages/test_command_log/appConfig_fast_no_reg.json @@ -6,15 +6,15 @@ "heartbeat.monitor.interval": "20000", "agent.instance.debug.data": "ANY:DO_NOT_REGISTER:NONE", "agent.conf": "agent.ini", - "application.def": "cmd_log_app_pkg.zip", + "application.def": "apache-slider-command-logger.zip", "config_types": "cl-site", "java_home": "/usr/jdk64/jdk1.7.0_45", - "package_list": "files/command_log_10.tar", + "package_list": "files/command-logger.tar", "site.global.app_user": "yarn", "site.global.application_id": "CommandLogger", "site.global.app_log_dir": "${AGENT_LOG_ROOT}/app/log", "site.global.app_pid_dir": "${AGENT_WORK_ROOT}/app/run", - "site.global.app_root": "${AGENT_WORK_ROOT}/app/install/hbase-0.96.1-hadoop2", + "site.global.app_root": "${AGENT_WORK_ROOT}/app/install/command-logger", "site.global.app_install_dir": "${AGENT_WORK_ROOT}/app/install", "site.cl-site.logfile.location": "${AGENT_LOG_ROOT}/app/log/operations.log", "site.cl-site.datetime.format": "%A, %d. %B %Y %I:%M%p" http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/be94df3b/slider-core/src/test/app_packages/test_command_log/appConfig_no_hb.json ---------------------------------------------------------------------- diff --git a/slider-core/src/test/app_packages/test_command_log/appConfig_no_hb.json b/slider-core/src/test/app_packages/test_command_log/appConfig_no_hb.json index c824e03..e028140 100644 --- a/slider-core/src/test/app_packages/test_command_log/appConfig_no_hb.json +++ b/slider-core/src/test/app_packages/test_command_log/appConfig_no_hb.json @@ -6,15 +6,15 @@ "heartbeat.monitor.interval": "20000", "agent.instance.debug.data": "ANY:DO_NOT_HEARTBEAT:DO_NOT_HEARTBEAT:NONE", "agent.conf": "agent.ini", - "application.def": "cmd_log_app_pkg.zip", + "application.def": "apache-slider-command-logger.zip", "config_types": "cl-site", "java_home": "/usr/jdk64/jdk1.7.0_45", - "package_list": "files/command_log_10.tar", + "package_list": "files/command-logger.tar", "site.global.app_user": "yarn", "site.global.application_id": "CommandLogger", "site.global.app_log_dir": "${AGENT_LOG_ROOT}/app/log", "site.global.app_pid_dir": "${AGENT_WORK_ROOT}/app/run", - "site.global.app_root": "${AGENT_WORK_ROOT}/app/install/hbase-0.96.1-hadoop2", + "site.global.app_root": "${AGENT_WORK_ROOT}/app/install/command-logger", "site.global.app_install_dir": "${AGENT_WORK_ROOT}/app/install", "site.cl-site.logfile.location": "${AGENT_LOG_ROOT}/app/log/operations.log", "site.cl-site.datetime.format": "%A, %d. %B %Y %I:%M%p" http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/be94df3b/slider-core/src/test/app_packages/test_command_log/configuration/cl-site.xml ---------------------------------------------------------------------- diff --git a/slider-core/src/test/app_packages/test_command_log/configuration/cl-site.xml b/slider-core/src/test/app_packages/test_command_log/configuration/cl-site.xml deleted file mode 100644 index 977c8bc..0000000 --- a/slider-core/src/test/app_packages/test_command_log/configuration/cl-site.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0"?> -<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> -<!-- -/** - * 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. - */ ---> -<configuration> - <property> - <name>logfile.location</name> - <value>/tmp/logfiles/operations.log</value> - <description>The location where the log file is stored.</description> - </property> - <property> - <name>datetime.format</name> - <value>%A, %d. %B %Y %I:%M%p</value> - <description>The format to use. - </description> - </property> -</configuration> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/be94df3b/slider-core/src/test/app_packages/test_command_log/metainfo.xml ---------------------------------------------------------------------- diff --git a/slider-core/src/test/app_packages/test_command_log/metainfo.xml b/slider-core/src/test/app_packages/test_command_log/metainfo.xml deleted file mode 100644 index 845ad93..0000000 --- a/slider-core/src/test/app_packages/test_command_log/metainfo.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.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. ---> -<metainfo> - <schemaVersion>2.0</schemaVersion> - <application> - <name>TEST_COMMAND_LOG</name> - <comment> - When started it creates a new log file and stores all commands in the - log file. When stopped it renames the file. - </comment> - <version>0.1.0</version> - <components> - <component> - <name>COMMAND_LOGGER</name> - <category>MASTER</category> - <commandScript> - <script>scripts/cl.py</script> - <scriptType>PYTHON</scriptType> - <timeout>600</timeout> - </commandScript> - </component> - </components> - - <osSpecifics> - <osSpecific> - <osType>any</osType> - <packages> - <package> - <type>tarball</type> - <name>files/command_log.tar.gz</name> - </package> - </packages> - </osSpecific> - </osSpecifics> - - </application> -</metainfo> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/be94df3b/slider-core/src/test/app_packages/test_command_log/package/files/command_log_10.tar ---------------------------------------------------------------------- diff --git a/slider-core/src/test/app_packages/test_command_log/package/files/command_log_10.tar b/slider-core/src/test/app_packages/test_command_log/package/files/command_log_10.tar deleted file mode 100644 index b8231d1..0000000 Binary files a/slider-core/src/test/app_packages/test_command_log/package/files/command_log_10.tar and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/be94df3b/slider-core/src/test/app_packages/test_command_log/package/scripts/cl.py ---------------------------------------------------------------------- diff --git a/slider-core/src/test/app_packages/test_command_log/package/scripts/cl.py b/slider-core/src/test/app_packages/test_command_log/package/scripts/cl.py deleted file mode 100644 index 6b18faa..0000000 --- a/slider-core/src/test/app_packages/test_command_log/package/scripts/cl.py +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env python -""" -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. - -""" - -import sys -import os -from datetime import datetime -from resource_management import * -from resource_management.core.base import Fail - - -class CommandLogger(Script): - def install(self, env): - self.install_packages(env) - - def configure(self, env): - import params - - env.set_params(params) - - def start(self, env): - import params - - env.set_params(params) - self.configure(env) - self.rename_file(env) - self.ensure_file(env) - self.check_and_log(env, "Starting instance.") - - def stop(self, env): - import params - - env.set_params(params) - self.check_and_log(env, "Stopping instance.") - self.rename_file(env) - - def status(self, env): - Logger.info("Returning status as live.") - - def check_and_log(self, env, message): - import params - - file_location = params.file_location - datetime_format = params.datetime_format - if not os.path.isfile(file_location) or not os.access(file_location, - os.W_OK): - raise Fail("File does not exist or not writable. %s" % file_location) - with open(file_location, "a") as logfile: - logfile.write("Time: " + datetime.utcnow().strftime(datetime_format) + "\n") - logfile.write("Log: " + message + "\n") - logfile.write("---------------\n") - - def rename_file(self, env): - import params - - file_location = params.file_location - if os.path.isfile(file_location) and \ - os.access(file_location, os.W_OK): - new_file_name = \ - file_location + "." + datetime.utcnow().strftime("%d_%m_%y_%I_%M_%S") - os.rename(file_location, new_file_name) - - def ensure_file(self, env): - import params - - file_location = params.file_location - TemplateConfig( file_location, - owner = params.app_user, - template_tag = None - ) - -if __name__ == "__main__": - CommandLogger().execute() http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/be94df3b/slider-core/src/test/app_packages/test_command_log/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/slider-core/src/test/app_packages/test_command_log/package/scripts/params.py b/slider-core/src/test/app_packages/test_command_log/package/scripts/params.py deleted file mode 100644 index 3d388ae..0000000 --- a/slider-core/src/test/app_packages/test_command_log/package/scripts/params.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python -""" -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. - -""" - -from resource_management import * - -# server configurations -config = Script.get_config() - -container_id = config['hostLevelParams']['container_id'] -application_id = config['configurations']['global']['application_id'] -app_user = config['configurations']['global']['app_user'] - -datetime_format = config['configurations']['cl-site']['datetime.format'] -file_location = config['configurations']['cl-site']['logfile.location'] http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/be94df3b/slider-core/src/test/app_packages/test_command_log/package/templates/operations.log.j2 ---------------------------------------------------------------------- diff --git a/slider-core/src/test/app_packages/test_command_log/package/templates/operations.log.j2 b/slider-core/src/test/app_packages/test_command_log/package/templates/operations.log.j2 deleted file mode 100644 index 8d6e879..0000000 --- a/slider-core/src/test/app_packages/test_command_log/package/templates/operations.log.j2 +++ /dev/null @@ -1,22 +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 is a log for all operations on a Yarn container. -Container Id: {{container_id}} -Application id: {{application_id}} ---------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/be94df3b/slider-funtest/pom.xml ---------------------------------------------------------------------- diff --git a/slider-funtest/pom.xml b/slider-funtest/pom.xml index 51b5cec..76785a0 100644 --- a/slider-funtest/pom.xml +++ b/slider-funtest/pom.xml @@ -27,6 +27,9 @@ <artifactId>slider</artifactId> <version>0.31.0-incubating-SNAPSHOT</version> </parent> + <properties> + <work.dir>package-tmp</work.dir> + </properties> <build> @@ -113,6 +116,7 @@ <!-- this property must be supplied--> <slider.conf.dir>${slider.conf.dir}</slider.conf.dir> <slider.bin.dir>../slider-assembly/target/slider-${project.version}-all/slider-${project.version}</slider.bin.dir> + <test.app.pkg>target/package-tmp/apache-slider-command-logger.zip</test.app.pkg> </systemPropertyVariables> <includes> <include>**/Test*.java</include> @@ -143,6 +147,45 @@ </excludes> </configuration> </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>${maven-dependency-plugin.version}</version> + <executions> + <execution> + <id>copy-dependencies</id> + <phase>process-resources</phase> + <goals> + <goal>copy-dependencies</goal> + </goals> + <configuration> + <includeArtifactIds>apache-slider-command-logger</includeArtifactIds> + <includeTypes>zip</includeTypes> + <outputDirectory>${project.build.directory}/${work.dir}</outputDirectory> + </configuration> + </execution> + <execution> + <id>copy</id> + <phase>test</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>org.apache.slider</groupId> + <artifactId>apache-slider-command-logger</artifactId> + <type>zip</type> + <overWrite>false</overWrite> + <outputDirectory>${project.build.directory}/${work.dir}</outputDirectory> + <destFileName>apache-slider-command-logger.zip</destFileName> + </artifactItem> + </artifactItems> + </configuration> + </execution> + </executions> + </plugin> </plugins> </build> @@ -198,7 +241,14 @@ <artifactId>hadoop-minicluster</artifactId> <scope>test</scope> </dependency> - + + <dependency> + <groupId>org.apache.slider</groupId> + <artifactId>apache-slider-command-logger</artifactId> + <version>${project.version}</version> + <type>zip</type> + </dependency> + <dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase-server</artifactId> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/be94df3b/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 33c0b81..daf102a 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 @@ -39,13 +39,15 @@ class AgentCommandTestBase extends CommandTestBase implements FuntestProperties, Arguments, SliderExitCodes, SliderActions { public static final boolean AGENTTESTS_ENABLED + private static String TEST_APP_PKG_PROP = "test.app.pkg" + 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_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_AGENT_CONF + public static final String TEST_APP_PKG = sysprop(TEST_APP_PKG_PROP) + protected static Path agentTarballPath; protected static Path appPkgPath; @@ -83,24 +85,13 @@ implements FuntestProperties, Arguments, SliderExitCodes, SliderActions { AgentUploads agentUploads = new AgentUploads(SLIDER_CONFIG) agentUploads.uploader.mkHomeDir() - appPkgPath = new Path(clusterFS.homeDirectory, "cmd_log_app_pkg.zip") + appPkgPath = new Path(clusterFS.homeDirectory, "apache-slider-command-logger.zip") if (!clusterFS.exists(appPkgPath)) { clusterFS.delete(appPkgPath, false) } - def pkgPath = folder.newFolder("testpkg") - File zipFileName = new File(pkgPath, "cmd_log_app_pkg.zip").canonicalFile - - def localZipDirectory = new File(APP_PKG_DIR) - assume(localZipDirectory.exists(), "App pkg dir not found at $APP_PKG_DIR") - - zipDir(zipFileName.canonicalPath, APP_PKG_DIR) - - // Verify and upload the app pkg - assume(zipFileName.exists(), "App pkg not found at $zipFileName") - Path localAppPkg = new Path(zipFileName.toURI()); + File zipFileName = new File(TEST_APP_PKG).canonicalFile agentUploads.uploader.copyIfOutOfDate(zipFileName, appPkgPath, false) - } public static void logShell(SliderShell shell) {