hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jia...@apache.org
Subject [66/74] [abbrv] hadoop git commit: YARN-5909. Remove agent related code in slider AM. Contributed by Jian He
Date Tue, 13 Dec 2016 22:53:58 GMT
http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Component.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Component.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Component.java
deleted file mode 100644
index 78bb8c1..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Component.java
+++ /dev/null
@@ -1,217 +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.
- */
-package org.apache.slider.providers.agent.application.metadata;
-
-import org.apache.slider.common.tools.SliderUtils;
-import org.apache.slider.core.exceptions.BadConfigException;
-import org.apache.slider.core.exceptions.SliderException;
-import org.codehaus.jackson.annotate.JsonProperty;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Component defined in master package metainfo.json
- */
-public class Component extends AbstractComponent {
-
-  String category = CATEGORY_MASTER;
-  String publishConfig = Boolean.FALSE.toString();
-  String minInstanceCount = "0";
-  String maxInstanceCount;
-  String autoStartOnFailure = Boolean.FALSE.toString();
-  String appExports;
-  String compExports;
-  String type = TYPE_STANDARD;
-  List<ComponentExport> componentExports = new ArrayList<>();
-  List<DockerContainer> dockerContainers = new ArrayList<>();
-  List<ConfigFile> configFiles = new ArrayList<>();
-
-  public Component() {
-  }
-
-  public String getType() {
-    return type;
-  }
-
-  public void setType(String type) {
-    this.type = type;
-  }
-
-  public String getCategory() {
-    return category;
-  }
-
-  public void setCategory(String category) {
-    this.category = category;
-  }
-
-  public String getPublishConfig() {
-    return publishConfig;
-  }
-
-  public void setPublishConfig(String publishConfig) {
-    this.publishConfig = publishConfig;
-  }
-
-  public String getAutoStartOnFailure() {
-    return autoStartOnFailure;
-  }
-
-  public void setAutoStartOnFailure(String autoStartOnFailure) {
-    this.autoStartOnFailure = autoStartOnFailure;
-  }
-
-  public String getAppExports() {
-    return appExports;
-  }
-
-  public void setAppExports(String appExports) {
-    this.appExports = appExports;
-  }
-
-  public String getCompExports() {
-    return compExports;
-  }
-
-  public void setCompExports(String compExports) {
-    this.compExports = compExports;
-  }
-
-  public String getMinInstanceCount() {
-    return minInstanceCount;
-  }
-  
-  @JsonProperty("dockerContainers")
-  public List<DockerContainer> getDockerContainers() {
-     return this.dockerContainers;
-  }
-  
-  public Boolean getAutoStartOnFailureBoolean() {
-    if (SliderUtils.isUnset(getAutoStartOnFailure())) {
-      return Boolean.FALSE;
-    }
-
-    return Boolean.parseBoolean(getAutoStartOnFailure());
-  }
-
-  public int getMinInstanceCountInt() throws BadConfigException {
-    if (SliderUtils.isUnset(minInstanceCount)) {
-      return 0;
-    }
-
-    try {
-      return Integer.parseInt(minInstanceCount);
-    } catch (NumberFormatException nfe) {
-      throw new BadConfigException(nfe, "Invalid value for minInstanceCount for %s", name);
-    }
-  }
-
-  public int getMaxInstanceCountInt() throws BadConfigException {
-    if (SliderUtils.isUnset(maxInstanceCount)) {
-      return Integer.MAX_VALUE;
-    }
-
-    try {
-      return Integer.parseInt(maxInstanceCount);
-    } catch (NumberFormatException nfe) {
-      throw new BadConfigException(nfe, "Invalid value for maxInstanceCount for %s", name);
-    }
-  }
-
-  public void setMinInstanceCount(String minInstanceCount) {
-    this.minInstanceCount = minInstanceCount;
-  }
-
-  public String getMaxInstanceCount() {
-    return maxInstanceCount;
-  }
-
-  public void setMaxInstanceCount(String maxInstanceCount) {
-    this.maxInstanceCount = maxInstanceCount;
-  }
-
-  public void addComponentExport(ComponentExport export) {
-    componentExports.add(export);
-  }
-
-  public List<ComponentExport> getComponentExports() {
-    return componentExports;
-  }
-
-  public Boolean getRequiresAutoRestart() {
-    return Boolean.parseBoolean(this.autoStartOnFailure);
-  }
-
-  public void addConfigFile(ConfigFile configFile) {
-    this.configFiles.add(configFile);
-  }
-
-  @JsonProperty("configFiles")
-  public List<ConfigFile> getConfigFiles() {
-    return configFiles;
-  }
-
-  @Override
-  public String toString() {
-    final StringBuilder sb =
-        new StringBuilder("{");
-    sb.append("\n\"name\": ").append(name);
-    sb.append(",\n\"category\": ").append(category);
-    sb.append(",\n\"commandScript\" :").append(commandScript);
-    for(DockerContainer dc : dockerContainers){
-      sb.append(",\n\"container\" :").append(dc.toString());
-    }    
-    sb.append('}');
-    return sb.toString();
-  }
-
-  public void validate(String version) throws SliderException {
-    Metainfo.checkNonNull(getName(), "name", "component");
-    Metainfo.checkNonNull(getCategory(), "category", "component");
-    if (!getCategory().equals(CATEGORY_MASTER)
-        && !getCategory().equals(CATEGORY_SLAVE)
-        && !getCategory().equals(CATEGORY_CLIENT)) {
-      throw new SliderException("Invalid category for the component " + getCategory());
-    }
-
-    Metainfo.checkNonNull(getType(), "type", "component");
-    if (!getType().equals(TYPE_DOCKER)
-        && !getType().equals(TYPE_STANDARD)) {
-      throw new SliderException("Invalid type for the component " + getType());
-    }
-
-    if (version.equals(Metainfo.VERSION_TWO_ZERO)) {
-      if (getType().equals(TYPE_DOCKER)) {
-        throw new SliderException(TYPE_DOCKER + " is not supported in version " + Metainfo.VERSION_TWO_ZERO);
-      }
-
-      if (getCommands().size() > 0) {
-        throw new SliderException("commands are not supported in version " + Metainfo.VERSION_TWO_ZERO);
-      }
-    }
-
-    if (commandScript != null) {
-      commandScript.validate(version);
-    }
-
-    if (version.equals(Metainfo.VERSION_TWO_ONE)) {
-      for (ComponentCommand cc : getCommands()) {
-        cc.validate(version);
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ComponentCommand.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ComponentCommand.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ComponentCommand.java
deleted file mode 100644
index 52117c5..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ComponentCommand.java
+++ /dev/null
@@ -1,85 +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.
- */
-
-package org.apache.slider.providers.agent.application.metadata;
-
-import org.apache.slider.core.exceptions.SliderException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Represents the metadata associated with the application.
- */
-public class ComponentCommand implements Validate {
-  protected static final Logger
-      log = LoggerFactory.getLogger(ComponentCommand.class);
-
-
-  private String exec;
-  private String name = "START";
-  private String type = "SHELL";
-
-  /**
-   * Creator.
-   */
-  public ComponentCommand() {
-  }
-
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public void setExec(String exec) {
-    this.exec = exec;
-  }
-
-  public String getExec() {
-    return exec;
-  }
-
-  public void setType(String type) {
-    this.type = type;
-  }
-
-  public String getType() {
-    return type;
-  }
-
-  public void validate(String version) throws SliderException {
-    Metainfo.checkNonNull(getName(), "name", "componentCommand");
-
-    Metainfo.checkNonNull(getType(), "version", "application");
-  }
-
-  public static ComponentCommand getDefaultComponentCommand() {
-    ComponentCommand cc = new ComponentCommand();
-    cc.setExec("DEFAULT");
-    return cc;
-  }
-
-  public static ComponentCommand getDefaultComponentCommand(String commandName) {
-    ComponentCommand cc = new ComponentCommand();
-    cc.setExec("DEFAULT");
-    cc.setName(commandName);
-    return cc;
-  }
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ComponentExport.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ComponentExport.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ComponentExport.java
deleted file mode 100644
index a18854c..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ComponentExport.java
+++ /dev/null
@@ -1,54 +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.
- */
-package org.apache.slider.providers.agent.application.metadata;
-
-/**
- *
- */
-public class ComponentExport {
-  String name;
-  String value;
-
-  public ComponentExport() {
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  public String getValue() {
-    return value;
-  }
-
-  public void setValue(String value) {
-    this.value = value;
-  }
-
-  @Override
-  public String toString() {
-    final StringBuilder sb =
-        new StringBuilder("{");
-    sb.append(",\n\"name\": ").append(name);
-    sb.append(",\n\"value\": ").append(value);
-    sb.append('}');
-    return sb.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ComponentsInAddonPackage.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ComponentsInAddonPackage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ComponentsInAddonPackage.java
deleted file mode 100644
index 855e5b6..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ComponentsInAddonPackage.java
+++ /dev/null
@@ -1,26 +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.
- */
-package org.apache.slider.providers.agent.application.metadata;
-
-import org.apache.slider.core.exceptions.SliderException;
-
-public class ComponentsInAddonPackage extends AbstractComponent {
-
-  @Override
-  public void validate(String version) throws SliderException {
-  }
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ConfigFile.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ConfigFile.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ConfigFile.java
deleted file mode 100644
index cb47512..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ConfigFile.java
+++ /dev/null
@@ -1,59 +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.
- */
-package org.apache.slider.providers.agent.application.metadata;
-
-import org.apache.slider.core.exceptions.SliderException;
-
-/**
- *
- */
-public class ConfigFile implements Validate {
-  String type;
-  String fileName;
-  String dictionaryName;
-
-  public ConfigFile() {
-  }
-
-  public String getType() {
-    return type;
-  }
-
-  public void setType(String type) {
-    this.type = type;
-  }
-
-  public String getFileName() {
-    return fileName;
-  }
-
-  public void setFileName(String fileName) {
-    this.fileName = fileName;
-  }
-
-  public String getDictionaryName() {
-    return dictionaryName;
-  }
-
-  public void setDictionaryName(String dictionaryName) {
-    this.dictionaryName = dictionaryName;
-  }
-
-  public void validate(String version) throws SliderException {
-
-  }
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DefaultConfig.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DefaultConfig.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DefaultConfig.java
deleted file mode 100644
index 46c8836..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DefaultConfig.java
+++ /dev/null
@@ -1,39 +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.
- */
-package org.apache.slider.providers.agent.application.metadata;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Application default config
- */
-public class DefaultConfig {
-  List<PropertyInfo> propertyInfos;
-
-  public DefaultConfig() {
-    propertyInfos = new ArrayList<PropertyInfo>();
-  }
-
-  public void addPropertyInfo(PropertyInfo propertyInfo) {
-    propertyInfos.add(propertyInfo);
-  }
-
-  public List<PropertyInfo> getPropertyInfos() {
-    return propertyInfos;
-  }
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DefaultConfigParser.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DefaultConfigParser.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DefaultConfigParser.java
deleted file mode 100644
index e136775..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DefaultConfigParser.java
+++ /dev/null
@@ -1,54 +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.
- */
-package org.apache.slider.providers.agent.application.metadata;
-
-import org.apache.commons.digester.Digester;
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- *
- */
-public class DefaultConfigParser {
-
-  public DefaultConfig parse(InputStream configFileStream) throws IOException {
-    Digester digester = new Digester();
-    digester.setValidating(false);
-
-    digester.addObjectCreate("configuration", DefaultConfig.class);
-
-    digester.addObjectCreate("*/property", PropertyInfo.class);
-    digester.addBeanPropertySetter("*/property/name");
-    digester.addBeanPropertySetter("*/property/value");
-    digester.addBeanPropertySetter("*/property/description");
-    digester.addSetNext("*/property", "addPropertyInfo");
-
-    try {
-      return (DefaultConfig) digester.parse(configFileStream);
-    } catch (IOException e) {
-
-    } catch (SAXException e) {
-
-    } finally {
-      configFileStream.close();
-    }
-
-    return null;
-  }
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainer.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainer.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainer.java
deleted file mode 100644
index 4c61e7f..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainer.java
+++ /dev/null
@@ -1,187 +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.
- */
-
-package org.apache.slider.providers.agent.application.metadata;
-
-import org.apache.slider.core.exceptions.SliderException;
-import org.codehaus.jackson.annotate.JsonProperty;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Represents a docker container
- */
-public class DockerContainer implements Validate {
-  protected static final Logger
-      log = LoggerFactory.getLogger(DockerContainer.class);
-
-  private String name;
-  private String image;
-  private String network;
-  private String useNetworkScript;
-  private String options;
-  private List<DockerContainerMount> mounts = new ArrayList<>();
-  private List<DockerContainerPort> ports = new ArrayList<>();
-  private String statusCommand;
-  private String startCommand;
-  private String commandPath;
-  private String additionalParam;
-  private String runPrivilegedContainer;
-  private List<DockerContainerInputFile> inputFiles = new ArrayList<>();
-  private List<ConfigFile> configFiles = new ArrayList<>();
-
-  public DockerContainer() {
-  }
-
-  @JsonProperty("mounts")
-  public List<DockerContainerMount> getMounts() { return this.mounts; }
-
-  @JsonProperty("ports")
-  public List<DockerContainerPort> getPorts() {
-    return this.ports;
-  }
-
-  @JsonProperty("inputFiles")
-  public List<DockerContainerInputFile> getInputFiles() {
-    return this.inputFiles;
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  public String getImage() {
-    return image;
-  }
-
-  public void setImage(String image) {
-    this.image = image;
-  }
-
-  public String getNetwork() {
-    return network;
-  }
-
-  public void setNetwork(String network) {
-    this.network = network;
-  }
-
-  public String getUseNetworkScript() {
-    return useNetworkScript;
-  }
-
-  public void setUseNetworkScript(String useNetworkScript) {
-    this.useNetworkScript = useNetworkScript;
-  }
-
-  public String getOptions() {
-    return options;
-  }
-
-  public void setOptions(String options) {
-    this.options = options;
-  }
-
-  @Override
-  public void validate(String version) throws SliderException {
-    Metainfo.checkNonNull(getName(), "name", "dockerContainer");
-    Metainfo.checkNonNull(getImage(), "image", "dockerContainer");
-    for (DockerContainerMount dcm : getMounts()) {
-      dcm.validate(version);
-    }
-    for (DockerContainerPort dcp : getPorts()) {
-      dcp.validate(version);
-    }
-  }
-
-  @JsonProperty("statusCommand")
-  public String getStatusCommand() {
-    return statusCommand;
-  }
-
-  @JsonProperty("statusCommand")
-  public void setStatusCommand(String statusCommand) {
-    this.statusCommand = statusCommand;
-  }
-
-  public String getCommandPath() {
-    return commandPath;
-  }
-
-  public void setCommandPath(String commandPath) {
-    this.commandPath = commandPath;
-  }
-
-  public String getAdditionalParam() {
-    return additionalParam;
-  }
-
-  public void setAdditionalParam(String additionalParam) {
-    this.additionalParam = additionalParam;
-  }
-
-  @JsonProperty("startCommand")
-  public String getStartCommand() {
-    return startCommand;
-  }
-
-  @JsonProperty("startCommand")
-  public void setStartCommand(String startCommand) {
-    this.startCommand = startCommand;
-  }
-
-  @JsonProperty("runPrivilegedContainer")
-  public String getRunPrivilegedContainer() {
-    return runPrivilegedContainer;
-  }
-
-  @JsonProperty("runPrivilegedContainer")
-  public void setRunPrivilegedContainer(String runPrivilegedContainer) {
-    this.runPrivilegedContainer = runPrivilegedContainer;
-  }
-
-  public List<ConfigFile> getConfigFiles() {
-    return configFiles;
-  }
-
-  public void setConfigFiles(List<ConfigFile> configFiles) {
-    this.configFiles = configFiles;
-  }
-
-  @Override
-  public String toString() {
-    StringBuilder result = new StringBuilder("DockerContainer [name=")
-        .append(name).append(", image=").append(image).append(", options=")
-        .append(options).append(", mounts=").append(mounts).append(", ports=")
-        .append(ports).append(", statusCommand=").append(statusCommand)
-        .append(", commandPath=").append(commandPath)
-        .append(", additionalParam=").append(additionalParam)
-        .append(", inputFiles=").append(inputFiles).append(", startCommand=")
-        .append(startCommand).append(", runPriviledgedContainer=")
-        .append(runPrivilegedContainer).append(", configFiles=")
-        .append(configFiles).append("]");
-    return result.toString();
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainerInputFile.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainerInputFile.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainerInputFile.java
deleted file mode 100644
index 0faceb9..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainerInputFile.java
+++ /dev/null
@@ -1,50 +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.
- */
-
-package org.apache.slider.providers.agent.application.metadata;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DockerContainerInputFile {
-  protected static final Logger log = LoggerFactory
-      .getLogger(DockerContainerInputFile.class);
-
-  private String containerPath;
-  private String fileLocalPath;
-
-  public DockerContainerInputFile() {
-  }
-
-  public String getContainerMount() {
-    return containerPath;
-  }
-
-  public void setContainerMount(String containerMount) {
-    this.containerPath = containerMount;
-  }
-
-  public String getFileLocalPath() {
-    return fileLocalPath;
-  }
-
-  public void setFileLocalPath(String fileLocalPath) {
-    this.fileLocalPath = fileLocalPath;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainerMount.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainerMount.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainerMount.java
deleted file mode 100644
index 61f07f4..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainerMount.java
+++ /dev/null
@@ -1,60 +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.
- */
-
-package org.apache.slider.providers.agent.application.metadata;
-
-import org.apache.slider.core.exceptions.SliderException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Represents a docker container mount
- */
-public class DockerContainerMount implements Validate {
-  protected static final Logger
-      log = LoggerFactory.getLogger(DockerContainerMount.class);
-
-
-  private String containerMount;
-  private String hostMount;
-
-  public DockerContainerMount() {
-  }
-
-  public String getContainerMount() {
-    return containerMount;
-  }
-
-  public void setContainerMount(String containerMount) {
-    this.containerMount = containerMount;
-  }
-
-  public String getHostMount() {
-    return hostMount;
-  }
-
-  public void setHostMount(String hostMount) {
-    this.hostMount = hostMount;
-  }
-
-  @Override
-  public void validate(String version) throws SliderException {
-    Metainfo.checkNonNull(getContainerMount(), "containerMount", "dockerContainerMount");
-    Metainfo.checkNonNull(getHostMount(), "hostMount", "dockerContainerMount");
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainerPort.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainerPort.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainerPort.java
deleted file mode 100644
index 0629d9d..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainerPort.java
+++ /dev/null
@@ -1,66 +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.
- */
-
-package org.apache.slider.providers.agent.application.metadata;
-
-import org.apache.slider.core.exceptions.SliderException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Represents a docker container port
- */
-public class DockerContainerPort implements Validate {
-  protected static final Logger
-      log = LoggerFactory.getLogger(DockerContainerPort.class);
-
-
-  private String containerPort;
-  private String hostPort;
-
-  public DockerContainerPort() {
-  }
-
-  public String getContainerPort() {
-    return containerPort;
-  }
-
-  public void setContainerPort(String containerPort) {
-    this.containerPort = containerPort;
-  }
-
-  public String getHostPort() {
-    return hostPort;
-  }
-
-  public void setHostPort(String hostPort) {
-    this.hostPort = hostPort;
-  }
-
-  @Override
-  public void validate(String version) throws SliderException {
-    Metainfo.checkNonNull(getContainerPort(), "containerPort", "dockerContainerPort");
-    Metainfo.checkNonNull(getHostPort(), "hostPort", "dockerContainerPort");
-  }
-
-  @Override
-  public String toString() {
-    return "DockerContainerPort [containerPort=" + containerPort
-         + ", hostPort=" + hostPort + "]";
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Export.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Export.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Export.java
deleted file mode 100644
index 5e0fb24..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Export.java
+++ /dev/null
@@ -1,61 +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.
- */
-package org.apache.slider.providers.agent.application.metadata;
-
-import org.apache.slider.core.exceptions.SliderException;
-
-/**
- *
- */
-public class Export implements Validate {
-  String name;
-  String value;
-
-  public Export() {
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  public String getValue() {
-    return value;
-  }
-
-  public void setValue(String value) {
-    this.value = value;
-  }
-
-  @Override
-  public String toString() {
-    final StringBuilder sb =
-        new StringBuilder("{");
-    sb.append(",\n\"name\": ").append(name);
-    sb.append(",\n\"value\": ").append(value);
-    sb.append('}');
-    return sb.toString();
-  }
-
-  public void validate(String version) throws SliderException {
-    Metainfo.checkNonNull(getName(), "name", "export");
-    Metainfo.checkNonNull(getValue(), "value", "export");
-  }
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ExportGroup.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ExportGroup.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ExportGroup.java
deleted file mode 100644
index 3d9f34c..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ExportGroup.java
+++ /dev/null
@@ -1,71 +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.
- */
-package org.apache.slider.providers.agent.application.metadata;
-
-import org.apache.slider.core.exceptions.SliderException;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- *
- */
-public class ExportGroup implements Validate {
-  String name;
-  List<Export> exports;
-
-  public ExportGroup() {
-    exports = new ArrayList<Export>();
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  public void addExport(Export export) {
-    exports.add(export);
-  }
-
-  public List<Export> getExports() {
-    return exports;
-  }
-
-  @Override
-  public String toString() {
-    final StringBuilder sb =
-        new StringBuilder("{");
-    sb.append(",\n\"name\": ").append(name);
-    sb.append(",\n\"exports\" : {");
-    for (Export export : exports) {
-      sb.append("\n").append(export);
-    }
-    sb.append("\n},");
-    sb.append('}');
-    return sb.toString();
-  }
-
-  public void validate(String version) throws SliderException {
-    Metainfo.checkNonNull(getName(), "name", "exportGroup");
-    for(Export exp : getExports()) {
-      exp.validate(version);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Metainfo.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Metainfo.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Metainfo.java
deleted file mode 100644
index 10c497f..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Metainfo.java
+++ /dev/null
@@ -1,118 +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.
- */
-package org.apache.slider.providers.agent.application.metadata;
-
-import org.apache.slider.common.tools.SliderUtils;
-import org.apache.slider.core.exceptions.SliderException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Application metainfo uber class
- */
-public class Metainfo {
-  protected static final Logger log =
-      LoggerFactory.getLogger(Metainfo.class);
-  public static String VERSION_TWO_ZERO = "2.0";
-  public static String VERSION_TWO_ONE = "2.1";
-
-  String schemaVersion;
-  ApplicationPackage applicationPackage;
-  Application application;
-
-  public String getSchemaVersion() {
-    return schemaVersion;
-  }
-
-  public void setSchemaVersion(String schemaVersion) {
-    this.schemaVersion = schemaVersion;
-  }
-
-  public ApplicationPackage getApplicationPackage() {
-    return applicationPackage;
-  }
-
-  public void setApplicationPackage(ApplicationPackage pkg) {
-    this.applicationPackage = pkg;
-  }
-
-  public Application getApplication() {
-    return application;
-  }
-
-  public void setApplication(Application application) {
-    this.application = application;
-  }
-
-  public Component getApplicationComponent(String roleGroup) {
-    if (application == null) {
-      log.error("Malformed app definition: Expect application as the top level element for metainfo");
-    } else {
-      for (Component component : application.getComponents()) {
-        if (component.getName().equals(roleGroup)) {
-          return component;
-        }
-      }
-    }
-    return null;
-  }
-
-  public List<ConfigFile> getComponentConfigFiles(String roleGroup) {
-    List<ConfigFile> componentConfigFiles = new ArrayList<>();
-    componentConfigFiles.addAll(application.getConfigFiles());
-    Component component = getApplicationComponent(roleGroup);
-    if (component != null) {
-      componentConfigFiles.addAll(component.getConfigFiles());
-    }
-    return componentConfigFiles;
-  }
-
-  public void validate() throws SliderException {
-    if (!VERSION_TWO_ONE.equals(schemaVersion) &&
-        !VERSION_TWO_ZERO.equals(schemaVersion)) {
-      throw new SliderException("Unsupported version " + getSchemaVersion());
-    }
-    if (application != null) {
-      application.validate(schemaVersion);
-    }
-    if (applicationPackage != null) {
-      applicationPackage.validate(schemaVersion);
-    }
-  }
-
-  public static void checkNonNull(String value, String field, String type) throws SliderException {
-    if (SliderUtils.isUnset(value)) {
-      throw new SliderException(type + "." + field + " cannot be null");
-    }
-  }
-
-  @Override
-  public String toString() {
-    StringBuilder builder = new StringBuilder();
-    builder.append("Metainfo [schemaVersion=");
-    builder.append(schemaVersion);
-    builder.append(", applicationPackage=");
-    builder.append(applicationPackage);
-    builder.append(", application=");
-    builder.append(application);
-    builder.append("]");
-    return builder.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/MetainfoParser.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/MetainfoParser.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/MetainfoParser.java
deleted file mode 100644
index 8b520eb..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/MetainfoParser.java
+++ /dev/null
@@ -1,97 +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.
- */
-package org.apache.slider.providers.agent.application.metadata;
-
-import org.apache.commons.digester.Digester;
-
-/**
- *
- */
-public class MetainfoParser extends AbstractMetainfoParser{
-  
-  protected void composeSchema(Digester digester){
-    digester.addObjectCreate("metainfo", Metainfo.class);
-    digester.addBeanPropertySetter("metainfo/schemaVersion");
-
-    digester.addObjectCreate("*/application", Application.class);
-    digester.addBeanPropertySetter("*/application/name");
-    digester.addBeanPropertySetter("*/application/comment");
-    digester.addBeanPropertySetter("*/application/version");
-    digester.addBeanPropertySetter("*/application/exportedConfigs");
-
-    digester.addObjectCreate("*/commandOrder", CommandOrder.class);
-    digester.addBeanPropertySetter("*/commandOrder/command");
-    digester.addBeanPropertySetter("*/commandOrder/requires");
-    digester.addSetNext("*/commandOrder", "addCommandOrder");
-
-    digester.addObjectCreate("*/exportGroup", ExportGroup.class);
-    digester.addBeanPropertySetter("*/exportGroup/name");
-    digester.addObjectCreate("*/export", Export.class);
-    digester.addBeanPropertySetter("*/export/name");
-    digester.addBeanPropertySetter("*/export/value");
-    digester.addSetNext("*/export", "addExport");
-    digester.addSetNext("*/exportGroup", "addExportGroup");
-
-    digester.addObjectCreate("*/component", Component.class);
-    digester.addBeanPropertySetter("*/component/name");
-    digester.addBeanPropertySetter("*/component/category");
-    digester.addBeanPropertySetter("*/component/publishConfig");
-    digester.addBeanPropertySetter("*/component/minInstanceCount");
-    digester.addBeanPropertySetter("*/component/maxInstanceCount");
-    digester.addBeanPropertySetter("*/component/autoStartOnFailure");
-    digester.addBeanPropertySetter("*/component/appExports");
-    digester.addBeanPropertySetter("*/component/compExports");
-    digester.addObjectCreate("*/componentExport", ComponentExport.class);
-    digester.addBeanPropertySetter("*/componentExport/name");
-    digester.addBeanPropertySetter("*/componentExport/value");
-    digester.addSetNext("*/componentExport", "addComponentExport");
-    digester.addSetNext("*/component", "addComponent");
-
-    digester.addObjectCreate("*/commandScript", CommandScript.class);
-    digester.addBeanPropertySetter("*/commandScript/script");
-    digester.addBeanPropertySetter("*/commandScript/scriptType");
-    digester.addBeanPropertySetter("*/commandScript/timeout");
-    digester.addSetNext("*/commandScript", "addCommandScript");
-
-    digester.addObjectCreate("*/command", ComponentCommand.class);
-    digester.addBeanPropertySetter("*/command/exec");
-    digester.addBeanPropertySetter("*/command/name");
-    digester.addBeanPropertySetter("*/command/type");
-    digester.addSetNext("*/command", "addCommand");
-
-    digester.addObjectCreate("*/osSpecific", OSSpecific.class);
-    digester.addBeanPropertySetter("*/osSpecific/osType");
-    digester.addObjectCreate("*/osSpecific/packages/package", OSPackage.class);
-    digester.addBeanPropertySetter("*/osSpecific/packages/package/type");
-    digester.addBeanPropertySetter("*/osSpecific/packages/package/name");
-    digester.addSetNext("*/osSpecific/packages/package", "addOSPackage");
-    digester.addSetNext("*/osSpecific", "addOSSpecific");
-
-    digester.addObjectCreate("*/application/packages/package", Package.class);
-    digester.addBeanPropertySetter("*/application/packages/package/type");
-    digester.addBeanPropertySetter("*/application/packages/package/name");
-    digester.addSetNext("*/application/packages/package", "addPackage");
-
-    digester.addObjectCreate("*/configFile", ConfigFile.class);
-    digester.addBeanPropertySetter("*/configFile/type");
-    digester.addBeanPropertySetter("*/configFile/fileName");
-    digester.addBeanPropertySetter("*/configFile/dictionaryName");
-    digester.addSetNext("*/configFile", "addConfigFile");
-
-    digester.addSetRoot("*/application", "setApplication");
-  }
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/OSPackage.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/OSPackage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/OSPackage.java
deleted file mode 100644
index 32b4890..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/OSPackage.java
+++ /dev/null
@@ -1,51 +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.
- */
-package org.apache.slider.providers.agent.application.metadata;
-
-import org.apache.slider.core.exceptions.SliderException;
-
-/**
- *
- */
-public class OSPackage implements Validate {
-  String type;
-  String name;
-
-  public OSPackage() {
-  }
-
-  public String getType() {
-    return type;
-  }
-
-  public void setType(String type) {
-    this.type = type;
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  public void validate(String version) throws SliderException {
-    Metainfo.checkNonNull(getName(), "name", "osPackage");
-    Metainfo.checkNonNull(getType(), "type", "osPackage");
-  }
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/OSSpecific.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/OSSpecific.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/OSSpecific.java
deleted file mode 100644
index c06d498..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/OSSpecific.java
+++ /dev/null
@@ -1,57 +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.
- */
-package org.apache.slider.providers.agent.application.metadata;
-
-import org.apache.slider.core.exceptions.SliderException;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- *
- */
-public class OSSpecific implements Validate {
-  String osType;
-  List<OSPackage> packages;
-
-  public OSSpecific() {
-    packages = new ArrayList<OSPackage>();
-  }
-
-  public String getOsType() {
-    return osType;
-  }
-
-  public void setOsType(String osType) {
-    this.osType = osType;
-  }
-
-  public void addOSPackage(OSPackage osPackage) {
-    packages.add(osPackage);
-  }
-
-  public List<OSPackage> getPackages() {
-    return packages;
-  }
-
-  public void validate(String version) throws SliderException {
-    Metainfo.checkNonNull(getOsType(), "osType", "osSpecific");
-    for (OSPackage opkg : getPackages()) {
-      opkg.validate(version);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Package.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Package.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Package.java
deleted file mode 100644
index b88f77d..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Package.java
+++ /dev/null
@@ -1,60 +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.
- */
-
-package org.apache.slider.providers.agent.application.metadata;
-
-import org.apache.slider.core.exceptions.SliderException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Represents package description.
- */
-public class Package implements Validate {
-  protected static final Logger
-      log = LoggerFactory.getLogger(Package.class);
-
-
-  private String name;
-  private String type;
-
-  public Package() {
-  }
-
-
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public String getType() {
-    return type;
-  }
-
-  public void setType(String type) {
-    this.type = type;
-  }
-
-  public void validate(String version) throws SliderException {
-    Metainfo.checkNonNull(getName(), "name", "package");
-    Metainfo.checkNonNull(getType(), "type", "package");
-  }
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/PropertyInfo.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/PropertyInfo.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/PropertyInfo.java
deleted file mode 100644
index 62ee0f5..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/PropertyInfo.java
+++ /dev/null
@@ -1,54 +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.
- */
-package org.apache.slider.providers.agent.application.metadata;
-
-/**
- * Application config property info
- */
-public class PropertyInfo {
-  String name;
-  String value;
-  String description;
-
-  public PropertyInfo() {
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  public String getValue() {
-    return value;
-  }
-
-  public void setValue(String value) {
-    this.value = value;
-  }
-
-  public String getDescription() {
-    return description;
-  }
-
-  public void setDescription(String description) {
-    this.description = description;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Validate.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Validate.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Validate.java
deleted file mode 100644
index ef03dcd..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Validate.java
+++ /dev/null
@@ -1,27 +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.
- */
-package org.apache.slider.providers.agent.application.metadata;
-
-import org.apache.slider.core.exceptions.SliderException;
-
-/**
- * Implementer provides a validate method
- */
-public interface Validate {
-
-  public void validate(String version) throws SliderException;
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/todo.md
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/todo.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/todo.md
deleted file mode 100644
index dfd1373..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/todo.md
+++ /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.
--->
-  
-# todo list
-
-* Retry on failure
-  * Agent can toleate a configurable number of failures (e.g. 3) before giving up
-* Agent should separate out hostname and label that is received for registration

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
index 57ec218..34b6a7d 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
@@ -20,12 +20,8 @@ package org.apache.slider.server.appmaster;
 
 import com.codahale.metrics.MetricRegistry;
 import com.codahale.metrics.health.HealthCheckRegistry;
-import com.codahale.metrics.jvm.GarbageCollectorMetricSet;
-import com.codahale.metrics.jvm.MemoryUsageGaugeSet;
-import com.codahale.metrics.jvm.ThreadStatesGaugeSet;
 import com.google.common.base.Preconditions;
 import com.google.protobuf.BlockingService;
-
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
@@ -36,8 +32,14 @@ import org.apache.hadoop.hdfs.HdfsConfiguration;
 import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier;
 import org.apache.hadoop.http.HttpConfig;
 import org.apache.hadoop.io.Text;
+import org.apache.hadoop.registry.client.api.RegistryOperations;
+import org.apache.hadoop.registry.client.binding.RegistryPathUtils;
 import org.apache.hadoop.registry.client.binding.RegistryTypeUtils;
 import org.apache.hadoop.registry.client.binding.RegistryUtils;
+import org.apache.hadoop.registry.client.types.ServiceRecord;
+import org.apache.hadoop.registry.client.types.yarn.PersistencePolicies;
+import org.apache.hadoop.registry.client.types.yarn.YarnRegistryAttributes;
+import org.apache.hadoop.registry.server.integration.RMRegistryOperationsService;
 import org.apache.hadoop.security.Credentials;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.security.token.Token;
@@ -66,18 +68,9 @@ import org.apache.hadoop.yarn.client.api.async.AMRMClientAsync;
 import org.apache.hadoop.yarn.client.api.async.NMClientAsync;
 import org.apache.hadoop.yarn.client.api.async.impl.NMClientAsyncImpl;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
-import static org.apache.hadoop.yarn.conf.YarnConfiguration.*;
-import static org.apache.slider.common.Constants.HADOOP_JAAS_DEBUG;
-
 import org.apache.hadoop.yarn.exceptions.InvalidApplicationMasterRequestException;
 import org.apache.hadoop.yarn.exceptions.YarnException;
 import org.apache.hadoop.yarn.ipc.YarnRPC;
-import org.apache.hadoop.registry.client.api.RegistryOperations;
-import org.apache.hadoop.registry.client.binding.RegistryPathUtils;
-import org.apache.hadoop.registry.client.types.yarn.PersistencePolicies;
-import org.apache.hadoop.registry.client.types.ServiceRecord;
-import org.apache.hadoop.registry.client.types.yarn.YarnRegistryAttributes;
-import org.apache.hadoop.registry.server.integration.RMRegistryOperationsService;
 import org.apache.hadoop.yarn.security.AMRMTokenIdentifier;
 import org.apache.hadoop.yarn.security.client.ClientToAMTokenSecretManager;
 import org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier;
@@ -122,18 +115,16 @@ import org.apache.slider.providers.ProviderCompleted;
 import org.apache.slider.providers.ProviderRole;
 import org.apache.slider.providers.ProviderService;
 import org.apache.slider.providers.SliderProviderFactory;
-import org.apache.slider.providers.agent.AgentKeys;
-import org.apache.slider.providers.agent.AgentProviderService;
 import org.apache.slider.providers.slideram.SliderAMClientProvider;
 import org.apache.slider.providers.slideram.SliderAMProviderService;
 import org.apache.slider.server.appmaster.actions.ActionRegisterServiceInstance;
-import org.apache.slider.server.appmaster.actions.EscalateOutstandingRequests;
-import org.apache.slider.server.appmaster.actions.RegisterComponentInstance;
-import org.apache.slider.server.appmaster.actions.QueueExecutor;
-import org.apache.slider.server.appmaster.actions.QueueService;
 import org.apache.slider.server.appmaster.actions.ActionStopSlider;
 import org.apache.slider.server.appmaster.actions.ActionUpgradeContainers;
 import org.apache.slider.server.appmaster.actions.AsyncAction;
+import org.apache.slider.server.appmaster.actions.EscalateOutstandingRequests;
+import org.apache.slider.server.appmaster.actions.QueueExecutor;
+import org.apache.slider.server.appmaster.actions.QueueService;
+import org.apache.slider.server.appmaster.actions.RegisterComponentInstance;
 import org.apache.slider.server.appmaster.actions.RenewingAction;
 import org.apache.slider.server.appmaster.actions.ResetFailureWindow;
 import org.apache.slider.server.appmaster.actions.ReviewAndFlexApplicationSize;
@@ -143,26 +134,24 @@ import org.apache.slider.server.appmaster.management.YarnServiceHealthCheck;
 import org.apache.slider.server.appmaster.monkey.ChaosKillAM;
 import org.apache.slider.server.appmaster.monkey.ChaosKillContainer;
 import org.apache.slider.server.appmaster.monkey.ChaosMonkeyService;
+import org.apache.slider.server.appmaster.operations.AbstractRMOperation;
 import org.apache.slider.server.appmaster.operations.AsyncRMOperationHandler;
 import org.apache.slider.server.appmaster.operations.ProviderNotifyingOperationHandler;
+import org.apache.slider.server.appmaster.operations.RMOperationHandler;
 import org.apache.slider.server.appmaster.rpc.RpcBinder;
 import org.apache.slider.server.appmaster.rpc.SliderAMPolicyProvider;
 import org.apache.slider.server.appmaster.rpc.SliderClusterProtocolPBImpl;
-import org.apache.slider.server.appmaster.operations.AbstractRMOperation;
 import org.apache.slider.server.appmaster.rpc.SliderIPCService;
 import org.apache.slider.server.appmaster.security.SecurityConfiguration;
 import org.apache.slider.server.appmaster.state.AppState;
 import org.apache.slider.server.appmaster.state.AppStateBindingInfo;
 import org.apache.slider.server.appmaster.state.ContainerAssignment;
 import org.apache.slider.server.appmaster.state.ProviderAppState;
-import org.apache.slider.server.appmaster.operations.RMOperationHandler;
 import org.apache.slider.server.appmaster.state.RoleInstance;
-import org.apache.slider.server.appmaster.web.AgentService;
-import org.apache.slider.server.appmaster.web.rest.InsecureAmFilterInitializer;
-import org.apache.slider.server.appmaster.web.rest.agent.AgentWebApp;
 import org.apache.slider.server.appmaster.web.SliderAMWebApp;
 import org.apache.slider.server.appmaster.web.WebAppApi;
 import org.apache.slider.server.appmaster.web.WebAppApiImpl;
+import org.apache.slider.server.appmaster.web.rest.InsecureAmFilterInitializer;
 import org.apache.slider.server.appmaster.web.rest.RestPaths;
 import org.apache.slider.server.appmaster.web.rest.application.ApplicationResouceContentCacheFactory;
 import org.apache.slider.server.appmaster.web.rest.application.resources.ContentCache;
@@ -181,7 +170,6 @@ import java.io.IOException;
 import java.net.InetSocketAddress;
 import java.net.URI;
 import java.net.URL;
-import java.net.URLClassLoader;
 import java.nio.ByteBuffer;
 import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
@@ -199,6 +187,9 @@ import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.ReentrantLock;
 
+import static org.apache.hadoop.yarn.conf.YarnConfiguration.*;
+import static org.apache.slider.common.Constants.HADOOP_JAAS_DEBUG;
+
 /**
  * This is the AM, which directly implements the callbacks from the AM and NM
  */
@@ -765,11 +756,6 @@ public class SliderAppMaster extends AbstractSliderLaunchedService
                                     appMasterContainerID.toString(),
                                     clustername);
       certificateManager.setPassphrase(instanceDefinition.getPassphrase());
- 
-      if (component.getOptionBool(
-          AgentKeys.KEY_AGENT_TWO_WAY_SSL_ENABLED, false)) {
-        uploadServerCertForLocalization(clustername, fs);
-      }
 
       // Web service endpoints: initialize
       WebAppApiImpl webAppApi =
@@ -784,10 +770,6 @@ public class SliderAppMaster extends AbstractSliderLaunchedService
               contentCache);
       initAMFilterOptions(serviceConf);
 
-      if (providerService instanceof AgentProviderService) {
-        // start the agent web app
-        startAgentWebApp(appInformation, serviceConf, webAppApi);
-      }
       int webAppPort = deployWebApplication(webAppApi);
 
       String scheme = WebAppUtils.HTTP_PREFIX;
@@ -1165,26 +1147,6 @@ public class SliderAppMaster extends AbstractSliderLaunchedService
     return portScanner.getAvailablePort();
   }
 
-  private void uploadServerCertForLocalization(String clustername,
-                                               SliderFileSystem fs)
-      throws IOException {
-    Path certsDir = fs.buildClusterSecurityDirPath(clustername);
-    if (!fs.getFileSystem().exists(certsDir)) {
-      fs.getFileSystem().mkdirs(certsDir,
-        new FsPermission(FsAction.ALL, FsAction.NONE, FsAction.NONE));
-    }
-    Path destPath = new Path(certsDir, SliderKeys.CRT_FILE_NAME);
-    if (!fs.getFileSystem().exists(destPath)) {
-      fs.getFileSystem().copyFromLocalFile(
-          new Path(CertificateManager.getServerCertficateFilePath().getAbsolutePath()),
-          destPath);
-      log.info("Uploaded server cert to localization path {}", destPath);
-    }
-
-    fs.getFileSystem().setPermission(destPath,
-        new FsPermission(FsAction.READ, FsAction.NONE, FsAction.NONE));
-  }
-
   protected void login(String principal, File localKeytabFile)
       throws IOException, SliderException {
     log.info("Logging in as {} with keytab {}", principal, localKeytabFile);
@@ -1221,53 +1183,6 @@ public class SliderAppMaster extends AbstractSliderLaunchedService
   }
 
   /**
-   * Set up and start the agent web application 
-   * @param appInformation application information
-   * @param serviceConf service configuration
-   * @param webAppApi web app API instance to bind to
-   * @throws IOException
-   */
-  private void startAgentWebApp(MapOperations appInformation,
-      Configuration serviceConf, WebAppApiImpl webAppApi) throws IOException, SliderException {
-    URL[] urls = ((URLClassLoader) AgentWebApp.class.getClassLoader() ).getURLs();
-    StringBuilder sb = new StringBuilder("AM classpath:");
-    for (URL url : urls) {
-      sb.append("\n").append(url.toString());
-    }
-    LOG_YARN.debug(sb.append("\n").toString());
-    initAMFilterOptions(serviceConf);
-
-
-    // Start up the agent web app and track the URL for it
-    MapOperations appMasterConfig = getInstanceDefinition()
-        .getAppConfOperations().getComponent(SliderKeys.COMPONENT_AM);
-    AgentWebApp agentWebApp = AgentWebApp.$for(AgentWebApp.BASE_PATH,
-        webAppApi,
-        RestPaths.AGENT_WS_CONTEXT)
-        .withComponentConfig(appMasterConfig)
-        .withPort(getPortToRequest())
-        .withSecuredPort(getPortToRequest())
-            .start();
-    agentOpsUrl =
-        "https://" + appMasterHostname + ":" + agentWebApp.getSecuredPort();
-    agentStatusUrl =
-        "https://" + appMasterHostname + ":" + agentWebApp.getPort();
-    AgentService agentService =
-      new AgentService("slider-agent", agentWebApp);
-
-    agentService.init(serviceConf);
-    agentService.start();
-    addService(agentService);
-
-    appInformation.put(StatusKeys.INFO_AM_AGENT_OPS_URL, agentOpsUrl + "/");
-    appInformation.put(StatusKeys.INFO_AM_AGENT_STATUS_URL, agentStatusUrl + "/");
-    appInformation.set(StatusKeys.INFO_AM_AGENT_STATUS_PORT,
-                       agentWebApp.getPort());
-    appInformation.set(StatusKeys.INFO_AM_AGENT_OPS_PORT,
-                       agentWebApp.getSecuredPort());
-  }
-
-  /**
    * Set up the AM filter 
    * @param serviceConf configuration to patch
    */
@@ -1327,17 +1242,8 @@ public class SliderAppMaster extends AbstractSliderLaunchedService
         serviceRecord);
 
     // provider service dynamic definitions.
-    if (providerService instanceof AgentProviderService) {
-      URL agentOpsURI = new URL(agentOpsUrl);
-      URL agentStatusURI = new URL(agentStatusUrl);
-      ((AgentProviderService)providerService).applyInitialRegistryDefinitions(
-          amWebURI,
-          agentOpsURI,
-          agentStatusURI,
-          serviceRecord);
-    } else {
-      providerService.applyInitialRegistryDefinitions(amWebURI, serviceRecord);
-    }
+    providerService.applyInitialRegistryDefinitions(amWebURI, serviceRecord);
+
 
     // set any provided attributes
     setProvidedServiceRecordAttributes(
@@ -1800,11 +1706,6 @@ public class SliderAppMaster extends AbstractSliderLaunchedService
     }
     LOG_YARN.info("Final list of containers to be upgraded (total {}) : {}",
         containers.size(), containers);
-    if (providerService instanceof AgentProviderService) {
-      AgentProviderService agentProviderService = (AgentProviderService) providerService;
-      agentProviderService.setInUpgradeMode(true);
-      agentProviderService.addUpgradeContainers(containers);
-    }
   }
 
   // create a reverse map of roles -> set of all live containers
@@ -1968,11 +1869,6 @@ public class SliderAppMaster extends AbstractSliderLaunchedService
    * Shutdown operation: release all containers
    */
   private void releaseAllContainers() {
-    if (providerService instanceof AgentProviderService) {
-      log.info("Setting stopInitiated flag to true");
-      AgentProviderService agentProviderService = (AgentProviderService) providerService;
-      agentProviderService.setAppStopInitiated(true);
-    }
     // Add the sleep here (before releasing containers) so that applications get
     // time to perform graceful shutdown
     try {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/AgentService.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/AgentService.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/AgentService.java
deleted file mode 100644
index f840035..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/AgentService.java
+++ /dev/null
@@ -1,37 +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.
- */
-package org.apache.slider.server.appmaster.web;
-
-import org.apache.slider.server.appmaster.web.rest.agent.AgentWebApp;
-import org.apache.slider.server.services.workflow.ClosingService;
-import org.apache.slider.server.services.workflow.WorkflowCompositeService;
-
-/**
- * agent service gives the agent webapp lifecycle integration
- */
-public class AgentService extends ClosingService<AgentWebApp> {
-
-
-  public AgentService(String name) {
-    super(name);
-  }
-
-  public AgentService(String name, AgentWebApp app) {
-    super(name, app);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/038561ca/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/WebAppApi.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/WebAppApi.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/WebAppApi.java
index 0f99d6d..65a3591 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/WebAppApi.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/WebAppApi.java
@@ -17,7 +17,6 @@
 package org.apache.slider.server.appmaster.web;
 
 import org.apache.hadoop.registry.client.api.RegistryOperations;
-import org.apache.slider.api.SliderClusterProtocol;
 import org.apache.slider.providers.ProviderService;
 import org.apache.slider.server.appmaster.AppMasterActionOperations;
 import org.apache.slider.server.appmaster.actions.QueueAccess;
@@ -25,7 +24,6 @@ import org.apache.slider.server.appmaster.management.MetricsAndMonitoring;
 import org.apache.slider.server.appmaster.state.AppState;
 import org.apache.slider.server.appmaster.state.RoleStatus;
 import org.apache.slider.server.appmaster.state.StateAccessForProviders;
-import org.apache.slider.server.appmaster.web.rest.agent.AgentRestOperations;
 import org.apache.slider.server.appmaster.web.rest.application.resources.ContentCache;
 import org.apache.slider.server.services.security.CertificateManager;
 
@@ -57,11 +55,6 @@ public interface WebAppApi {
    * is a computed value and not just a getter
    */
   Map<String, RoleStatus> getRoleStatusByName();
-
-  /**
-   * Returns an interface that can support the agent-based REST operations.
-   */
-  AgentRestOperations getAgentRestOperations();
   
   /**
    * Registry operations accessor


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message