SLIDER-710 writing a ping operation to test verb support
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/6e1453bb Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/6e1453bb Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/6e1453bb Branch: refs/heads/develop Commit: 6e1453bbb4752a9bb2ab8bd66d250e34417dbea5 Parents: e5fb7f8 Author: Steve Loughran <[email protected]> Authored: Wed Jan 7 15:16:02 2015 +0000 Committer: Steve Loughran <[email protected]> Committed: Wed Jan 7 15:16:02 2015 +0000 ---------------------------------------------------------------------- .../org/apache/slider/client/SliderClient.java | 13 +++--- .../org/apache/slider/common/SliderKeys.java | 12 +++-- .../apache/slider/common/SliderXmlConfKeys.java | 2 - .../slider/common/tools/ConfigHelper.java | 21 ++++++--- .../apache/slider/common/tools/SliderUtils.java | 15 +++--- .../server/appmaster/SliderAppMaster.java | 25 ++++++---- .../server/appmaster/web/rest/RestPaths.java | 3 ++ .../rest/application/ApplicationResource.java | 17 +++++++ .../application/actions/RestActionPing.java | 49 ++++++++++++++++++++ .../application/resources/PingResource.java | 39 ++++++++++++++++ .../main/resources/org/apache/slider/slider.xml | 6 +++ .../standalone/TestStandaloneAgentWeb.groovy | 9 ++++ .../tools/TestClientResourceRegistration.groovy | 2 +- .../funtest/framework/FuntestProperties.groovy | 2 +- 14 files changed, 178 insertions(+), 37 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6e1453bb/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 f7b558e..2d1af35 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 @@ -252,8 +252,8 @@ public class SliderClient extends AbstractSliderLaunchedService implements RunSe @Override protected void serviceInit(Configuration conf) throws Exception { - Configuration clientConf = SliderUtils.loadClientConfigurationResource(); - ConfigHelper.mergeConfigurations(conf, clientConf, CLIENT_RESOURCE, true); + Configuration clientConf = SliderUtils.loadSliderClientXML(); + ConfigHelper.mergeConfigurations(conf, clientConf, SLIDER_CLIENT_XML, true); serviceArgs.applyDefinitions(conf); serviceArgs.applyFileSystemBinding(conf); // init security with our conf @@ -1437,8 +1437,9 @@ public class SliderClient extends AbstractSliderLaunchedService implements RunSe String libdir = "lib"; Path libPath = new Path(tempPath, libdir); sliderFileSystem.getFileSystem().mkdirs(libPath); - log.debug("FS={}, tempPath={}, libdir={}", sliderFileSystem.toString(), - tempPath, libPath); + log.debug("FS={}, tempPath={}, libdir={}", + sliderFileSystem, tempPath, libPath); + // set local resources for the application master // local files or archives as needed // In this scenario, the jar file for the application master is part of the local resources @@ -1593,7 +1594,7 @@ public class SliderClient extends AbstractSliderLaunchedService implements RunSe JavaCommandLineBuilder commandLine = new JavaCommandLineBuilder(); // insert any JVM options); sliderAM.addJVMOptions(instanceDefinition, commandLine); - // enable asserts if the text option is set + // enable asserts commandLine.enableJavaAssertions(); // if the conf dir has a log4j-server.properties, switch to that @@ -3044,7 +3045,7 @@ public class SliderClient extends AbstractSliderLaunchedService implements RunSe private void actionDiagnosticCredentials() throws BadConfigException, IOException { if (SliderUtils.isHadoopClusterSecure(SliderUtils - .loadClientConfigurationResource())) { + .loadSliderClientXML())) { String credentialCacheFileDescription = null; try { credentialCacheFileDescription = SliderUtils.checkCredentialCacheFile(); http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6e1453bb/slider-core/src/main/java/org/apache/slider/common/SliderKeys.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/common/SliderKeys.java b/slider-core/src/main/java/org/apache/slider/common/SliderKeys.java index 701ef14..8437087 100644 --- a/slider-core/src/main/java/org/apache/slider/common/SliderKeys.java +++ b/slider-core/src/main/java/org/apache/slider/common/SliderKeys.java @@ -112,7 +112,7 @@ public interface SliderKeys extends SliderXmlConfKeys { * {@value} */ String SLIDER_XML = "org/apache/slider/slider.xml"; - + String CLUSTER_DIRECTORY = "cluster"; String PACKAGE_DIRECTORY = "package"; @@ -158,13 +158,12 @@ public interface SliderKeys extends SliderXmlConfKeys { * name of the Slider client resource * loaded when the service is loaded. */ - String CLIENT_RESOURCE = "slider-client.xml"; + String SLIDER_CLIENT_XML = "slider-client.xml"; /** * The name of the resource to put on the classpath - * This only goes up on a real cluster, not a test run. */ - String SERVER_RESOURCE = "slider-server.xml"; + String SLIDER_SERVER_XML = "slider-server.xml"; String TMP_LOGDIR_PREFIX = "/tmp/slider-"; String TMP_DIR_PREFIX = "tmp"; @@ -210,7 +209,12 @@ public interface SliderKeys extends SliderXmlConfKeys { String AM_FILTER_NAME = "org.apache.hadoop.yarn.server.webproxy.amfilter.AmFilterInitializer"; + /** + * Allowed port range. This MUST be set in app_conf/global. + * {@value} + */ String KEY_ALLOWED_PORT_RANGE = "site.global.slider.allowed.ports"; + /** * Allowed port range */ http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6e1453bb/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 0672955..0d1121d 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 @@ -18,9 +18,7 @@ package org.apache.slider.common; -import org.apache.hadoop.fs.CommonConfigurationKeysPublic; import org.apache.hadoop.registry.client.api.RegistryConstants; -import org.apache.hadoop.yarn.conf.YarnConfiguration; /** * These are the keys that can be added to <code>conf/slider-client.xml</code>. http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6e1453bb/slider-core/src/main/java/org/apache/slider/common/tools/ConfigHelper.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/common/tools/ConfigHelper.java b/slider-core/src/main/java/org/apache/slider/common/tools/ConfigHelper.java index af5ceee..c7b79f0 100644 --- a/slider-core/src/main/java/org/apache/slider/common/tools/ConfigHelper.java +++ b/slider-core/src/main/java/org/apache/slider/common/tools/ConfigHelper.java @@ -489,8 +489,7 @@ public class ConfigHelper { * @return the URL or null */ public static URL registerDefaultResource(String resource) { - URL resURL = ConfigHelper.class.getClassLoader() - .getResource(resource); + URL resURL = getResourceUrl(resource); if (resURL != null) { Configuration.addDefaultResource(resource); } @@ -505,8 +504,7 @@ public class ConfigHelper { */ public static Configuration loadFromResource(String resource) { Configuration conf = new Configuration(false); - URL resURL = ConfigHelper.class.getClassLoader() - .getResource(resource); + URL resURL = getResourceUrl(resource); if (resURL != null) { log.debug("loaded resources from {}", resURL); conf.addResource(resource); @@ -518,7 +516,17 @@ public class ConfigHelper { } /** - * Load a resource that must be there + * Get the URL to a resource, null if not on the CP + * @param resource resource to look for + * @return the URL or null + */ + public static URL getResourceUrl(String resource) { + return ConfigHelper.class.getClassLoader() + .getResource(resource); + } + + /** + * Load a resource that must be on the classpath * @param resource the resource name * @return the loaded configuration * @throws FileNotFoundException if the resource is missing @@ -526,8 +534,7 @@ public class ConfigHelper { public static Configuration loadMandatoryResource(String resource) throws FileNotFoundException { Configuration conf = new Configuration(false); - URL resURL = ConfigHelper.class.getClassLoader() - .getResource(resource); + URL resURL = getResourceUrl(resource); if (resURL != null) { log.debug("loaded resources from {}", resURL); conf.addResource(resource); http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6e1453bb/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 af034b1..aeffe6c 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 @@ -1304,23 +1304,22 @@ public final class SliderUtils { /** * Register the client resource in - * {@link SliderKeys#CLIENT_RESOURCE} + * {@link SliderKeys#SLIDER_CLIENT_XML} * for Configuration instances. * * @return true if the resource could be loaded */ public static URL registerClientResource() { - return ConfigHelper.registerDefaultResource(SliderKeys.CLIENT_RESOURCE); + return ConfigHelper.registerDefaultResource(SliderKeys.SLIDER_CLIENT_XML); } - - + /** * Attempt to load the slider client resource. If the * resource is not on the CP an empty config is returned. * @return a config */ - public static Configuration loadClientConfigurationResource() { - return ConfigHelper.loadFromResource(SliderKeys.CLIENT_RESOURCE); + public static Configuration loadSliderClientXML() { + return ConfigHelper.loadFromResource(SliderKeys.SLIDER_CLIENT_XML); } /** @@ -2025,7 +2024,7 @@ public final class SliderUtils { */ public static String getClientConfigPath() { URL path = ConfigHelper.class.getClassLoader().getResource( - SliderKeys.CLIENT_RESOURCE); + SliderKeys.SLIDER_CLIENT_XML); return path.toString(); } @@ -2037,7 +2036,7 @@ public final class SliderUtils { */ public static void validateClientConfigFile() throws IOException { URL resURL = SliderVersionInfo.class.getClassLoader().getResource( - SliderKeys.CLIENT_RESOURCE); + SliderKeys.SLIDER_CLIENT_XML); if (resURL == null) { throw new IOException( "slider-client.xml doesn't exist on the path: " http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6e1453bb/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java index c34c692..cc9bf82 100644 --- a/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java @@ -405,11 +405,17 @@ public class SliderAppMaster extends AbstractSliderLaunchedService public synchronized void serviceInit(Configuration conf) throws Exception { // slider client if found - Configuration customConf = SliderUtils.loadClientConfigurationResource(); + Configuration customConf = SliderUtils.loadSliderClientXML(); // Load in the server configuration - if it is actually on the Classpath - Configuration serverConf = - ConfigHelper.loadFromResource(SERVER_RESOURCE); - ConfigHelper.mergeConfigurations(customConf, serverConf, SERVER_RESOURCE, true); + URL serverXmlUrl = ConfigHelper.getResourceUrl(SLIDER_SERVER_XML); + if (serverXmlUrl != null) { + + log.info("Loading {} at {}", SLIDER_SERVER_XML, serverXmlUrl); + Configuration serverConf = + ConfigHelper.loadFromResource(SLIDER_SERVER_XML); + ConfigHelper.mergeConfigurations(customConf, serverConf, + SLIDER_SERVER_XML, true); + } serviceArgs.applyDefinitions(customConf); serviceArgs.applyFileSystemBinding(customConf); // conf now contains all customizations @@ -420,14 +426,14 @@ public class SliderAppMaster extends AbstractSliderLaunchedService // sort out the location of the AM String rmAddress = createAction.getRmAddress(); if (rmAddress != null) { - log.debug("Setting rm address from the command line: {}", rmAddress); + log.debug("Setting RM address from the command line: {}", rmAddress); SliderUtils.setRmSchedulerAddress(customConf, rmAddress); } log.info("AM configuration:\n{}", ConfigHelper.dumpConfigToString(customConf)); - ConfigHelper.mergeConfigurations(conf, customConf, CLIENT_RESOURCE, true); + ConfigHelper.mergeConfigurations(conf, customConf, SLIDER_CLIENT_XML, true); //init security with our conf if (SliderUtils.isHadoopClusterSecure(conf)) { log.info("Secure mode with kerberos realm {}", @@ -495,11 +501,14 @@ public class SliderAppMaster extends AbstractSliderLaunchedService @Override // RunService public Configuration bindArgs(Configuration config, String... args) throws Exception { + // let the superclass process it + Configuration superConf = super.bindArgs(config, args); + //yarn-ify YarnConfiguration yarnConfiguration = new YarnConfiguration( - super.bindArgs(config, args)); + superConf); serviceArgs = new SliderAMArgs(args); serviceArgs.parse(); - //yarn-ify + return SliderUtils.patchConfiguration(yarnConfiguration); } http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6e1453bb/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/RestPaths.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/RestPaths.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/RestPaths.java index f637190..58520f5 100644 --- a/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/RestPaths.java +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/RestPaths.java @@ -142,4 +142,7 @@ public class RestPaths { public static final String MODEL_RESOLVED_APPCONF = MODEL_RESOLVED +"/appconf"; public static final String MODEL_RESOLVED_RESOURCES = MODEL_RESOLVED +"/resources"; public static final String MODEL_INTERNAL = "/model/internal"; + + public static final String ACTION = "/action"; + public static final String ACTION_PING = ACTION + "/ping"; } http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6e1453bb/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/ApplicationResource.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/ApplicationResource.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/ApplicationResource.java index 48540d4..1bdf109 100644 --- a/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/ApplicationResource.java +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/ApplicationResource.java @@ -40,15 +40,19 @@ import org.apache.slider.server.appmaster.web.rest.application.resources.LiveCon import org.apache.slider.server.appmaster.web.rest.application.resources.ContentCache; import org.apache.slider.server.appmaster.web.rest.application.resources.LiveComponentsRefresher; import org.apache.slider.server.appmaster.web.rest.application.resources.LiveResourcesRefresher; +import org.apache.slider.server.appmaster.web.rest.application.actions.RestActionPing; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.inject.Singleton; +import javax.servlet.http.HttpServletRequest; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -73,6 +77,12 @@ public class ApplicationResource extends AbstractSliderResource { public static final List<String> MODEL_ENTRIES = toJsonList("desired", "resolved"); + /** + * This is the cache of all content ... each entry is + * designed to be self-refreshing on get operations, + * so is never very out of date, yet many GETs don't + * overload the rest of the system. + */ private final ContentCache cache = new ContentCache(); private final StateAccessForProviders state; @@ -285,4 +295,11 @@ public class ApplicationResource extends AbstractSliderResource { } } + @GET + @Path(ACTION_PING) + @Produces({MediaType.APPLICATION_JSON}) + public Object actionPing(@Context HttpServletRequest request, + @Context UriInfo uriInfo) { + return new RestActionPing().ping(request, uriInfo); + } } http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6e1453bb/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/actions/RestActionPing.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/actions/RestActionPing.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/actions/RestActionPing.java new file mode 100644 index 0000000..6113e1e --- /dev/null +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/actions/RestActionPing.java @@ -0,0 +1,49 @@ +/* + * 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.application.actions; + +import org.apache.slider.server.appmaster.web.rest.application.resources.PingResource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.UriInfo; +import java.util.Locale; + +public class RestActionPing { + private static final Logger log = + LoggerFactory.getLogger(RestActionPing.class); + + public RestActionPing() { + } + + public Object ping(@Context HttpServletRequest request, + @Context UriInfo uriInfo) { + log.info("Ping {}", request.getMethod()); + PingResource pingResource = new PingResource(); + pingResource.time = System.currentTimeMillis(); + String text = + String.format(Locale.ENGLISH, + "Ping verb %s received at %tc", + request.getMethod(), pingResource.time); + pingResource.text = text; + return pingResource; + } +} http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6e1453bb/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/resources/PingResource.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/resources/PingResource.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/resources/PingResource.java new file mode 100644 index 0000000..7e5396c --- /dev/null +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/resources/PingResource.java @@ -0,0 +1,39 @@ +/* + * 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.application.resources; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.map.annotate.JsonSerialize; + +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) +public class PingResource { + public long time; + public String text; + + @Override + public String toString() { + final StringBuilder sb = + new StringBuilder("PingResource{"); + sb.append("time=").append(time); + sb.append(", text='").append(text).append('\''); + sb.append('}'); + return sb.toString(); + } +} http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6e1453bb/slider-core/src/main/resources/org/apache/slider/slider.xml ---------------------------------------------------------------------- diff --git a/slider-core/src/main/resources/org/apache/slider/slider.xml b/slider-core/src/main/resources/org/apache/slider/slider.xml index 37ac65c..262a764 100644 --- a/slider-core/src/main/resources/org/apache/slider/slider.xml +++ b/slider-core/src/main/resources/org/apache/slider/slider.xml @@ -27,4 +27,10 @@ <name>slider.provider.agent</name> <value>org.apache.slider.providers.agent.AgentProviderFactory</value> </property> + <property> + <name>slider.dev.ws.insecure</name> + <description>switch to insecure WS path</description> + <value>true</value> + </property> + </configuration> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6e1453bb/slider-core/src/test/groovy/org/apache/slider/agent/standalone/TestStandaloneAgentWeb.groovy ---------------------------------------------------------------------- diff --git a/slider-core/src/test/groovy/org/apache/slider/agent/standalone/TestStandaloneAgentWeb.groovy b/slider-core/src/test/groovy/org/apache/slider/agent/standalone/TestStandaloneAgentWeb.groovy index 7a62c83..1018a02 100644 --- a/slider-core/src/test/groovy/org/apache/slider/agent/standalone/TestStandaloneAgentWeb.groovy +++ b/slider-core/src/test/groovy/org/apache/slider/agent/standalone/TestStandaloneAgentWeb.groovy @@ -30,6 +30,7 @@ import org.apache.slider.common.params.Arguments import org.apache.slider.core.conf.AggregateConf import org.apache.slider.core.conf.ConfTree import org.apache.slider.server.appmaster.web.rest.application.ApplicationResource +import org.apache.slider.server.appmaster.web.rest.application.resources.PingResource import static org.apache.slider.api.ResourceKeys.* import static org.apache.slider.api.StatusKeys.* @@ -186,6 +187,7 @@ class TestStandaloneAgentWeb extends AgentMiniClusterTestBase { assert amFullInfo.containers[0] == amContainerId testRESTModel(appmaster) + testPing(appmaster) } @@ -236,5 +238,12 @@ class TestStandaloneAgentWeb extends AgentMiniClusterTestBase { assert entries.containsAll(list) } + public void testPing(String appmaster) { + describe "ping" + def pinged = fetchType(PingResource, appmaster, ACTION_PING) + log.info "Ping: $pinged" + + + } } http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6e1453bb/slider-core/src/test/groovy/org/apache/slider/common/tools/TestClientResourceRegistration.groovy ---------------------------------------------------------------------- diff --git a/slider-core/src/test/groovy/org/apache/slider/common/tools/TestClientResourceRegistration.groovy b/slider-core/src/test/groovy/org/apache/slider/common/tools/TestClientResourceRegistration.groovy index b217329..81fffaa 100644 --- a/slider-core/src/test/groovy/org/apache/slider/common/tools/TestClientResourceRegistration.groovy +++ b/slider-core/src/test/groovy/org/apache/slider/common/tools/TestClientResourceRegistration.groovy @@ -87,7 +87,7 @@ class TestClientResourceRegistration { */ @Test public void testLoadRes() throws Throwable { - Configuration conf = SliderUtils.loadClientConfigurationResource() + Configuration conf = SliderUtils.loadSliderClientXML() assert conf.get(KEY_RESOURCE_ORIGIN) == "test/resources" String hostname = "nosuchhost:0" conf.set(YarnConfiguration.RM_ADDRESS, hostname) http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6e1453bb/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FuntestProperties.groovy ---------------------------------------------------------------------- diff --git a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FuntestProperties.groovy b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FuntestProperties.groovy index 2b13d13..3bc9263 100644 --- a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FuntestProperties.groovy +++ b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/FuntestProperties.groovy @@ -48,7 +48,7 @@ public interface FuntestProperties extends SliderXMLConfKeysForTesting { String KEY_AM_RESTART_SLEEP_TIME = "slider.test.am.restart.time" int DEFAULT_AM_RESTART_SLEEP_TIME = 30000 - String CLIENT_CONFIG_FILENAME = SliderKeys.CLIENT_RESOURCE + String CLIENT_CONFIG_FILENAME = SliderKeys.SLIDER_CLIENT_XML String ENV_SLIDER_CONF_DIR = "SLIDER_CONF_DIR" String ENV_HADOOP_CONF_DIR = "HADOOP_CONF_DIR"
