svn commit: r1594527 - /incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/registry/RegistryRestResources.java
Author: stevel Date: Wed May 14 09:49:12 2014 New Revision: 1594527 URL: http://svn.apache.org/r1594527 Log: SLIDER-50 use RestPaths for source of base registry path Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/registry/RegistryRestResources.java Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/registry/RegistryRestResources.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/registry/RegistryRestResources.java?rev=1594527r1=1594526r2=1594527view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/registry/RegistryRestResources.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/registry/RegistryRestResources.java Wed May 14 09:49:12 2014 @@ -49,8 +49,8 @@ import java.util.Random; @Singleton @Path(RestPaths.SLIDER_PATH_REGISTRY) public class RegistryRestResources extends DiscoveryResourceServiceInstanceData { - public static final String SERVICE_NAME = v1/service/{name}; - public static final String SERVICE_NAME_ID = v1/service/{name}/{id}; + public static final String SERVICE_NAME = RestPaths.REGISTRY_SERVICE +/{name}; + public static final String SERVICE_NAME_ID = SERVICE_NAME + /{id}; protected static final Logger log = LoggerFactory.getLogger(RegistryRestResources.class); private final SliderRegistryService registry;
svn commit: r1594532 - in /incubator/slider/trunk/slider-core/src: main/java/org/apache/slider/core/registry/docstore/ main/java/org/apache/slider/core/registry/retrieve/ main/java/org/apache/slider/s
Author: stevel Date: Wed May 14 10:20:40 2014 New Revision: 1594532 URL: http://svn.apache.org/r1594532 Log: SLIDER-50 change URL for published key-val pairs to .filetype, not /filetype Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfigSet.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfiguration.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfigurationOutputter.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/core/registry/retrieve/RegistryRetriever.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/web/SliderAmIpFilter.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/RestPaths.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/publisher/PublisherResource.java incubator/slider/trunk/slider-core/src/test/groovy/org/apache/slider/agent/standalone/TestStandaloneRegistryAM.groovy incubator/slider/trunk/slider-core/src/test/groovy/org/apache/slider/registry/TestConfigSetNaming.groovy Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfigSet.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfigSet.java?rev=1594532r1=1594531r2=1594532view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfigSet.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfigSet.java Wed May 14 10:20:40 2014 @@ -18,10 +18,12 @@ package org.apache.slider.core.registry.docstore; +import org.apache.slider.server.appmaster.web.rest.RestPaths; import org.codehaus.jackson.annotate.JsonIgnoreProperties; import org.codehaus.jackson.map.annotate.JsonSerialize; import java.util.HashMap; +import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.TreeSet; @@ -35,7 +37,7 @@ import java.util.regex.Pattern; @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) public class PublishedConfigSet { - public static final String VALID_NAME_PATTERN = [A-Za-z0-9_-]+; + public static final String VALID_NAME_PATTERN = RestPaths.PUBLISHED_CONFIGURATION_REGEXP; public static final String E_INVALID_NAME = Invalid configuration name -it must match the pattern + VALID_NAME_PATTERN; @@ -44,16 +46,25 @@ public class PublishedConfigSet { public MapString, PublishedConfiguration configurations = new HashMap(); + /** + * Put a name -it will be converted to lower case before insertion. + * Any existing entry will be overwritten (that includes an entry + * with a different case in the original name) + * @param name name of entry + * @param conf configuration + * @throws IllegalArgumentException if not a valid name + */ public void put(String name, PublishedConfiguration conf) { -validateName(name); -configurations.put(name, conf); +String name1 = name.toLowerCase(Locale.ENGLISH); +validateName(name1); +configurations.put(name1, conf); } /** * Validate the name -restricting it to the set defined in * {@link #VALID_NAME_PATTERN} * @param name name to validate - * @throws IllegalArgumentException if not + * @throws IllegalArgumentException if not a valid name */ public static void validateName(String name) { if (!validNames.matcher(name).matches()) { Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfiguration.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfiguration.java?rev=1594532r1=1594531r2=1594532view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfiguration.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfiguration.java Wed May 14 10:20:40 2014 @@ -158,4 +158,8 @@ public class PublishedConfiguration { sb.append('}'); return sb.toString(); } + + public PublishedConfigurationOutputter creatOutputter(ConfigFormat format) { +return PublishedConfigurationOutputter.createOutputter(format, this); + } } Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfigurationOutputter.java URL: http://svn.apache.org/viewvc/incubator
svn commit: r1594535 - /incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/publisher/PublisherResource.java
Author: stevel Date: Wed May 14 10:43:05 2014 New Revision: 1594535 URL: http://svn.apache.org/r1594535 Log: SLIDER-50 change URL for published key-val pairs to .filetype, not /filetype Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/publisher/PublisherResource.java Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/publisher/PublisherResource.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/publisher/PublisherResource.java?rev=1594535r1=1594534r2=1594535view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/publisher/PublisherResource.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/publisher/PublisherResource.java Wed May 14 10:43:05 2014 @@ -79,7 +79,7 @@ public class PublisherResource { } @GET - @Path(/{config}) + @Path(/ + CONFIG) @Produces({MediaType.APPLICATION_JSON}) public PublishedConfiguration getConfigurationInstance( @PathParam(config) String config, @@ -96,7 +96,7 @@ public class PublisherResource { } @GET - @Path(/{config}.json) + @Path(/ + CONFIG+ .json) @Produces({MediaType.APPLICATION_JSON}) public String getConfigurationContentJson( @PathParam(config) String config, @@ -107,7 +107,7 @@ public class PublisherResource { } @GET - @Path(/{config}.xml) + @Path(/ + CONFIG + .xml) @Produces({MediaType.APPLICATION_XML}) public String getConfigurationContentXML( @PathParam(config) String config, @@ -118,7 +118,7 @@ public class PublisherResource { } @GET - @Path(/{config}.properties) + @Path(/ + CONFIG + .properties) @Produces({MediaType.APPLICATION_XML}) public String getConfigurationContentProperties( @PathParam(config) String config,
svn commit: r1593316 - /incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/client/SliderClient.java
Author: stevel Date: Thu May 8 16:15:35 2014 New Revision: 1593316 URL: http://svn.apache.org/r1593316 Log: SLIDER-39 use providerName string to set provider in internal.json Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/client/SliderClient.java Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/client/SliderClient.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/client/SliderClient.java?rev=1593316r1=1593315r2=1593316view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/client/SliderClient.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/client/SliderClient.java Thu May 8 16:15:35 2014 @@ -384,9 +384,6 @@ public class SliderClient extends Abstra getConfig(), clustername); - - - AggregateConf instanceDefinition = new AggregateConf(); ConfTreeOperations appConf = instanceDefinition.getAppConfOperations(); ConfTreeOperations resources = instanceDefinition.getResourceOperations(); @@ -459,7 +456,7 @@ public class SliderClient extends Abstra appConf.merge(cmdLineResourceOptions); resources.mergeComponents(buildInfo.getResourceCompOptionMap()); -builder.init(provider.getName(), instanceDefinition); +builder.init(providerName, instanceDefinition); builder.propagateFilename(); builder.propagatePrincipals(); builder.setImageDetails(buildInfo.getImage(), buildInfo.getAppHomeDir()); @@ -508,7 +505,6 @@ public class SliderClient extends Abstra throw new BadClusterStateException(Failed to save + clustername + : + e); } - } public FsPermission getClusterDirectoryPermissions(Configuration conf) {
svn commit: r1593301 - in /incubator/slider/trunk: slider-core/src/main/java/org/apache/slider/common/tools/ slider-core/src/main/java/org/apache/slider/providers/agent/ slider-core/src/main/java/org/
Author: stevel Date: Thu May 8 14:51:39 2014 New Revision: 1593301 URL: http://svn.apache.org/r1593301 Log: SLIDER-38 do some minor cleanup of slider code while putting slides together Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/RoleLaunchService.java incubator/slider/trunk/slider-providers/hbase/slider-hbase-provider/src/main/java/org/apache/slider/providers/hbase/HBaseKeys.java incubator/slider/trunk/slider-providers/hbase/slider-hbase-provider/src/main/java/org/apache/slider/providers/hbase/HBaseProviderService.java incubator/slider/trunk/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/HBaseTestUtils.groovy incubator/slider/trunk/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/failures/TestKilledAM.groovy Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java?rev=1593301r1=1593300r2=1593301view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java Thu May 8 14:51:39 2014 @@ -816,7 +816,7 @@ public final class SliderUtils { public static MapString, String buildEnvMap(MapString, String roleOpts) { MapString, String env = new HashMapString, String(); if (roleOpts != null) { - for (Map.EntryString, String entry:roleOpts.entrySet()) { + for (Map.EntryString, String entry: roleOpts.entrySet()) { String key = entry.getKey(); if (key.startsWith(RoleKeys.ENV_PREFIX)) { String envName = key.substring(RoleKeys.ENV_PREFIX.length()); Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java?rev=1593301r1=1593300r2=1593301view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java Thu May 8 14:51:39 2014 @@ -156,7 +156,7 @@ public class AgentProviderService extend String logDir = ApplicationConstants.Environment.LOG_DIRS.$(); launcher.setEnv(AGENT_LOG_ROOT, logDir); log.info(AGENT_LOG_ROOT set to {}, logDir); -launcher.setEnv(HADOOP_USER_NAME, System.getenv(HADOOP_USER_NAME)); +launcher.setEnv(HADOOP_USER_NAME, System.getenv(HADOOP_USER_NAME)); //local resources Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/RoleLaunchService.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/RoleLaunchService.java?rev=1593301r1=1593300r2=1593301view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/RoleLaunchService.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/RoleLaunchService.java Thu May 8 14:51:39 2014 @@ -48,6 +48,7 @@ public class RoleLaunchService extends A * {@value} */ public static final int LAUNCHER_THREAD_SHUTDOWN_TIME = 1; + public static final String ROLE_LAUNCH_SERVICE = RoleLaunchService; /** * Map of launched threads. * These are retained so that at shutdown time the AM can signal @@ -89,7 +90,8 @@ public class RoleLaunchService extends A * Thread group for the launchers; gives them all a useful name * in stack dumps */ - private final ThreadGroup launcherThreadGroup = new ThreadGroup(launcher); + private final ThreadGroup launcherThreadGroup = new ThreadGroup( + ROLE_LAUNCH_SERVICE); private MapString, String envVars; @@ -107,7 +109,7 @@ public class RoleLaunchService extends A SliderFileSystem fs, Path generatedConfDirPath, MapString, String envVars, Path launcherTmpDirPath) { -super(RoleLaunchService); +super(ROLE_LAUNCH_SERVICE); containerStarter = startOperation; this.fs = fs
svn commit: r1595261 - in /incubator/slider/trunk: slider-core/src/main/java/org/apache/slider/core/registry/info/ slider-core/src/main/java/org/apache/slider/providers/ slider-core/src/main/java/org/
Author: stevel Date: Fri May 16 16:41:36 2014 New Revision: 1595261 URL: http://svn.apache.org/r1595261 Log: SLIDER-35 providers to publish registry information - all providers enum their endpoints and list what there is Added: incubator/slider/trunk/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/DemoHBaseCluster.groovy Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/core/registry/info/RegisteredEndpoint.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/ProviderService.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/web/view/IndexBlock.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/curator/RegistryBinderService.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/registry/RegistryRestResources.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/registry/RegistryViewForProviders.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/registry/SliderRegistryService.java incubator/slider/trunk/slider-core/src/test/groovy/org/apache/slider/server/appmaster/model/mock/MockProviderService.groovy incubator/slider/trunk/slider-providers/accumulo/slider-accumulo-provider/src/main/java/org/apache/slider/providers/accumulo/AccumuloProviderService.java incubator/slider/trunk/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/TestFunctionalHBaseCluster.groovy incubator/slider/trunk/slider-providers/hbase/slider-hbase-provider/src/main/java/org/apache/slider/providers/hbase/HBaseProviderService.java Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/core/registry/info/RegisteredEndpoint.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/core/registry/info/RegisteredEndpoint.java?rev=1595261r1=1595260r2=1595261view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/core/registry/info/RegisteredEndpoint.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/core/registry/info/RegisteredEndpoint.java Fri May 16 16:41:36 2014 @@ -19,6 +19,7 @@ package org.apache.slider.core.registry.info; import org.apache.slider.core.exceptions.SliderException; +import org.codehaus.jackson.annotate.JsonIgnore; import org.codehaus.jackson.annotate.JsonIgnoreProperties; import org.codehaus.jackson.map.annotate.JsonSerialize; @@ -174,6 +175,7 @@ public class RegisteredEndpoint { return sb.toString(); } + @JsonIgnore public boolean isHttpProtocol() { return PROTOCOL_HTTP.equals(protocol) || PROTOCOL_HTTPS.equals(protocol); } Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java?rev=1595261r1=1595260r2=1595261view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java Fri May 16 16:41:36 2014 @@ -28,9 +28,16 @@ import org.apache.slider.core.conf.Aggre import org.apache.slider.core.exceptions.BadCommandArgumentsException; import org.apache.slider.core.exceptions.SliderException; import org.apache.slider.core.main.ExitCodeProvider; +import org.apache.slider.core.registry.info.RegisteredEndpoint; import org.apache.slider.core.registry.info.ServiceInstanceData; +import org.apache.slider.providers.agent.AgentProviderService; 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.agent.HeartBeat; +import org.apache.slider.server.appmaster.web.rest.agent.HeartBeatResponse; +import org.apache.slider.server.appmaster.web.rest.agent.Register; +import org.apache.slider.server.appmaster.web.rest.agent.RegistrationResponse; +import org.apache.slider.server.appmaster.web.rest.agent.RegistrationStatus; import org.apache.slider.server.services.curator.RegistryBinderService
svn commit: r1595907 - in /incubator/slider/trunk: slider-core/src/main/java/org/apache/slider/providers/ slider-core/src/main/java/org/apache/slider/providers/agent/ slider-core/src/main/java/org/apa
Author: stevel Date: Mon May 19 13:52:05 2014 New Revision: 1595907 URL: http://svn.apache.org/r1595907 Log: SLIDER-70 move from URLs to URL strings in ProviderService methods Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/ProviderService.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/web/view/IndexBlock.java incubator/slider/trunk/slider-providers/accumulo/slider-accumulo-provider/src/main/java/org/apache/slider/providers/accumulo/AccumuloProviderService.java incubator/slider/trunk/slider-providers/hbase/slider-hbase-provider/src/main/java/org/apache/slider/providers/hbase/HBaseProviderService.java Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java?rev=1595907r1=1595906r2=1595907view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java Mon May 19 13:52:05 2014 @@ -279,8 +279,8 @@ public abstract class AbstractProviderSe in the external view */ @Override - public MapString,URL buildMonitorDetails(ClusterDescription clusterDesc) { -MapString, URL details = new LinkedHashMap(); + public MapString, String buildMonitorDetails(ClusterDescription clusterDesc) { +MapString, String details = new LinkedHashMap(); // add in all the buildEndpointDetails(details); @@ -295,24 +295,19 @@ public abstract class AbstractProviderSe } @Override - public void buildEndpointDetails(MapString, URL details) { + public void buildEndpointDetails(MapString, String details) { ServiceInstanceData self = registry.getSelfRegistration(); buildEndpointDetails(details, self); } - public static void buildEndpointDetails(MapString, URL details, + public static void buildEndpointDetails(MapString, String details, ServiceInstanceData self) { MapString, RegisteredEndpoint endpoints = self.getRegistryView(true).endpoints; for (Map.EntryString, RegisteredEndpoint endpoint : endpoints.entrySet()) { RegisteredEndpoint val = endpoint.getValue(); if (val.type.equals(RegisteredEndpoint.TYPE_URL)) { -try { - URL url = new URL(val.value); - details.put(val.description, url); -} catch (MalformedURLException e) { - log.warn(Failed to create URL from {} : {} ,val.value, e); -} + details.put(val.description, val.value); } } } Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/ProviderService.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/ProviderService.java?rev=1595907r1=1595906r2=1595907view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/ProviderService.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/ProviderService.java Mon May 19 13:52:05 2014 @@ -133,7 +133,7 @@ public interface ProviderService extends * If no anchor is needed/desired, insert the key with a null value. * @return */ - MapString,URL buildMonitorDetails(ClusterDescription clusterSpec); + MapString, String buildMonitorDetails(ClusterDescription clusterSpec); /** * bind operation -invoked before the service is started @@ -153,5 +153,5 @@ public interface ProviderService extends * Build up the endpoint details for this service * @param details */ - void buildEndpointDetails(MapString, URL details); + void buildEndpointDetails(MapString, String details); } Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java?rev=1595907r1=1595906r2=1595907view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java Mon May 19 13:52:05 2014 @@ -737,18 +737,18
svn commit: r1595950 - in /incubator/slider/trunk/slider-core/src: main/java/org/apache/slider/providers/ main/java/org/apache/slider/providers/agent/ main/java/org/apache/slider/providers/slideram/ m
Author: stevel Date: Mon May 19 16:25:08 2014 New Revision: 1595950 URL: http://svn.apache.org/r1595950 Log: SLIDER-35 providers to publish registry information -slider AM publishes its (existing) registration info from a new provider Added: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/slideram/SliderAMProviderService.java (with props) Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/ProviderService.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/registry/RegistryViewForProviders.java incubator/slider/trunk/slider-core/src/test/groovy/org/apache/slider/server/appmaster/model/mock/MockProviderService.groovy Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java?rev=1595950r1=1595949r2=1595950view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java Mon May 19 16:25:08 2014 @@ -30,15 +30,8 @@ import org.apache.slider.core.exceptions import org.apache.slider.core.main.ExitCodeProvider; import org.apache.slider.core.registry.info.RegisteredEndpoint; import org.apache.slider.core.registry.info.ServiceInstanceData; -import org.apache.slider.providers.agent.AgentProviderService; 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.agent.HeartBeat; -import org.apache.slider.server.appmaster.web.rest.agent.HeartBeatResponse; -import org.apache.slider.server.appmaster.web.rest.agent.Register; -import org.apache.slider.server.appmaster.web.rest.agent.RegistrationResponse; -import org.apache.slider.server.appmaster.web.rest.agent.RegistrationStatus; -import org.apache.slider.server.services.curator.RegistryBinderService; import org.apache.slider.server.services.registry.RegistryViewForProviders; import org.apache.slider.server.services.utility.ForkedProcessService; import org.apache.slider.server.services.utility.Parent; @@ -51,7 +44,6 @@ import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.util.Collection; -import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; @@ -271,7 +263,7 @@ public abstract class AbstractProviderSe */ @Override public MapString, String buildProviderStatus() { -return new HashMapString, String(); +return new HashMap(); } /* @@ -311,4 +303,11 @@ public abstract class AbstractProviderSe } } } + @Override + public void applyInitialRegistryDefinitions(URL amWebAPI, + ServiceInstanceData registryInstanceData) throws MalformedURLException, + IOException { + + //no-op + } } Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/ProviderService.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/ProviderService.java?rev=1595950r1=1595949r2=1595950view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/ProviderService.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/ProviderService.java Mon May 19 16:25:08 2014 @@ -39,6 +39,7 @@ import org.apache.slider.server.services import java.io.File; import java.io.IOException; +import java.net.MalformedURLException; import java.net.URL; import java.util.Map; @@ -154,4 +155,13 @@ public interface ProviderService extends * @param details */ void buildEndpointDetails(MapString, String details); + + /** + * Prior to going live -register the initial service registry data + * @param amWebAPI + * @param registryInstanceData + */ + void applyInitialRegistryDefinitions(URL amWebAPI, + ServiceInstanceData registryInstanceData) throws MalformedURLException, + IOException; } Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java URL: http://svn.apache.org/viewvc
svn commit: r1595951 - /incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/params/
Author: stevel Date: Mon May 19 16:32:14 2014 New Revision: 1595951 URL: http://svn.apache.org/r1595951 Log: move common/params classes to java 7 language features Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/params/AbstractActionArgs.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/params/AbstractClusterBuildingActionArgs.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/params/AppAndResouceOptionArgsDelegate.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/params/ArgOps.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/params/CommonArgs.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/params/DontSplitArguments.java Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/params/AbstractActionArgs.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/params/AbstractActionArgs.java?rev=1595951r1=1595950r2=1595951view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/params/AbstractActionArgs.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/params/AbstractActionArgs.java Mon May 19 16:32:14 2014 @@ -58,7 +58,7 @@ public abstract class AbstractActionArgs * This is the default parameter */ @Parameter - public final ListString parameters = new ArrayListString(); + public final ListString parameters = new ArrayList(); /** @@ -80,7 +80,7 @@ public abstract class AbstractActionArgs */ @Parameter(names = ARG_DEFINE, arity = 1, description = Definitions) - public final ListString definitions = new ArrayListString(); + public final ListString definitions = new ArrayList(); /** * System properties @@ -88,7 +88,7 @@ public abstract class AbstractActionArgs @Parameter(names = {ARG_SYSPROP}, arity = 1, description = system properties in the form name value + These are set after the JVM is started.) - public final ListString sysprops = new ArrayListString(0); + public final ListString sysprops = new ArrayList(0); @Parameter(names = {ARG_MANAGER_SHORT, ARG_MANAGER}, Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/params/AbstractClusterBuildingActionArgs.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/params/AbstractClusterBuildingActionArgs.java?rev=1595951r1=1595950r2=1595951view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/params/AbstractClusterBuildingActionArgs.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/common/params/AbstractClusterBuildingActionArgs.java Mon May 19 16:32:14 2014 @@ -35,7 +35,8 @@ import java.util.Map; * Abstract Action to build things; shares args across build and * list */ -public abstract class AbstractClusterBuildingActionArgs extends AbstractActionArgs { +public abstract class AbstractClusterBuildingActionArgs extends +AbstractActionArgs { /** * Declare the image configuration directory to use when creating or @@ -44,16 +45,16 @@ public abstract class AbstractClusterBui * be specified. */ @Parameter(names = ARG_CONFDIR, - description = Path to cluster configuration directory in HDFS, - converter = PathArgumentConverter.class) + description = Path to cluster configuration directory in HDFS, + converter = PathArgumentConverter.class) public Path confdir; @Parameter(names = ARG_ZKPATH, - description = Zookeeper path for the application) + description = Zookeeper path for the application) public String appZKPath; @Parameter(names = ARG_ZKHOSTS, - description = comma separated list of the Zookeeper hosts) + description = comma separated list of the Zookeeper hosts) public String zkhosts; /** @@ -61,47 +62,48 @@ public abstract class AbstractClusterBui the full path to a .tar or .tar.gz path containing an HBase image. */ @Parameter(names = ARG_IMAGE, - description = The full path to a .tar or .tar.gz path containing the application, - converter = PathArgumentConverter.class) + description = The full path to a .tar or .tar.gz path containing the application, + converter = PathArgumentConverter.class) public Path image; @Parameter(names = ARG_APP_HOME, - description = Home directory of a pre-installed application) + description = Home directory of a pre-installed application) public String
svn commit: r1596246 - in /incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/utility: EventNotifyingService.java SequenceService.java
Author: stevel Date: Tue May 20 13:47:32 2014 New Revision: 1596246 URL: http://svn.apache.org/r1596246 Log: quick cleanup of some of the AM services/utility services Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/utility/EventNotifyingService.java incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/utility/SequenceService.java Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/utility/EventNotifyingService.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/utility/EventNotifyingService.java?rev=1596246r1=1596245r2=1596246view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/utility/EventNotifyingService.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/utility/EventNotifyingService.java Tue May 20 13:47:32 2014 @@ -52,7 +52,7 @@ public class EventNotifyingService exten if (delay 0) { try { Thread.sleep(delay); - } catch (InterruptedException e) { + } catch (InterruptedException ignored) { } } Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/utility/SequenceService.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/utility/SequenceService.java?rev=1596246r1=1596245r2=1596246view=diff == --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/utility/SequenceService.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/utility/SequenceService.java Tue May 20 13:47:32 2014 @@ -44,7 +44,7 @@ public class SequenceService extends Abs /** * list of services */ - private final ListService serviceList = new ArrayListService(); + private final ListService serviceList = new ArrayList(); /** * The current service. @@ -63,7 +63,7 @@ public class SequenceService extends Abs * @param name service name * @param offspring initial sequence */ - public SequenceService(String name, Service...offspring) { + public SequenceService(String name, Service... offspring) { super(name); for (Service service : offspring) { addService(service);
[2/2] git commit: SLIDER-72: add a DISCLAIMER file according to incubator rules, tell RAT to ignore it as it lacks an ASF license
SLIDER-72: add a DISCLAIMER file according to incubator rules, tell RAT to ignore it as it lacks an ASF license Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/6d95ea34 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/6d95ea34 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/6d95ea34 Branch: refs/heads/develop Commit: 6d95ea34ea1ffb202ab6643d53759eab41511fb1 Parents: 1cb2547 Author: Steve Loughran ste...@hortonworks.com Authored: Wed May 21 19:45:31 2014 +0100 Committer: Steve Loughran ste...@hortonworks.com Committed: Wed May 21 19:45:31 2014 +0100 -- DISCLAIMER | 10 ++ pom.xml| 1 + 2 files changed, 11 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6d95ea34/DISCLAIMER -- diff --git a/DISCLAIMER b/DISCLAIMER new file mode 100644 index 000..f855d84 --- /dev/null +++ b/DISCLAIMER @@ -0,0 +1,10 @@ + +Apache Slider is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by Apache Incubator. + +Incubation is required of all newly accepted projects until a further review +indicates that the infrastructure, communications, and decision making process +have stabilized in a manner consistent with other successful ASF projects. +While incubation status is not necessarily a reflection of the completeness +or stability of the code, it does indicate that the project has yet +to be fully endorsed by the ASF. http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6d95ea34/pom.xml -- diff --git a/pom.xml b/pom.xml index 8810da5..efb3ac5 100644 --- a/pom.xml +++ b/pom.xml @@ -347,6 +347,7 @@ exclude**/httpfs-signature.secret/exclude exclude**/dfs.exclude/exclude exclude**/*.iml/exclude +excludeDISCLAIMER/exclude /excludes /configuration /plugin
[6/7] git commit: Merge branch 'feature/SLIDER-38_berlin-buzz_cleanup' into develop
Merge branch 'feature/SLIDER-38_berlin-buzz_cleanup' into develop Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/1358c655 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/1358c655 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/1358c655 Branch: refs/heads/develop Commit: 1358c6558523fb5f083dbf42180f1097d151b194 Parents: 3e91285 4063d4a Author: Steve Loughran ste...@apache.org Authored: Fri May 23 18:47:38 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Fri May 23 18:47:38 2014 +0100 -- slider-core/pom.xml | 18 +- .../org/apache/slider/client/SliderClient.java | 2 +- .../apache/slider/common/tools/SliderUtils.java | 1 + .../slider/core/build/InstanceBuilder.java | 4 +- .../core/registry/zk/BlockingZKWatcher.java | 63 --- .../slider/core/registry/zk/ZKCallback.java | 31 -- .../slider/core/registry/zk/ZKIntegration.java | 280 .../slider/core/registry/zk/ZKPathBuilder.java | 82 .../slider/core/registry/zk/ZookeeperUtils.java | 136 -- .../slider/core/zk/BlockingZKWatcher.java | 63 +++ .../slider/core/zk/MiniZooKeeperCluster.java| 423 +++ .../org/apache/slider/core/zk/ZKCallback.java | 31 ++ .../apache/slider/core/zk/ZKIntegration.java| 280 .../apache/slider/core/zk/ZKPathBuilder.java| 82 .../apache/slider/core/zk/ZookeeperUtils.java | 134 ++ .../slideram/SliderAMClientProvider.java| 16 - .../utility/AbstractSliderLaunchedService.java | 2 +- .../common/tools/GroovyZKIntegration.groovy | 2 +- .../common/tools/TestZKIntegration.groovy | 3 +- .../apache/slider/test/MicroZKCluster.groovy| 18 +- .../slider/test/YarnMiniClusterTestBase.groovy | 6 +- .../test/YarnZKMiniClusterTestBase.groovy | 7 +- .../slider/test/MiniZooKeeperCluster.java | 395 + .../accumulo/AccumuloProviderService.java | 3 +- .../live/TestAccCorrectInstanceName.groovy | 2 +- .../accumulo/live/TestAccFreezeThaw.groovy | 2 +- .../accumulo/live/TestAccLiveHDFSArchive.groovy | 2 +- .../live/TestAccLiveLocalArchive.groovy | 2 +- .../accumulo/live/TestAccM1T1GC1Mon1.groovy | 2 +- .../accumulo/live/TestAccM2T2GC1Mon1.groovy | 2 +- .../accumulo/live/TestAccumuloAMWebApp.groovy | 2 +- .../providers/hbase/HBaseClientProvider.java| 2 +- .../minicluster/live/TestHBaseMaster.groovy | 2 +- .../live/TestHBaseMasterWithBadHeap.groovy | 3 - .../live/TestLiveRegionServiceOnHDFS.groovy | 2 +- 35 files changed, 1444 insertions(+), 661 deletions(-) --
[1/7] git commit: SLIDER-38 copy in the mini ZK cluster from hbase, and drop hbase as a dependency for the tests
Repository: incubator-slider Updated Branches: refs/heads/develop 466248ad4 - 9fd773ec3 SLIDER-38 copy in the mini ZK cluster from hbase, and drop hbase as a dependency for the tests Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/5281b049 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/5281b049 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/5281b049 Branch: refs/heads/develop Commit: 5281b049e280c22e576f42c65e2bec0457e50b02 Parents: cfa4d71 Author: Steve Loughran ste...@hortonworks.com Authored: Thu May 22 11:09:33 2014 +0100 Committer: Steve Loughran ste...@hortonworks.com Committed: Thu May 22 11:09:33 2014 +0100 -- slider-core/pom.xml | 18 +- .../slider/core/registry/zk/ZookeeperUtils.java | 4 +- .../apache/slider/test/MicroZKCluster.groovy| 1 - .../test/YarnZKMiniClusterTestBase.groovy | 3 +- .../slider/test/MiniZooKeeperCluster.java | 395 +++ 5 files changed, 403 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5281b049/slider-core/pom.xml -- diff --git a/slider-core/pom.xml b/slider-core/pom.xml index 100102b..f0b7d2c 100644 --- a/slider-core/pom.xml +++ b/slider-core/pom.xml @@ -419,6 +419,7 @@ /exclusion /exclusions /dependency +!-- dependency groupIdorg.apache.hbase/groupId @@ -432,19 +433,9 @@ scopetest/scope /dependency -!-- -dependency - groupIdorg.apache.accumulo/groupId - artifactIdaccumulo/artifactId - version${accumulo.version}/version - exclusions -exclusion - groupIdorg.slf4j/groupId - artifactIdslf4j-api/artifactId -/exclusion - /exclusions -/dependency --- +-- + +!-- dependency groupIdorg.apache.accumulo/groupId @@ -469,6 +460,7 @@ artifactIdaccumulo-trace/artifactId scopetest/scope /dependency +-- dependency groupIdjunit/groupId http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5281b049/slider-core/src/main/java/org/apache/slider/core/registry/zk/ZookeeperUtils.java -- diff --git a/slider-core/src/main/java/org/apache/slider/core/registry/zk/ZookeeperUtils.java b/slider-core/src/main/java/org/apache/slider/core/registry/zk/ZookeeperUtils.java index 84a9321..7d73a97 100644 --- a/slider-core/src/main/java/org/apache/slider/core/registry/zk/ZookeeperUtils.java +++ b/slider-core/src/main/java/org/apache/slider/core/registry/zk/ZookeeperUtils.java @@ -32,9 +32,7 @@ public class ZookeeperUtils { String zkPort = Integer.toString(port); //parse the hosts String[] hostlist = zkHosts.split(,, 0); -String quorum = SliderUtils.join(hostlist, : + zkPort + ,); -//this quorum has a trailing comma -quorum = quorum.substring(0, quorum.length() - 1); +String quorum = SliderUtils.join(hostlist, : + zkPort + ,, false); return quorum; } http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5281b049/slider-core/src/test/groovy/org/apache/slider/test/MicroZKCluster.groovy -- diff --git a/slider-core/src/test/groovy/org/apache/slider/test/MicroZKCluster.groovy b/slider-core/src/test/groovy/org/apache/slider/test/MicroZKCluster.groovy index d0da914..8e7b460 100644 --- a/slider-core/src/test/groovy/org/apache/slider/test/MicroZKCluster.groovy +++ b/slider-core/src/test/groovy/org/apache/slider/test/MicroZKCluster.groovy @@ -21,7 +21,6 @@ package org.apache.slider.test import groovy.transform.CompileStatic import groovy.util.logging.Slf4j import org.apache.hadoop.conf.Configuration -import org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster import org.apache.slider.common.tools.SliderUtils @Slf4j http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5281b049/slider-core/src/test/groovy/org/apache/slider/test/YarnZKMiniClusterTestBase.groovy -- diff --git a/slider-core/src/test/groovy/org/apache/slider/test/YarnZKMiniClusterTestBase.groovy b/slider-core/src/test/groovy/org/apache/slider/test/YarnZKMiniClusterTestBase.groovy index dcc07c6..09a5a8f 100644 --- a/slider-core/src/test/groovy/org/apache/slider/test/YarnZKMiniClusterTestBase.groovy +++ b/slider-core/src/test/groovy/org/apache/slider/test/YarnZKMiniClusterTestBase.groovy @@ -21,6 +21,7 @@ package org.apache.slider.test import groovy.transform.CompileStatic import groovy.util.logging.Slf4j
[7/7] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-slider into develop
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-slider into develop Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/917de1fe Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/917de1fe Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/917de1fe Branch: refs/heads/develop Commit: 917de1fe9d550bc5ff13a8c63801016e5389ff4e Parents: 40e7e18 600463c Author: Steve Loughran ste...@apache.org Authored: Mon May 26 08:50:37 2014 +0200 Committer: Steve Loughran ste...@apache.org Committed: Mon May 26 08:50:37 2014 +0200 -- app-packages/hbase-v0_96/ganglia_metrics.json | 38 +++ app-packages/hbase-v0_96/jmx_metrics.json | 56 +++ app-packages/hbase-v0_96/metrics.json | 110 - 3 files changed, 94 insertions(+), 110 deletions(-) --
[1/6] git commit: SLIDER-94 callableV notification service
Repository: incubator-slider Updated Branches: refs/heads/develop 5ff1aa7a6 - d81da56a1 SLIDER-94 callableV notification service Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/61658283 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/61658283 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/61658283 Branch: refs/heads/develop Commit: 616582838b074e9747af67a3d80013cec5cbbdc8 Parents: 10fc874 Author: Steve Loughran ste...@apache.org Authored: Tue Jun 3 13:19:48 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Tue Jun 3 13:19:48 2014 +0100 -- .../workflow/TestWorkflowCompositeService.java | 20 .../workflow/TestWorkflowSequenceService.java | 24 +++- 2 files changed, 13 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/61658283/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestWorkflowCompositeService.java -- diff --git a/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestWorkflowCompositeService.java b/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestWorkflowCompositeService.java index 1e8eb52..afd5a61 100644 --- a/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestWorkflowCompositeService.java +++ b/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestWorkflowCompositeService.java @@ -61,23 +61,6 @@ public class TestWorkflowCompositeService extends ParentWorkflowTestBase { } @Test - public void testNotificationChild() throws Throwable { - -MockService one = new MockService(one, false, 100); -EventCallbackHandler ecb = new EventCallbackHandler(); -WorkflowEventNotifyingService ens = -new WorkflowEventNotifyingService(ecb, hello, 100); -MockService two = new MockService(two, false, 100); -ServiceParent parent = startService(one, ens, two); -waitForParentToStop(parent); -assertStopped(one); -assertStopped(ens); -assertStopped(two); -assertTrue(ecb.notified); -assertEquals(hello, ecb.result); - } - - @Test public void testCallableChild() throws Throwable { MockService one = new MockService(one, false, 100); @@ -92,11 +75,9 @@ public class TestWorkflowCompositeService extends ParentWorkflowTestBase { assertStopped(two); assertTrue(handler.notified); String s = ens.getScheduledFuture().get(); - assertEquals(hello, s); } - @Test public void testNestedComposite() throws Throwable { MockService one = new MockService(one, false, 100); @@ -121,7 +102,6 @@ public class TestWorkflowCompositeService extends ParentWorkflowTestBase { assertEquals(one.getFailureCause(), parent.getFailureCause()); } - @Override public ServiceParent buildService(Service... services) { ServiceParent parent = http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/61658283/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestWorkflowSequenceService.java -- diff --git a/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestWorkflowSequenceService.java b/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestWorkflowSequenceService.java index 22b595e..a581bc9 100644 --- a/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestWorkflowSequenceService.java +++ b/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestWorkflowSequenceService.java @@ -52,21 +52,24 @@ public class TestWorkflowSequenceService extends ParentWorkflowTestBase { } @Test - public void testNotificationInSequence() throws Throwable { -EventCallbackHandler ecb = new EventCallbackHandler(); + public void testCallableChild() throws Throwable { + MockService one = new MockService(one, false, 100); -WorkflowEventNotifyingService ens = -new WorkflowEventNotifyingService(ecb, 3, 100); +CallableHandler handler = new CallableHandler(hello); +WorkflowCallbackServiceString ens = +new WorkflowCallbackServiceString(handler, handler, 100); MockService two = new MockService(two, false, 100); ServiceParent parent = startService(one, ens, two); waitForParentToStop(parent); assertStopped(one); assertStopped(ens); assertStopped(two); -assertTrue(ecb.notified); -assertEquals(3, ecb.result); +assertTrue(handler.notified); +String s = ens.getScheduledFuture().get(); +assertEquals(hello, s); } + @Test public void testFailingSequence() throws
[5/5] git commit: SLIDER-140 test against hadoop 2.4.1 RC
SLIDER-140 test against hadoop 2.4.1 RC Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/e2440c32 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/e2440c32 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/e2440c32 Branch: refs/heads/develop Commit: e2440c32d70d68289d7312357b8fbe082f847ea9 Parents: 33778c3 Author: Steve Loughran ste...@apache.org Authored: Tue Jun 17 15:31:24 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Tue Jun 17 15:31:24 2014 -0700 -- pom.xml | 19 +-- .../flexing/TestClusterFlex0To1.groovy | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/e2440c32/pom.xml -- diff --git a/pom.xml b/pom.xml index 262d194..ae92769 100644 --- a/pom.xml +++ b/pom.xml @@ -1331,10 +1331,25 @@ /profile profile - !-- hadoop 2.4 builds of everything -- + !-- hadoop branch-2 builds -- + idhadoop-2.4.1/id + properties +hadoop.version2.4.1/hadoop.version + /properties +/profile +profile + !-- hadoop branch-2 builds -- idbranch-2/id properties -hadoop.version2.4.0/hadoop.version +hadoop.version2.5.0-SNAPSHOT/hadoop.version + /properties +/profile + +profile + !-- hadoop branch-2 builds -- + idhadoop-trunk/id + properties +hadoop.version3.0.0-SNAPSHOT/hadoop.version /properties /profile http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/e2440c32/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/flexing/TestClusterFlex0To1.groovy -- diff --git a/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/flexing/TestClusterFlex0To1.groovy b/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/flexing/TestClusterFlex0To1.groovy index 587e41f..3a66873 100644 --- a/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/flexing/TestClusterFlex0To1.groovy +++ b/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/flexing/TestClusterFlex0To1.groovy @@ -30,7 +30,7 @@ class TestClusterFlex0To1 extends HBaseMiniClusterTestBase { @Test public void testClusterFlex0To1() throws Throwable { -assert flexHBaseClusterTestRun(test_cluster_flex_0To1, 1, 1, 0, 1, false) +assert flexHBaseClusterTestRun(test_cluster_flex_0to1, 1, 1, 0, 1, false) } }
[3/5] git commit: SLIDER-3 : service registry
SLIDER-3 : service registry Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/9b7000fa Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/9b7000fa Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/9b7000fa Branch: refs/heads/develop Commit: 9b7000fab354460a36c2af751e7697c643dbe414 Parents: 93c1b3b Author: Steve Loughran ste...@apache.org Authored: Mon Jun 16 16:58:02 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Mon Jun 16 16:58:02 2014 -0700 -- .../registry/a_YARN_service_registry.md | 1 - .../markdown/registry/p2p_service_registries.md | 78 ++ ...lication_registration_and_binding_problem.md | 107 +-- 3 files changed, 135 insertions(+), 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/9b7000fa/src/site/markdown/registry/a_YARN_service_registry.md -- diff --git a/src/site/markdown/registry/a_YARN_service_registry.md b/src/site/markdown/registry/a_YARN_service_registry.md index 23cfce9..b695106 100644 --- a/src/site/markdown/registry/a_YARN_service_registry.md +++ b/src/site/markdown/registry/a_YARN_service_registry.md @@ -224,4 +224,3 @@ This isn't a registry service directly, though LDAP queries do make enumeration If service information were to be published via LDAP, then it should allow IT-managed LDAP services to both host this information, and publish configuration data. This would be relevant for classic Hadoop applications if we were to move the Configuration class to support back-end configuration sources beyond XML files on the classpath. -# Proposal http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/9b7000fa/src/site/markdown/registry/p2p_service_registries.md -- diff --git a/src/site/markdown/registry/p2p_service_registries.md b/src/site/markdown/registry/p2p_service_registries.md index 2cf953c..eaf5097 100644 --- a/src/site/markdown/registry/p2p_service_registries.md +++ b/src/site/markdown/registry/p2p_service_registries.md @@ -17,9 +17,11 @@ # P2P Service Registries for Apache Slider -Alongside the centralized service registries, there's much prior work on P2P discovery systems, especially for mobile and consumer devices. +Alongside the centralized service registries, there's much prior work on +P2P discovery systems, especially for mobile and consumer devices. -They perform some multicast- or distributed hash table-based lookup, and tend to have common limitations: +They perform some multicast- or distributed hash table-based lookup, +and tend to have common limitations: * scalability @@ -29,15 +31,29 @@ They perform some multicast- or distributed hash table-based lookup, and tend to * consistency: can you trust the results to be complete and current? -Bootstrapping is usually done via multicast, possibly then switching to unicast for better scale. As multicasting doesn't work in cloud infrastructures, none of the services work unmodified in public clouds. There's multiple anecdotes of [Amazon's SimpleDB service](http://aws.amazon.com/simpledb/) being used as a registry for in-EC2 applications. At the very least, this service and its equivalents in other cloud providers could be used to bootstrap ZK client bindings in cloud environments. +Bootstrapping is usually done via multicast, possibly then switching +to unicast for better scale. As multicasting doesn't work in cloud +infrastructures, none of the services work unmodified in public +clouds. There's multiple anecdotes of +[Amazon's SimpleDB service](http://aws.amazon.com/simpledb/) being used as a +registry for in-EC2 applications. At the very least, this service and its +equivalents in other cloud providers could be used to bootstrap ZK client +bindings in cloud environments. ## Service Location Protocol -Service Location Protocol is a protocol for discovery services that came out of Sun, Novell and others -it is still available for printer discovery and suchlike +Service Location Protocol is a protocol for discovery services that came out +of Sun, Novell and others -it is still available for printer discovery and +suchlike -It supports both a multicast discovery mechanism, and a unicast protocol to talk to a Directory Agent -an agent that is itself discovered by multicast requests, or by listening for the agent's intermittent multicast announcements. +It supports both a multicast discovery mechanism, and a unicast protocol +to talk to a Directory Agent -an agent that is itself discovered by multicast +requests, or by listening for the agent's intermittent multicast announcements.
[1/5] git commit: SLIDER-24 - move to simple constructors while looking @ jenkins failures
Repository: incubator-slider Updated Branches: refs/heads/develop 7003c06eb - 93475e1bd SLIDER-24 - move to simple constructors while looking @ jenkins failures Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/846310cb Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/846310cb Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/846310cb Branch: refs/heads/develop Commit: 846310cbc1689f095e9551fb8947ea1456f8e14e Parents: 1bbeebe Author: Steve Loughran ste...@apache.org Authored: Wed Jun 18 13:45:32 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Wed Jun 18 13:45:32 2014 -0700 -- .../slider/server/services/workflow/ProcessCommandFactory.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/846310cb/slider-core/src/test/java/org/apache/slider/server/services/workflow/ProcessCommandFactory.java -- diff --git a/slider-core/src/test/java/org/apache/slider/server/services/workflow/ProcessCommandFactory.java b/slider-core/src/test/java/org/apache/slider/server/services/workflow/ProcessCommandFactory.java index 45fdc86..e77eeb3 100644 --- a/slider-core/src/test/java/org/apache/slider/server/services/workflow/ProcessCommandFactory.java +++ b/slider-core/src/test/java/org/apache/slider/server/services/workflow/ProcessCommandFactory.java @@ -37,7 +37,7 @@ public class ProcessCommandFactory { * @return commands */ public ListString ls(File dir) { -ListString commands = new ArrayListString(5); +ListString commands = new ArrayList(5); commands.add(ls); commands.add(-1); commands.add(dir.getAbsolutePath()); @@ -50,7 +50,7 @@ public class ProcessCommandFactory { * @return commands */ public ListString echo(String text) { -ListString commands = new ArrayListString(5); +ListString commands = new ArrayList(5); commands.add(echo); commands.add(text); return commands; @@ -72,7 +72,7 @@ public class ProcessCommandFactory { * @return commands */ public ListString exitFalse() { -ListString commands = new ArrayListString(2); +ListString commands = new ArrayList(2); commands.add(false); return commands; }
[4/5] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-slider into develop
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-slider into develop Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/6744e7db Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/6744e7db Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/6744e7db Branch: refs/heads/develop Commit: 6744e7dbce3744a46255c5aaf0464ab8e7fff70d Parents: 846310c 7003c06 Author: Steve Loughran ste...@apache.org Authored: Wed Jun 18 17:50:19 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Wed Jun 18 17:50:19 2014 -0700 -- slider-funtest/pom.xml | 4 .../funtest/framework/CommandTestBase.groovy| 1 - .../funtest/framework/FuntestProperties.groovy | 5 - .../lifecycle/AgentCommandTestBase.groovy | 19 + .../lifecycle/TestAgentClusterLifecycle.groovy | 8 +++ .../lifecycle/TestAppsThroughAgent.groovy | 22 ++-- 6 files changed, 24 insertions(+), 35 deletions(-) --
[5/5] git commit: Merge branch 'feature/SLIDER-149_integrate_with_a_YARN_service_registry' into develop
Merge branch 'feature/SLIDER-149_integrate_with_a_YARN_service_registry' into develop Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/93475e1b Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/93475e1b Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/93475e1b Branch: refs/heads/develop Commit: 93475e1bd281d6c65667e07d641819c85e74057e Parents: 6744e7d 5b90d3e Author: Steve Loughran ste...@apache.org Authored: Wed Jun 18 17:50:38 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Wed Jun 18 17:50:38 2014 -0700 -- .../core/registry/info/RegisteredEndpoint.java | 44 +--- .../core/registry/info/ServiceInstanceData.java | 2 + .../providers/AbstractProviderService.java | 2 +- .../server/services/curator/CuratorUriSpec.java | 2 +- 4 files changed, 32 insertions(+), 18 deletions(-) --
[2/5] git commit: SLIDER-149 changing endpoint design to match current thoughts on what a YARN registry should do
SLIDER-149 changing endpoint design to match current thoughts on what a YARN registry should do Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/86cabdc4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/86cabdc4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/86cabdc4 Branch: refs/heads/develop Commit: 86cabdc427d59a5daf60c94bb5b00d7361391f81 Parents: 846310c Author: Steve Loughran ste...@apache.org Authored: Wed Jun 18 16:32:36 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Wed Jun 18 16:48:14 2014 -0700 -- .../core/registry/info/RegisteredEndpoint.java | 43 +--- .../core/registry/info/ServiceInstanceData.java | 2 + .../providers/AbstractProviderService.java | 2 +- .../server/services/curator/CuratorUriSpec.java | 2 +- 4 files changed, 32 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/86cabdc4/slider-core/src/main/java/org/apache/slider/core/registry/info/RegisteredEndpoint.java -- diff --git a/slider-core/src/main/java/org/apache/slider/core/registry/info/RegisteredEndpoint.java b/slider-core/src/main/java/org/apache/slider/core/registry/info/RegisteredEndpoint.java index 3dae7fc..dc335c6 100644 --- a/slider-core/src/main/java/org/apache/slider/core/registry/info/RegisteredEndpoint.java +++ b/slider-core/src/main/java/org/apache/slider/core/registry/info/RegisteredEndpoint.java @@ -48,7 +48,12 @@ public class RegisteredEndpoint { /** * hostname:port pair: {@value} */ - public static final String TYPE_ADDRESS = address; + public static final String TYPE_INETADDRESS = inetaddress; + + /** + * simple path string: {@value} + */ + public static final String TYPE_PATH = path; // standard protocols @@ -86,19 +91,31 @@ public class RegisteredEndpoint { */ public static final String PROTOCOL_HADOOP_PROTOBUF = org.apache.hadoop.ipc.Protobuf; - public String value; + /** + * The address -format is driven by the type entry + */ + public String address; + + /** + * Protocol + */ public String protocol = ; + public String type = ; + + /** + * Human readable type + */ public String description = ; public RegisteredEndpoint() { } - public RegisteredEndpoint(String value, + public RegisteredEndpoint(String address, String protocol, String type, String description) { -this.value = value; +this.address = address; this.protocol = protocol; this.type = type; this.description = description; @@ -113,7 +130,7 @@ public class RegisteredEndpoint { public RegisteredEndpoint(URI uri, String description) { -this.value = uri.toString(); +this.address = uri.toString(); this.protocol = uri.getScheme(); this.type = TYPE_URL; this.description = description; @@ -128,9 +145,9 @@ public class RegisteredEndpoint { String protocol, String description) { -this.value = address.toString(); +this.address = address.toString(); this.protocol = protocol; -this.type = TYPE_ADDRESS; +this.type = TYPE_INETADDRESS; this.description = description; } @@ -153,10 +170,10 @@ public class RegisteredEndpoint { public URL asURL() throws SliderException { verifyEndpointType(TYPE_URL); try { - return new URL(value); + return new URL(address); } catch (MalformedURLException e) { throw new SliderException(-1, e, - could not create a URL from %s : %s, value, e.toString()); + could not create a URL from %s : %s, address, e.toString()); } } @@ -165,20 +182,16 @@ public class RegisteredEndpoint { final StringBuilder sb = new StringBuilder(); if (TYPE_URL.equals(type)) { - sb.append(value); + sb.append(address); } else { sb.append(protocol=').append(protocol).append('\''); - sb.append( value=').append(value).append('\''); + sb.append( address=').append(address).append('\''); sb.append( type=').append(type).append('\''); } sb.append( -- \).append(description).append(''); return sb.toString(); } - @JsonIgnore - public boolean isHttpProtocol() { -return PROTOCOL_HTTP.equals(protocol) || PROTOCOL_HTTPS.equals(protocol); - } /** * Verify that an endpoint is of the desired type http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/86cabdc4/slider-core/src/main/java/org/apache/slider/core/registry/info/ServiceInstanceData.java
[1/2] git commit: SLIDER-151 moving rest paths slightly, making more constants, and adding a shared base class AbstractSliderResource for all resources that need at the slider web api
Repository: incubator-slider Updated Branches: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it [created] 915320cda SLIDER-151 moving rest paths slightly, making more constants, and adding a shared base class AbstractSliderResource for all resources that need at the slider web api Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/768f3038 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/768f3038 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/768f3038 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 768f30389602c1e67b5a908c1f1bee814cbfa692 Parents: 93475e1 Author: Steve Loughran ste...@apache.org Authored: Thu Jun 19 14:54:44 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Thu Jun 19 14:54:44 2014 -0700 -- .../web/rest/AMWadlGeneratorConfig.java | 4 +- .../web/rest/AbstractSliderResource.java| 34 .../server/appmaster/web/rest/RestPaths.java| 3 +- .../web/rest/SliderJacksonJaxbJsonProvider.java | 1 - .../appmaster/web/rest/agent/AgentResource.java | 6 +-- .../web/rest/management/ManagementResource.java | 15 +++--- .../management/resources/ActionsResource.java | 22 .../resources/AggregateConfResource.java| 4 +- .../management/resources/ConfTreeResource.java | 3 +- .../web/rest/publisher/PublisherResource.java | 55 +++- 10 files changed, 103 insertions(+), 44 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/768f3038/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/AMWadlGeneratorConfig.java -- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/AMWadlGeneratorConfig.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/AMWadlGeneratorConfig.java index 4ae7490..ea9f22b 100644 --- a/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/AMWadlGeneratorConfig.java +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/AMWadlGeneratorConfig.java @@ -22,9 +22,9 @@ import com.sun.jersey.api.wadl.config.WadlGeneratorDescription; import java.util.List; /** - * + * App master's WADL generation support */ -public class AMWadlGeneratorConfig extends WadlGeneratorConfig{ +public class AMWadlGeneratorConfig extends WadlGeneratorConfig { public static final String CLASSNAME = org.apache.slider.server.appmaster.web.rest.AMWadlGeneratorConfig; @Override http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/768f3038/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/AbstractSliderResource.java -- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/AbstractSliderResource.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/AbstractSliderResource.java new file mode 100644 index 000..4f41815 --- /dev/null +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/AbstractSliderResource.java @@ -0,0 +1,34 @@ +/* + * 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.rest; + +import org.apache.slider.server.appmaster.web.WebAppApi; + +/** + * Abstract resource base class for REST resources + * that use the slider WebAppApi + */ +public abstract class AbstractSliderResource { + + protected final WebAppApi slider; + + public AbstractSliderResource(WebAppApi slider) { +this.slider = slider; + } +} http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/768f3038/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/RestPaths.java -- diff --git
git commit: SLIDER-151 adding actions
Repository: incubator-slider Updated Branches: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it 915320cda - 6f5c5faf1 SLIDER-151 adding actions Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/6f5c5faf Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/6f5c5faf Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/6f5c5faf Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 6f5c5faf140ea3fbb2cfe4f44ff1c27e1e635f32 Parents: 915320c Author: Steve Loughran ste...@apache.org Authored: Fri Jun 20 16:08:08 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Fri Jun 20 16:08:08 2014 -0700 -- .../web/rest/management/ManagementResource.java | 43 ++-- 1 file changed, 40 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6f5c5faf/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/management/ManagementResource.java -- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/management/ManagementResource.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/management/ManagementResource.java index 02199cf..8a6b928 100644 --- a/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/management/ManagementResource.java +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/management/ManagementResource.java @@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.GET; +import javax.ws.rs.*; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; @@ -46,6 +47,8 @@ import java.net.URL; public class ManagementResource extends AbstractSliderResource { protected static final Logger log = LoggerFactory.getLogger(ManagementResource.class); + public static final String CONFIG = config; + public static final String APP_UNDER_MANAGEMENT = /app; public ManagementResource(WebAppApi slider) { super(slider); @@ -80,9 +83,9 @@ public class ManagementResource extends AbstractSliderResource { } @GET - @Path(/app/configurations/{config}) + @Path(APP_UNDER_MANAGEMENT+/configurations/{config}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) - public ConfTreeResource getConfTreeResource(@PathParam(config) String config, + public ConfTreeResource getConfTreeResource(@PathParam(CONFIG) String config, @Context UriInfo uriInfo, @Context HttpServletResponse res) { init(res); @@ -90,11 +93,45 @@ public class ManagementResource extends AbstractSliderResource { ResourceFactory.createAggregateConfResource(getAggregateConf(), uriInfo.getBaseUriBuilder() .path(RestPaths.SLIDER_CONTEXT_ROOT) - .path(RestPaths.MANAGEMENT + /app)); + .path(RestPaths.MANAGEMENT + APP_UNDER_MANAGEMENT)); return aggregateConf.getConfTree(config); } protected AggregateConf getAggregateConf() { return slider.getAppState().getInstanceDefinitionSnapshot(); } + + @POST + @Path(actions/flex) +public void actionFlex() { + } + + @POST + @Path(actions/stop) +public void actionStop() { + } + + + @POST + @Path(actions/test/suicide) +public void actionSuicide() { + } + + @POST + @Path(actions/test/kill-container) +public void actionKillContainer() { + } + + + @GET + @Path(containers+/components +/{name}) + public void actionListContainers() { + } + + @GET + @Path(containers+/components +/{name}) + public void actionListContainersbyComponent() { + } + + }
git commit: SLIDER-153: stub .py command
Repository: incubator-slider Updated Branches: refs/heads/feature/SLIDER-153_add_slider_py_command 5023eb56c - 19d313d7f SLIDER-153: stub .py command Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/19d313d7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/19d313d7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/19d313d7 Branch: refs/heads/feature/SLIDER-153_add_slider_py_command Commit: 19d313d7fb879ff8aff24494800870a704100df1 Parents: 5023eb5 Author: Steve Loughran ste...@apache.org Authored: Fri Jun 20 18:07:54 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Fri Jun 20 18:07:54 2014 -0700 -- slider-assembly/src/main/scripts/slider.py | 22 ++ 1 file changed, 22 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/19d313d7/slider-assembly/src/main/scripts/slider.py -- diff --git a/slider-assembly/src/main/scripts/slider.py b/slider-assembly/src/main/scripts/slider.py new file mode 100644 index 000..f154210 --- /dev/null +++ b/slider-assembly/src/main/scripts/slider.py @@ -0,0 +1,22 @@ +# !/usr/bin/env python +# -*- coding: 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. + +# Slider main method + +if __name__ == '__main__': +print slider python script \ No newline at end of file
[02/13] SLIDER-126. Slider-Agent and Agent Provider need to handle component instance install/start failure gracefully
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/3aca57d2/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/TestAppsThroughAgent.groovy -- diff --git a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/TestAppsThroughAgent.groovy b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/TestAppsThroughAgent.groovy index aef9aa1..e3422ee 100644 --- a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/TestAppsThroughAgent.groovy +++ b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/TestAppsThroughAgent.groovy @@ -31,14 +31,14 @@ import org.junit.Test @CompileStatic @Slf4j public class TestAppsThroughAgent extends AgentCommandTestBase -implements FuntestProperties, Arguments, SliderExitCodes, SliderActions { +implements FuntestProperties, Arguments, SliderExitCodes, SliderActions { private static String COMMAND_LOGGER = COMMAND_LOGGER - private static String APPLICATION_NAME = agenttst + private static String APPLICATION_NAME = happy-path-with-flex @After public void destroyCluster() { -cleanup() +cleanup(APPLICATION_NAME) } @Test @@ -48,69 +48,39 @@ public class TestAppsThroughAgent extends AgentCommandTestBase return } -cleanup() -try { - SliderShell shell = slider(EXIT_SUCCESS, - [ - ACTION_CREATE, APPLICATION_NAME, - ARG_IMAGE, agentTarballPath.toString(), - ARG_TEMPLATE, APP_TEMPLATE, - ARG_RESOURCES, APP_RESOURCE - ]) +cleanup(APPLICATION_NAME) +SliderShell shell = slider(EXIT_SUCCESS, +[ +ACTION_CREATE, APPLICATION_NAME, +ARG_IMAGE, agentTarballPath.toString(), +ARG_TEMPLATE, APP_TEMPLATE, +ARG_RESOURCES, APP_RESOURCE +]) - logShell(shell) +logShell(shell) - ensureApplicationIsUp(APPLICATION_NAME) +ensureApplicationIsUp(APPLICATION_NAME) - //flex - slider(EXIT_SUCCESS, - [ - ACTION_FLEX, - APPLICATION_NAME, - ARG_COMPONENT, - COMMAND_LOGGER, - 2]) +//flex +slider(EXIT_SUCCESS, +[ +ACTION_FLEX, +APPLICATION_NAME, +ARG_COMPONENT, +COMMAND_LOGGER, +2]) - // sleep till the new instance starts - sleep(1000 * 10) +// sleep till the new instance starts +sleep(1000 * 10) - shell = slider(EXIT_SUCCESS, - [ - ACTION_STATUS, - APPLICATION_NAME]) +shell = slider(EXIT_SUCCESS, +[ +ACTION_STATUS, +APPLICATION_NAME]) - assertComponentCount(COMMAND_LOGGER, 2, shell) +assertComponentCount(COMMAND_LOGGER, 2, shell) - shell = slider(EXIT_SUCCESS, - [ - ACTION_LIST, - APPLICATION_NAME]) - - assert isAppRunning(RUNNING, shell), 'App is not running.' - - assertSuccess(shell) -} finally { - cleanup() -} - } - - - public void cleanup() throws Throwable { -log.info Cleaning app instance, if exists, by name + APPLICATION_NAME -teardown(APPLICATION_NAME) - -// sleep till the instance is frozen -sleep(1000 * 3) - -SliderShell shell = slider([ -ACTION_DESTROY, -APPLICATION_NAME]) - -if (shell.ret != 0 shell.ret != EXIT_UNKNOWN_INSTANCE) { - logShell(shell) - assert fail(Old cluster either should not exist or should get destroyed.) -} +assertSuccess(shell) +assert isApplicationInState(RUNNING, APPLICATION_NAME), 'App is not running.' } - - }
[11/13] git commit: SLIDER-153 stub main()
SLIDER-153 stub main() Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/d6131ca4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/d6131ca4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/d6131ca4 Branch: refs/heads/feature/SLIDER-153_add_slider_py_command Commit: d6131ca426bee6e8aa9819a377bb82345fc97b56 Parents: e519fbc Author: Steve Loughran ste...@apache.org Authored: Mon Jun 23 13:41:18 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Mon Jun 23 13:41:18 2014 -0700 -- slider-assembly/src/main/scripts/slider.py | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/d6131ca4/slider-assembly/src/main/scripts/slider.py -- diff --git a/slider-assembly/src/main/scripts/slider.py b/slider-assembly/src/main/scripts/slider.py index f154210..d5891ed 100644 --- a/slider-assembly/src/main/scripts/slider.py +++ b/slider-assembly/src/main/scripts/slider.py @@ -15,8 +15,14 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +import sys +import subprocess # Slider main method - +def main(): + + if __name__ == '__main__': -print slider python script \ No newline at end of file +print slider python script +rv = main() +sys.exit(rv)
[04/13] git commit: Merge branch 'feature/SLIDER_126_handle_heartbeat_failures' into develop
Merge branch 'feature/SLIDER_126_handle_heartbeat_failures' into develop Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/45f5d796 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/45f5d796 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/45f5d796 Branch: refs/heads/feature/SLIDER-153_add_slider_py_command Commit: 45f5d7968d03f24c9d6f1af03f9afb4c1925e8c7 Parents: 1a8062e 3aca57d Author: Sumit Mohanty smoha...@hortonworks.com Authored: Sat Jun 21 18:22:00 2014 -0700 Committer: Sumit Mohanty smoha...@hortonworks.com Committed: Sat Jun 21 18:22:00 2014 -0700 -- slider-agent/conf/agent.ini | 2 + .../src/main/python/agent/AgentConfig.py| 21 +++ slider-agent/src/main/python/agent/Constants.py | 3 + .../src/main/python/agent/Controller.py | 23 ++- slider-agent/src/main/python/agent/main.py | 4 + .../src/test/python/agent/TestController.py | 30 slider-agent/src/test/python/agent/TestMain.py | 5 +- .../providers/AbstractProviderService.java | 15 +- .../slider/providers/ProviderService.java | 5 +- .../slider/providers/agent/AgentKeys.java | 3 + .../providers/agent/AgentLaunchParameter.java | 130 ++ .../providers/agent/AgentProviderService.java | 179 --- .../slider/providers/agent/AgentRoles.java | 18 +- .../apache/slider/providers/agent/Command.java | 13 +- .../slider/providers/agent/CommandResult.java | 16 +- .../providers/agent/ComponentInstanceState.java | 24 +++ .../slider/providers/agent/ContainerState.java | 41 + .../providers/agent/HeartbeatMonitor.java | 116 .../server/appmaster/AMViewForProviders.java| 27 +++ .../server/appmaster/SliderAppMaster.java | 32 +++- .../slider/server/appmaster/state/AppState.java | 20 +++ .../test_command_log/appConfig_fast_no_reg.json | 29 +++ .../test_command_log/appConfig_no_hb.json | 29 +++ .../model/mock/MockProviderService.groovy | 4 +- .../agent/TestAgentLaunchParameter.java | 76 .../providers/agent/TestHeartbeatMonitor.java | 136 ++ .../publisher/TestAgentProviderService.java | 5 +- .../lifecycle/AgentCommandTestBase.groovy | 100 --- .../lifecycle/TestAgentClusterLifecycle.groovy | 2 +- .../funtest/lifecycle/TestAgentFailures.groovy | 103 +++ .../funtest/lifecycle/TestAgentFailures2.groovy | 103 +++ .../lifecycle/TestAppsThroughAgent.groovy | 90 -- 32 files changed, 1253 insertions(+), 151 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/45f5d796/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java --
[05/13] git commit: SLIDER-156 Utilize multiple log directories when possible
SLIDER-156 Utilize multiple log directories when possible Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/57a9c9f8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/57a9c9f8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/57a9c9f8 Branch: refs/heads/feature/SLIDER-153_add_slider_py_command Commit: 57a9c9f88d7bc41ee80320dd146244be5c3d420f Parents: 45f5d79 Author: tedyu yuzhih...@gmail.com Authored: Sun Jun 22 17:52:20 2014 -0700 Committer: tedyu yuzhih...@gmail.com Committed: Sun Jun 22 17:52:20 2014 -0700 -- .../slider/providers/hbase/HBaseProviderService.java | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/57a9c9f8/slider-providers/hbase/slider-hbase-provider/src/main/java/org/apache/slider/providers/hbase/HBaseProviderService.java -- diff --git a/slider-providers/hbase/slider-hbase-provider/src/main/java/org/apache/slider/providers/hbase/HBaseProviderService.java b/slider-providers/hbase/slider-hbase-provider/src/main/java/org/apache/slider/providers/hbase/HBaseProviderService.java index 5405753..a578441 100644 --- a/slider-providers/hbase/slider-hbase-provider/src/main/java/org/apache/slider/providers/hbase/HBaseProviderService.java +++ b/slider-providers/hbase/slider-hbase-provider/src/main/java/org/apache/slider/providers/hbase/HBaseProviderService.java @@ -60,6 +60,7 @@ import java.net.URL; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Random; import static org.apache.slider.server.appmaster.web.rest.RestPaths.SLIDER_PATH_PUBLISHER; @@ -127,9 +128,16 @@ public class HBaseProviderService extends AbstractProviderService implements // Set the environment launcher.putEnv(SliderUtils.buildEnvMap(appComponent)); -String logDir = providerUtils.getLogdir(); -int idx = logDir.indexOf(,); -launcher.setEnv(HBASE_LOG_DIR, idx 0 ? logDir.substring(0, idx) : logDir); +String logDirs = providerUtils.getLogdir(); +String logDir; +int idx = logDirs.indexOf(,); +if (idx 0) { + // randomly choose a log dir candidate + String[] segments = logDirs.split(,); + Random rand = new Random(); + logDir = segments[rand.nextInt(segments.length)]; +} else logDir = logDirs; +launcher.setEnv(HBASE_LOG_DIR, logDir); launcher.setEnv(PROPAGATED_CONFDIR, ProviderUtils.convertToAppRelativePath(
git commit: SLIDER-106 funtest properties skipped by default
Repository: incubator-slider Updated Branches: refs/heads/develop 537d87c25 - 153f5e94b SLIDER-106 funtest properties skipped by default Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/153f5e94 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/153f5e94 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/153f5e94 Branch: refs/heads/develop Commit: 153f5e94b64a45e97c4b0494755472788455d678 Parents: 537d87c Author: Steve Loughran ste...@apache.org Authored: Mon Jun 23 16:19:49 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Mon Jun 23 16:19:49 2014 -0700 -- slider-funtest/pom.xml | 34 ++ 1 file changed, 34 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/153f5e94/slider-funtest/pom.xml -- diff --git a/slider-funtest/pom.xml b/slider-funtest/pom.xml index 42a57b2..51b5cec 100644 --- a/slider-funtest/pom.xml +++ b/slider-funtest/pom.xml @@ -265,5 +265,39 @@ /dependencies + profiles +profile + idtests-on-from-CLI/id + activation +property + nameslider.conf.dir/name +/property + /activation + properties +maven.test.skipfalse/maven.test.skip + /properties +/profile +profile + idtests-on-from-build.properties/id + activation +file + exists../build.properties/exists +/file + /activation + properties +maven.test.skipfalse/maven.test.skip + /properties +/profile +profile + idtests-off/id + activation +activeByDefaulttrue/activeByDefault + /activation + properties +maven.test.skiptrue/maven.test.skip + /properties +/profile + + /profiles /project
[3/4] git commit: SLIDER-153 fix shebang line
SLIDER-153 fix shebang line Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/77f3e021 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/77f3e021 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/77f3e021 Branch: refs/heads/feature/SLIDER-153_add_slider_py_command Commit: 77f3e02186cf1e55857eb991c216e94ef4f85c49 Parents: 6fc569d Author: Steve Loughran ste...@apache.org Authored: Tue Jun 24 13:18:50 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Tue Jun 24 13:18:50 2014 -0700 -- slider-assembly/src/main/scripts/slider.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/77f3e021/slider-assembly/src/main/scripts/slider.py -- diff --git a/slider-assembly/src/main/scripts/slider.py b/slider-assembly/src/main/scripts/slider.py index 1e55cc6..77c39aa 100644 --- a/slider-assembly/src/main/scripts/slider.py +++ b/slider-assembly/src/main/scripts/slider.py @@ -1,4 +1,4 @@ -# !/usr/bin/env python +#!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one or more
git commit: SLIDER-153 bin/slider is now python
Repository: incubator-slider Updated Branches: refs/heads/feature/SLIDER-153_add_slider_py_command 8a8ffd94c - 6f05995e4 SLIDER-153 bin/slider is now python Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/6f05995e Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/6f05995e Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/6f05995e Branch: refs/heads/feature/SLIDER-153_add_slider_py_command Commit: 6f05995e42c767062500da68759f75e7f66fd05c Parents: 8a8ffd9 Author: Steve Loughran ste...@apache.org Authored: Tue Jun 24 16:08:58 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Tue Jun 24 16:08:58 2014 -0700 -- slider-assembly/src/main/scripts/slider| 217 +--- slider-assembly/src/main/scripts/slider.py | 169 -- slider-assembly/src/main/scripts/slider.sh | 74 3 files changed, 230 insertions(+), 230 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6f05995e/slider-assembly/src/main/scripts/slider -- diff --git a/slider-assembly/src/main/scripts/slider b/slider-assembly/src/main/scripts/slider old mode 100755 new mode 100644 index caf275b..d48eca6 --- a/slider-assembly/src/main/scripts/slider +++ b/slider-assembly/src/main/scripts/slider @@ -1,5 +1,6 @@ -#!/usr/bin/env bash - +#!/usr/bin/env python +# -*- coding: 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. @@ -7,68 +8,162 @@ # (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 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an AS IS BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - - -# this is the shell script to start Slider deploying an application -# Usage: slider action commands - -# The env variable SLIDER_JVM_OPTS can be used to override -# the default JVM opts - -function usage -{ - echo Usage: slider action arguments - echo -} - -# Slider works out its own location -this=${BASH_SOURCE-$0} -bindir=$(cd -P -- $(dirname -- $this) pwd -P) -script=$(basename -- $this) - -# lib directory is one up; it is expected to contain -# slider.jar and any other dependencies that are not in the -# standard Hadoop classpath - -slider_home=${bindir}/.. -slider_home=`cd -P ${slider_home} pwd -P` - -libdir=${slider_home}/lib -libdir=`cd -P ${libdir} pwd -P` - - -confdir=${slider_home}/conf - -# normalize the conf dir so it can be passed down -confdir=`cd -P ${confdir} pwd -P` -confdir=${SLIDER_CONF_DIR:-$confdir} - - -slider_jvm_opts=-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xmx256m -Djava.confdir=${confdir} -slider_jvm_opts=${SLIDER_JVM_OPTS:-$slider_jvm_opts} - -# allow for an extra classpath -slider_classpath_extra=${SLIDER_CLASSPATH_EXTRA:-} - -slider_classpath=${libdir}/*:${confdir}:${slider_classpath_extra} - -launcher=org.apache.slider.Slider - - -echo slider_home = \${slider_home}\ -echo slider_jvm_opts = \${slider_jvm_opts}\ -echo classpath = \${slider_classpath}\ -export CLASSPATH=${slider_classpath} -echo - -echo command is java ${slider_jvm_opts} --classpath \${slider_classpath}\ ${launcher} $@ -echo -echo -exec java ${slider_jvm_opts} ${launcher} $@ +import sys +import os +import subprocess + +CONF = conf + +LIB = lib + +SLIDER_CONF_DIR = SLIDER_CONF_DIR +SLIDER_JVM_OPTS = SLIDER_JVM_OPTS +SLIDER_CLASSPATH_EXTRA = SLIDER_CLASSPATH_EXTRA + +SLIDER_CLASSNAME = org.apache.slider.Slider +DEFAULT_JVM__OPTS = -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xmx256m -Djava.confdir=%s + + +Launches slider + + + + + + +def scriptDir(): + + get the script path + + return os.path.dirname(os.path.realpath(__file__)) + +def sliderDir(): + return os.path.dirname(scriptDir()) + +def libDir(sliderdir) : + return os.path.join(sliderdir, LIB) + +def confDir(sliderdir): + + determine the active configuration directory + :param sliderdir: slider directory + :return: the configuration directory -any env var will + override the relative path + + localconf = os.path.join(sliderdir, CONF) + return os.environ.get(SLIDER_CONF_DIR,localconf) + +def dirMustExist(dir): + if not os.path.exists(dir): +raise Exception(Directory does
[5/6] git commit: SLIDER-153 remove superflous check for agent test enablement in TestAppsThroughAgent
SLIDER-153 remove superflous check for agent test enablement in TestAppsThroughAgent Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/bab88672 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/bab88672 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/bab88672 Branch: refs/heads/develop Commit: bab886723eca65bbe3a4090642b26714391df3ba Parents: eba97da Author: Steve Loughran ste...@apache.org Authored: Tue Jun 24 18:10:02 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Tue Jun 24 18:10:02 2014 -0700 -- .../apache/slider/funtest/lifecycle/TestAppsThroughAgent.groovy | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/bab88672/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/TestAppsThroughAgent.groovy -- diff --git a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/TestAppsThroughAgent.groovy b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/TestAppsThroughAgent.groovy index e3422ee..793a323 100644 --- a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/TestAppsThroughAgent.groovy +++ b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/TestAppsThroughAgent.groovy @@ -43,10 +43,7 @@ implements FuntestProperties, Arguments, SliderExitCodes, SliderActions { @Test public void testCreateFlex() throws Throwable { -if (!AGENTTESTS_ENABLED) { - log.info TESTS are not run. - return -} +assumeAgentTestsEnabled() cleanup(APPLICATION_NAME) SliderShell shell = slider(EXIT_SUCCESS,
[2/6] git commit: File upload work ... security model wrong
File upload work ... security model wrong Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/8327e52a Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/8327e52a Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/8327e52a Branch: refs/heads/develop Commit: 8327e52ae2dec00e0a954da1804413b1ef76f93c Parents: 81578df Author: Steve Loughran ste...@apache.org Authored: Mon Jun 23 18:42:25 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Mon Jun 23 18:42:25 2014 -0700 -- .../funtest/framework/AgentUploads.groovy | 41 +++ .../funtest/framework/FileUploader.groovy | 76 .../slider/funtest/framework/SudoClosure.groovy | 54 ++ 3 files changed, 171 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/8327e52a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy -- diff --git a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy new file mode 100644 index 000..b1c29c0 --- /dev/null +++ b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy @@ -0,0 +1,41 @@ +/* + * 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.funtest.framework + +import groovy.util.logging.Slf4j +import org.apache.hadoop.conf.Configuration +import org.apache.hadoop.fs.FileUtil +import org.apache.hadoop.fs.Path +import org.apache.hadoop.fs.permission.FsPermission +import org.apache.hadoop.security.UserGroupInformation + +@Slf4j +class AgentUploads { + final Configuration conf + + + AgentUploads(Configuration conf) { +this.conf = conf + } + + def execUploadSequence() { +UserGroupInformation.loginUserFromKeytabAndReturnUGI(yarn) + } + +} http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/8327e52a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy -- diff --git a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy new file mode 100644 index 000..dd42473 --- /dev/null +++ b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy @@ -0,0 +1,76 @@ +/* + * 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.funtest.framework + +import groovy.util.logging.Slf4j +import org.apache.hadoop.conf.Configuration +import org.apache.hadoop.fs.FileUtil +import org.apache.hadoop.fs.Path +import org.apache.hadoop.fs.permission.FsPermission +import org.apache.hadoop.security.UserGroupInformation + +@Slf4j +class FileUploader { + final Configuration conf + final UserGroupInformation user + + FileUploader(Configuration conf, UserGroupInformation user) { +this.conf = conf +this.user = user + } + + /** + * Copy if the file is considered out of date + * @param src + * @param dest + * @param force + *
[3/6] git commit: SLIDER-160: agent functional tests upload binaries/ini file if there is a difference
SLIDER-160: agent functional tests upload binaries/ini file if there is a difference Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/5464584d Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/5464584d Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/5464584d Branch: refs/heads/develop Commit: 5464584d784cf57348bf22100cee2581d5a887c0 Parents: 8327e52 Author: Steve Loughran ste...@apache.org Authored: Tue Jun 24 17:40:49 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Tue Jun 24 17:40:49 2014 -0700 -- .../funtest/framework/AgentUploads.groovy | 41 +++--- .../funtest/framework/CommandTestBase.groovy| 9 ++-- .../funtest/framework/FileUploader.groovy | 45 ++-- .../funtest/framework/FuntestProperties.groovy | 12 -- .../lifecycle/AgentCommandTestBase.groovy | 39 ++--- .../lifecycle/TestClusterBuildDestroy.groovy| 2 +- 6 files changed, 94 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5464584d/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy -- diff --git a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy index b1c29c0..5f10c0e 100644 --- a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy +++ b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy @@ -20,22 +20,51 @@ package org.apache.slider.funtest.framework import groovy.util.logging.Slf4j import org.apache.hadoop.conf.Configuration -import org.apache.hadoop.fs.FileUtil import org.apache.hadoop.fs.Path -import org.apache.hadoop.fs.permission.FsPermission import org.apache.hadoop.security.UserGroupInformation +import org.apache.hadoop.fs.FileSystem as HadoopFS @Slf4j -class AgentUploads { +class AgentUploads implements FuntestProperties { final Configuration conf + private final FileUploader uploader + private final HadoopFS clusterFS + private final Path homeDir + AgentUploads(Configuration conf) { this.conf = conf +uploader = new FileUploader(conf, UserGroupInformation.currentUser) +clusterFS = uploader.fileSystem +homeDir = clusterFS.homeDirectory } - def execUploadSequence() { -UserGroupInformation.loginUserFromKeytabAndReturnUGI(yarn) + /** + * Upload agent-related files + * @param tarballDir + * @param force + * @return + */ + def uploadAgentFiles(File tarballDir, boolean force) { +def localAgentTar = new File(tarballDir, AGENT_SLIDER_GZ_IN_SLIDER_TAR) +assert localAgentTar.exists() + +def agentTarballPath = new Path( +homeDir, +AGENT_TAR_FILENAME) + +// Upload the agent tarball +uploader.copyIfOutOfDate(localAgentTar, agentTarballPath, force) + +File localAgentIni = new File(tarballDir, AGENT_INI_IN_SLIDER_TAR) +// Upload the agent.ini +def agentIniPath = new Path(homeDir, AGENT_INI) +uploader.copyIfOutOfDate(localAgentIni, agentIniPath, force) + +return [agentTarballPath, agentIniPath] + + } - + } http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5464584d/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy -- diff --git a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy index d2accbb..61ae804 100644 --- a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy +++ b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy @@ -50,17 +50,16 @@ abstract class CommandTestBase extends SliderTestUtils { LoggerFactory.getLogger(CommandTestBase.class); public static final String SLIDER_CONF_DIR = sysprop(SLIDER_CONF_DIR_PROP) - public static final String SLIDER_BIN_DIR = sysprop(SLIDER_BIN_DIR_PROP) - public static final File SLIDER_BIN_DIRECTORY = new File( - SLIDER_BIN_DIR).canonicalFile + public static final String SLIDER_TAR_DIR = sysprop(SLIDER_BIN_DIR_PROP) + public static final File SLIDER_TAR_DIRECTORY = new File( + SLIDER_TAR_DIR).canonicalFile public static final File SLIDER_SCRIPT = new File( - SLIDER_BIN_DIRECTORY, + SLIDER_TAR_DIRECTORY, BIN_SLIDER).canonicalFile public static final File SLIDER_CONF_DIRECTORY = new File(
[1/6] git commit: SLIDER-160: initial client settings for an ambari vagrant VM up on c6401
Repository: incubator-slider Updated Branches: refs/heads/develop 3be6c8692 - 186673363 SLIDER-160: initial client settings for an ambari vagrant VM up on c6401 Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/81578df2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/81578df2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/81578df2 Branch: refs/heads/develop Commit: 81578df22f2eee22f49419e48a2f3e07c33005ff Parents: 153f5e9 Author: Steve Loughran ste...@apache.org Authored: Mon Jun 23 17:35:23 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Mon Jun 23 17:35:23 2014 -0700 -- src/test/clusters/c6401/slider/log4j.properties | 83 .../clusters/c6401/slider/slider-client.xml | 71 + 2 files changed, 154 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/81578df2/src/test/clusters/c6401/slider/log4j.properties -- diff --git a/src/test/clusters/c6401/slider/log4j.properties b/src/test/clusters/c6401/slider/log4j.properties new file mode 100644 index 000..6211771 --- /dev/null +++ b/src/test/clusters/c6401/slider/log4j.properties @@ -0,0 +1,83 @@ +# +# Licensed under the Apache License, Version 2.0 (the License); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +#http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. See accompanying LICENSE file. +# + +# +# Licensed to the Apache Software Foundation (ASF) under one +# 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. +# + +# Licensed under the Apache License, Version 2.0 (the License); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# log4j configuration used during build and unit tests + +log4j.rootLogger=INFO,stdout +log4j.threshhold=ALL +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout + +# log layout skips stack-trace creation operations by avoiding line numbers and method +#log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{2} - %m%n + +# debug edition is much more expensive +log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{2} (%F:%M(%L)) - %m%n + + +log4j.appender.subprocess=org.apache.log4j.ConsoleAppender +log4j.appender.subprocess.layout=org.apache.log4j.PatternLayout +log4j.appender.subprocess.layout.ConversionPattern=[%c{1}]: %m%n + +log4j.logger.org.apache.slider=DEBUG + +# uncomment to debug service lifecycle issues +#log4j.logger.org.apache.hadoop.yarn.service.launcher=DEBUG +#log4j.logger.org.apache.hadoop.yarn.service=DEBUG + +# uncomment for YARN operations +#log4j.logger.org.apache.hadoop.yarn.client=DEBUG + +# uncomment this to debug security problems +#log4j.logger.org.apache.hadoop.security=DEBUG + +#crank back on some noise +log4j.logger.org.apache.hadoop.util.NativeCodeLoader=ERROR +log4j.logger.org.apache.hadoop.hdfs=WARN + + +log4j.logger.org.apache.hadoop.yarn.server.nodemanager.containermanager.monitor=WARN +log4j.logger.org.apache.hadoop.yarn.server.nodemanager.NodeStatusUpdaterImpl=WARN +log4j.logger.org.apache.zookeeper=WARN + +
[4/6] git commit: SLIDER-160: move test for file existence into upload method; now covers all source files
SLIDER-160: move test for file existence into upload method; now covers all source files Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/eba97da0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/eba97da0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/eba97da0 Branch: refs/heads/develop Commit: eba97da01765ecf924d0a4f672e8ffd2474b7464 Parents: 5464584 Author: Steve Loughran ste...@apache.org Authored: Tue Jun 24 17:42:36 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Tue Jun 24 17:42:36 2014 -0700 -- .../org/apache/slider/funtest/framework/AgentUploads.groovy | 2 -- .../org/apache/slider/funtest/framework/FileUploader.groovy | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/eba97da0/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy -- diff --git a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy index 5f10c0e..3570183 100644 --- a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy +++ b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy @@ -48,8 +48,6 @@ class AgentUploads implements FuntestProperties { */ def uploadAgentFiles(File tarballDir, boolean force) { def localAgentTar = new File(tarballDir, AGENT_SLIDER_GZ_IN_SLIDER_TAR) -assert localAgentTar.exists() - def agentTarballPath = new Path( homeDir, AGENT_TAR_FILENAME) http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/eba97da0/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy -- diff --git a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy index 262693c..4f61730 100644 --- a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy +++ b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy @@ -44,6 +44,9 @@ class FileUploader { * @return */ public boolean copyIfOutOfDate(File src, Path destPath, boolean force) { +if (!src.exists()) { + throw new FileNotFoundException(Source file $src not found) +} def srcLen = src.length() def fs = getFileSystem(destPath) boolean toCopy = force
[6/6] git commit: Merge branch 'feature/SLIDER-160_Improve_slider_functional_testing' into develop
Merge branch 'feature/SLIDER-160_Improve_slider_functional_testing' into develop Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/18667336 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/18667336 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/18667336 Branch: refs/heads/develop Commit: 186673363c32a644d5ebaa21e3e2f7e3150115d6 Parents: 3be6c86 bab8867 Author: Steve Loughran ste...@apache.org Authored: Tue Jun 24 18:10:28 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Tue Jun 24 18:10:28 2014 -0700 -- .../funtest/framework/AgentUploads.groovy | 68 + .../funtest/framework/CommandTestBase.groovy| 9 +- .../funtest/framework/FileUploader.groovy | 100 +++ .../funtest/framework/FuntestProperties.groovy | 12 ++- .../slider/funtest/framework/SudoClosure.groovy | 54 ++ .../lifecycle/AgentCommandTestBase.groovy | 39 +++- .../lifecycle/TestAppsThroughAgent.groovy | 5 +- .../lifecycle/TestClusterBuildDestroy.groovy| 2 +- src/test/clusters/c6401/slider/log4j.properties | 83 +++ .../clusters/c6401/slider/slider-client.xml | 71 + 10 files changed, 403 insertions(+), 40 deletions(-) --
[09/14] git commit: SLIDER-153 add JVM args to CLI
SLIDER-153 add JVM args to CLI Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/8a8ffd94 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/8a8ffd94 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/8a8ffd94 Branch: refs/heads/develop Commit: 8a8ffd94c9b9685df578ba493e6cb0148af0e5b1 Parents: 77f3e02 Author: Steve Loughran ste...@apache.org Authored: Tue Jun 24 13:19:49 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Tue Jun 24 13:19:49 2014 -0700 -- slider-assembly/src/main/scripts/slider.py | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/8a8ffd94/slider-assembly/src/main/scripts/slider.py -- diff --git a/slider-assembly/src/main/scripts/slider.py b/slider-assembly/src/main/scripts/slider.py index 77c39aa..d48eca6 100644 --- a/slider-assembly/src/main/scripts/slider.py +++ b/slider-assembly/src/main/scripts/slider.py @@ -30,14 +30,12 @@ SLIDER_CLASSPATH_EXTRA = SLIDER_CLASSPATH_EXTRA SLIDER_CLASSNAME = org.apache.slider.Slider DEFAULT_JVM__OPTS = -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xmx256m -Djava.confdir=%s -Launches slider - - +Launches slider + -print os.environ['HOME'] def scriptDir(): @@ -107,6 +105,8 @@ def main(): confdir = dirMustExist(confDir(slider_home)) default_jvm_opts = DEFAULT_JVM__OPTS % confdir slider_jvm_opts = os.environ.get(SLIDER_JVM_OPTS, default_jvm_opts) + # split the JVM opts by space + jvm_opts_split = slider_jvm_opts.split() slider_classpath_extra = os.environ.get(SLIDER_CLASSPATH_EXTRA, ) p = os.pathsep# path separator d = os.sep# dir separator @@ -120,12 +120,11 @@ def main(): print slider_classpath = \%s\ % slider_classpath #java = /usr/bin/java - java = java - commandline = [java, - -classpath, - slider_classpath, - SLIDER_CLASSNAME] - # commandline.append(slider_jvm_opts) + commandline = [java, ] + commandline.append(-classpath) + commandline.append(slider_classpath) + commandline.extend(jvm_opts_split) + commandline.append(SLIDER_CLASSNAME) commandline.extend(args) print ready to exec : %s % commandline # docs warn of using PIPE on stderr
[03/14] git commit: SLIDER-153 stub main()
SLIDER-153 stub main() Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/d6131ca4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/d6131ca4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/d6131ca4 Branch: refs/heads/develop Commit: d6131ca426bee6e8aa9819a377bb82345fc97b56 Parents: e519fbc Author: Steve Loughran ste...@apache.org Authored: Mon Jun 23 13:41:18 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Mon Jun 23 13:41:18 2014 -0700 -- slider-assembly/src/main/scripts/slider.py | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/d6131ca4/slider-assembly/src/main/scripts/slider.py -- diff --git a/slider-assembly/src/main/scripts/slider.py b/slider-assembly/src/main/scripts/slider.py index f154210..d5891ed 100644 --- a/slider-assembly/src/main/scripts/slider.py +++ b/slider-assembly/src/main/scripts/slider.py @@ -15,8 +15,14 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +import sys +import subprocess # Slider main method - +def main(): + + if __name__ == '__main__': -print slider python script \ No newline at end of file +print slider python script +rv = main() +sys.exit(rv)
[12/14] git commit: SLIDER-153 revert rename - slider for bash
SLIDER-153 revert rename - slider for bash Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/150b589b Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/150b589b Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/150b589b Branch: refs/heads/develop Commit: 150b589b72dae4c4b857a6b19205f6ce11f63d39 Parents: 1c5f303 Author: Steve Loughran ste...@apache.org Authored: Wed Jun 25 11:22:20 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Wed Jun 25 11:22:20 2014 -0700 -- slider-assembly/src/main/scripts/slider| 74 + slider-assembly/src/main/scripts/slider.sh | 74 - 2 files changed, 74 insertions(+), 74 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/150b589b/slider-assembly/src/main/scripts/slider -- diff --git a/slider-assembly/src/main/scripts/slider b/slider-assembly/src/main/scripts/slider new file mode 100755 index 000..caf275b --- /dev/null +++ b/slider-assembly/src/main/scripts/slider @@ -0,0 +1,74 @@ +#!/usr/bin/env bash + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the License); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# this is the shell script to start Slider deploying an application +# Usage: slider action commands + +# The env variable SLIDER_JVM_OPTS can be used to override +# the default JVM opts + +function usage +{ + echo Usage: slider action arguments + echo +} + +# Slider works out its own location +this=${BASH_SOURCE-$0} +bindir=$(cd -P -- $(dirname -- $this) pwd -P) +script=$(basename -- $this) + +# lib directory is one up; it is expected to contain +# slider.jar and any other dependencies that are not in the +# standard Hadoop classpath + +slider_home=${bindir}/.. +slider_home=`cd -P ${slider_home} pwd -P` + +libdir=${slider_home}/lib +libdir=`cd -P ${libdir} pwd -P` + + +confdir=${slider_home}/conf + +# normalize the conf dir so it can be passed down +confdir=`cd -P ${confdir} pwd -P` +confdir=${SLIDER_CONF_DIR:-$confdir} + + +slider_jvm_opts=-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xmx256m -Djava.confdir=${confdir} +slider_jvm_opts=${SLIDER_JVM_OPTS:-$slider_jvm_opts} + +# allow for an extra classpath +slider_classpath_extra=${SLIDER_CLASSPATH_EXTRA:-} + +slider_classpath=${libdir}/*:${confdir}:${slider_classpath_extra} + +launcher=org.apache.slider.Slider + + +echo slider_home = \${slider_home}\ +echo slider_jvm_opts = \${slider_jvm_opts}\ +echo classpath = \${slider_classpath}\ +export CLASSPATH=${slider_classpath} +echo + +echo command is java ${slider_jvm_opts} --classpath \${slider_classpath}\ ${launcher} $@ +echo +echo +exec java ${slider_jvm_opts} ${launcher} $@ http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/150b589b/slider-assembly/src/main/scripts/slider.sh -- diff --git a/slider-assembly/src/main/scripts/slider.sh b/slider-assembly/src/main/scripts/slider.sh deleted file mode 100755 index caf275b..000 --- a/slider-assembly/src/main/scripts/slider.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env bash - -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the License); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an AS IS BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# this is the shell script to start Slider deploying an
[04/14] git commit: SLIDER-153 building up exec
SLIDER-153 building up exec Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/918e746d Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/918e746d Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/918e746d Branch: refs/heads/develop Commit: 918e746d83c4ad0f4a25bba39050942f5689599a Parents: d6131ca Author: Steve Loughran ste...@apache.org Authored: Mon Jun 23 14:40:34 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Mon Jun 23 14:40:34 2014 -0700 -- slider-assembly/src/main/scripts/slider| 1 - slider-assembly/src/main/scripts/slider.py | 109 +++- 2 files changed, 106 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/918e746d/slider-assembly/src/main/scripts/slider -- diff --git a/slider-assembly/src/main/scripts/slider b/slider-assembly/src/main/scripts/slider index e9522cf..caf275b 100755 --- a/slider-assembly/src/main/scripts/slider +++ b/slider-assembly/src/main/scripts/slider @@ -32,7 +32,6 @@ function usage this=${BASH_SOURCE-$0} bindir=$(cd -P -- $(dirname -- $this) pwd -P) script=$(basename -- $this) -this=$bin/$script # lib directory is one up; it is expected to contain # slider.jar and any other dependencies that are not in the http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/918e746d/slider-assembly/src/main/scripts/slider.py -- diff --git a/slider-assembly/src/main/scripts/slider.py b/slider-assembly/src/main/scripts/slider.py index d5891ed..e846e64 100644 --- a/slider-assembly/src/main/scripts/slider.py +++ b/slider-assembly/src/main/scripts/slider.py @@ -16,13 +16,116 @@ # See the License for the specific language governing permissions and # limitations under the License. import sys +import os import subprocess -# Slider main method +CONF = conf + +LIB = lib + +SLIDER_CONF_DIR = SLIDER_CONF_DIR +SLIDER_JVM_OPTS = SLIDER_JVM_OPTS +SLIDER_CLASSPATH_EXTRA = SLIDER_CLASSPATH_EXTRA + +SLIDER_CLASSNAME = org.apache.slider.Slider +DEFAULT_JVM__OPTS = -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xmx256m -Djava.confdir=%s + +Launches slider + + + + + + +print os.environ['HOME'] + + +def scriptDir(): + + get the script path + + return os.path.dirname(os.path.realpath(__file__)) + +def sliderDir(): + return os.path.dirname(scriptDir()) + +def libDir(sliderdir) : + return os.path.join(sliderdir, LIB) + +def confDir(sliderdir): + + determine the active configuration directory + :param sliderdir: slider directory + :return: the configuration directory -any env var will + override the relative path + + localconf = os.path.join(sliderdir, CONF) + return os.environ.get(SLIDER_CONF_DIR,localconf) + +def dirMustExist(dir): + if not os.path.exists(dir): +raise Exception(Directory does not exist: %s % dir) + return dir + + +def usage(): + print Usage: slider action arguments + return 1 + + def main(): + + Slider main method + :return: exit code of the process + + if len(sys.argv)==1 : +return usage() + args = sys.argv[1:] + slider_home = sliderDir() + libdir = dirMustExist(libDir(slider_home)) + confdir = dirMustExist(confDir(slider_home)) + default_jvm_opts = DEFAULT_JVM__OPTS % confdir + slider_jvm_opts = os.environ.get(SLIDER_JVM_OPTS, default_jvm_opts) + slider_classpath_extra = os.environ.get(SLIDER_CLASSPATH_EXTRA, ) + p = os.pathsep# path separator + d = os.sep# dir separator + slider_classpath = '' + \ + libdir + d + * + p \ + + confdir + p \ + + slider_classpath_extra \ + + '' + + print slider_home = \%s\ % slider_home + print slider_jvm_opts = \%s\ % slider_jvm_opts + print slider_classpath = \%s\ % slider_classpath + commandline = [java,] + # commandline.append(slider_jvm_opts) + commandline.append(-classpath) + commandline.append(slider_classpath) + commandline.append(SLIDER_CLASSNAME) + commandline.extend(args) + print ready to exec : %s % commandline + # docs warn of using PIPE on stderr + return subprocess.call(commandline, + stdin=None, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + shell=False) + + + + + if __name__ == '__main__': -print slider python script + print slider python script + try: rv = main() -sys.exit(rv) +if rv != 0: + print exit code = %d % rv + except Exception as e: +print Exception: %s % e.message +rv = -1 + + sys.exit(rv)
Git Push Summary
Repository: incubator-slider Updated Branches: refs/heads/feature/SLIDER-153_add_slider_py_command [deleted] 150b589b7
[25/50] [abbrv] git commit: SLIDER-153: output streaming now working
SLIDER-153: output streaming now working Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/6fc569de Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/6fc569de Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/6fc569de Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 6fc569de084dbba6a9701bba5595f557d1029484 Parents: 06816c4 Author: Steve Loughran ste...@apache.org Authored: Tue Jun 24 13:01:37 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Tue Jun 24 13:01:37 2014 -0700 -- slider-assembly/src/main/scripts/slider.py | 60 +++-- 1 file changed, 46 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6fc569de/slider-assembly/src/main/scripts/slider.py -- diff --git a/slider-assembly/src/main/scripts/slider.py b/slider-assembly/src/main/scripts/slider.py index cfad59a..1e55cc6 100644 --- a/slider-assembly/src/main/scripts/slider.py +++ b/slider-assembly/src/main/scripts/slider.py @@ -67,6 +67,26 @@ def dirMustExist(dir): raise Exception(Directory does not exist: %s % dir) return dir +def read(pipe, line): + + read a char, append to the listing if there is a char that is not \n + :param pipe: pipe to read from + :param line: line being built up + :return: (the potentially updated line, flag indicating newline reached) + + + c = pipe.read(1) + if c != : +o = c.decode('utf-8') +if o != '\n': + line += o + return line, False +else: + return line, True + else: +return line, False + + def usage(): print Usage: slider action arguments @@ -80,6 +100,7 @@ def main(): if len(sys.argv)==1 : return usage() + print stdout encoding: + sys.stdout.encoding args = sys.argv[1:] slider_home = sliderDir() libdir = dirMustExist(libDir(slider_home)) @@ -109,30 +130,41 @@ def main(): print ready to exec : %s % commandline # docs warn of using PIPE on stderr exe = subprocess.Popen(commandline, - stdin=subprocess.PIPE, + stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False) - exe.wait() + stdout = exe.stdout + stderr = exe.stderr + outline = + errline = + while exe.poll() is None: +# process is running; grab output and echo every line +outline, done = read(stdout, outline) +if done: + print outline + outline = +errline, done = read(stderr, errline) +if done: + print errline + errline = + + # get tail out, err = exe.communicate() - print stdout : , out.decode() - print stderr : , err.decode() + print outline + out.decode() + print errline + err.decode() return exe.returncode - - if __name__ == '__main__': - print slider python script + + Entry point + try: -rv = main() -if rv != 0: - print Failed with exit code = %d % rv -else: - print Success +returncode = main() except Exception as e: print Exception: %s % e.message -rv = -1 +returncode = -1 - sys.exit(rv) + sys.exit(returncode)
[09/50] [abbrv] git commit: SLIDER-159 Jenkins testEcho failing
SLIDER-159 Jenkins testEcho failing Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/537d87c2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/537d87c2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/537d87c2 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 537d87c25e20e3c11994dbfdcfcb89ba20f59859 Parents: bc0c672 Author: Steve Loughran ste...@apache.org Authored: Mon Jun 23 13:25:41 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Mon Jun 23 13:25:41 2014 -0700 -- .../services/workflow/ForkedProcessService.java | 25 .../services/workflow/LongLivedProcess.java | 13 ++ .../TestWorkflowForkedProcessService.java | 3 ++- 3 files changed, 35 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/537d87c2/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java -- diff --git a/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java index b0c503d..7e73005 100644 --- a/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java +++ b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java @@ -269,15 +269,28 @@ public class ForkedProcessService extends AbstractWorkflowExecutorService implem /** * Get the recent output from the process, or [] if not defined - * @param duration the duration, in ms, which we wait for recent output to become non-empty + * + * @param finalOutput flag to indicate wait for the final output of the process + * @param duration the duration, in ms, + * ro wait for recent output to become non-empty * @return a possibly empty list */ - public ListString getRecentOutput(int duration) { -if (process == null) return new LinkedListString(); + public ListString getRecentOutput(boolean finalOutput, int duration) { +if (process == null) { + return new LinkedListString(); +} long start = System.currentTimeMillis(); -while (process.isRecentOutputEmpty() System.currentTimeMillis() - start = duration) { +while (System.currentTimeMillis() - start = duration) { + if (finalOutput process.isFinalOutputProcessed()) { +//end of stream, break +break; + } + if (!process.isRecentOutputEmpty()) { +// there is some output +break; + } try { -Thread.sleep(20); +Thread.sleep(100); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); break; @@ -285,4 +298,6 @@ public class ForkedProcessService extends AbstractWorkflowExecutorService implem } return process.getRecentOutput(); } + + } http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/537d87c2/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java -- diff --git a/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java b/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java index 7b9863f..d9ddecb 100644 --- a/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java +++ b/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java @@ -35,6 +35,7 @@ import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; /** * Execute a long-lived process. @@ -82,6 +83,7 @@ public class LongLivedProcess implements Runnable { private final ListString recentLines = new LinkedListString(); private int recentLineLimit = RECENT_LINE_LOG_LIMIT; private LongLivedProcessLifecycleEvent lifecycleCallback; + private final AtomicBoolean finalOutputProcessed = new AtomicBoolean(false); /** @@ -347,6 +349,14 @@ public class LongLivedProcess implements Runnable { } /** + * Query to see if the final output has been processed + * @return + */ + public boolean isFinalOutputProcessed() { +return finalOutputProcessed.get(); + } + + /** * add the recent line to the list of recent lines; deleting * an earlier on if the limit is reached. * @@ -499,6 +509,9 @@ public class LongLivedProcess implements Runnable {
[06/50] [abbrv] SLIDER-157 Remove app-packages/hbase-v0_96
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/7729653f/app-packages/hbase/README.txt -- diff --git a/app-packages/hbase/README.txt b/app-packages/hbase/README.txt index 941579d..fb84750 100644 --- a/app-packages/hbase/README.txt +++ b/app-packages/hbase/README.txt @@ -17,11 +17,17 @@ How to create a Slider package for HBase? - mvn clean package -DskipTests -Phbase-app-package +Copy the tarball for HBase: + cp ~/Downloads/hbase-0.98.3-hadoop2-bin.tar.gz package/files/ +If, HBase tarball is publised in maven repository, you can use: + mvn clean package -DskipTests -Phbase-app-package App package can be found in app-packages/HBase/target/apache-slider-hbase-${hbase.version}-app-package-${slider.version}.zip +Create a zip package at the root of the package (slider enlistment/app-packages/hbase/) + zip -r hbase-v098.zip . + Verify the content using zip -Tv apache-slider-hbase-*.zip
[04/50] [abbrv] git commit: Merge branch 'feature/SLIDER_126_handle_heartbeat_failures' into develop
Merge branch 'feature/SLIDER_126_handle_heartbeat_failures' into develop Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/45f5d796 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/45f5d796 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/45f5d796 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 45f5d7968d03f24c9d6f1af03f9afb4c1925e8c7 Parents: 1a8062e 3aca57d Author: Sumit Mohanty smoha...@hortonworks.com Authored: Sat Jun 21 18:22:00 2014 -0700 Committer: Sumit Mohanty smoha...@hortonworks.com Committed: Sat Jun 21 18:22:00 2014 -0700 -- slider-agent/conf/agent.ini | 2 + .../src/main/python/agent/AgentConfig.py| 21 +++ slider-agent/src/main/python/agent/Constants.py | 3 + .../src/main/python/agent/Controller.py | 23 ++- slider-agent/src/main/python/agent/main.py | 4 + .../src/test/python/agent/TestController.py | 30 slider-agent/src/test/python/agent/TestMain.py | 5 +- .../providers/AbstractProviderService.java | 15 +- .../slider/providers/ProviderService.java | 5 +- .../slider/providers/agent/AgentKeys.java | 3 + .../providers/agent/AgentLaunchParameter.java | 130 ++ .../providers/agent/AgentProviderService.java | 179 --- .../slider/providers/agent/AgentRoles.java | 18 +- .../apache/slider/providers/agent/Command.java | 13 +- .../slider/providers/agent/CommandResult.java | 16 +- .../providers/agent/ComponentInstanceState.java | 24 +++ .../slider/providers/agent/ContainerState.java | 41 + .../providers/agent/HeartbeatMonitor.java | 116 .../server/appmaster/AMViewForProviders.java| 27 +++ .../server/appmaster/SliderAppMaster.java | 32 +++- .../slider/server/appmaster/state/AppState.java | 20 +++ .../test_command_log/appConfig_fast_no_reg.json | 29 +++ .../test_command_log/appConfig_no_hb.json | 29 +++ .../model/mock/MockProviderService.groovy | 4 +- .../agent/TestAgentLaunchParameter.java | 76 .../providers/agent/TestHeartbeatMonitor.java | 136 ++ .../publisher/TestAgentProviderService.java | 5 +- .../lifecycle/AgentCommandTestBase.groovy | 100 --- .../lifecycle/TestAgentClusterLifecycle.groovy | 2 +- .../funtest/lifecycle/TestAgentFailures.groovy | 103 +++ .../funtest/lifecycle/TestAgentFailures2.groovy | 103 +++ .../lifecycle/TestAppsThroughAgent.groovy | 90 -- 32 files changed, 1253 insertions(+), 151 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/45f5d796/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java --
[10/50] [abbrv] git commit: Merge branch 'develop' into feature/SLIDER-153_add_slider_py_command
Merge branch 'develop' into feature/SLIDER-153_add_slider_py_command Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/e519fbcc Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/e519fbcc Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/e519fbcc Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: e519fbcc645894541bdf93d1fef9ceba36ded847 Parents: 19d313d 537d87c Author: Steve Loughran ste...@apache.org Authored: Mon Jun 23 13:33:20 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Mon Jun 23 13:33:20 2014 -0700 -- app-packages/hbase-v0_96/README.txt | 33 -- app-packages/hbase-v0_96/appConfig.json | 67 .../hbase-v0_96/configuration/global.xml| 160 .../hbase-v0_96/configuration/hbase-log4j.xml | 142 .../hbase-v0_96/configuration/hbase-policy.xml | 53 --- .../hbase-v0_96/configuration/hbase-site.xml| 365 --- app-packages/hbase-v0_96/ganglia_metrics.json | 38 -- app-packages/hbase-v0_96/jmx_metrics.json | 56 --- app-packages/hbase-v0_96/metainfo.xml | 109 -- .../hbase-0.96.1-hadoop2-bin.tar.gz.REPLACE | 16 - .../hbase-v0_96/package/scripts/__init__.py | 19 - .../hbase-v0_96/package/scripts/functions.py| 40 -- .../hbase-v0_96/package/scripts/hbase.py| 125 --- .../hbase-v0_96/package/scripts/hbase_client.py | 43 --- .../hbase-v0_96/package/scripts/hbase_master.py | 63 .../package/scripts/hbase_regionserver.py | 66 .../package/scripts/hbase_service.py| 45 --- .../hbase-v0_96/package/scripts/params.py | 109 -- .../package/scripts/status_params.py| 26 -- ...-metrics2-hbase.properties-GANGLIA-MASTER.j2 | 62 ...doop-metrics2-hbase.properties-GANGLIA-RS.j2 | 62 .../package/templates/hbase-env.sh.j2 | 81 .../package/templates/hbase_client_jaas.conf.j2 | 22 -- .../package/templates/hbase_master_jaas.conf.j2 | 25 -- .../templates/hbase_regionserver_jaas.conf.j2 | 25 -- .../package/templates/regionservers.j2 | 20 - app-packages/hbase-v0_96/resources.json | 19 - app-packages/hbase/README.txt | 8 +- slider-agent/conf/agent.ini | 2 + .../src/main/python/agent/AgentConfig.py| 21 ++ slider-agent/src/main/python/agent/Constants.py | 3 + .../src/main/python/agent/Controller.py | 23 +- slider-agent/src/main/python/agent/main.py | 4 + .../src/test/python/agent/TestController.py | 30 ++ slider-agent/src/test/python/agent/TestMain.py | 5 +- .../providers/AbstractProviderService.java | 15 +- .../slider/providers/ProviderService.java | 5 +- .../slider/providers/agent/AgentKeys.java | 3 + .../providers/agent/AgentLaunchParameter.java | 130 +++ .../providers/agent/AgentProviderService.java | 179 +++-- .../slider/providers/agent/AgentRoles.java | 18 +- .../apache/slider/providers/agent/Command.java | 13 +- .../slider/providers/agent/CommandResult.java | 16 +- .../providers/agent/ComponentInstanceState.java | 24 ++ .../slider/providers/agent/ContainerState.java | 41 +++ .../providers/agent/HeartbeatMonitor.java | 116 ++ .../server/appmaster/AMViewForProviders.java| 27 ++ .../server/appmaster/SliderAppMaster.java | 32 +- .../slider/server/appmaster/state/AppState.java | 20 + .../services/workflow/ForkedProcessService.java | 25 +- .../services/workflow/LongLivedProcess.java | 13 + .../test_command_log/appConfig_fast_no_reg.json | 29 ++ .../test_command_log/appConfig_no_hb.json | 29 ++ .../model/mock/MockProviderService.groovy | 4 +- .../agent/TestAgentLaunchParameter.java | 76 .../providers/agent/TestHeartbeatMonitor.java | 136 +++ .../publisher/TestAgentProviderService.java | 5 +- .../TestWorkflowForkedProcessService.java | 3 +- .../lifecycle/AgentCommandTestBase.groovy | 100 +++-- .../lifecycle/TestAgentClusterLifecycle.groovy | 2 +- .../funtest/lifecycle/TestAgentFailures.groovy | 103 ++ .../funtest/lifecycle/TestAgentFailures2.groovy | 103 ++ .../lifecycle/TestAppsThroughAgent.groovy | 90 ++--- .../providers/hbase/HBaseProviderService.java | 13 +- .../slider_specs/creating_app_definitions.md| 80 ++-- 65 files changed, 1349 insertions(+), 2088 deletions(-) --
[17/50] [abbrv] git commit: SLIDER-153 python script working: stdout and stderr is being printed after the end of the process
SLIDER-153 python script working: stdout and stderr is being printed after the end of the process Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/06816c4c Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/06816c4c Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/06816c4c Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 06816c4cd6ffbb94014ff95250f26c5028723a09 Parents: acdfe5b Author: Steve Loughran ste...@apache.org Authored: Tue Jun 24 10:52:10 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Tue Jun 24 10:52:10 2014 -0700 -- slider-assembly/src/main/scripts/slider.py | 28 - 1 file changed, 18 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/06816c4c/slider-assembly/src/main/scripts/slider.py -- diff --git a/slider-assembly/src/main/scripts/slider.py b/slider-assembly/src/main/scripts/slider.py index 2c1f4b3..cfad59a 100644 --- a/slider-assembly/src/main/scripts/slider.py +++ b/slider-assembly/src/main/scripts/slider.py @@ -97,21 +97,27 @@ def main(): print slider_home = \%s\ % slider_home print slider_jvm_opts = \%s\ % slider_jvm_opts print slider_classpath = \%s\ % slider_classpath - - - commandline = [java,] + + #java = /usr/bin/java + java = java + commandline = [java, + -classpath, + slider_classpath, + SLIDER_CLASSNAME] # commandline.append(slider_jvm_opts) - commandline.append(-classpath) - commandline.append(slider_classpath) - commandline.append(SLIDER_CLASSNAME) commandline.extend(args) print ready to exec : %s % commandline # docs warn of using PIPE on stderr - return subprocess.call(commandline, - stdin=None, + exe = subprocess.Popen(commandline, + stdin=subprocess.PIPE, stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, + stderr=subprocess.PIPE, shell=False) + exe.wait() + out, err = exe.communicate() + print stdout : , out.decode() + print stderr : , err.decode() + return exe.returncode @@ -122,7 +128,9 @@ if __name__ == '__main__': try: rv = main() if rv != 0: - print exit code = %d % rv + print Failed with exit code = %d % rv +else: + print Success except Exception as e: print Exception: %s % e.message rv = -1
[14/50] [abbrv] git commit: SLIDER-106 funtest properties skipped by default
SLIDER-106 funtest properties skipped by default Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/153f5e94 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/153f5e94 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/153f5e94 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 153f5e94b64a45e97c4b0494755472788455d678 Parents: 537d87c Author: Steve Loughran ste...@apache.org Authored: Mon Jun 23 16:19:49 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Mon Jun 23 16:19:49 2014 -0700 -- slider-funtest/pom.xml | 34 ++ 1 file changed, 34 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/153f5e94/slider-funtest/pom.xml -- diff --git a/slider-funtest/pom.xml b/slider-funtest/pom.xml index 42a57b2..51b5cec 100644 --- a/slider-funtest/pom.xml +++ b/slider-funtest/pom.xml @@ -265,5 +265,39 @@ /dependencies + profiles +profile + idtests-on-from-CLI/id + activation +property + nameslider.conf.dir/name +/property + /activation + properties +maven.test.skipfalse/maven.test.skip + /properties +/profile +profile + idtests-on-from-build.properties/id + activation +file + exists../build.properties/exists +/file + /activation + properties +maven.test.skipfalse/maven.test.skip + /properties +/profile +profile + idtests-off/id + activation +activeByDefaulttrue/activeByDefault + /activation + properties +maven.test.skiptrue/maven.test.skip + /properties +/profile + + /profiles /project
[36/50] [abbrv] git commit: SLIDER-153 revert rename - slider for bash
SLIDER-153 revert rename - slider for bash Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/150b589b Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/150b589b Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/150b589b Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 150b589b72dae4c4b857a6b19205f6ce11f63d39 Parents: 1c5f303 Author: Steve Loughran ste...@apache.org Authored: Wed Jun 25 11:22:20 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Wed Jun 25 11:22:20 2014 -0700 -- slider-assembly/src/main/scripts/slider| 74 + slider-assembly/src/main/scripts/slider.sh | 74 - 2 files changed, 74 insertions(+), 74 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/150b589b/slider-assembly/src/main/scripts/slider -- diff --git a/slider-assembly/src/main/scripts/slider b/slider-assembly/src/main/scripts/slider new file mode 100755 index 000..caf275b --- /dev/null +++ b/slider-assembly/src/main/scripts/slider @@ -0,0 +1,74 @@ +#!/usr/bin/env bash + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the License); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# this is the shell script to start Slider deploying an application +# Usage: slider action commands + +# The env variable SLIDER_JVM_OPTS can be used to override +# the default JVM opts + +function usage +{ + echo Usage: slider action arguments + echo +} + +# Slider works out its own location +this=${BASH_SOURCE-$0} +bindir=$(cd -P -- $(dirname -- $this) pwd -P) +script=$(basename -- $this) + +# lib directory is one up; it is expected to contain +# slider.jar and any other dependencies that are not in the +# standard Hadoop classpath + +slider_home=${bindir}/.. +slider_home=`cd -P ${slider_home} pwd -P` + +libdir=${slider_home}/lib +libdir=`cd -P ${libdir} pwd -P` + + +confdir=${slider_home}/conf + +# normalize the conf dir so it can be passed down +confdir=`cd -P ${confdir} pwd -P` +confdir=${SLIDER_CONF_DIR:-$confdir} + + +slider_jvm_opts=-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xmx256m -Djava.confdir=${confdir} +slider_jvm_opts=${SLIDER_JVM_OPTS:-$slider_jvm_opts} + +# allow for an extra classpath +slider_classpath_extra=${SLIDER_CLASSPATH_EXTRA:-} + +slider_classpath=${libdir}/*:${confdir}:${slider_classpath_extra} + +launcher=org.apache.slider.Slider + + +echo slider_home = \${slider_home}\ +echo slider_jvm_opts = \${slider_jvm_opts}\ +echo classpath = \${slider_classpath}\ +export CLASSPATH=${slider_classpath} +echo + +echo command is java ${slider_jvm_opts} --classpath \${slider_classpath}\ ${launcher} $@ +echo +echo +exec java ${slider_jvm_opts} ${launcher} $@ http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/150b589b/slider-assembly/src/main/scripts/slider.sh -- diff --git a/slider-assembly/src/main/scripts/slider.sh b/slider-assembly/src/main/scripts/slider.sh deleted file mode 100755 index caf275b..000 --- a/slider-assembly/src/main/scripts/slider.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env bash - -# 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.
[39/50] [abbrv] git commit: SLIDER-173 When host is specified in ContainerRequest, relaxLocality should be false
SLIDER-173 When host is specified in ContainerRequest, relaxLocality should be false Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/22c9689e Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/22c9689e Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/22c9689e Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 22c9689e648a13f09dda9e78337ebd5afe7f0a47 Parents: 9619c33 Author: tedyu yuzhih...@gmail.com Authored: Wed Jun 25 19:13:07 2014 -0700 Committer: tedyu yuzhih...@gmail.com Committed: Wed Jun 25 19:13:07 2014 -0700 -- .../slider/server/appmaster/state/OutstandingRequest.java | 2 +- .../org/apache/slider/server/appmaster/state/RoleHistory.java | 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/22c9689e/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java -- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java index 7d3e427..45dd9d1 100644 --- a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java @@ -108,7 +108,7 @@ public final class OutstandingRequest { if (node != null) { hosts = new String[1]; hosts[0] = node.hostname; - relaxLocality = true; + relaxLocality = false; locationSpecified = true; // tell the node it is in play node.getOrCreate(roleId); http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/22c9689e/slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleHistory.java -- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleHistory.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleHistory.java index 68e7693..990d735 100644 --- a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleHistory.java +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleHistory.java @@ -29,6 +29,7 @@ import org.apache.slider.core.exceptions.BadConfigException; import org.apache.slider.providers.ProviderRole; import org.apache.slider.server.avro.RoleHistoryHeader; import org.apache.slider.server.avro.RoleHistoryWriter; +import org.mortbay.log.Log; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -468,12 +469,17 @@ public class RoleHistory { NodeInstance nodeInstance = null; ListNodeInstance targets = getNodesForRoleId(roleKey); +int cnt = targets == null ? 0 : targets.size(); +Log.info(There're + cnt + nodes to consider for + role.getName()); while (targets != null !targets.isEmpty() nodeInstance == null) { NodeInstance head = targets.remove(0); if (head.getActiveRoleInstances(roleKey) == 0) { nodeInstance = head; } } +if (nodeInstance == null) { + Log.debug(No node selected for + role.getName()); +} return nodeInstance; }
[05/50] [abbrv] git commit: SLIDER-156 Utilize multiple log directories when possible
SLIDER-156 Utilize multiple log directories when possible Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/57a9c9f8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/57a9c9f8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/57a9c9f8 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 57a9c9f88d7bc41ee80320dd146244be5c3d420f Parents: 45f5d79 Author: tedyu yuzhih...@gmail.com Authored: Sun Jun 22 17:52:20 2014 -0700 Committer: tedyu yuzhih...@gmail.com Committed: Sun Jun 22 17:52:20 2014 -0700 -- .../slider/providers/hbase/HBaseProviderService.java | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/57a9c9f8/slider-providers/hbase/slider-hbase-provider/src/main/java/org/apache/slider/providers/hbase/HBaseProviderService.java -- diff --git a/slider-providers/hbase/slider-hbase-provider/src/main/java/org/apache/slider/providers/hbase/HBaseProviderService.java b/slider-providers/hbase/slider-hbase-provider/src/main/java/org/apache/slider/providers/hbase/HBaseProviderService.java index 5405753..a578441 100644 --- a/slider-providers/hbase/slider-hbase-provider/src/main/java/org/apache/slider/providers/hbase/HBaseProviderService.java +++ b/slider-providers/hbase/slider-hbase-provider/src/main/java/org/apache/slider/providers/hbase/HBaseProviderService.java @@ -60,6 +60,7 @@ import java.net.URL; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Random; import static org.apache.slider.server.appmaster.web.rest.RestPaths.SLIDER_PATH_PUBLISHER; @@ -127,9 +128,16 @@ public class HBaseProviderService extends AbstractProviderService implements // Set the environment launcher.putEnv(SliderUtils.buildEnvMap(appComponent)); -String logDir = providerUtils.getLogdir(); -int idx = logDir.indexOf(,); -launcher.setEnv(HBASE_LOG_DIR, idx 0 ? logDir.substring(0, idx) : logDir); +String logDirs = providerUtils.getLogdir(); +String logDir; +int idx = logDirs.indexOf(,); +if (idx 0) { + // randomly choose a log dir candidate + String[] segments = logDirs.split(,); + Random rand = new Random(); + logDir = segments[rand.nextInt(segments.length)]; +} else logDir = logDirs; +launcher.setEnv(HBASE_LOG_DIR, logDir); launcher.setEnv(PROPAGATED_CONFDIR, ProviderUtils.convertToAppRelativePath(
[34/50] [abbrv] git commit: SLIDER-169 Change proxy-user cookie log to DEBUG
SLIDER-169 Change proxy-user cookie log to DEBUG Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/93bd8ce6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/93bd8ce6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/93bd8ce6 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 93bd8ce6f3ef3ab7e94a4ab7298c321549de1565 Parents: 1866733 Author: tedyu yuzhih...@gmail.com Authored: Wed Jun 25 10:24:42 2014 -0700 Committer: tedyu yuzhih...@gmail.com Committed: Wed Jun 25 10:24:42 2014 -0700 -- .../org/apache/slider/server/appmaster/web/SliderAmIpFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/93bd8ce6/slider-core/src/main/java/org/apache/slider/server/appmaster/web/SliderAmIpFilter.java -- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/web/SliderAmIpFilter.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/web/SliderAmIpFilter.java index dec89d1..fc96284 100644 --- a/slider-core/src/main/java/org/apache/slider/server/appmaster/web/SliderAmIpFilter.java +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/web/SliderAmIpFilter.java @@ -121,7 +121,7 @@ public class SliderAmIpFilter implements Filter { } try { if (user == null) { -log.warn(Could not find + WebAppProxyServlet.PROXY_USER_COOKIE_NAME +log.debug(Could not find + WebAppProxyServlet.PROXY_USER_COOKIE_NAME + cookie, so user will not be set); chain.doFilter(req, resp); } else {
[50/50] [abbrv] git commit: Merge branch 'develop' into feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it
Merge branch 'develop' into feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/81a85495 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/81a85495 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/81a85495 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 81a85495de9dcbf6aed1a37594d0e29b95a180d5 Parents: 6f5c5fa 0ad4fb4 Author: Steve Loughran ste...@apache.org Authored: Mon Jun 30 16:16:30 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Mon Jun 30 16:16:30 2014 +0100 -- .gitignore | 10 +- LICENSE | 423 LICENSE.txt | 423 NOTICE |5 + NOTICE.txt |5 - app-packages/accumulo-v1_5/README.txt | 33 - app-packages/accumulo-v1_5/appConfig.json | 62 -- .../configuration/accumulo-site.xml | 111 -- .../accumulo-v1_5/configuration/global.xml | 94 -- app-packages/accumulo-v1_5/jmx_metrics.json | 41 - app-packages/accumulo-v1_5/metainfo.xml | 145 --- .../files/accumulo-1.5.1-bin.tar.gz.REPLACE | 14 - .../package/files/accumulo-metrics.xml | 60 -- .../accumulo-v1_5/package/files/auditLog.xml| 41 - app-packages/accumulo-v1_5/package/files/gc | 16 - .../package/files/generic_logger.xml| 83 -- .../package/files/log4j.properties | 41 - .../accumulo-v1_5/package/files/masters | 16 - .../accumulo-v1_5/package/files/monitor | 16 - .../package/files/monitor_logger.xml| 64 -- app-packages/accumulo-v1_5/package/files/slaves | 16 - .../accumulo-v1_5/package/files/tracers | 16 - .../accumulo-v1_5/package/scripts/__init__.py | 19 - .../package/scripts/accumulo_client.py | 43 - .../package/scripts/accumulo_configuration.py | 134 --- .../package/scripts/accumulo_gc.py | 24 - .../package/scripts/accumulo_master.py | 24 - .../package/scripts/accumulo_monitor.py | 24 - .../package/scripts/accumulo_script.py | 110 -- .../package/scripts/accumulo_service.py | 52 - .../package/scripts/accumulo_tracer.py | 24 - .../package/scripts/accumulo_tserver.py | 24 - .../accumulo-v1_5/package/scripts/params.py | 72 -- .../package/scripts/status_params.py| 26 - .../package/templates/accumulo-env.sh.j2| 42 - app-packages/accumulo-v1_5/resources.json | 31 - app-packages/accumulo/LICENSE.txt | 261 + app-packages/accumulo/NOTICE.txt|8 + app-packages/accumulo/README.txt| 47 + app-packages/accumulo/appConfig.json| 62 ++ .../accumulo/configuration/accumulo-site.xml| 111 ++ app-packages/accumulo/configuration/global.xml | 94 ++ app-packages/accumulo/jmx_metrics.json | 41 + app-packages/accumulo/metainfo.xml | 147 +++ .../accumulo/package/files/accumulo-metrics.xml | 60 ++ .../accumulo/package/files/auditLog.xml | 41 + app-packages/accumulo/package/files/gc | 16 + .../accumulo/package/files/generic_logger.xml | 83 ++ .../accumulo/package/files/log4j.properties | 41 + app-packages/accumulo/package/files/masters | 16 + app-packages/accumulo/package/files/monitor | 16 + .../accumulo/package/files/monitor_logger.xml | 64 ++ app-packages/accumulo/package/files/slaves | 16 + app-packages/accumulo/package/files/tracers | 16 + .../accumulo/package/scripts/__init__.py| 19 + .../accumulo/package/scripts/accumulo_client.py | 43 + .../package/scripts/accumulo_configuration.py | 135 +++ .../accumulo/package/scripts/accumulo_gc.py | 24 + .../accumulo/package/scripts/accumulo_master.py | 24 + .../package/scripts/accumulo_monitor.py | 24 + .../accumulo/package/scripts/accumulo_script.py | 110 ++ .../package/scripts/accumulo_service.py | 52 + .../accumulo/package/scripts/accumulo_tracer.py | 24 + .../package/scripts/accumulo_tserver.py | 24 + app-packages/accumulo/package/scripts/params.py | 76 ++ .../accumulo/package/scripts/status_params.py | 26 + .../package/templates/accumulo-env.sh.j2| 42 + app-packages/accumulo/pom.xml | 93 ++ app-packages/accumulo/resources.json| 31 + app-packages/accumulo/src/assembly/accumulo.xml | 71 ++ app-packages/hbase-v0_96/README.txt | 33 -
[45/50] [abbrv] git commit: SLIDER-173 relaxLocality should be false if specific node is requested
SLIDER-173 relaxLocality should be false if specific node is requested Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/590cbe02 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/590cbe02 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/590cbe02 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 590cbe02a805362242657f1c3be3b60fe0ab7825 Parents: ea251f1 Author: tedyu yuzhih...@gmail.com Authored: Thu Jun 26 19:23:35 2014 -0700 Committer: tedyu yuzhih...@gmail.com Committed: Thu Jun 26 19:23:35 2014 -0700 -- .../slider/server/appmaster/state/ContainerPriority.java | 8 ++-- .../slider/server/appmaster/state/OutstandingRequest.java| 7 ++- .../appmaster/model/appstate/TestMockRMOperations.groovy | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/590cbe02/slider-core/src/main/java/org/apache/slider/server/appmaster/state/ContainerPriority.java -- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/ContainerPriority.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/ContainerPriority.java index ccd9a64..935c09f 100644 --- a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/ContainerPriority.java +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/ContainerPriority.java @@ -37,9 +37,13 @@ import org.apache.hadoop.yarn.util.Records; */ public final class ContainerPriority { + // bit that represents whether location is specified + static final int LOCATION = 1 30; + public static int buildPriority(int role, boolean locationSpecified) { -return (role) ; +int location = locationSpecified ? LOCATION : 0; +return role | LOCATION; } @@ -53,7 +57,7 @@ public final class ContainerPriority { public static int extractRole(int priority) { -return priority ; +return priority = LOCATION ? priority^LOCATION : priority; } /** http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/590cbe02/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java -- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java index 7d3e427..0d8b56c 100644 --- a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java @@ -103,23 +103,20 @@ public final class OutstandingRequest { RoleStatus role, long time) { String[] hosts; boolean relaxLocality; -boolean locationSpecified; requestedTime = time; if (node != null) { hosts = new String[1]; hosts[0] = node.hostname; - relaxLocality = true; - locationSpecified = true; + relaxLocality = false; // tell the node it is in play node.getOrCreate(roleId); log.info(Submitting request for container on {}, hosts[0]); } else { hosts = null; relaxLocality = true; - locationSpecified = false; } Priority pri = ContainerPriority.createPriority(roleId, -locationSpecified); +!relaxLocality); AMRMClient.ContainerRequest request = new AMRMClient.ContainerRequest(resource, hosts, http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/590cbe02/slider-core/src/test/groovy/org/apache/slider/server/appmaster/model/appstate/TestMockRMOperations.groovy -- diff --git a/slider-core/src/test/groovy/org/apache/slider/server/appmaster/model/appstate/TestMockRMOperations.groovy b/slider-core/src/test/groovy/org/apache/slider/server/appmaster/model/appstate/TestMockRMOperations.groovy index 7f92f9c..168ac9f 100644 --- a/slider-core/src/test/groovy/org/apache/slider/server/appmaster/model/appstate/TestMockRMOperations.groovy +++ b/slider-core/src/test/groovy/org/apache/slider/server/appmaster/model/appstate/TestMockRMOperations.groovy @@ -41,7 +41,7 @@ class TestMockRMOperations extends BaseMockAppStateTest implements MockRoles { @Test public void testPriorityOnly() throws Throwable { -assert 5 == buildPriority(5, false) +assert 5 ==
[28/50] [abbrv] git commit: Modify README.txt for HBase app package
Modify README.txt for HBase app package Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/3be6c869 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/3be6c869 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/3be6c869 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 3be6c86922d0413163e65766d827bfcc03d60f88 Parents: 209cee4 Author: tedyu yuzhih...@gmail.com Authored: Tue Jun 24 14:00:22 2014 -0700 Committer: tedyu yuzhih...@gmail.com Committed: Tue Jun 24 14:00:22 2014 -0700 -- app-packages/hbase/README.txt | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/3be6c869/app-packages/hbase/README.txt -- diff --git a/app-packages/hbase/README.txt b/app-packages/hbase/README.txt index fb84750..78d033e 100644 --- a/app-packages/hbase/README.txt +++ b/app-packages/hbase/README.txt @@ -17,10 +17,17 @@ How to create a Slider package for HBase? +The version of HBase used for the app package can be adjusted by adding a +flag such as + -Dhbase.version=0.98.3 + Copy the tarball for HBase: cp ~/Downloads/hbase-0.98.3-hadoop2-bin.tar.gz package/files/ -If, HBase tarball is publised in maven repository, you can use: +Use the following command to install HBase tarball locally: + mvn install:install-file -Dfile=path-to-tarball -DgroupId=org.apache.hbase -DartifactId=hbase -Dversion=0.98.3-hadoop2 -Dclassifier=bin -Dpackaging=tar.gz + +After HBase tarball is publised locally in maven repository, you can use the following command: mvn clean package -DskipTests -Phbase-app-package App package can be found in app-packages/HBase/target/apache-slider-hbase-${hbase.version}-app-package-${slider.version}.zip @@ -36,10 +43,6 @@ work well as the default configuration for Slider apps. So it is advisable that when you create an application package for Slider, include sample/default resources.json and appConfig.json for a minimal Yarn cluster. -The version of HBase used for the app package can be adjusted by adding a -flag such as - -Dhbase.version=0.98.3 - If an HBase version older than 0.98.3 is desired, it must be installed in the local maven repo.
[42/50] [abbrv] git commit: SLIDER-96. Fixes to some tests.
SLIDER-96. Fixes to some tests. Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/78a1364b Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/78a1364b Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/78a1364b Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 78a1364b1c52453f029d3afdedfd1fc6e9fb6ebb Parents: b64e1cd Author: Sumit Mohanty smoha...@hortonworks.com Authored: Thu Jun 26 07:21:28 2014 -0700 Committer: Sumit Mohanty smoha...@hortonworks.com Committed: Thu Jun 26 13:41:31 2014 -0700 -- .../slider/providers/agent/AgentTestBase.groovy | 2 +- .../providers/agent/TestBuildBasicAgent.groovy | 73 ++-- 2 files changed, 36 insertions(+), 39 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/78a1364b/slider-core/src/test/groovy/org/apache/slider/providers/agent/AgentTestBase.groovy -- diff --git a/slider-core/src/test/groovy/org/apache/slider/providers/agent/AgentTestBase.groovy b/slider-core/src/test/groovy/org/apache/slider/providers/agent/AgentTestBase.groovy index bb3eabe..9b4c377 100644 --- a/slider-core/src/test/groovy/org/apache/slider/providers/agent/AgentTestBase.groovy +++ b/slider-core/src/test/groovy/org/apache/slider/providers/agent/AgentTestBase.groovy @@ -47,7 +47,7 @@ public abstract class AgentTestBase extends YarnZKMiniClusterTestBase { @Rule public TemporaryFolder folder = new TemporaryFolder(); - public static String app_def_pkg_path; + public String app_def_pkg_path; @Before public void setupAppPkg() { http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/78a1364b/slider-core/src/test/groovy/org/apache/slider/providers/agent/TestBuildBasicAgent.groovy -- diff --git a/slider-core/src/test/groovy/org/apache/slider/providers/agent/TestBuildBasicAgent.groovy b/slider-core/src/test/groovy/org/apache/slider/providers/agent/TestBuildBasicAgent.groovy index 1879f84..9f44888 100644 --- a/slider-core/src/test/groovy/org/apache/slider/providers/agent/TestBuildBasicAgent.groovy +++ b/slider-core/src/test/groovy/org/apache/slider/providers/agent/TestBuildBasicAgent.groovy @@ -38,34 +38,31 @@ import static org.apache.slider.providers.agent.AgentKeys.* @Slf4j class TestBuildBasicAgent extends AgentTestBase { static String TEST_FILES = ./src/test/resources/org/apache/slider/providers/agent/tests/ + static File slider_core = new File(new File(.).absoluteFile, src/test/python); + static String bad_app_def = appdef_1.tar + static File bad_app_def_path = new File(slider_core, bad_app_def) + static String agt_conf = agent.ini + static File agt_conf_path = new File(slider_core, agt_conf) @Override void checkTestAssumptions(YarnConfiguration conf) { } - private static class TestResources { -static File slider_core = new File(new File(.).absoluteFile, src/test/python); -static String bad_app_def = appdef_1.tar -static File bad_app_def_path = new File(slider_core, bad_app_def) -static String agt_conf = agent.ini -static File agt_conf_path = new File(slider_core, agt_conf) - -public static File getAppDef() { - return new File(app_def_pkg_path); -} + private File getAppDef() { +return new File(app_def_pkg_path); + } -public static File getBadAppDef() { - return bad_app_def_path; -} + private File getBadAppDef() { +return bad_app_def_path; + } -public static File getAgentConf() { - return agt_conf_path; -} + private File getAgentConf() { +return agt_conf_path; + } -public static File getAgentImg() { - return new File(app_def_pkg_path); -} + private File getAgentImg() { +return new File(app_def_pkg_path); } @@ -86,8 +83,8 @@ class TestBuildBasicAgent extends AgentTestBase { [ ARG_OPTION, CONTROLLER_URL, http://localhost;, ARG_PACKAGE, ., -ARG_OPTION, APP_DEF, file:// + TestResources.getAppDef().absolutePath, -ARG_OPTION, AGENT_CONF, file:// + TestResources.getAgentConf().absolutePath, +ARG_OPTION, APP_DEF, file:// + getAppDef().absolutePath, +ARG_OPTION, AGENT_CONF, file:// + getAgentConf().absolutePath, ARG_OPTION, SCRIPT_PATH, agent/scripts/agent.py, ARG_COMP_OPT, ROLE_NODE, SCRIPT_PATH, agent/scripts/agent.py, ARG_RES_COMP_OPT, ROLE_NODE, ResourceKeys.COMPONENT_PRIORITY, 1, @@ -106,8 +103,8 @@ class TestBuildBasicAgent extends AgentTestBase { [ ARG_OPTION, CONTROLLER_URL, http://localhost;,
[29/50] [abbrv] git commit: SLIDER-153 bin/slider is now python
SLIDER-153 bin/slider is now python Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/6f05995e Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/6f05995e Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/6f05995e Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 6f05995e42c767062500da68759f75e7f66fd05c Parents: 8a8ffd9 Author: Steve Loughran ste...@apache.org Authored: Tue Jun 24 16:08:58 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Tue Jun 24 16:08:58 2014 -0700 -- slider-assembly/src/main/scripts/slider| 217 +--- slider-assembly/src/main/scripts/slider.py | 169 -- slider-assembly/src/main/scripts/slider.sh | 74 3 files changed, 230 insertions(+), 230 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6f05995e/slider-assembly/src/main/scripts/slider -- diff --git a/slider-assembly/src/main/scripts/slider b/slider-assembly/src/main/scripts/slider old mode 100755 new mode 100644 index caf275b..d48eca6 --- a/slider-assembly/src/main/scripts/slider +++ b/slider-assembly/src/main/scripts/slider @@ -1,5 +1,6 @@ -#!/usr/bin/env bash - +#!/usr/bin/env python +# -*- coding: 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. @@ -7,68 +8,162 @@ # (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 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an AS IS BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - - -# this is the shell script to start Slider deploying an application -# Usage: slider action commands - -# The env variable SLIDER_JVM_OPTS can be used to override -# the default JVM opts - -function usage -{ - echo Usage: slider action arguments - echo -} - -# Slider works out its own location -this=${BASH_SOURCE-$0} -bindir=$(cd -P -- $(dirname -- $this) pwd -P) -script=$(basename -- $this) - -# lib directory is one up; it is expected to contain -# slider.jar and any other dependencies that are not in the -# standard Hadoop classpath - -slider_home=${bindir}/.. -slider_home=`cd -P ${slider_home} pwd -P` - -libdir=${slider_home}/lib -libdir=`cd -P ${libdir} pwd -P` - - -confdir=${slider_home}/conf - -# normalize the conf dir so it can be passed down -confdir=`cd -P ${confdir} pwd -P` -confdir=${SLIDER_CONF_DIR:-$confdir} - - -slider_jvm_opts=-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xmx256m -Djava.confdir=${confdir} -slider_jvm_opts=${SLIDER_JVM_OPTS:-$slider_jvm_opts} - -# allow for an extra classpath -slider_classpath_extra=${SLIDER_CLASSPATH_EXTRA:-} - -slider_classpath=${libdir}/*:${confdir}:${slider_classpath_extra} - -launcher=org.apache.slider.Slider - - -echo slider_home = \${slider_home}\ -echo slider_jvm_opts = \${slider_jvm_opts}\ -echo classpath = \${slider_classpath}\ -export CLASSPATH=${slider_classpath} -echo - -echo command is java ${slider_jvm_opts} --classpath \${slider_classpath}\ ${launcher} $@ -echo -echo -exec java ${slider_jvm_opts} ${launcher} $@ +import sys +import os +import subprocess + +CONF = conf + +LIB = lib + +SLIDER_CONF_DIR = SLIDER_CONF_DIR +SLIDER_JVM_OPTS = SLIDER_JVM_OPTS +SLIDER_CLASSPATH_EXTRA = SLIDER_CLASSPATH_EXTRA + +SLIDER_CLASSNAME = org.apache.slider.Slider +DEFAULT_JVM__OPTS = -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xmx256m -Djava.confdir=%s + + +Launches slider + + + + + + +def scriptDir(): + + get the script path + + return os.path.dirname(os.path.realpath(__file__)) + +def sliderDir(): + return os.path.dirname(scriptDir()) + +def libDir(sliderdir) : + return os.path.join(sliderdir, LIB) + +def confDir(sliderdir): + + determine the active configuration directory + :param sliderdir: slider directory + :return: the configuration directory -any env var will + override the relative path + + localconf = os.path.join(sliderdir, CONF) + return os.environ.get(SLIDER_CONF_DIR,localconf) + +def dirMustExist(dir): + if not os.path.exists(dir): +raise Exception(Directory does not exist: %s % dir) + return dir + +def read(pipe, line): + + read a char, append to
[13/50] [abbrv] git commit: SLIDER-153 more on execing scripts
SLIDER-153 more on execing scripts Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/acdfe5bd Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/acdfe5bd Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/acdfe5bd Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: acdfe5bd6dfe59daca573a5e28271d9950467b16 Parents: 918e746 Author: Steve Loughran ste...@apache.org Authored: Mon Jun 23 14:47:28 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Mon Jun 23 14:47:28 2014 -0700 -- slider-assembly/src/main/scripts/slider.py | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/acdfe5bd/slider-assembly/src/main/scripts/slider.py -- diff --git a/slider-assembly/src/main/scripts/slider.py b/slider-assembly/src/main/scripts/slider.py index e846e64..2c1f4b3 100644 --- a/slider-assembly/src/main/scripts/slider.py +++ b/slider-assembly/src/main/scripts/slider.py @@ -89,11 +89,10 @@ def main(): slider_classpath_extra = os.environ.get(SLIDER_CLASSPATH_EXTRA, ) p = os.pathsep# path separator d = os.sep# dir separator - slider_classpath = '' + \ - libdir + d + * + p \ + slider_classpath = libdir + d + * + p \ + confdir + p \ - + slider_classpath_extra \ - + '' + + slider_classpath_extra + print slider_home = \%s\ % slider_home print slider_jvm_opts = \%s\ % slider_jvm_opts @@ -111,7 +110,7 @@ def main(): return subprocess.call(commandline, stdin=None, stdout=subprocess.PIPE, - stderr=subprocess.PIPE, + stderr=subprocess.STDOUT, shell=False)
[26/50] [abbrv] git commit: SLIDER-153 fix shebang line
SLIDER-153 fix shebang line Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/77f3e021 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/77f3e021 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/77f3e021 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 77f3e02186cf1e55857eb991c216e94ef4f85c49 Parents: 6fc569d Author: Steve Loughran ste...@apache.org Authored: Tue Jun 24 13:18:50 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Tue Jun 24 13:18:50 2014 -0700 -- slider-assembly/src/main/scripts/slider.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/77f3e021/slider-assembly/src/main/scripts/slider.py -- diff --git a/slider-assembly/src/main/scripts/slider.py b/slider-assembly/src/main/scripts/slider.py index 1e55cc6..77c39aa 100644 --- a/slider-assembly/src/main/scripts/slider.py +++ b/slider-assembly/src/main/scripts/slider.py @@ -1,4 +1,4 @@ -# !/usr/bin/env python +#!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one or more
[47/50] [abbrv] git commit: SLIDER-173 Container requests for the same role should utilize different nodes - add more logs
SLIDER-173 Container requests for the same role should utilize different nodes - add more logs Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/581c182b Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/581c182b Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/581c182b Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 581c182beccc24bbc720b363ba42ea927b09e84f Parents: 736a9c7 Author: tedyu yuzhih...@gmail.com Authored: Fri Jun 27 09:29:32 2014 -0700 Committer: tedyu yuzhih...@gmail.com Committed: Fri Jun 27 09:29:32 2014 -0700 -- .../org/apache/slider/server/appmaster/state/RoleHistory.java | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/581c182b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleHistory.java -- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleHistory.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleHistory.java index 990d735..0cd2b39 100644 --- a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleHistory.java +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleHistory.java @@ -406,6 +406,7 @@ public class RoleHistory { for (int i = 0; i roleSize; i++) { NodeEntry nodeEntry = ni.get(i); if (nodeEntry != null nodeEntry.isAvailable()) { + log.debug(Adding {} for role {}, ni, i); getOrCreateNodesForRoleId(i).add(ni); } } @@ -470,7 +471,7 @@ public class RoleHistory { ListNodeInstance targets = getNodesForRoleId(roleKey); int cnt = targets == null ? 0 : targets.size(); -Log.info(There're + cnt + nodes to consider for + role.getName()); +log.info(There're {} nodes to consider for {}, cnt, role.getName()); while (targets != null !targets.isEmpty() nodeInstance == null) { NodeInstance head = targets.remove(0); if (head.getActiveRoleInstances(roleKey) == 0) { @@ -478,7 +479,7 @@ public class RoleHistory { } } if (nodeInstance == null) { - Log.debug(No node selected for + role.getName()); + log.debug(No node selected for {}, role.getName()); } return nodeInstance; } @@ -597,6 +598,7 @@ public class RoleHistory { hosts = outstandingRequests.cancelOutstandingRequests(role); if (!hosts.isEmpty()) { //add the list +log.debug(Adding {} hosts for role {}, hosts.size(), role); getOrCreateNodesForRoleId(role).addAll(hosts); sortAvailableNodeList(role); }
[37/50] [abbrv] git commit: Merge branch 'feature/SLIDER-153_add_slider_py_command' into develop
Merge branch 'feature/SLIDER-153_add_slider_py_command' into develop Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/7089fa0f Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/7089fa0f Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/7089fa0f Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 7089fa0fbd6d1cb8c92eb1a360cdd82429321bdf Parents: 1866733 150b589 Author: Steve Loughran ste...@apache.org Authored: Wed Jun 25 11:22:59 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Wed Jun 25 11:22:59 2014 -0700 -- slider-assembly/src/main/scripts/slider| 1 - slider-assembly/src/main/scripts/slider.py | 169 2 files changed, 169 insertions(+), 1 deletion(-) --
[11/50] [abbrv] git commit: SLIDER-153 stub main()
SLIDER-153 stub main() Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/d6131ca4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/d6131ca4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/d6131ca4 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: d6131ca426bee6e8aa9819a377bb82345fc97b56 Parents: e519fbc Author: Steve Loughran ste...@apache.org Authored: Mon Jun 23 13:41:18 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Mon Jun 23 13:41:18 2014 -0700 -- slider-assembly/src/main/scripts/slider.py | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/d6131ca4/slider-assembly/src/main/scripts/slider.py -- diff --git a/slider-assembly/src/main/scripts/slider.py b/slider-assembly/src/main/scripts/slider.py index f154210..d5891ed 100644 --- a/slider-assembly/src/main/scripts/slider.py +++ b/slider-assembly/src/main/scripts/slider.py @@ -15,8 +15,14 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +import sys +import subprocess # Slider main method - +def main(): + + if __name__ == '__main__': -print slider python script \ No newline at end of file +print slider python script +rv = main() +sys.exit(rv)
[33/50] [abbrv] git commit: Merge branch 'feature/SLIDER-160_Improve_slider_functional_testing' into develop
Merge branch 'feature/SLIDER-160_Improve_slider_functional_testing' into develop Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/18667336 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/18667336 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/18667336 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 186673363c32a644d5ebaa21e3e2f7e3150115d6 Parents: 3be6c86 bab8867 Author: Steve Loughran ste...@apache.org Authored: Tue Jun 24 18:10:28 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Tue Jun 24 18:10:28 2014 -0700 -- .../funtest/framework/AgentUploads.groovy | 68 + .../funtest/framework/CommandTestBase.groovy| 9 +- .../funtest/framework/FileUploader.groovy | 100 +++ .../funtest/framework/FuntestProperties.groovy | 12 ++- .../slider/funtest/framework/SudoClosure.groovy | 54 ++ .../lifecycle/AgentCommandTestBase.groovy | 39 +++- .../lifecycle/TestAppsThroughAgent.groovy | 5 +- .../lifecycle/TestClusterBuildDestroy.groovy| 2 +- src/test/clusters/c6401/slider/log4j.properties | 83 +++ .../clusters/c6401/slider/slider-client.xml | 71 + 10 files changed, 403 insertions(+), 40 deletions(-) --
[27/50] [abbrv] git commit: SLIDER-153 add JVM args to CLI
SLIDER-153 add JVM args to CLI Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/8a8ffd94 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/8a8ffd94 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/8a8ffd94 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 8a8ffd94c9b9685df578ba493e6cb0148af0e5b1 Parents: 77f3e02 Author: Steve Loughran ste...@apache.org Authored: Tue Jun 24 13:19:49 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Tue Jun 24 13:19:49 2014 -0700 -- slider-assembly/src/main/scripts/slider.py | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/8a8ffd94/slider-assembly/src/main/scripts/slider.py -- diff --git a/slider-assembly/src/main/scripts/slider.py b/slider-assembly/src/main/scripts/slider.py index 77c39aa..d48eca6 100644 --- a/slider-assembly/src/main/scripts/slider.py +++ b/slider-assembly/src/main/scripts/slider.py @@ -30,14 +30,12 @@ SLIDER_CLASSPATH_EXTRA = SLIDER_CLASSPATH_EXTRA SLIDER_CLASSNAME = org.apache.slider.Slider DEFAULT_JVM__OPTS = -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xmx256m -Djava.confdir=%s -Launches slider - - +Launches slider + -print os.environ['HOME'] def scriptDir(): @@ -107,6 +105,8 @@ def main(): confdir = dirMustExist(confDir(slider_home)) default_jvm_opts = DEFAULT_JVM__OPTS % confdir slider_jvm_opts = os.environ.get(SLIDER_JVM_OPTS, default_jvm_opts) + # split the JVM opts by space + jvm_opts_split = slider_jvm_opts.split() slider_classpath_extra = os.environ.get(SLIDER_CLASSPATH_EXTRA, ) p = os.pathsep# path separator d = os.sep# dir separator @@ -120,12 +120,11 @@ def main(): print slider_classpath = \%s\ % slider_classpath #java = /usr/bin/java - java = java - commandline = [java, - -classpath, - slider_classpath, - SLIDER_CLASSNAME] - # commandline.append(slider_jvm_opts) + commandline = [java, ] + commandline.append(-classpath) + commandline.append(slider_classpath) + commandline.extend(jvm_opts_split) + commandline.append(SLIDER_CLASSNAME) commandline.extend(args) print ready to exec : %s % commandline # docs warn of using PIPE on stderr
[44/50] [abbrv] git commit: SLIDER-176. Container request after failure is failing to allocate replacement container
SLIDER-176. Container request after failure is failing to allocate replacement container Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/ea251f16 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/ea251f16 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/ea251f16 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: ea251f165bf322c4cd86c6d84483169b07b6fba5 Parents: 78a1364 Author: Sumit Mohanty smoha...@hortonworks.com Authored: Thu Jun 26 13:41:26 2014 -0700 Committer: Sumit Mohanty smoha...@hortonworks.com Committed: Thu Jun 26 13:41:31 2014 -0700 -- .../appmaster/state/OutstandingRequest.java | 2 +- .../app_packages/test_command_log/metainfo.xml | 62 ++-- 2 files changed, 31 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/ea251f16/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java -- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java index 45dd9d1..7d3e427 100644 --- a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java @@ -108,7 +108,7 @@ public final class OutstandingRequest { if (node != null) { hosts = new String[1]; hosts[0] = node.hostname; - relaxLocality = false; + relaxLocality = true; locationSpecified = true; // tell the node it is in play node.getOrCreate(roleId); http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/ea251f16/slider-core/src/test/app_packages/test_command_log/metainfo.xml -- diff --git a/slider-core/src/test/app_packages/test_command_log/metainfo.xml b/slider-core/src/test/app_packages/test_command_log/metainfo.xml index f5fde30..845ad93 100644 --- a/slider-core/src/test/app_packages/test_command_log/metainfo.xml +++ b/slider-core/src/test/app_packages/test_command_log/metainfo.xml @@ -17,38 +17,36 @@ -- metainfo schemaVersion2.0/schemaVersion - services -service - nameTEST_COMMAND_LOG/name - comment -When started it creates a new log file and stores all commands in the -log file. When stopped it renames the file. - /comment - version0.1.0/version - components -component - nameCOMMAND_LOGGER/name - categoryMASTER/category - commandScript -scriptscripts/cl.py/script -scriptTypePYTHON/scriptType -timeout600/timeout - /commandScript -/component - /components + application +nameTEST_COMMAND_LOG/name +comment + When started it creates a new log file and stores all commands in the + log file. When stopped it renames the file. +/comment +version0.1.0/version +components + component +nameCOMMAND_LOGGER/name +categoryMASTER/category +commandScript + scriptscripts/cl.py/script + scriptTypePYTHON/scriptType + timeout600/timeout +/commandScript + /component +/components - osSpecifics -osSpecific - osTypeany/osType - packages -package - typetarball/type - namefiles/command_log.tar.gz/name -/package - /packages -/osSpecific - /osSpecifics +osSpecifics + osSpecific +osTypeany/osType +packages + package +typetarball/type +namefiles/command_log.tar.gz/name + /package +/packages + /osSpecific +/osSpecifics -/service - /services + /application /metainfo
[08/50] [abbrv] git commit: SLIDER-157 Remove app-packages/hbase-v0_96
SLIDER-157 Remove app-packages/hbase-v0_96 Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/bc0c6728 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/bc0c6728 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/bc0c6728 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: bc0c672843efaa8d83a97a94d1152f6ebd1c27c1 Parents: 7729653 Author: tedyu yuzhih...@gmail.com Authored: Mon Jun 23 09:24:46 2014 -0700 Committer: tedyu yuzhih...@gmail.com Committed: Mon Jun 23 09:24:46 2014 -0700 -- .../slider_specs/creating_app_definitions.md| 80 +++- 1 file changed, 43 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/bc0c6728/src/site/markdown/slider_specs/creating_app_definitions.md -- diff --git a/src/site/markdown/slider_specs/creating_app_definitions.md b/src/site/markdown/slider_specs/creating_app_definitions.md index be3dd33..ab9f51c 100644 --- a/src/site/markdown/slider_specs/creating_app_definitions.md +++ b/src/site/markdown/slider_specs/creating_app_definitions.md @@ -70,45 +70,51 @@ Additional configuration parameters are described in `app-packages/accumulo/READ For other app packages, follow this example: -* cd slider/app-packages/hbase-v0_96 -* zip -r hbase_v096.zip . -* Looking at the content through unzip -l $@ hbase_v096.zip +* cd slider/app-packages/hbase +* zip -r hbase-v098.zip . +* Looking at the content through unzip -l $@ hbase-v098.zip ``` -Archive: hbase_v096.zip - Length Date TimeName - - 3163 05-16-14 16:32 appConfig.json -0 05-02-14 07:51 configuration/ - 5077 05-02-14 07:51 configuration/global.xml - 5248 05-02-14 07:51 configuration/hbase-log4j.xml - 2250 05-02-14 07:51 configuration/hbase-policy.xml -14705 05-02-14 07:51 configuration/hbase-site.xml - 3332 05-16-14 16:33 metainfo.xml -0 05-02-14 07:51 package/ -0 05-19-14 20:36 package/files/ - 83154798 05-19-14 20:36 package/files/hbase-0.96.1-hadoop2-bin.tar.gz -0 05-02-14 07:51 package/scripts/ - 787 05-02-14 07:51 package/scripts/__init__.py - 1378 05-02-14 07:51 package/scripts/functions.py - 3599 05-02-14 07:51 package/scripts/hbase.py - 1205 05-02-14 07:51 package/scripts/hbase_client.py - 1640 05-02-14 07:51 package/scripts/hbase_master.py - 1764 05-02-14 07:51 package/scripts/hbase_regionserver.py - 1482 05-02-14 07:51 package/scripts/hbase_service.py - 4924 05-02-14 07:51 package/scripts/params.py - 973 05-02-14 07:51 package/scripts/status_params.py -0 05-02-14 07:51 package/templates/ - 2723 05-02-14 07:51 package/templates/hadoop-metrics2-hbase.properties-GANGLIA-MASTER.j2 - 2723 05-02-14 07:51 package/templates/hadoop-metrics2-hbase.properties-GANGLIA-RS.j2 - 3878 05-02-14 07:51 package/templates/hbase-env.sh.j2 - 909 05-02-14 07:51 package/templates/hbase_client_jaas.conf.j2 - 989 05-02-14 07:51 package/templates/hbase_master_jaas.conf.j2 - 1001 05-02-14 07:51 package/templates/hbase_regionserver_jaas.conf.j2 - 837 05-02-14 07:51 package/templates/regionservers.j2 - 357 05-12-14 12:04 resources.json - --- - 83219742 29 files +Archive: hbase-v098.zip + Length DateTimeName +- -- - + 3158 06-19-2014 22:08 appConfig.json +0 06-19-2014 22:15 configuration/ + 5077 06-19-2014 22:15 configuration/global.xml + 5248 06-19-2014 22:15 configuration/hbase-log4j.xml + 2250 06-19-2014 22:15 configuration/hbase-policy.xml +14705 06-19-2014 22:15 configuration/hbase-site.xml + 2142 06-19-2014 22:17 jmx_metrics.json + 3991 06-19-2014 22:45 metainfo.xml +0 06-19-2014 22:33 package/ +0 06-19-2014 22:31 package/files/ + 83278591 06-19-2014 22:31 package/files/hbase-0.98.3-hadoop2-bin.tar.gz +0 06-19-2014 22:29 package/scripts/ + 787 06-19-2014 22:27 package/scripts/__init__.py + 1378 06-19-2014 22:27 package/scripts/functions.py + 3738 06-19-2014 22:27 package/scripts/hbase.py + 1205 06-19-2014 22:27 package/scripts/hbase_client.py + 1640 06-19-2014 22:27 package/scripts/hbase_master.py + 1764 06-19-2014 22:27 package/scripts/hbase_regionserver.py + 1482 06-19-2014 22:27 package/scripts/hbase_service.py + 5089 06-19-2014 22:27 package/scripts/params.py + 973 06-19-2014 22:27
[30/50] [abbrv] git commit: SLIDER-160: agent functional tests upload binaries/ini file if there is a difference
SLIDER-160: agent functional tests upload binaries/ini file if there is a difference Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/5464584d Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/5464584d Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/5464584d Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 5464584d784cf57348bf22100cee2581d5a887c0 Parents: 8327e52 Author: Steve Loughran ste...@apache.org Authored: Tue Jun 24 17:40:49 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Tue Jun 24 17:40:49 2014 -0700 -- .../funtest/framework/AgentUploads.groovy | 41 +++--- .../funtest/framework/CommandTestBase.groovy| 9 ++-- .../funtest/framework/FileUploader.groovy | 45 ++-- .../funtest/framework/FuntestProperties.groovy | 12 -- .../lifecycle/AgentCommandTestBase.groovy | 39 ++--- .../lifecycle/TestClusterBuildDestroy.groovy| 2 +- 6 files changed, 94 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5464584d/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy -- diff --git a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy index b1c29c0..5f10c0e 100644 --- a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy +++ b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy @@ -20,22 +20,51 @@ package org.apache.slider.funtest.framework import groovy.util.logging.Slf4j import org.apache.hadoop.conf.Configuration -import org.apache.hadoop.fs.FileUtil import org.apache.hadoop.fs.Path -import org.apache.hadoop.fs.permission.FsPermission import org.apache.hadoop.security.UserGroupInformation +import org.apache.hadoop.fs.FileSystem as HadoopFS @Slf4j -class AgentUploads { +class AgentUploads implements FuntestProperties { final Configuration conf + private final FileUploader uploader + private final HadoopFS clusterFS + private final Path homeDir + AgentUploads(Configuration conf) { this.conf = conf +uploader = new FileUploader(conf, UserGroupInformation.currentUser) +clusterFS = uploader.fileSystem +homeDir = clusterFS.homeDirectory } - def execUploadSequence() { -UserGroupInformation.loginUserFromKeytabAndReturnUGI(yarn) + /** + * Upload agent-related files + * @param tarballDir + * @param force + * @return + */ + def uploadAgentFiles(File tarballDir, boolean force) { +def localAgentTar = new File(tarballDir, AGENT_SLIDER_GZ_IN_SLIDER_TAR) +assert localAgentTar.exists() + +def agentTarballPath = new Path( +homeDir, +AGENT_TAR_FILENAME) + +// Upload the agent tarball +uploader.copyIfOutOfDate(localAgentTar, agentTarballPath, force) + +File localAgentIni = new File(tarballDir, AGENT_INI_IN_SLIDER_TAR) +// Upload the agent.ini +def agentIniPath = new Path(homeDir, AGENT_INI) +uploader.copyIfOutOfDate(localAgentIni, agentIniPath, force) + +return [agentTarballPath, agentIniPath] + + } - + } http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5464584d/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy -- diff --git a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy index d2accbb..61ae804 100644 --- a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy +++ b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy @@ -50,17 +50,16 @@ abstract class CommandTestBase extends SliderTestUtils { LoggerFactory.getLogger(CommandTestBase.class); public static final String SLIDER_CONF_DIR = sysprop(SLIDER_CONF_DIR_PROP) - public static final String SLIDER_BIN_DIR = sysprop(SLIDER_BIN_DIR_PROP) - public static final File SLIDER_BIN_DIRECTORY = new File( - SLIDER_BIN_DIR).canonicalFile + public static final String SLIDER_TAR_DIR = sysprop(SLIDER_BIN_DIR_PROP) + public static final File SLIDER_TAR_DIRECTORY = new File( + SLIDER_TAR_DIR).canonicalFile public static final File SLIDER_SCRIPT = new File( - SLIDER_BIN_DIRECTORY, + SLIDER_TAR_DIRECTORY, BIN_SLIDER).canonicalFile public static
[19/50] [abbrv] SLIDER-121 removed site documentation from git source
status' = AM'.getJSONClusterStatus() -len(status'.instances[role]) len(status.instances[role]) -status'.roles[role][role.failed.instances] == status'.roles[role][role.failed.instances]+1 - - -At some time `t2 t1` in the future, the size of the containers of the application -in the YARN cluster `YARN''` will be as before - -let status'' = AM''.getJSONClusterStatus() -len(status''.instances[r] == len(status.instances[r]) http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/209cee43/src/site/markdown/specification/index.md -- diff --git a/src/site/markdown/specification/index.md b/src/site/markdown/specification/index.md deleted file mode 100644 index f4c8d67..000 --- a/src/site/markdown/specification/index.md +++ /dev/null @@ -1,41 +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. --- - -# Specification of Apache Slider behaviour - -This is a a more rigorous definition of the behavior of Slider in terms -of its state and its command-line operations -by defining a 'formal' model -of HDFS, YARN and Slider's internal state, then describing the operations -that can take place in terms of their preconditions and postconditions. - -This is to show what tests we can create to verify that an action -with a valid set of preconditions results in an outcome whose postconditions -can be verified. It also makes more apparent what conditions should be -expected to result in failures, as well as what the failure codes should be. - -Specifying the behavior has also helped identify areas where there was ambiguity, -where clarification and more tests were needed. - -The specification depends on ongoing work in [HADOOP-9361](https://issues.apache.org/jira/browse/HADOOP-9361): -to define the Hadoop Filesytem APIs --This specification uses [the same notation](https://github.com/steveloughran/hadoop-trunk/blob/stevel/HADOOP-9361-filesystem-contract/hadoop-common-project/hadoop-common/src/site/markdown/filesystem/notation.md) - - -1. [Model: YARN And Slider](slider-model.html) -1. [CLI actions](cli-actions.html) - -Exceptions and operations may specify exit codes -these are listed in -[Client Exit Codes](../exitcodes.html) http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/209cee43/src/site/markdown/specification/slider-model.md -- diff --git a/src/site/markdown/specification/slider-model.md b/src/site/markdown/specification/slider-model.md deleted file mode 100644 index 75f8c68..000 --- a/src/site/markdown/specification/slider-model.md +++ /dev/null @@ -1,286 +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. --- - -# Formal Apache Slider Model - -This is the model of Slider and YARN for the rest of the specification. - -## File System - -A File System `HDFS` represents a Hadoop FileSystem -either HDFS or another File -System which spans the cluster. There are also other filesystems that -can act as sources of data that is then copied into HDFS. These will be marked -as `FS` or with the generic `FileSystem` type. - - -There's ongoing work in [HADOOP-9361](https://issues.apache.org/jira/browse/HADOOP-9361) -to define the Hadoop Filesytem APIs using the same notation as here, -the latest version being available on [github](https://github.com/steveloughran/hadoop-trunk/tree/stevel/HADOOP-9361-filesystem-contract/hadoop-common-project
[32/50] [abbrv] git commit: SLIDER-153 remove superflous check for agent test enablement in TestAppsThroughAgent
SLIDER-153 remove superflous check for agent test enablement in TestAppsThroughAgent Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/bab88672 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/bab88672 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/bab88672 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: bab886723eca65bbe3a4090642b26714391df3ba Parents: eba97da Author: Steve Loughran ste...@apache.org Authored: Tue Jun 24 18:10:02 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Tue Jun 24 18:10:02 2014 -0700 -- .../apache/slider/funtest/lifecycle/TestAppsThroughAgent.groovy | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/bab88672/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/TestAppsThroughAgent.groovy -- diff --git a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/TestAppsThroughAgent.groovy b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/TestAppsThroughAgent.groovy index e3422ee..793a323 100644 --- a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/TestAppsThroughAgent.groovy +++ b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/TestAppsThroughAgent.groovy @@ -43,10 +43,7 @@ implements FuntestProperties, Arguments, SliderExitCodes, SliderActions { @Test public void testCreateFlex() throws Throwable { -if (!AGENTTESTS_ENABLED) { - log.info TESTS are not run. - return -} +assumeAgentTestsEnabled() cleanup(APPLICATION_NAME) SliderShell shell = slider(EXIT_SUCCESS,
[46/50] [abbrv] git commit: SLIDER-107. Work items for the release 0.40
SLIDER-107. Work items for the release 0.40 Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/736a9c7e Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/736a9c7e Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/736a9c7e Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 736a9c7e87aa4f31470bcf6016b004b9a83954b5 Parents: 590cbe0 Author: Sumit Mohanty smoha...@hortonworks.com Authored: Thu Jun 26 17:29:58 2014 -0700 Committer: Sumit Mohanty smoha...@hortonworks.com Committed: Thu Jun 26 20:13:44 2014 -0700 -- LICENSE | 423 +++ LICENSE.txt | 423 --- NOTICE | 5 + NOTICE.txt | 5 - 4 files changed, 428 insertions(+), 428 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/736a9c7e/LICENSE -- diff --git a/LICENSE b/LICENSE new file mode 100644 index 000..b029173 --- /dev/null +++ b/LICENSE @@ -0,0 +1,423 @@ + Apache License + Version 2.0, January 2004 +http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + License shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + Licensor shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + Legal Entity shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + control means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + You (or Your) shall mean an individual or Legal Entity + exercising permissions granted by this License. + + Source form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + Object form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + Work shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + Derivative Works shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + Contribution shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, submitted + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as Not a Contribution. + + Contributor shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each
[49/50] [abbrv] git commit: SLIDER-153 refactor .py script slightly for use elsewhere
SLIDER-153 refactor .py script slightly for use elsewhere Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/0ad4fb4f Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/0ad4fb4f Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/0ad4fb4f Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 0ad4fb4f7b5cc4e590cbb9e51aa7cefb59a0ae2d Parents: a048c9f Author: Steve Loughran ste...@apache.org Authored: Mon Jun 30 16:16:08 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Mon Jun 30 16:16:08 2014 +0100 -- slider-assembly/src/main/scripts/slider.py | 107 ++-- 1 file changed, 64 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/0ad4fb4f/slider-assembly/src/main/scripts/slider.py -- diff --git a/slider-assembly/src/main/scripts/slider.py b/slider-assembly/src/main/scripts/slider.py index d48eca6..e60bed3 100644 --- a/slider-assembly/src/main/scripts/slider.py +++ b/slider-assembly/src/main/scripts/slider.py @@ -60,10 +60,10 @@ def confDir(sliderdir): localconf = os.path.join(sliderdir, CONF) return os.environ.get(SLIDER_CONF_DIR,localconf) -def dirMustExist(dir): - if not os.path.exists(dir): -raise Exception(Directory does not exist: %s % dir) - return dir +def dirMustExist(dirname): + if not os.path.exists(dirname): +raise Exception(Directory does not exist: %s % dirname) + return dirname def read(pipe, line): @@ -83,7 +83,61 @@ def read(pipe, line): return line, True else: return line, False - + + +def runProcess(commandline): + + Run a process + :param commandline: command line + :return:the return code + + print ready to exec : %s % commandline + exe = subprocess.Popen(commandline, + stdin=None, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + shell=False) + stdout = exe.stdout + stderr = exe.stderr + outline = + errline = + while exe.poll() is None: +# process is running; grab output and echo every line +outline, done = read(stdout, outline) +if done: + print outline + outline = +errline, done = read(stderr, errline) +if done: + print errline + errline = + + # get tail + out, err = exe.communicate() + print outline + out.decode() + print errline + err.decode() + return exe.returncode + + +def java(classname, args, classpath, jvm_opts_list): + + Execute a java process, hooking up stdout and stderr + and printing them a line at a time as they come in + :param classname: classname + :param args: arguments to the java program + :param classpath: classpath + :param jvm_opts_list: list of JVM options + :return: the exit code. + + # split the JVM opts by space + # java = /usr/bin/java + commandline = [java] + commandline.extend(jvm_opts_list) + commandline.append(-classpath) + commandline.append(classpath) + commandline.append(classname) + commandline.extend(args) + return runProcess(commandline) def usage(): @@ -98,14 +152,13 @@ def main(): if len(sys.argv)==1 : return usage() - print stdout encoding: + sys.stdout.encoding + # print stdout encoding: + sys.stdout.encoding args = sys.argv[1:] slider_home = sliderDir() libdir = dirMustExist(libDir(slider_home)) confdir = dirMustExist(confDir(slider_home)) default_jvm_opts = DEFAULT_JVM__OPTS % confdir slider_jvm_opts = os.environ.get(SLIDER_JVM_OPTS, default_jvm_opts) - # split the JVM opts by space jvm_opts_split = slider_jvm_opts.split() slider_classpath_extra = os.environ.get(SLIDER_CLASSPATH_EXTRA, ) p = os.pathsep# path separator @@ -119,42 +172,10 @@ def main(): print slider_jvm_opts = \%s\ % slider_jvm_opts print slider_classpath = \%s\ % slider_classpath - #java = /usr/bin/java - commandline = [java, ] - commandline.append(-classpath) - commandline.append(slider_classpath) - commandline.extend(jvm_opts_split) - commandline.append(SLIDER_CLASSNAME) - commandline.extend(args) - print ready to exec : %s % commandline - # docs warn of using PIPE on stderr - exe = subprocess.Popen(commandline, - stdin=None, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - shell=False) - stdout = exe.stdout - stderr = exe.stderr - outline = - errline = - while exe.poll() is None: -# process is running; grab output and echo every line -outline, done = read(stdout, outline) -if done: - print outline -
[43/50] [abbrv] git commit: SLIDER-96. Related fix. Dynamically create app packages for tests.
SLIDER-96. Related fix. Dynamically create app packages for tests. Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/b64e1cdf Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/b64e1cdf Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/b64e1cdf Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: b64e1cdfc5d4d5c89c786a301209bd43391d5b36 Parents: 4eb8ea9 Author: Sumit Mohanty smoha...@hortonworks.com Authored: Wed Jun 25 14:07:59 2014 -0700 Committer: Sumit Mohanty smoha...@hortonworks.com Committed: Thu Jun 26 13:41:31 2014 -0700 -- app-packages/accumulo/metainfo.xml | 238 ++- app-packages/hbase/metainfo.xml | 168 +++-- app-packages/storm-v0_91/metainfo.xml | 229 +- .../providers/agent/AgentClientProvider.java| 23 +- .../agent/AgentMiniClusterTestBase.groovy | 41 +++- .../slider/providers/agent/AgentTestBase.groovy | 44 +++- .../agent/TestAgentAMManagementWS.groovy| 3 +- .../slider/providers/agent/TestAgentEcho.groovy | 6 +- .../providers/agent/TestBuildBasicAgent.groovy | 17 +- .../curator/TestRegistryRestResources.groovy| 3 +- .../publisher/TestPublisherRestResources.groovy | 3 +- slider-core/src/test/python/appdef_1.zip| Bin 972 - 0 bytes slider-core/src/test/python/metainfo.xml| 68 +++--- 13 files changed, 445 insertions(+), 398 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/b64e1cdf/app-packages/accumulo/metainfo.xml -- diff --git a/app-packages/accumulo/metainfo.xml b/app-packages/accumulo/metainfo.xml index eba75c6..4cf6c79 100644 --- a/app-packages/accumulo/metainfo.xml +++ b/app-packages/accumulo/metainfo.xml @@ -17,129 +17,131 @@ -- metainfo schemaVersion2.0/schemaVersion - services -service - nameACCUMULO/name - comment -The Apache Accumulo sorted, distributed key/value store is a robust, -scalable, high performance data storage system that features cell-based -access control and customizable server-side processing. It is based on -Google's BigTable design and is built on top of Apache Hadoop, -Zookeeper, and Thrift. -Requirements: -1. Ensure parent dir for path (accumulo-site/instance.volumes) is accessible to the App owner. - /comment - version${accumulo.version}/version - exportGroups -exportGroup - nameQuickLinks/name - exports -export - nameorg.apache.slider.monitor/name - value${site.global.monitor_protocol}://${ACCUMULO_MONITOR_HOST}:${site.accumulo-site.monitor.port.client}/value -/export -export - nameorg.apache.slider.jmx/name - value${site.global.monitor_protocol}://${ACCUMULO_MONITOR_HOST}:${site.accumulo-site.monitor.port.client}/xml/value -/export - /exports -/exportGroup - /exportGroups - commandOrders -commandOrder - commandACCUMULO_MASTER-START/command - requiresACCUMULO_MONITOR-INSTALLED/requires -/commandOrder -commandOrder - commandACCUMULO_TSERVER-START/command - requiresACCUMULO_MASTER-STARTED/requires -/commandOrder -commandOrder - commandACCUMULO_MONITOR-START/command - requiresACCUMULO_MASTER-STARTED/requires -/commandOrder -commandOrder - commandACCUMULO_GC-START/command - requiresACCUMULO_MASTER-STARTED/requires -/commandOrder -commandOrder - commandACCUMULO_TRACER-START/command - requiresACCUMULO_MASTER-STARTED/requires -/commandOrder - /commandOrders - components -component - nameACCUMULO_MASTER/name - categoryMASTER/category - commandScript -scriptscripts/accumulo_master.py/script -scriptTypePYTHON/scriptType -timeout600/timeout - /commandScript -/component + application +nameACCUMULO/name +comment + The Apache Accumulo sorted, distributed key/value store is a robust, + scalable, high performance data storage system that features cell-based + access control and customizable server-side processing. It is based on + Google's BigTable design and is built on top of Apache Hadoop, + Zookeeper, and Thrift. + Requirements: + 1. Ensure parent dir for path (accumulo-site/instance.volumes) is accessible to the App owner. +/comment +version${accumulo.version}/version
git commit: SLIDER-175 Scripts for installing, running, and destroying slider applications
Repository: incubator-slider Updated Branches: refs/heads/develop 2449f6f35 - 31d22b888 SLIDER-175 Scripts for installing, running, and destroying slider applications Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/31d22b88 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/31d22b88 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/31d22b88 Branch: refs/heads/develop Commit: 31d22b8884ff83e99050e5e3fea3594ca6c1c862 Parents: 2449f6f Author: Steve Loughran ste...@apache.org Authored: Mon Jun 30 17:57:52 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Mon Jun 30 17:57:52 2014 +0100 -- slider-install/README.md | 102 slider-install/src/main/bash/slider-client.xml | 83 ++ slider-install/src/main/bash/slider_destroy| 64 slider-install/src/main/bash/slider_setup | 173 slider-install/src/main/bash/slider_setup.conf | 60 +++ 5 files changed, 482 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/31d22b88/slider-install/README.md -- diff --git a/slider-install/README.md b/slider-install/README.md new file mode 100644 index 000..a4b7b08 --- /dev/null +++ b/slider-install/README.md @@ -0,0 +1,102 @@ +!--- + 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. +-- + + +slider_setup + + +Tools for installing, starting, and destroying HBase, Accumulo, and Storm slider apps on YARN. + +**WARNING: This is intended for POC/sandbox testing, may not be idempotent so DO NOT use on an existing Production cluster!!!** + +Setup +- +1. Clone the repo +2. Set the necessary cluster variables in `slider_setup.conf`, it shouldn't be necessary to change any other values but thoe ones below + + +# Zookeeper nodes +ZK_QUORUM=zk1:2181,zk2:2181,zk3:2181 + +# Resource Manager address (yarn.resourcemanager.address) +RM_ADDRESS=rm1:8050 + +# Resource Manager scheduler address (yarn.resourcemanager.scheduler.address) +RM_SCHED_ADDRESS=rm1:8030 + +# Default FS (fs.defaultFS) +DEFAULT_FS=hdfs://nn1:8020 + +Running +--- +* slider_setup is the main script and handles the following + 1. Pulls down slider and extracts the contents to the SLIDER_INST_DIR + 2. Modifies slider-client.xml with cluster related info + 3. Pulls down the slider enabled version of the specified product + 4. Creates necessary directories and copies required files to HDFS + 5. For HBase, creates the app dir in HDFS + 6. Submits the slider base application to the YARN cluster + +* The following args are required + * -f - The path to the slider_setup.conf that has been modified with cluster info + * -p - The product to run (hbase, accumulo, or storm are all that are supported at this time) + * -w - The number of worker nodes. This has different meaning depending on product. +* HBase - number of region servers +* Accumulo - number of tablet servers +* Storm - number of supervisors + * -n - The name of the app, this will be the display name in the resource manager and is used by the teardown process + +* HBase Example: + + +./slider_setup -f slider_setup.conf -p hbase -w 5 -n hbase-slider + +* Accumulo Example: + + +./slider_setup -f slider_setup.conf -p accumulo -w 3 -n accumulo-slider + +* Storm Example: + + +./slider_setup -f slider_setup.conf -p storm -w 3 -n storm-slider + +Tear Down +- + +* slider_destroy will do the following + 1. Freeze the slider application based on provided name + 2. Destory the slider application based on provided name + +* The following args are required + * `-f` - The path to the `slider_setup.conf` that has been modified with cluster info + * `-n` - The name of the app, this was provided to the slider_setup tool + +* HBase Example: + + +./slider_destroy -f slider_setup.conf -n hbase-slider + +* Accumulo Example: + + +
svn commit: r1607095 - /incubator/slider/site/trunk/content/docs/security.md
Author: stevel Date: Tue Jul 1 14:25:30 2014 New Revision: 1607095 URL: http://svn.apache.org/r1607095 Log: SLIDER-192: use hadoop.security.authentication type as indicate whether to use security or not. Modified: incubator/slider/site/trunk/content/docs/security.md Modified: incubator/slider/site/trunk/content/docs/security.md URL: http://svn.apache.org/viewvc/incubator/slider/site/trunk/content/docs/security.md?rev=1607095r1=1607094r2=1607095view=diff == --- incubator/slider/site/trunk/content/docs/security.md (original) +++ incubator/slider/site/trunk/content/docs/security.md Tue Jul 1 14:25:30 2014 @@ -24,7 +24,7 @@ to deploy secure applications on a secur This document does not cover Kerberos, how to secure a Hadoop cluster, Kerberos command line tools or how Hadoop uses delegation tokens to delegate permissions -round a cluster. These are assumed, though some links to useful pages are +round a cluster. These are prerequisites em;though some links to useful pages are listed at the bottom. @@ -72,20 +72,21 @@ Slider runs in secure clusters, but with * Slider application instance and HBase instance to remain functional and secure over an indefinite period of time. ### Initial Non-requirements -* secure audit trail of cluster operations. -* multiple authorized users being granted rights to a Slider Cluster (YARN admins can always kill the Slider application instance. -* More than one HBase cluster in the YARN cluster belonging to a single user (irrespective of how they are started). +* Secure audit trail of cluster operations. +* Multiple authorized users being granted rights to a Slider Cluster (YARN admins can always kill the Slider application instance. * Any way to revoke certificates/rights of running containers. ### Assumptions * Kerberos is running and that HDFS and YARN are running Kerberized. * LDAP cannot be assumed. -* Credentials needed for HBase can be pushed out into the local filesystems of +* Credentials needed for the application can be pushed out into the local filesystems of the of the worker nodes via some external mechanism (e.g. scp), and protected by the access permissions of the native filesystem. Any user with access to these credentials is considered to have been granted such rights. -* These credentials can outlive the duration of the HBase containers -* The user running HBase has the same identity as that of the HBase cluster. +* These credentials can outlive the duration of the application instances +* The user running the application has the same identity as that of the application. +* All application instances run by a single user can share the same machine-specific +kerberos identities. ## Design @@ -172,7 +173,7 @@ They can also be set on the Slider comma -S java.security.krb5.realm=MINICLUSTER -S java.security.krb5.kdc=hadoop-kdc -### Java Cryptography Exceptions +### Important: Java Cryptography Package When trying to talk to a secure, cluster you may see the message: @@ -184,6 +185,8 @@ needed to work with the keys that Kerber from Oracle (or other supplier of the JVM) and installed according to its accompanying instructions. + + ## Useful Links 1. [Adding Security to Apache Hadoop](http://hortonworks.com/wp-content/uploads/2011/10/security-design_withCover-1.pdf)
git commit: SLIDER-192: use hadoop.security.authentication type as indicate whether to use security or not.
Repository: incubator-slider Updated Branches: refs/heads/develop 31d22b888 - 8fe71f067 SLIDER-192: use hadoop.security.authentication type as indicate whether to use security or not. Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/8fe71f06 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/8fe71f06 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/8fe71f06 Branch: refs/heads/develop Commit: 8fe71f06738321525501b7c13a50046bf85e43fb Parents: 31d22b8 Author: Steve Loughran ste...@apache.org Authored: Tue Jul 1 15:24:58 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Tue Jul 1 15:24:58 2014 +0100 -- .../java/org/apache/slider/client/SliderClient.java | 4 +++- .../org/apache/slider/common/SliderXmlConfKeys.java | 4 ++-- .../org/apache/slider/common/tools/SliderUtils.java | 15 --- 3 files changed, 13 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/8fe71f06/slider-core/src/main/java/org/apache/slider/client/SliderClient.java -- diff --git a/slider-core/src/main/java/org/apache/slider/client/SliderClient.java b/slider-core/src/main/java/org/apache/slider/client/SliderClient.java index 95c120c..a337533 100644 --- a/slider-core/src/main/java/org/apache/slider/client/SliderClient.java +++ b/slider-core/src/main/java/org/apache/slider/client/SliderClient.java @@ -894,7 +894,9 @@ public class SliderClient extends AbstractSliderLaunchedService implements RunSe if (clusterSecure) { // if the cluster is secure, make sure that // the relevant security settings go over - addConfOptionToCLI(commandLine, config, KEY_SECURITY_ENABLED); +/* + addConfOptionToCLI(commandLine, config, KEY_SECURITY); +*/ addConfOptionToCLI(commandLine, config, DFSConfigKeys.DFS_NAMENODE_USER_NAME_KEY); http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/8fe71f06/slider-core/src/main/java/org/apache/slider/common/SliderXmlConfKeys.java -- diff --git a/slider-core/src/main/java/org/apache/slider/common/SliderXmlConfKeys.java b/slider-core/src/main/java/org/apache/slider/common/SliderXmlConfKeys.java index 272ae6a..c7b8ea5 100644 --- a/slider-core/src/main/java/org/apache/slider/common/SliderXmlConfKeys.java +++ b/slider-core/src/main/java/org/apache/slider/common/SliderXmlConfKeys.java @@ -93,8 +93,8 @@ public interface SliderXmlConfKeys { * Flag which is set to indicate that security should be enabled * when talking to this cluster. */ - String KEY_SECURITY_ENABLED = - CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION; + String KEY_SECURITY = + CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION; /** * queue name http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/8fe71f06/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java -- diff --git a/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java b/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java index b97ff63..5479b54 100644 --- a/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java +++ b/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java @@ -904,7 +904,8 @@ public final class SliderUtils { * @return true if the slider client/service should be in secure mode */ public static boolean isHadoopClusterSecure(Configuration conf) { -return conf.getBoolean(SliderXmlConfKeys.KEY_SECURITY_ENABLED, false); +return SecurityUtil.getAuthenticationMethod(conf) != + UserGroupInformation.AuthenticationMethod.SIMPLE; } /** @@ -953,22 +954,22 @@ public final class SliderUtils { conf.get(CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION)); log.debug(hadoop.security.authorization={}, conf.get(CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION)); -SecurityUtil.setAuthenticationMethod( -UserGroupInformation.AuthenticationMethod.KERBEROS, conf); +/*SecurityUtil.setAuthenticationMethod( +UserGroupInformation.AuthenticationMethod.KERBEROS, conf);*/ UserGroupInformation.setConfiguration(conf); UserGroupInformation authUser = UserGroupInformation.getCurrentUser(); log.debug(Authenticating as + authUser.toString()); log.debug(Login user is {}, UserGroupInformation.getLoginUser()); if (!UserGroupInformation.isSecurityEnabled()) { throw new BadConfigException(Although secure mode is enabled, + -
git commit: SLIDER-159: jenkins testEcho intermittently failing
Repository: incubator-slider Updated Branches: refs/heads/develop 8fe71f067 - 9a54a0b8d SLIDER-159: jenkins testEcho intermittently failing Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/9a54a0b8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/9a54a0b8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/9a54a0b8 Branch: refs/heads/develop Commit: 9a54a0b8d3e6d5f5f706407dfe4ba432419b90d2 Parents: 8fe71f0 Author: Steve Loughran ste...@apache.org Authored: Tue Jul 1 16:19:58 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Tue Jul 1 16:19:58 2014 +0100 -- .../services/workflow/ForkedProcessService.java | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/9a54a0b8/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java -- diff --git a/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java index 7e73005..ee68aa4 100644 --- a/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java +++ b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java @@ -281,12 +281,15 @@ public class ForkedProcessService extends AbstractWorkflowExecutorService implem } long start = System.currentTimeMillis(); while (System.currentTimeMillis() - start = duration) { - if (finalOutput process.isFinalOutputProcessed()) { -//end of stream, break -break; - } - if (!process.isRecentOutputEmpty()) { + boolean finished; + if (finalOutput) { +// final flag means block until all data is done +finished = process.isFinalOutputProcessed(); + } else { // there is some output +finished = !process.isRecentOutputEmpty(); + } + if (finished) { break; } try { @@ -299,5 +302,4 @@ public class ForkedProcessService extends AbstractWorkflowExecutorService implem return process.getRecentOutput(); } - }
[1/8] git commit: SLIDER-171 create config for windows VM morzine
Repository: incubator-slider Updated Branches: refs/heads/develop be94df3b4 - e4723f5e5 SLIDER-171 create config for windows VM morzine Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/0060d48b Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/0060d48b Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/0060d48b Branch: refs/heads/develop Commit: 0060d48bda1f18f181029bf49d93be7e25c69e96 Parents: 9a54a0b Author: Steve Loughran ste...@apache.org Authored: Tue Jul 1 18:49:16 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Tue Jul 1 18:49:16 2014 +0100 -- .../clusters/morzine/slider/log4j.properties| 83 .../clusters/morzine/slider/slider-client.xml | 59 ++ 2 files changed, 142 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/0060d48b/src/test/clusters/morzine/slider/log4j.properties -- diff --git a/src/test/clusters/morzine/slider/log4j.properties b/src/test/clusters/morzine/slider/log4j.properties new file mode 100644 index 000..6211771 --- /dev/null +++ b/src/test/clusters/morzine/slider/log4j.properties @@ -0,0 +1,83 @@ +# +# Licensed under the Apache License, Version 2.0 (the License); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +#http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. See accompanying LICENSE file. +# + +# +# Licensed to the Apache Software Foundation (ASF) under one +# 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. +# + +# Licensed under the Apache License, Version 2.0 (the License); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# log4j configuration used during build and unit tests + +log4j.rootLogger=INFO,stdout +log4j.threshhold=ALL +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout + +# log layout skips stack-trace creation operations by avoiding line numbers and method +#log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{2} - %m%n + +# debug edition is much more expensive +log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{2} (%F:%M(%L)) - %m%n + + +log4j.appender.subprocess=org.apache.log4j.ConsoleAppender +log4j.appender.subprocess.layout=org.apache.log4j.PatternLayout +log4j.appender.subprocess.layout.ConversionPattern=[%c{1}]: %m%n + +log4j.logger.org.apache.slider=DEBUG + +# uncomment to debug service lifecycle issues +#log4j.logger.org.apache.hadoop.yarn.service.launcher=DEBUG +#log4j.logger.org.apache.hadoop.yarn.service=DEBUG + +# uncomment for YARN operations +#log4j.logger.org.apache.hadoop.yarn.client=DEBUG + +# uncomment this to debug security problems +#log4j.logger.org.apache.hadoop.security=DEBUG + +#crank back on some noise +log4j.logger.org.apache.hadoop.util.NativeCodeLoader=ERROR +log4j.logger.org.apache.hadoop.hdfs=WARN + + +log4j.logger.org.apache.hadoop.yarn.server.nodemanager.containermanager.monitor=WARN +log4j.logger.org.apache.hadoop.yarn.server.nodemanager.NodeStatusUpdaterImpl=WARN +log4j.logger.org.apache.zookeeper=WARN + +
[4/8] git commit: SLIDER-171 more details on dir owner for diags
SLIDER-171 more details on dir owner for diags Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/abb3d019 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/abb3d019 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/abb3d019 Branch: refs/heads/develop Commit: abb3d0190c55a79224e5b868844f72b82d28d71f Parents: fb73dbc Author: Steve Loughran ste...@apache.org Authored: Tue Jul 1 20:15:51 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Tue Jul 1 20:15:51 2014 +0100 -- .../org/apache/slider/funtest/basic/TestClusterConnectivity.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/abb3d019/slider-funtest/src/test/groovy/org/apache/slider/funtest/basic/TestClusterConnectivity.groovy -- diff --git a/slider-funtest/src/test/groovy/org/apache/slider/funtest/basic/TestClusterConnectivity.groovy b/slider-funtest/src/test/groovy/org/apache/slider/funtest/basic/TestClusterConnectivity.groovy index cf9cc9d..dcc7333 100644 --- a/slider-funtest/src/test/groovy/org/apache/slider/funtest/basic/TestClusterConnectivity.groovy +++ b/slider-funtest/src/test/groovy/org/apache/slider/funtest/basic/TestClusterConnectivity.groovy @@ -36,7 +36,7 @@ class TestClusterConnectivity extends CommandTestBase { def fs = clusterFS def status = fs.listStatus(new Path(/)) -status.each {it - log.info(it.path.toString())} +status.each {it - log.info(${it.path} = ${it})} }
[8/8] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-slider into develop
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-slider into develop Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/e4723f5e Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/e4723f5e Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/e4723f5e Branch: refs/heads/develop Commit: e4723f5e538d15c39320c3651d6bf4c400c59400 Parents: 613dbec be94df3 Author: Steve Loughran ste...@apache.org Authored: Tue Jul 1 21:44:44 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Tue Jul 1 21:44:44 2014 +0100 -- app-packages/command-logger/README.txt | 22 .../command-logger/application-pkg/README.txt | 24 .../command-logger/application-pkg/pom.xml | 83 + .../src/command_logger/README.txt | 18 +++ .../src/command_logger/operations.log | 24 .../src/packages/tarball/all.xml| 35 ++ .../command-logger/slider-pkg/appConfig.json| 27 .../slider-pkg/configuration/cl-site.xml| 34 ++ .../command-logger/slider-pkg/metainfo.xml | 52 .../slider-pkg/package/scripts/cl.py| 89 ++ .../slider-pkg/package/scripts/params.py| 31 + .../package/templates/operations.log.j2 | 22 app-packages/command-logger/slider-pkg/pom.xml | 122 +++ .../command-logger/slider-pkg/resources.json| 15 +++ .../slider-pkg/src/assembly/command-logger.xml | 78 app-packages/hbase/README.txt | 2 +- app-packages/hbase/appConfig.json | 4 +- pom.xml | 2 + .../test_command_log/appConfig.json | 6 +- .../test_command_log/appConfig_fast_no_reg.json | 6 +- .../test_command_log/appConfig_no_hb.json | 6 +- .../test_command_log/configuration/cl-site.xml | 34 -- .../app_packages/test_command_log/metainfo.xml | 52 .../package/files/command_log_10.tar| Bin 2560 - 0 bytes .../test_command_log/package/scripts/cl.py | 89 -- .../test_command_log/package/scripts/params.py | 31 - .../package/templates/operations.log.j2 | 22 slider-funtest/pom.xml | 52 +++- .../lifecycle/AgentCommandTestBase.groovy | 21 +--- 29 files changed, 747 insertions(+), 256 deletions(-) --
[6/8] git commit: Merge branch 'feature/SLIDER-171-slider-on-windows' into develop
Merge branch 'feature/SLIDER-171-slider-on-windows' into develop Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/0317c411 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/0317c411 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/0317c411 Branch: refs/heads/develop Commit: 0317c411590e378ce8dc03e1b13b7eb1acd0ea32 Parents: 9a54a0b 853a979 Author: Steve Loughran ste...@apache.org Authored: Tue Jul 1 21:10:16 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Tue Jul 1 21:10:16 2014 +0100 -- .../slider/client/SliderYarnClientImpl.java | 3 +- .../apache/slider/common/tools/SliderUtils.java | 2 +- .../core/launch/ClasspathConstructor.java | 4 +- .../core/launch/JavaCommandLineBuilder.java | 2 +- .../funtest/framework/CommandTestBase.groovy| 4 +- .../funtest/framework/FileUploader.groovy | 30 -- .../basic/TestClusterConnectivity.groovy| 96 .../lifecycle/TestAgentClusterLifecycle.groovy | 3 +- .../clusters/c6401/slider/slider-client.xml | 19 ++-- .../clusters/morzine/slider/log4j.properties| 83 + .../clusters/morzine/slider/slider-client.xml | 76 .../clusters/offline/slider/slider-client.xml | 7 +- .../clusters/remote/slider/slider-client.xml| 5 - .../clusters/sandbox/slider/slider-client.xml | 5 - src/test/clusters/ubuntu-secure/operations.md | 36 15 files changed, 315 insertions(+), 60 deletions(-) --
[3/8] git commit: SLIDER-171: connectivity tests to verify state of funtest client config
SLIDER-171: connectivity tests to verify state of funtest client config Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/fb73dbca Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/fb73dbca Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/fb73dbca Branch: refs/heads/develop Commit: fb73dbca80cd87c2880d7e46325a67c507f58ee0 Parents: a6a4680 Author: Steve Loughran ste...@apache.org Authored: Tue Jul 1 20:08:54 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Tue Jul 1 20:08:54 2014 +0100 -- .../slider/client/SliderYarnClientImpl.java | 3 +- .../funtest/framework/CommandTestBase.groovy| 4 +- .../basic/TestClusterConnectivity.groovy| 96 .../clusters/c6401/slider/slider-client.xml | 14 ++- .../clusters/morzine/slider/slider-client.xml | 29 -- 5 files changed, 132 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/fb73dbca/slider-core/src/main/java/org/apache/slider/client/SliderYarnClientImpl.java -- diff --git a/slider-core/src/main/java/org/apache/slider/client/SliderYarnClientImpl.java b/slider-core/src/main/java/org/apache/slider/client/SliderYarnClientImpl.java index 0c83e0c..e7b492b 100644 --- a/slider-core/src/main/java/org/apache/slider/client/SliderYarnClientImpl.java +++ b/slider-core/src/main/java/org/apache/slider/client/SliderYarnClientImpl.java @@ -19,6 +19,7 @@ package org.apache.slider.client; import com.google.common.annotations.VisibleForTesting; +import org.apache.commons.lang.StringUtils; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.yarn.api.ApplicationClientProtocol; import org.apache.hadoop.yarn.api.protocolrecords.KillApplicationRequest; @@ -74,7 +75,7 @@ public class SliderYarnClientImpl extends YarnClientImpl { ListApplicationReport allApps = getApplications(types); ListApplicationReport results = new ArrayList(); for (ApplicationReport report : allApps) { - if (user == null || user.equals(report.getUser())) { + if (StringUtils.isEmpty(user) || user.equals(report.getUser())) { results.add(report); } } http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/fb73dbca/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy -- diff --git a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy index 61ae804..08d352a 100644 --- a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy +++ b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy @@ -103,15 +103,13 @@ abstract class CommandTestBase extends SliderTestUtils { log.debug(Security enabled) SliderUtils.forceLogin() } else { - log.info Security off, making cluster dirs broadly accessible + log.info Security is off } SliderShell.confDir = SLIDER_CONF_DIRECTORY SliderShell.script = SLIDER_SCRIPT log.info(Test using ${HadoopFS.getDefaultUri(SLIDER_CONFIG)} + and YARN RM @ ${SLIDER_CONFIG.get(YarnConfiguration.RM_ADDRESS)}) -// now patch the settings with the path of the conf direcotry - } /** http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/fb73dbca/slider-funtest/src/test/groovy/org/apache/slider/funtest/basic/TestClusterConnectivity.groovy -- diff --git a/slider-funtest/src/test/groovy/org/apache/slider/funtest/basic/TestClusterConnectivity.groovy b/slider-funtest/src/test/groovy/org/apache/slider/funtest/basic/TestClusterConnectivity.groovy new file mode 100644 index 000..cf9cc9d --- /dev/null +++ b/slider-funtest/src/test/groovy/org/apache/slider/funtest/basic/TestClusterConnectivity.groovy @@ -0,0 +1,96 @@ +/* + * 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, + *
[2/8] git commit: SLIDER-192 drop obsolete references to slider.security.enabled
SLIDER-192 drop obsolete references to slider.security.enabled Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/a6a4680f Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/a6a4680f Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/a6a4680f Branch: refs/heads/develop Commit: a6a4680fec58330e5377c05b60061231e0be4037 Parents: 0060d48 Author: Steve Loughran ste...@apache.org Authored: Tue Jul 1 18:50:01 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Tue Jul 1 18:50:01 2014 +0100 -- .../clusters/c6401/slider/slider-client.xml | 5 --- .../clusters/offline/slider/slider-client.xml | 7 +--- .../clusters/remote/slider/slider-client.xml| 5 --- .../clusters/sandbox/slider/slider-client.xml | 5 --- src/test/clusters/ubuntu-secure/operations.md | 36 ++-- 5 files changed, 19 insertions(+), 39 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/a6a4680f/src/test/clusters/c6401/slider/slider-client.xml -- diff --git a/src/test/clusters/c6401/slider/slider-client.xml b/src/test/clusters/c6401/slider/slider-client.xml index f1aa4fb..fe2caad 100644 --- a/src/test/clusters/c6401/slider/slider-client.xml +++ b/src/test/clusters/c6401/slider/slider-client.xml @@ -38,11 +38,6 @@ /property property -nameslider.security.enabled/name -valuefalse/value - /property - - property nameslider.zookeeper.quorum/name valuec6401:2181/value /property http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/a6a4680f/src/test/clusters/offline/slider/slider-client.xml -- diff --git a/src/test/clusters/offline/slider/slider-client.xml b/src/test/clusters/offline/slider/slider-client.xml index a49dd29..8385086 100644 --- a/src/test/clusters/offline/slider/slider-client.xml +++ b/src/test/clusters/offline/slider/slider-client.xml @@ -41,12 +41,7 @@ nameslider.funtest.enabled/name valuefalse/value /property - - property -nameslider.security.enabled/name -valuefalse/value - /property - + property nameyarn.application.classpath/name value http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/a6a4680f/src/test/clusters/remote/slider/slider-client.xml -- diff --git a/src/test/clusters/remote/slider/slider-client.xml b/src/test/clusters/remote/slider/slider-client.xml index 5bd2edb..5ed4d10 100644 --- a/src/test/clusters/remote/slider/slider-client.xml +++ b/src/test/clusters/remote/slider/slider-client.xml @@ -50,11 +50,6 @@ /property property -nameslider.security.enabled/name -valuefalse/value - /property - - property nameslider.test.agent.enabled/name valuetrue/value /property http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/a6a4680f/src/test/clusters/sandbox/slider/slider-client.xml -- diff --git a/src/test/clusters/sandbox/slider/slider-client.xml b/src/test/clusters/sandbox/slider/slider-client.xml index f15f71d..30937ec 100644 --- a/src/test/clusters/sandbox/slider/slider-client.xml +++ b/src/test/clusters/sandbox/slider/slider-client.xml @@ -38,11 +38,6 @@ /property property -nameslider.security.enabled/name -valuefalse/value - /property - - property nameslider.zookeeper.quorum/name valuesandbox:2181/value /property http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/a6a4680f/src/test/clusters/ubuntu-secure/operations.md -- diff --git a/src/test/clusters/ubuntu-secure/operations.md b/src/test/clusters/ubuntu-secure/operations.md index cb14dfe..d894038 100644 --- a/src/test/clusters/ubuntu-secure/operations.md +++ b/src/test/clusters/ubuntu-secure/operations.md @@ -56,7 +56,7 @@ --manager ubuntu:8032 --filesystem hdfs://ubuntu:9090 \ --role workers 4\ --zkhosts ubuntu --zkport 2121 \ - -D slider.security.enabled=true -S java.security.krb5.realm=COTHAM \ + -S java.security.krb5.realm=COTHAM \ -S java.security.krb5.kdc=ubuntu \ --image hdfs://ubuntu:9090/hbase.tar \ --appconf file:Users/slider/Hadoop/configs/master/hbase \ @@ -70,7 +70,7 @@ bin/slider create cl1 \ --provider hbase \ --manager ubuntu:8032 --filesystem hdfs://ubuntu:9090 \ --D slider.security.enabled=true -S java.security.krb5.realm=COTHAM \ +-S java.security.krb5.realm=COTHAM \ -S java.security.krb5.kdc=ubuntu \
[7/8] git commit: SLIDER-171: mark up some methods as clearly not for use x-platform, but only for local setup of miniclusters
SLIDER-171: mark up some methods as clearly not for use x-platform, but only for local setup of miniclusters Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/613dbec8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/613dbec8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/613dbec8 Branch: refs/heads/develop Commit: 613dbec829810edff005c9b8aee00eba8f8bc1b8 Parents: 0317c41 Author: Steve Loughran ste...@apache.org Authored: Tue Jul 1 21:44:35 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Tue Jul 1 21:44:35 2014 +0100 -- .../org/apache/slider/common/tools/SliderUtils.java | 2 +- .../slider/core/launch/ClasspathConstructor.java| 16 +--- 2 files changed, 14 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/613dbec8/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java -- diff --git a/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java b/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java index 62e61c9..7c89321 100644 --- a/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java +++ b/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java @@ -1144,7 +1144,7 @@ public final class SliderUtils { if (usingMiniMRCluster) { // for mini cluster we pass down the java CP properties // and nothing else - classpath.appendAll(classpath.javaVMClasspath()); + classpath.appendAll(classpath.localJVMClasspath()); } else { classpath.addLibDir(libdir); if (sliderConfDir != null) { http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/613dbec8/slider-core/src/main/java/org/apache/slider/core/launch/ClasspathConstructor.java -- diff --git a/slider-core/src/main/java/org/apache/slider/core/launch/ClasspathConstructor.java b/slider-core/src/main/java/org/apache/slider/core/launch/ClasspathConstructor.java index ca325d1..5b74c03 100644 --- a/slider-core/src/main/java/org/apache/slider/core/launch/ClasspathConstructor.java +++ b/slider-core/src/main/java/org/apache/slider/core/launch/ClasspathConstructor.java @@ -123,12 +123,12 @@ public class ClasspathConstructor { public void addRemoteClasspathEnvVar() { -append(ApplicationConstants.Environment.CLASSPATH.$()); +append(ApplicationConstants.Environment.CLASSPATH.$$()); } public void insertRemoteClasspathEnvVar() { -append(ApplicationConstants.Environment.CLASSPATH.$()); +append(ApplicationConstants.Environment.CLASSPATH.$$()); } @@ -152,12 +152,22 @@ public class ClasspathConstructor { return dir; } + /** + * Split a classpath. This uses the local path separator so MUST NOT + * be used to work with remote classpaths + * @param localpath local path + * @return a splite + */ public CollectionString splitClasspath(String localpath) { String separator = System.getProperty(path.separator); return StringUtils.getStringCollection(localpath, separator); } - public CollectionString javaVMClasspath() { + /** + * Get the local JVM classpath split up + * @return the list of entries on the JVM classpath env var + */ + public CollectionString localJVMClasspath() { return splitClasspath(System.getProperty(java.class.path)); }
[1/2] git commit: SLIDER-159 TestLongLivedProcess.testEcho failing
Repository: incubator-slider Updated Branches: refs/heads/develop 5bb80a42b - 0151b9f53 SLIDER-159 TestLongLivedProcess.testEcho failing Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/e9ddcf0b Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/e9ddcf0b Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/e9ddcf0b Branch: refs/heads/develop Commit: e9ddcf0b13beb6aea3822ee0164f6f46f40676f2 Parents: 5bb80a4 Author: Steve Loughran ste...@apache.org Authored: Wed Jul 2 13:23:54 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Wed Jul 2 13:23:54 2014 +0100 -- .../services/workflow/ForkedProcessService.java | 22 +- .../services/workflow/LongLivedProcess.java | 31 .../services/workflow/TestLongLivedProcess.java | 5 ++-- 3 files changed, 35 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/e9ddcf0b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java -- diff --git a/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java index ee68aa4..ccce6cb 100644 --- a/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java +++ b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java @@ -279,27 +279,7 @@ public class ForkedProcessService extends AbstractWorkflowExecutorService implem if (process == null) { return new LinkedListString(); } -long start = System.currentTimeMillis(); -while (System.currentTimeMillis() - start = duration) { - boolean finished; - if (finalOutput) { -// final flag means block until all data is done -finished = process.isFinalOutputProcessed(); - } else { -// there is some output -finished = !process.isRecentOutputEmpty(); - } - if (finished) { -break; - } - try { -Thread.sleep(100); - } catch (InterruptedException ie) { -Thread.currentThread().interrupt(); -break; - } -} -return process.getRecentOutput(); +return process.getRecentOutput(finalOutput, duration); } } http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/e9ddcf0b/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java -- diff --git a/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java b/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java index d9ddecb..05a1c50 100644 --- a/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java +++ b/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java @@ -357,6 +357,37 @@ public class LongLivedProcess implements Runnable { } /** + * Get the recent output from the process, or [] if not defined + * + * @param finalOutput flag to indicate wait for the final output of the process + * @param duration the duration, in ms, + * ro wait for recent output to become non-empty + * @return a possibly empty list + */ + public ListString getRecentOutput(boolean finalOutput, int duration) { +long start = System.currentTimeMillis(); +while (System.currentTimeMillis() - start = duration) { + boolean finishedOutput; + if (finalOutput) { +// final flag means block until all data is done +finishedOutput = isFinalOutputProcessed(); + } else { +// there is some output +finishedOutput = !isRecentOutputEmpty(); + } + if (finishedOutput) { +break; + } + try { +Thread.sleep(100); + } catch (InterruptedException ie) { +Thread.currentThread().interrupt(); +break; + } +} +return getRecentOutput(); + } + /** * add the recent line to the list of recent lines; deleting * an earlier on if the limit is reached. * http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/e9ddcf0b/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestLongLivedProcess.java -- diff --git a/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestLongLivedProcess.java b/slider-core/src/test/java/org/apache/slider/server/services/workflow/TestLongLivedProcess.java index c8a0719..668bcca
[2/2] git commit: SLIDER-200 double mvn install failing as rat rejects hbase/target/rat.txt
SLIDER-200 double mvn install failing as rat rejects hbase/target/rat.txt Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/0151b9f5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/0151b9f5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/0151b9f5 Branch: refs/heads/develop Commit: 0151b9f53cdc46e39d80709c8090308f53bbfd3b Parents: e9ddcf0 Author: Steve Loughran ste...@apache.org Authored: Wed Jul 2 13:30:26 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Wed Jul 2 13:30:26 2014 +0100 -- pom.xml | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/0151b9f5/pom.xml -- diff --git a/pom.xml b/pom.xml index 460fb0d..0076561 100644 --- a/pom.xml +++ b/pom.xml @@ -300,6 +300,7 @@ exclude**/httpfs-signature.secret/exclude exclude**/dfs.exclude/exclude exclude**/*.iml/exclude +exclude**/rat.txt/exclude excludeDISCLAIMER/exclude /excludes /configuration
git commit: SLIDER-201 jenkins windows support - fail fast on HADOOP-10775
Repository: incubator-slider Updated Branches: refs/heads/develop 0151b9f53 - a6cbab17b SLIDER-201 jenkins windows support - fail fast on HADOOP-10775 Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/a6cbab17 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/a6cbab17 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/a6cbab17 Branch: refs/heads/develop Commit: a6cbab17bf591d7b0a6f908ea291c6b4c549bd6d Parents: 0151b9f Author: Steve Loughran ste...@apache.org Authored: Wed Jul 2 15:37:54 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Wed Jul 2 15:37:54 2014 +0100 -- .../org/apache/slider/test/YarnMiniClusterTestBase.groovy | 9 + 1 file changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/a6cbab17/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy -- diff --git a/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy b/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy index e5715b1..a5c8710 100644 --- a/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy +++ b/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy @@ -28,6 +28,7 @@ import org.apache.hadoop.fs.FileUtil import org.apache.hadoop.fs.Path import org.apache.hadoop.hdfs.MiniDFSCluster import org.apache.hadoop.service.ServiceOperations +import org.apache.hadoop.util.Shell import org.apache.hadoop.yarn.api.records.ApplicationReport import org.apache.hadoop.yarn.api.records.YarnApplicationState import org.apache.hadoop.yarn.conf.YarnConfiguration @@ -48,7 +49,9 @@ import org.apache.slider.core.main.ServiceLauncher import org.apache.slider.core.main.ServiceLauncherBaseTest import org.apache.slider.server.appmaster.SliderAppMaster import org.junit.After +import org.junit.Assert import org.junit.Before +import org.junit.BeforeClass import org.junit.Rule import org.junit.rules.TestName import org.junit.rules.Timeout @@ -126,6 +129,12 @@ public abstract class YarnMiniClusterTestBase extends ServiceLauncherBaseTest { KEY_TEST_TIMEOUT, DEFAULT_TEST_TIMEOUT_SECONDS * 1000) ) + @BeforeClass + public void checkWindowsSupport() { +if (Shell.WINDOWS) { + Assert.assertNotNull(winutils.exe not found, Shell.WINUTILS) +} + } @Rule
git commit: SLIDER-201 jenkins windows support - fail fast wasnt static
Repository: incubator-slider Updated Branches: refs/heads/develop a6cbab17b - 6d96ba956 SLIDER-201 jenkins windows support - fail fast wasnt static Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/6d96ba95 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/6d96ba95 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/6d96ba95 Branch: refs/heads/develop Commit: 6d96ba95659c2f47771eebbc1c632c89c3ee173f Parents: a6cbab1 Author: Steve Loughran ste...@apache.org Authored: Wed Jul 2 16:37:31 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Wed Jul 2 16:37:31 2014 +0100 -- .../groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6d96ba95/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy -- diff --git a/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy b/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy index a5c8710..80a83a4 100644 --- a/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy +++ b/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy @@ -130,9 +130,9 @@ public abstract class YarnMiniClusterTestBase extends ServiceLauncherBaseTest { DEFAULT_TEST_TIMEOUT_SECONDS * 1000) ) @BeforeClass - public void checkWindowsSupport() { + public static void checkWindowsSupport() { if (Shell.WINDOWS) { - Assert.assertNotNull(winutils.exe not found, Shell.WINUTILS) + assertNotNull(winutils.exe not found, Shell.WINUTILS) } }
git commit: SLIDER-34 re-enable disabled test to verify that YARN-2065 fixes the problem
Repository: incubator-slider Updated Branches: refs/heads/feature/SLIDER-34_AM_Restart_not_working [created] cdbed7d7e SLIDER-34 re-enable disabled test to verify that YARN-2065 fixes the problem Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/cdbed7d7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/cdbed7d7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/cdbed7d7 Branch: refs/heads/feature/SLIDER-34_AM_Restart_not_working Commit: cdbed7d7efcbbb132124aacd4bf69178e0274be2 Parents: 6d96ba9 Author: Steve Loughran ste...@apache.org Authored: Wed Jul 2 16:50:21 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Wed Jul 2 16:50:21 2014 +0100 -- .../providers/hbase/minicluster/failures/TestKilledHBaseAM.groovy | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/cdbed7d7/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/failures/TestKilledHBaseAM.groovy -- diff --git a/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/failures/TestKilledHBaseAM.groovy b/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/failures/TestKilledHBaseAM.groovy index 2237c5d..2c1ff57 100644 --- a/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/failures/TestKilledHBaseAM.groovy +++ b/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/failures/TestKilledHBaseAM.groovy @@ -47,7 +47,6 @@ class TestKilledHBaseAM extends HBaseMiniClusterTestBase { @Test public void testKilledHBaseAM() throws Throwable { -skip(SLIDER-66: AM Restart Failing -YARN issues) String clustername = test_killed_hbase_am int regionServerCount = 1
[26/26] git commit: SLIDER-151 adding actions
SLIDER-151 adding actions Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/621a981c Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/621a981c Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/621a981c Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 621a981cb185f76917b8c612b4062200208caa45 Parents: fe513d2 Author: Steve Loughran ste...@apache.org Authored: Fri Jun 20 16:08:08 2014 -0700 Committer: Steve Loughran ste...@apache.org Committed: Wed Jul 2 17:00:06 2014 +0100 -- .../web/rest/management/ManagementResource.java | 43 ++-- 1 file changed, 40 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/621a981c/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/management/ManagementResource.java -- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/management/ManagementResource.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/management/ManagementResource.java index 02199cf..8a6b928 100644 --- a/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/management/ManagementResource.java +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/management/ManagementResource.java @@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.GET; +import javax.ws.rs.*; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; @@ -46,6 +47,8 @@ import java.net.URL; public class ManagementResource extends AbstractSliderResource { protected static final Logger log = LoggerFactory.getLogger(ManagementResource.class); + public static final String CONFIG = config; + public static final String APP_UNDER_MANAGEMENT = /app; public ManagementResource(WebAppApi slider) { super(slider); @@ -80,9 +83,9 @@ public class ManagementResource extends AbstractSliderResource { } @GET - @Path(/app/configurations/{config}) + @Path(APP_UNDER_MANAGEMENT+/configurations/{config}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) - public ConfTreeResource getConfTreeResource(@PathParam(config) String config, + public ConfTreeResource getConfTreeResource(@PathParam(CONFIG) String config, @Context UriInfo uriInfo, @Context HttpServletResponse res) { init(res); @@ -90,11 +93,45 @@ public class ManagementResource extends AbstractSliderResource { ResourceFactory.createAggregateConfResource(getAggregateConf(), uriInfo.getBaseUriBuilder() .path(RestPaths.SLIDER_CONTEXT_ROOT) - .path(RestPaths.MANAGEMENT + /app)); + .path(RestPaths.MANAGEMENT + APP_UNDER_MANAGEMENT)); return aggregateConf.getConfTree(config); } protected AggregateConf getAggregateConf() { return slider.getAppState().getInstanceDefinitionSnapshot(); } + + @POST + @Path(actions/flex) +public void actionFlex() { + } + + @POST + @Path(actions/stop) +public void actionStop() { + } + + + @POST + @Path(actions/test/suicide) +public void actionSuicide() { + } + + @POST + @Path(actions/test/kill-container) +public void actionKillContainer() { + } + + + @GET + @Path(containers+/components +/{name}) + public void actionListContainers() { + } + + @GET + @Path(containers+/components +/{name}) + public void actionListContainersbyComponent() { + } + + }
[10/26] git commit: SLIDER-171: connectivity tests to verify state of funtest client config
SLIDER-171: connectivity tests to verify state of funtest client config Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/fb73dbca Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/fb73dbca Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/fb73dbca Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: fb73dbca80cd87c2880d7e46325a67c507f58ee0 Parents: a6a4680 Author: Steve Loughran ste...@apache.org Authored: Tue Jul 1 20:08:54 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Tue Jul 1 20:08:54 2014 +0100 -- .../slider/client/SliderYarnClientImpl.java | 3 +- .../funtest/framework/CommandTestBase.groovy| 4 +- .../basic/TestClusterConnectivity.groovy| 96 .../clusters/c6401/slider/slider-client.xml | 14 ++- .../clusters/morzine/slider/slider-client.xml | 29 -- 5 files changed, 132 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/fb73dbca/slider-core/src/main/java/org/apache/slider/client/SliderYarnClientImpl.java -- diff --git a/slider-core/src/main/java/org/apache/slider/client/SliderYarnClientImpl.java b/slider-core/src/main/java/org/apache/slider/client/SliderYarnClientImpl.java index 0c83e0c..e7b492b 100644 --- a/slider-core/src/main/java/org/apache/slider/client/SliderYarnClientImpl.java +++ b/slider-core/src/main/java/org/apache/slider/client/SliderYarnClientImpl.java @@ -19,6 +19,7 @@ package org.apache.slider.client; import com.google.common.annotations.VisibleForTesting; +import org.apache.commons.lang.StringUtils; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.yarn.api.ApplicationClientProtocol; import org.apache.hadoop.yarn.api.protocolrecords.KillApplicationRequest; @@ -74,7 +75,7 @@ public class SliderYarnClientImpl extends YarnClientImpl { ListApplicationReport allApps = getApplications(types); ListApplicationReport results = new ArrayList(); for (ApplicationReport report : allApps) { - if (user == null || user.equals(report.getUser())) { + if (StringUtils.isEmpty(user) || user.equals(report.getUser())) { results.add(report); } } http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/fb73dbca/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy -- diff --git a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy index 61ae804..08d352a 100644 --- a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy +++ b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy @@ -103,15 +103,13 @@ abstract class CommandTestBase extends SliderTestUtils { log.debug(Security enabled) SliderUtils.forceLogin() } else { - log.info Security off, making cluster dirs broadly accessible + log.info Security is off } SliderShell.confDir = SLIDER_CONF_DIRECTORY SliderShell.script = SLIDER_SCRIPT log.info(Test using ${HadoopFS.getDefaultUri(SLIDER_CONFIG)} + and YARN RM @ ${SLIDER_CONFIG.get(YarnConfiguration.RM_ADDRESS)}) -// now patch the settings with the path of the conf direcotry - } /** http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/fb73dbca/slider-funtest/src/test/groovy/org/apache/slider/funtest/basic/TestClusterConnectivity.groovy -- diff --git a/slider-funtest/src/test/groovy/org/apache/slider/funtest/basic/TestClusterConnectivity.groovy b/slider-funtest/src/test/groovy/org/apache/slider/funtest/basic/TestClusterConnectivity.groovy new file mode 100644 index 000..cf9cc9d --- /dev/null +++ b/slider-funtest/src/test/groovy/org/apache/slider/funtest/basic/TestClusterConnectivity.groovy @@ -0,0 +1,96 @@ +/* + * 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 + *
[23/26] git commit: SLIDER-201 jenkins windows support - fail fast wasnt static
SLIDER-201 jenkins windows support - fail fast wasnt static Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/6d96ba95 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/6d96ba95 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/6d96ba95 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 6d96ba95659c2f47771eebbc1c632c89c3ee173f Parents: a6cbab1 Author: Steve Loughran ste...@apache.org Authored: Wed Jul 2 16:37:31 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Wed Jul 2 16:37:31 2014 +0100 -- .../groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6d96ba95/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy -- diff --git a/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy b/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy index a5c8710..80a83a4 100644 --- a/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy +++ b/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy @@ -130,9 +130,9 @@ public abstract class YarnMiniClusterTestBase extends ServiceLauncherBaseTest { DEFAULT_TEST_TIMEOUT_SECONDS * 1000) ) @BeforeClass - public void checkWindowsSupport() { + public static void checkWindowsSupport() { if (Shell.WINDOWS) { - Assert.assertNotNull(winutils.exe not found, Shell.WINUTILS) + assertNotNull(winutils.exe not found, Shell.WINUTILS) } }
[15/26] git commit: SLIDER-171 changes to setting up java command and classpath needed to work with cross-platform client
SLIDER-171 changes to setting up java command and classpath needed to work with cross-platform client Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/853a9790 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/853a9790 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/853a9790 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 853a979006d5a08734a63ff80ce9c15ab577d61e Parents: abb3d01 Author: Steve Loughran ste...@apache.org Authored: Tue Jul 1 21:09:51 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Tue Jul 1 21:09:51 2014 +0100 -- .../apache/slider/common/tools/SliderUtils.java | 2 +- .../core/launch/ClasspathConstructor.java | 4 +-- .../core/launch/JavaCommandLineBuilder.java | 2 +- .../funtest/framework/FileUploader.groovy | 30 ++-- .../lifecycle/TestAgentClusterLifecycle.groovy | 3 +- 5 files changed, 28 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/853a9790/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java -- diff --git a/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java b/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java index 5479b54..62e61c9 100644 --- a/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java +++ b/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java @@ -1146,7 +1146,7 @@ public final class SliderUtils { // and nothing else classpath.appendAll(classpath.javaVMClasspath()); } else { - classpath.addLibDir(./ + libdir); + classpath.addLibDir(libdir); if (sliderConfDir != null) { classpath.addClassDirectory(sliderConfDir); } http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/853a9790/slider-core/src/main/java/org/apache/slider/core/launch/ClasspathConstructor.java -- diff --git a/slider-core/src/main/java/org/apache/slider/core/launch/ClasspathConstructor.java b/slider-core/src/main/java/org/apache/slider/core/launch/ClasspathConstructor.java index ee4c4d1..ca325d1 100644 --- a/slider-core/src/main/java/org/apache/slider/core/launch/ClasspathConstructor.java +++ b/slider-core/src/main/java/org/apache/slider/core/launch/ClasspathConstructor.java @@ -38,8 +38,8 @@ import java.util.List; */ public class ClasspathConstructor { - // public static final String CLASS_PATH_SEPARATOR = ApplicationConstants.CLASS_PATH_SEPARATOR; - public static final String CLASS_PATH_SEPARATOR = File.pathSeparator; +public static final String CLASS_PATH_SEPARATOR = ApplicationConstants.CLASS_PATH_SEPARATOR; +// public static final String CLASS_PATH_SEPARATOR = File.pathSeparator; private final ListString pathElements = new ArrayList(); public ClasspathConstructor() { http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/853a9790/slider-core/src/main/java/org/apache/slider/core/launch/JavaCommandLineBuilder.java -- diff --git a/slider-core/src/main/java/org/apache/slider/core/launch/JavaCommandLineBuilder.java b/slider-core/src/main/java/org/apache/slider/core/launch/JavaCommandLineBuilder.java index e8b6eb1..7b60461 100644 --- a/slider-core/src/main/java/org/apache/slider/core/launch/JavaCommandLineBuilder.java +++ b/slider-core/src/main/java/org/apache/slider/core/launch/JavaCommandLineBuilder.java @@ -38,7 +38,7 @@ public class JavaCommandLineBuilder extends CommandLineBuilder { * @return the path to the Java binary */ protected String getJavaBinary() { -return ApplicationConstants.Environment.JAVA_HOME.$() + /bin/java; +return ApplicationConstants.Environment.JAVA_HOME.$$() + /bin/java; } /** http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/853a9790/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy -- diff --git a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy index 2dc85be..921adbf 100644 --- a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy +++ b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy @@ -18,6 +18,7 @@ package org.apache.slider.funtest.framework +import groovy.transform.CompileStatic import
[03/26] git commit: Merge branch 'feature/SLIDER-162_test_runner_to_bootstrap_clean_HDFS_cluster_for_test_runs' into develop
Merge branch 'feature/SLIDER-162_test_runner_to_bootstrap_clean_HDFS_cluster_for_test_runs' into develop Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/3fb598fb Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/3fb598fb Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/3fb598fb Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 3fb598fba45b08b1d1d13124bf3ce5a0b2c77bb5 Parents: 0ad4fb4 1bdf134 Author: Steve Loughran ste...@apache.org Authored: Mon Jun 30 16:36:17 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Mon Jun 30 16:36:17 2014 +0100 -- .../funtest/framework/AgentUploads.groovy | 13 ++--- .../funtest/framework/FileUploader.groovy | 51 +--- .../lifecycle/AgentCommandTestBase.groovy | 10 +++- 3 files changed, 57 insertions(+), 17 deletions(-) --
[07/26] git commit: SLIDER-159: jenkins testEcho intermittently failing
SLIDER-159: jenkins testEcho intermittently failing Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/9a54a0b8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/9a54a0b8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/9a54a0b8 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 9a54a0b8d3e6d5f5f706407dfe4ba432419b90d2 Parents: 8fe71f0 Author: Steve Loughran ste...@apache.org Authored: Tue Jul 1 16:19:58 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Tue Jul 1 16:19:58 2014 +0100 -- .../services/workflow/ForkedProcessService.java | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/9a54a0b8/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java -- diff --git a/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java index 7e73005..ee68aa4 100644 --- a/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java +++ b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java @@ -281,12 +281,15 @@ public class ForkedProcessService extends AbstractWorkflowExecutorService implem } long start = System.currentTimeMillis(); while (System.currentTimeMillis() - start = duration) { - if (finalOutput process.isFinalOutputProcessed()) { -//end of stream, break -break; - } - if (!process.isRecentOutputEmpty()) { + boolean finished; + if (finalOutput) { +// final flag means block until all data is done +finished = process.isFinalOutputProcessed(); + } else { // there is some output +finished = !process.isRecentOutputEmpty(); + } + if (finished) { break; } try { @@ -299,5 +302,4 @@ public class ForkedProcessService extends AbstractWorkflowExecutorService implem return process.getRecentOutput(); } - }
[22/26] git commit: SLIDER-201 jenkins windows support - fail fast on HADOOP-10775
SLIDER-201 jenkins windows support - fail fast on HADOOP-10775 Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/a6cbab17 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/a6cbab17 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/a6cbab17 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: a6cbab17bf591d7b0a6f908ea291c6b4c549bd6d Parents: 0151b9f Author: Steve Loughran ste...@apache.org Authored: Wed Jul 2 15:37:54 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Wed Jul 2 15:37:54 2014 +0100 -- .../org/apache/slider/test/YarnMiniClusterTestBase.groovy | 9 + 1 file changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/a6cbab17/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy -- diff --git a/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy b/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy index e5715b1..a5c8710 100644 --- a/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy +++ b/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy @@ -28,6 +28,7 @@ import org.apache.hadoop.fs.FileUtil import org.apache.hadoop.fs.Path import org.apache.hadoop.hdfs.MiniDFSCluster import org.apache.hadoop.service.ServiceOperations +import org.apache.hadoop.util.Shell import org.apache.hadoop.yarn.api.records.ApplicationReport import org.apache.hadoop.yarn.api.records.YarnApplicationState import org.apache.hadoop.yarn.conf.YarnConfiguration @@ -48,7 +49,9 @@ import org.apache.slider.core.main.ServiceLauncher import org.apache.slider.core.main.ServiceLauncherBaseTest import org.apache.slider.server.appmaster.SliderAppMaster import org.junit.After +import org.junit.Assert import org.junit.Before +import org.junit.BeforeClass import org.junit.Rule import org.junit.rules.TestName import org.junit.rules.Timeout @@ -126,6 +129,12 @@ public abstract class YarnMiniClusterTestBase extends ServiceLauncherBaseTest { KEY_TEST_TIMEOUT, DEFAULT_TEST_TIMEOUT_SECONDS * 1000) ) + @BeforeClass + public void checkWindowsSupport() { +if (Shell.WINDOWS) { + Assert.assertNotNull(winutils.exe not found, Shell.WINUTILS) +} + } @Rule
[13/26] git commit: SLIDER-190. Add projects to create command logger package as well as Slider app package
SLIDER-190. Add projects to create command logger package as well as Slider app package Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/e879109a Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/e879109a Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/e879109a Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: e879109a45f255d63e3d32d5f8bb6d40a26e38e9 Parents: f53db87 Author: Sumit Mohanty smoha...@hortonworks.com Authored: Mon Jun 30 19:47:04 2014 -0700 Committer: Sumit Mohanty smoha...@hortonworks.com Committed: Tue Jul 1 12:56:33 2014 -0700 -- app-packages/command-logger/README.txt | 22 .../command-logger/application-pkg/pom.xml | 83 ++ .../src/command_logger/README.txt | 18 .../src/command_logger/operations.log | 24 + .../src/packages/tarball/all.xml| 35 ++ .../command-logger/slider-pkg/appConfig.json| 27 + .../slider-pkg/configuration/cl-site.xml| 34 ++ .../command-logger/slider-pkg/metainfo.xml | 52 + .../slider-pkg/package/scripts/cl.py| 89 +++ .../slider-pkg/package/scripts/params.py| 31 ++ .../package/templates/operations.log.j2 | 22 app-packages/command-logger/slider-pkg/pom.xml | 107 +++ .../command-logger/slider-pkg/resources.json| 15 +++ .../slider-pkg/src/assembly/command-logger.xml | 78 ++ app-packages/hbase/appConfig.json | 4 +- pom.xml | 2 + 16 files changed, 641 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/e879109a/app-packages/command-logger/README.txt -- diff --git a/app-packages/command-logger/README.txt b/app-packages/command-logger/README.txt new file mode 100644 index 000..56a8a33 --- /dev/null +++ b/app-packages/command-logger/README.txt @@ -0,0 +1,22 @@ +!--- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the License); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an AS IS BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +-- +Command logger is a test application used by Slider for functional tests. + +Like any typical Slider Application, there is a native application package +in the form of a tarball that is created by project under application_pkg and +there is a project under slider_pkg to create the Slider Application Package +that is consumed by Slider. http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/e879109a/app-packages/command-logger/application-pkg/pom.xml -- diff --git a/app-packages/command-logger/application-pkg/pom.xml b/app-packages/command-logger/application-pkg/pom.xml new file mode 100644 index 000..7da7259 --- /dev/null +++ b/app-packages/command-logger/application-pkg/pom.xml @@ -0,0 +1,83 @@ +?xml version=1.0? +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; + !-- + 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. +-- + parent +
[01/26] git commit: SLIDER-162: home dir created by hdfs if user lacks permissions (and hdfs can be impersonated)
Repository: incubator-slider Updated Branches: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it 81a85495d - 621a981cb (forced update) SLIDER-162: home dir created by hdfs if user lacks permissions (and hdfs can be impersonated) Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/e3c5d9d8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/e3c5d9d8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/e3c5d9d8 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: e3c5d9d8e7198e3a30027a412b9348926900c14a Parents: 9619c33 Author: Steve Loughran ste...@apache.org Authored: Mon Jun 30 16:14:15 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Mon Jun 30 16:14:15 2014 +0100 -- .../funtest/framework/AgentUploads.groovy | 13 ++--- .../funtest/framework/FileUploader.groovy | 51 +--- .../lifecycle/AgentCommandTestBase.groovy | 10 +++- 3 files changed, 57 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/e3c5d9d8/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy -- diff --git a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy index 3570183..2cec5c2 100644 --- a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy +++ b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentUploads.groovy @@ -27,11 +27,9 @@ import org.apache.hadoop.fs.FileSystem as HadoopFS @Slf4j class AgentUploads implements FuntestProperties { final Configuration conf - private final FileUploader uploader - private final HadoopFS clusterFS - private final Path homeDir - - + public final FileUploader uploader + public final HadoopFS clusterFS + public final Path homeDir AgentUploads(Configuration conf) { this.conf = conf @@ -52,6 +50,8 @@ class AgentUploads implements FuntestProperties { homeDir, AGENT_TAR_FILENAME) +//create the home dir or fail +uploader.mkHomeDir() // Upload the agent tarball uploader.copyIfOutOfDate(localAgentTar, agentTarballPath, force) @@ -59,10 +59,7 @@ class AgentUploads implements FuntestProperties { // Upload the agent.ini def agentIniPath = new Path(homeDir, AGENT_INI) uploader.copyIfOutOfDate(localAgentIni, agentIniPath, force) - return [agentTarballPath, agentIniPath] - - } } http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/e3c5d9d8/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy -- diff --git a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy index 4f61730..2dc85be 100644 --- a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy +++ b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FileUploader.groovy @@ -20,12 +20,14 @@ package org.apache.slider.funtest.framework import groovy.util.logging.Slf4j import org.apache.hadoop.conf.Configuration +import org.apache.hadoop.fs.FileSystem as HadoopFS import org.apache.hadoop.fs.FileUtil import org.apache.hadoop.fs.Path import org.apache.hadoop.fs.permission.FsPermission import org.apache.hadoop.security.AccessControlException import org.apache.hadoop.security.UserGroupInformation -import org.apache.hadoop.fs.FileSystem as HadoopFS + +@SuppressWarnings(GroovyOctalInteger) @Slf4j class FileUploader { final Configuration conf @@ -60,18 +62,20 @@ class FileUploader { } if (toCopy) { log.info(Copying $src to $destPath) + def dir = destPath.getParent() try { fs.delete(destPath, true) -fs.mkdirs(destPath.getParent(), FsPermission.dirDefault) +fs.mkdirs(dir, FsPermission.dirDefault) return FileUtil.copy(src, fs, destPath, false, conf) } catch (AccessControlException ace) { -log.error(No write access to test user home directory. + +log.error(No write access to destination directory $dir + Ensure home directory exists and has correct permissions. + ace, ace) throw ace } } else { - log.debug(Skipping copy as the destination $destPath considered up to date) + log.debug( + Skipping copy as the
[04/26] git commit: SLIDER-173 Container requests for the same role should utilize different nodes - give higher priority to requests with location specified
SLIDER-173 Container requests for the same role should utilize different nodes - give higher priority to requests with location specified Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/2449f6f3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/2449f6f3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/2449f6f3 Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 2449f6f35bee3220d05f9b386487d44439c9a3cc Parents: 3fb598f Author: tedyu yuzhih...@gmail.com Authored: Mon Jun 30 09:43:31 2014 -0700 Committer: tedyu yuzhih...@gmail.com Committed: Mon Jun 30 09:43:31 2014 -0700 -- .../slider/server/appmaster/state/ContainerPriority.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/2449f6f3/slider-core/src/main/java/org/apache/slider/server/appmaster/state/ContainerPriority.java -- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/ContainerPriority.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/ContainerPriority.java index 56a5af2..369a932 100644 --- a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/ContainerPriority.java +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/ContainerPriority.java @@ -38,11 +38,11 @@ import org.apache.hadoop.yarn.util.Records; public final class ContainerPriority { // bit that represents whether location is specified - static final int LOCATION = 1 30; + static final int NOLOCATION = 1 30; public static int buildPriority(int role, boolean locationSpecified) { -int location = locationSpecified ? LOCATION : 0; +int location = locationSpecified ? 0 : NOLOCATION; return role | location; } @@ -57,7 +57,7 @@ public final class ContainerPriority { public static int extractRole(int priority) { -return priority = LOCATION ? priority^LOCATION : priority; +return priority = NOLOCATION ? priority^NOLOCATION : priority; } /**
[02/26] git commit: Merge branch 'develop' into feature/SLIDER-162_test_runner_to_bootstrap_clean_HDFS_cluster_for_test_runs
Merge branch 'develop' into feature/SLIDER-162_test_runner_to_bootstrap_clean_HDFS_cluster_for_test_runs Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/1bdf134a Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/1bdf134a Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/1bdf134a Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it Commit: 1bdf134af5dd9fdb8186c848df8806324296f9cc Parents: e3c5d9d 0ad4fb4 Author: Steve Loughran ste...@apache.org Authored: Mon Jun 30 16:18:14 2014 +0100 Committer: Steve Loughran ste...@apache.org Committed: Mon Jun 30 16:18:14 2014 +0100 -- LICENSE | 423 +++ LICENSE.txt | 423 --- NOTICE | 5 + NOTICE.txt | 5 - app-packages/accumulo/metainfo.xml | 238 +-- app-packages/hbase/metainfo.xml | 168 app-packages/storm-v0_91/metainfo.xml | 229 +- slider-assembly/src/main/scripts/slider.py | 107 +++-- .../providers/agent/AgentClientProvider.java| 29 +- .../slider/providers/agent/AgentKeys.java | 1 - .../providers/agent/AgentProviderService.java | 53 +-- .../agent/application/metadata/Application.java | 121 ++ .../agent/application/metadata/Metainfo.java| 17 +- .../application/metadata/MetainfoParser.java| 10 +- .../agent/application/metadata/Service.java | 121 -- .../appmaster/state/ContainerPriority.java | 8 +- .../appmaster/state/OutstandingRequest.java | 7 +- .../server/appmaster/state/RoleHistory.java | 8 + .../app_packages/test_command_log/metainfo.xml | 62 ++- .../agent/AgentMiniClusterTestBase.groovy | 41 +- .../slider/providers/agent/AgentTestBase.groovy | 44 +- .../agent/TestAgentAMManagementWS.groovy| 3 +- .../slider/providers/agent/TestAgentEcho.groovy | 6 +- .../providers/agent/TestBuildBasicAgent.groovy | 78 ++-- .../curator/TestRegistryRestResources.groovy| 3 +- .../model/appstate/TestMockRMOperations.groovy | 2 +- .../publisher/TestPublisherRestResources.groovy | 3 +- .../slider/common/tools/TestSliderUtils.java| 23 +- .../agent/TestAgentClientProvider.java | 40 +- .../agent/TestAgentProviderService.java | 61 ++- .../metadata/MetainfoParserTest.java| 15 +- .../org/apache/slider/tools/TestUtility.java| 71 slider-core/src/test/python/appdef_1.zip| Bin 972 - 0 bytes slider-core/src/test/python/metainfo.xml| 68 ++- .../org/apache/slider/common/tools/test.zip | Bin 1273 - 0 bytes .../slider/common/tools/test/metainfo.txt | 16 + .../slider/common/tools/test/metainfo.xml | 95 + .../slider/common/tools/test/someOtherFile.txt | 16 + .../slider/common/tools/test/someOtherFile.xml | 16 + .../agent/application/metadata/metainfo.xml | 136 +++--- .../slider/providers/hbase/HBaseRoles.java | 3 +- 41 files changed, 1543 insertions(+), 1232 deletions(-) --