You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by ka...@apache.org on 2014/07/10 19:04:59 UTC
[16/50] [abbrv] Moving packages around
http://git-wip-us.apache.org/repos/asf/helix/blob/8992aa5a/recipes/provisioning/yarn/helloworld/pom.xml
----------------------------------------------------------------------
diff --git a/recipes/provisioning/yarn/helloworld/pom.xml b/recipes/provisioning/yarn/helloworld/pom.xml
deleted file mode 100644
index 6c30679..0000000
--- a/recipes/provisioning/yarn/helloworld/pom.xml
+++ /dev/null
@@ -1,159 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.helix.recipes.provisioning.yarn</groupId>
- <artifactId>yarn</artifactId>
- <version>0.7.1-incubating-SNAPSHOT</version>
- </parent>
-
- <artifactId>helloworld</artifactId>
- <packaging>bundle</packaging>
- <name>Apache Helix :: Recipes :: Provisioning :: YARN :: Hello World</name>
-
- <properties>
- <osgi.import>
- org.apache.helix*,
- org.apache.log4j,
- *
- </osgi.import>
- <osgi.export>org.apache.helix.provisioning.yarn.example*;version="${project.version};-noimport:=true</osgi.export>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>6.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.helix</groupId>
- <artifactId>helix-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.helix</groupId>
- <artifactId>helix-provisioning</artifactId>
- <version>0.7.1-incubating-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <exclusions>
- <exclusion>
- <groupId>javax.mail</groupId>
- <artifactId>mail</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.jms</groupId>
- <artifactId>jms</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.sun.jdmk</groupId>
- <artifactId>jmxtools</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.sun.jmx</groupId>
- <artifactId>jmxri</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>appassembler-maven-plugin</artifactId>
- <configuration>
- <!-- Set the target configuration directory to be used in the bin scripts -->
- <!-- <configurationDirectory>conf</configurationDirectory> -->
- <!-- Copy the contents from "/src/main/config" to the target configuration
- directory in the assembled application -->
- <!-- <copyConfigurationDirectory>true</copyConfigurationDirectory> -->
- <!-- Include the target configuration directory in the beginning of
- the classpath declaration in the bin scripts -->
- <includeConfigurationDirectoryInClasspath>true</includeConfigurationDirectoryInClasspath>
- <assembleDirectory>${project.build.directory}/${project.artifactId}-pkg</assembleDirectory>
- <!-- Extra JVM arguments that will be included in the bin scripts -->
- <extraJvmArguments>-Xms512m -Xmx512m</extraJvmArguments>
- <!-- Generate bin scripts for windows and unix pr default -->
- <platforms>
- <platform>windows</platform>
- <platform>unix</platform>
- </platforms>
- </configuration>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>assemble</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <configuration>
- <excludes combine.children="append">
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>appassembler-maven-plugin</artifactId>
- <configuration>
- <programs>
- <program>
- <mainClass>org.apache.helix.provisioning.yarn.Client</mainClass>
- <name>yarn-job-launcher</name>
- </program>
- <program>
- <mainClass>org.apache.helix.provisioning.yarn.AppLauncher</mainClass>
- <name>app-launcher</name>
- </program>
- </programs>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <descriptors>
- <descriptor>src/assemble/assembly.xml</descriptor>
- </descriptors>
- </configuration>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/helix/blob/8992aa5a/recipes/provisioning/yarn/helloworld/src/assemble/assembly.xml
----------------------------------------------------------------------
diff --git a/recipes/provisioning/yarn/helloworld/src/assemble/assembly.xml b/recipes/provisioning/yarn/helloworld/src/assemble/assembly.xml
deleted file mode 100644
index c2d08a1..0000000
--- a/recipes/provisioning/yarn/helloworld/src/assemble/assembly.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<assembly>
- <id>pkg</id>
- <formats>
- <format>tar</format>
- </formats>
- <fileSets>
- <fileSet>
- <directory>${project.build.directory}/${project.artifactId}-pkg/bin</directory>
- <outputDirectory>bin</outputDirectory>
- <lineEnding>unix</lineEnding>
- <fileMode>0755</fileMode>
- <directoryMode>0755</directoryMode>
- </fileSet>
- <fileSet>
- <directory>${project.build.directory}/${project.artifactId}-pkg/repo/</directory>
- <outputDirectory>repo</outputDirectory>
- <fileMode>0755</fileMode>
- <directoryMode>0755</directoryMode>
- <excludes>
- <exclude>**/*.xml</exclude>
- </excludes>
- </fileSet>
- <fileSet>
- <directory>${project.build.directory}/${project.artifactId}-pkg/conf</directory>
- <outputDirectory>conf</outputDirectory>
- <lineEnding>unix</lineEnding>
- <fileMode>0755</fileMode>
- <directoryMode>0755</directoryMode>
- </fileSet>
- <fileSet>
- <directory>${project.basedir}</directory>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>LICENSE</include>
- <include>NOTICE</include>
- <include>DISCLAIMER</include>
- </includes>
- <fileMode>0755</fileMode>
- </fileSet>
- </fileSets>
-</assembly>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/helix/blob/8992aa5a/recipes/provisioning/yarn/helloworld/src/main/config/log4j.properties
----------------------------------------------------------------------
diff --git a/recipes/provisioning/yarn/helloworld/src/main/config/log4j.properties b/recipes/provisioning/yarn/helloworld/src/main/config/log4j.properties
deleted file mode 100644
index 91fac03..0000000
--- a/recipes/provisioning/yarn/helloworld/src/main/config/log4j.properties
+++ /dev/null
@@ -1,31 +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.
-##
-
-# Set root logger level to DEBUG and its only appender to A1.
-log4j.rootLogger=DEBUG,A1
-
-# A1 is set to be a ConsoleAppender.
-log4j.appender.A1=org.apache.log4j.ConsoleAppender
-
-# A1 uses PatternLayout.
-log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
-
-log4j.logger.org.I0Itec=ERROR
-log4j.logger.org.apache=ERROR
http://git-wip-us.apache.org/repos/asf/helix/blob/8992aa5a/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloWordAppSpecFactory.java
----------------------------------------------------------------------
diff --git a/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloWordAppSpecFactory.java b/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloWordAppSpecFactory.java
deleted file mode 100644
index 2e1ad41..0000000
--- a/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloWordAppSpecFactory.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package org.apache.helix.provisioning.yarn.example;
-
-import java.io.File;
-import java.io.InputStream;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.helix.provisioning.yarn.AppConfig;
-import org.apache.helix.provisioning.yarn.ApplicationSpec;
-import org.apache.helix.provisioning.yarn.ApplicationSpecFactory;
-import org.apache.helix.provisioning.yarn.example.HelloWorldService;
-import org.apache.helix.provisioning.yarn.example.HelloworldAppSpec;
-import org.yaml.snakeyaml.DumperOptions;
-import org.yaml.snakeyaml.Yaml;
-
-public class HelloWordAppSpecFactory implements ApplicationSpecFactory {
-
- static HelloworldAppSpec data;
-
- static {
- HelloworldAppSpec data = new HelloworldAppSpec();
- AppConfig appConfig = new AppConfig();
- appConfig.setValue("k1", "v1");
- data.setAppConfig(appConfig);
- data.setAppName("testApp");
- data.setAppMasterPackageUri(
- "/Users/kgopalak/Documents/projects/incubator-helix/helix-provisioning/helix-provisioning-0.7.1-incubating-SNAPSHOT-pkg.tar");
- HashMap<String, Map<String, String>> serviceConfigMap = new HashMap<String, Map<String, String>>();
- serviceConfigMap.put("HelloWorld", new HashMap<String, String>());
- serviceConfigMap.get("HelloWorld").put("k1", "v1");
- data.setServiceConfigMap(serviceConfigMap);
- HashMap<String, String> serviceMainClassMap = new HashMap<String, String>();
- serviceMainClassMap.put("HelloWorld", HelloWorldService.class.getCanonicalName());
- data.setServiceMainClassMap(serviceMainClassMap);
- HashMap<String, String> servicePackageURIMap = new HashMap<String, String>();
- servicePackageURIMap
- .put(
- "HelloWorld",
- "/Users/kgopalak/Documents/projects/incubator-helix/helix-provisioning/helix-provisioning-0.7.1-incubating-SNAPSHOT-pkg.tar");
- data.setServicePackageURIMap(servicePackageURIMap);
- data.setServices(Arrays.asList(new String[] {
- "HelloWorld"
- })); }
-
- @Override
- public ApplicationSpec fromYaml(InputStream inputstream) {
- return (ApplicationSpec) new Yaml().load(inputstream);
- // return data;
- }
-
- public static void main(String[] args) {
- DumperOptions options = new DumperOptions();
- options.setPrettyFlow(true);
-
- Yaml yaml = new Yaml(options);
- HelloworldAppSpec data = new HelloworldAppSpec();
- AppConfig appConfig = new AppConfig();
- appConfig.setValue("k1", "v1");
- data.setAppConfig(appConfig);
- data.setAppName("testApp");
- data.setAppMasterPackageUri(
- "/Users/kgopalak/Documents/projects/incubator-helix/helix-provisioning/helix-provisioning-0.7.1-incubating-SNAPSHOT-pkg.tar");
- HashMap<String, Map<String, String>> serviceConfigMap = new HashMap<String, Map<String, String>>();
- serviceConfigMap.put("HelloWorld", new HashMap<String, String>());
- serviceConfigMap.get("HelloWorld").put("k1", "v1");
- data.setServiceConfigMap(serviceConfigMap);
- HashMap<String, String> serviceMainClassMap = new HashMap<String, String>();
- serviceMainClassMap.put("HelloWorld", HelloWorldService.class.getCanonicalName());
- data.setServiceMainClassMap(serviceMainClassMap);
- HashMap<String, String> servicePackageURIMap = new HashMap<String, String>();
- servicePackageURIMap
- .put(
- "HelloWorld",
- "/Users/kgopalak/Documents/projects/incubator-helix/helix-provisioning/helix-provisioning-0.7.1-incubating-SNAPSHOT-pkg.tar");
- data.setServicePackageURIMap(servicePackageURIMap);
- data.setServices(Arrays.asList(new String[] {
- "HelloWorld"
- }));
- String dump = yaml.dump(data);
- System.out.println(dump);
-
- InputStream resourceAsStream = ClassLoader.getSystemClassLoader().getResourceAsStream("hello_world_app_spec.yaml");
- HelloworldAppSpec load = yaml.loadAs(resourceAsStream,HelloworldAppSpec.class);
- String dumpnew = yaml.dump(load);
- System.out.println(dumpnew.equals(dump));
-
- System.out.println("==================================");
- System.out.println(dumpnew);
-
- }
-}
http://git-wip-us.apache.org/repos/asf/helix/blob/8992aa5a/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloWorldService.java
----------------------------------------------------------------------
diff --git a/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloWorldService.java b/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloWorldService.java
deleted file mode 100644
index 8999817..0000000
--- a/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloWorldService.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.apache.helix.provisioning.yarn.example;
-
-import org.apache.helix.HelixConnection;
-import org.apache.helix.api.accessor.ResourceAccessor;
-import org.apache.helix.api.config.UserConfig;
-import org.apache.helix.api.id.ClusterId;
-import org.apache.helix.api.id.ParticipantId;
-import org.apache.helix.api.id.ResourceId;
-import org.apache.helix.api.id.StateModelDefId;
-import org.apache.helix.manager.zk.AbstractParticipantService;
-import org.apache.helix.provisioning.yarn.example.HelloWorldStateModelFactory;
-import org.apache.log4j.Logger;
-
-public class HelloWorldService extends AbstractParticipantService {
-
- private static Logger LOG = Logger.getLogger(AbstractParticipantService.class);
-
- static String SERVICE_NAME = "HelloWorld";
-
- public HelloWorldService(HelixConnection connection, ClusterId clusterId,
- ParticipantId participantId) {
- super(connection, clusterId, participantId);
- }
-
- /**
- * init method to setup appropriate call back handlers.
- */
- @Override
- public void init() {
- ClusterId clusterId = getClusterId();
- ResourceAccessor resourceAccessor = getConnection().createResourceAccessor(clusterId);
- UserConfig serviceConfig = resourceAccessor.readUserConfig(ResourceId.from(SERVICE_NAME));
- LOG.info("Starting service:" + SERVICE_NAME + " with configuration:" + serviceConfig);
-
- HelloWorldStateModelFactory stateModelFactory = new HelloWorldStateModelFactory();
- getParticipant().getStateMachineEngine().registerStateModelFactory(
- StateModelDefId.from("StatelessService"), stateModelFactory);
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/helix/blob/8992aa5a/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloWorldStateModel.java
----------------------------------------------------------------------
diff --git a/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloWorldStateModel.java b/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloWorldStateModel.java
deleted file mode 100644
index 95f66e3..0000000
--- a/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloWorldStateModel.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.apache.helix.provisioning.yarn.example;
-
-import org.apache.helix.NotificationContext;
-import org.apache.helix.api.id.PartitionId;
-import org.apache.helix.model.Message;
-import org.apache.helix.participant.statemachine.StateModel;
-import org.apache.helix.participant.statemachine.StateModelInfo;
-import org.apache.helix.participant.statemachine.Transition;
-
-@StateModelInfo(initialState = "OFFLINE", states = { "OFFLINE", "ONLINE",
- "ERROR" })
-public class HelloWorldStateModel extends StateModel {
-
- public HelloWorldStateModel(PartitionId partitionId) {
- // TODO Auto-generated constructor stub
- }
-
- @Transition(to = "ONLINE", from = "OFFLINE")
- public void onBecomeOnlineFromOffline(Message message,
- NotificationContext context) throws Exception {
- System.out.println("Started HelloWorld service");
- }
-
- @Transition(to = "OFFLINE", from = "ONLINE")
- public void onBecomeOfflineFromOnline(Message message,
- NotificationContext context) throws InterruptedException {
- System.out.println("Stopped HelloWorld service");
- }
-}
http://git-wip-us.apache.org/repos/asf/helix/blob/8992aa5a/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloWorldStateModelFactory.java
----------------------------------------------------------------------
diff --git a/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloWorldStateModelFactory.java b/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloWorldStateModelFactory.java
deleted file mode 100644
index 2766f6d..0000000
--- a/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloWorldStateModelFactory.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.apache.helix.provisioning.yarn.example;
-
-import org.apache.helix.api.id.PartitionId;
-import org.apache.helix.participant.statemachine.HelixStateModelFactory;
-import org.apache.helix.participant.statemachine.StateModel;
-import org.apache.helix.provisioning.yarn.example.HelloWorldStateModel;
-
-public class HelloWorldStateModelFactory extends HelixStateModelFactory<StateModel> {
- @Override
- public StateModel createNewStateModel(PartitionId partitionId) {
- return new HelloWorldStateModel(partitionId);
- }
-}
http://git-wip-us.apache.org/repos/asf/helix/blob/8992aa5a/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloworldAppSpec.java
----------------------------------------------------------------------
diff --git a/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloworldAppSpec.java b/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloworldAppSpec.java
deleted file mode 100644
index e22c7b2..0000000
--- a/recipes/provisioning/yarn/helloworld/src/main/java/org/apache/helix/provisioning/yarn/example/HelloworldAppSpec.java
+++ /dev/null
@@ -1,138 +0,0 @@
-package org.apache.helix.provisioning.yarn.example;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.helix.api.Scope;
-import org.apache.helix.api.config.ParticipantConfig;
-import org.apache.helix.api.config.ResourceConfig;
-import org.apache.helix.api.config.ResourceConfig.Builder;
-import org.apache.helix.api.config.UserConfig;
-import org.apache.helix.api.id.ParticipantId;
-import org.apache.helix.api.id.ResourceId;
-import org.apache.helix.provisioning.yarn.AppConfig;
-import org.apache.helix.provisioning.yarn.ApplicationSpec;
-import org.apache.helix.provisioning.yarn.ServiceConfig;
-import org.apache.helix.provisioning.yarn.TaskConfig;
-
-public class HelloworldAppSpec implements ApplicationSpec {
-
- public String _appName;
-
- public AppConfig _appConfig;
-
- public List<String> _services;
-
- private String _appMasterPackageUri;
-
- private Map<String, String> _servicePackageURIMap;
-
- private Map<String, String> _serviceMainClassMap;
-
- private Map<String, Map<String, String>> _serviceConfigMap;
-
- private List<TaskConfig> _taskConfigs;
-
- public AppConfig getAppConfig() {
- return _appConfig;
- }
-
- public void setAppConfig(AppConfig appConfig) {
- _appConfig = appConfig;
- }
-
- public String getAppMasterPackageUri() {
- return _appMasterPackageUri;
- }
-
- public void setAppMasterPackageUri(String appMasterPackageUri) {
- _appMasterPackageUri = appMasterPackageUri;
- }
-
- public Map<String, String> getServicePackageURIMap() {
- return _servicePackageURIMap;
- }
-
- public void setServicePackageURIMap(Map<String, String> servicePackageURIMap) {
- _servicePackageURIMap = servicePackageURIMap;
- }
-
- public Map<String, String> getServiceMainClassMap() {
- return _serviceMainClassMap;
- }
-
- public void setServiceMainClassMap(Map<String, String> serviceMainClassMap) {
- _serviceMainClassMap = serviceMainClassMap;
- }
-
- public Map<String, Map<String, String>> getServiceConfigMap() {
- return _serviceConfigMap;
- }
-
- public void setServiceConfigMap(Map<String, Map<String, String>> serviceConfigMap) {
- _serviceConfigMap = serviceConfigMap;
- }
-
- public void setAppName(String appName) {
- _appName = appName;
- }
-
- public void setServices(List<String> services) {
- _services = services;
- }
-
- public void setTaskConfigs(List<TaskConfig> taskConfigs) {
- _taskConfigs = taskConfigs;
- }
-
- @Override
- public String getAppName() {
- return _appName;
- }
-
- @Override
- public AppConfig getConfig() {
- return _appConfig;
- }
-
- @Override
- public List<String> getServices() {
- return _services;
- }
-
- @Override
- public URI getAppMasterPackage() {
- try {
- return new URI(_appMasterPackageUri);
- } catch (URISyntaxException e) {
- return null;
- }
- }
-
- @Override
- public URI getServicePackage(String serviceName) {
- try {
- return new URI(_servicePackageURIMap.get(serviceName));
- } catch (URISyntaxException e) {
- return null;
- }
- }
-
- @Override
- public String getServiceMainClass(String service) {
- return _serviceMainClassMap.get(service);
- }
-
- @Override
- public ServiceConfig getServiceConfig(String serviceName) {
- return new ServiceConfig(Scope.resource(ResourceId.from(serviceName)));
- }
-
- @Override
- public List<TaskConfig> getTaskConfigs() {
- return _taskConfigs;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/helix/blob/8992aa5a/recipes/provisioning/yarn/helloworld/src/main/resources/hello_world_app_spec.yaml
----------------------------------------------------------------------
diff --git a/recipes/provisioning/yarn/helloworld/src/main/resources/hello_world_app_spec.yaml b/recipes/provisioning/yarn/helloworld/src/main/resources/hello_world_app_spec.yaml
deleted file mode 100644
index d8d1dd2..0000000
--- a/recipes/provisioning/yarn/helloworld/src/main/resources/hello_world_app_spec.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
-!!org.apache.helix.provisioning.yarn.example.HelloworldAppSpec
-appConfig:
- config: {
- k1: v1
- }
-appMasterPackageUri: 'file:///Users/kgopalak/Documents/projects/incubator-helix/recipes/provisioning/yarn/helloworld/target/helloworld-0.7.1-incubating-SNAPSHOT-pkg.tar'
-appName: testApp
-serviceConfigMap:
- HelloWorld: {
- num_containers: 3,
- memory: 1024
- }
-serviceMainClassMap: {
- HelloWorld: org.apache.helix.provisioning.yarn.example.HelloWorldService
-}
-servicePackageURIMap: {
- HelloWorld: 'file:///Users/kgopalak/Documents/projects/incubator-helix/recipes/provisioning/yarn/helloworld/target/helloworld-0.7.1-incubating-SNAPSHOT-pkg.tar'
-}
-services: [
- HelloWorld]
-taskConfigs: null
-
-
-
http://git-wip-us.apache.org/repos/asf/helix/blob/8992aa5a/recipes/provisioning/yarn/helloworld/src/test/conf/testng.xml
----------------------------------------------------------------------
diff --git a/recipes/provisioning/yarn/helloworld/src/test/conf/testng.xml b/recipes/provisioning/yarn/helloworld/src/test/conf/testng.xml
deleted file mode 100644
index 37bccf3..0000000
--- a/recipes/provisioning/yarn/helloworld/src/test/conf/testng.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
-<suite name="Suite" parallel="none">
- <test name="Test" preserve-order="false">
- <packages>
- <package name="org.apache.helix.agent"/>
- </packages>
- </test>
-</suite>
http://git-wip-us.apache.org/repos/asf/helix/blob/8992aa5a/recipes/provisioning/yarn/pom.xml
----------------------------------------------------------------------
diff --git a/recipes/provisioning/yarn/pom.xml b/recipes/provisioning/yarn/pom.xml
deleted file mode 100644
index d557b2b..0000000
--- a/recipes/provisioning/yarn/pom.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.helix.recipes.provisioning</groupId>
- <artifactId>provisioning</artifactId>
- <version>0.7.1-incubating-SNAPSHOT</version>
- </parent>
- <groupId>org.apache.helix.recipes.provisioning.yarn</groupId>
- <artifactId>yarn</artifactId>
- <packaging>pom</packaging>
- <name>Apache Helix :: Recipes :: Provisioning :: YARN</name>
-
- <modules>
- <module>helloworld</module>
- </modules>
-
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-
-</project>