Merge branch 'feature/hbase_package_related_changes' 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/3736b3af Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/3736b3af Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/3736b3af Branch: refs/heads/feature/SLIDER-149_Support_a_YARN_service_registry Commit: 3736b3afb14f891f2421b1a3fa55b5e45997b146 Parents: 31d70a3 d66d444 Author: Sumit Mohanty <smoha...@hortonworks.com> Authored: Fri Aug 22 17:42:11 2014 -0700 Committer: Sumit Mohanty <smoha...@hortonworks.com> Committed: Fri Aug 22 17:42:11 2014 -0700 ---------------------------------------------------------------------- .../command-logger/slider-pkg/appConfig.json | 2 - .../command-logger/slider-pkg/metainfo.xml | 8 + app-packages/hbase/appConfig.json | 38 +---- app-packages/hbase/configuration/global.xml | 160 ------------------- app-packages/hbase/configuration/hbase-env.xml | 117 ++++++++++++++ .../hbase/configuration/hbase-log4j.xml | 1 + app-packages/hbase/configuration/hbase-site.xml | 19 ++- app-packages/hbase/metainfo.xml | 24 +++ app-packages/hbase/package/scripts/hbase.py | 26 +-- app-packages/hbase/package/scripts/params.py | 26 ++- .../hbase/package/templates/hbase-env.sh.j2 | 81 ---------- app-packages/storm/appConfig.json | 88 +--------- app-packages/storm/configuration/global.xml | 39 ----- app-packages/storm/configuration/storm-env.xml | 40 +++++ app-packages/storm/configuration/storm-site.xml | 15 +- app-packages/storm/metainfo.xml | 14 ++ app-packages/storm/package/scripts/params.py | 8 +- app-packages/storm/package/scripts/storm.py | 7 +- .../storm/package/scripts/yaml_config.py | 7 +- .../core/providers/system.py | 8 + .../core/resources/system.py | 1 + .../providers/agent/AgentProviderService.java | 119 +++++++++++--- .../slider/providers/agent/AgentUtils.java | 20 ++- .../agent/application/metadata/Application.java | 11 +- .../agent/application/metadata/Component.java | 6 + .../agent/application/metadata/ConfigFile.java | 53 ++++++ .../metadata/ConfigurationDependencies.java | 39 ----- .../application/metadata/DefaultConfig.java | 39 +++++ .../metadata/DefaultConfigParser.java | 54 +++++++ .../application/metadata/MetainfoParser.java | 9 +- .../application/metadata/PropertyInfo.java | 54 +++++++ .../test_command_log/appConfig.json | 2 - .../test_command_log/appConfig_fast_no_reg.json | 2 - .../test_command_log/appConfig_no_hb.json | 2 - .../agent/TestAgentProviderService.java | 101 ++++++++++-- .../application/metadata/TestConfigParser.java | 107 +++++++++++++ .../metadata/TestMetainfoParser.java | 7 + .../slider/common/tools/test/metainfo.xml | 11 +- 38 files changed, 818 insertions(+), 547 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/3736b3af/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/3736b3af/slider-core/src/main/java/org/apache/slider/providers/agent/AgentUtils.java ---------------------------------------------------------------------- diff --cc slider-core/src/main/java/org/apache/slider/providers/agent/AgentUtils.java index 6bb6132,2ed4885..1d61c15 --- a/slider-core/src/main/java/org/apache/slider/providers/agent/AgentUtils.java +++ b/slider-core/src/main/java/org/apache/slider/providers/agent/AgentUtils.java @@@ -25,7 -26,7 +27,8 @@@ import org.apache.slider.providers.agen import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.FileNotFoundException; + import java.io.File; import java.io.IOException; import java.io.InputStream; @@@ -35,17 -36,14 +38,17 @@@ public class AgentUtils { private static final Logger log = LoggerFactory.getLogger(AgentUtils.class); - static Metainfo getApplicationMetainfo(SliderFileSystem fileSystem, - String appDef) throws IOException { + public static Metainfo getApplicationMetainfo(SliderFileSystem fileSystem, - String appDef) throws IOException { ++ String appDef) throws IOException { log.info("Reading metainfo at {}", appDef); + FileSystem fs = fileSystem.getFileSystem(); + Path appPath = new Path(appDef); InputStream metainfoStream = SliderUtils.getApplicationResourceInputStream( - fileSystem.getFileSystem(), new Path(appDef), "metainfo.xml"); + fs, appPath, "metainfo.xml"); if (metainfoStream == null) { log.error("metainfo.xml is unavailable at {}.", appDef); - throw new IOException("metainfo.xml is required in app package."); + throw new FileNotFoundException("metainfo.xml is required in app package. " + + appPath); } Metainfo metainfo = new MetainfoParser().parse(metainfoStream);