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=1595950&r1=1595949&r2=1595950&view=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 Map<String, String> buildProviderStatus() { - return new HashMap<String, 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=1595950&r1=1595949&r2=1595950&view=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(Map<String, 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/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java?rev=1595950&r1=1595949&r2=1595950&view=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 16:25:08 2014 @@ -41,6 +41,7 @@ import org.apache.slider.core.exceptions import org.apache.slider.core.launch.CommandLineBuilder; import org.apache.slider.core.launch.ContainerLauncher; import org.apache.slider.core.registry.docstore.PublishedConfiguration; +import org.apache.slider.core.registry.info.CustomRegistryConstants; import org.apache.slider.core.registry.info.RegisteredEndpoint; import org.apache.slider.core.registry.info.ServiceInstanceData; import org.apache.slider.providers.AbstractProviderService; @@ -51,7 +52,6 @@ import org.apache.slider.providers.agent import org.apache.slider.providers.agent.application.metadata.Export; import org.apache.slider.providers.agent.application.metadata.ExportGroup; import org.apache.slider.providers.agent.application.metadata.Metainfo; -import org.apache.slider.providers.agent.application.metadata.MetainfoParser; import org.apache.slider.providers.agent.application.metadata.Service; import org.apache.slider.server.appmaster.state.StateAccessForProviders; import org.apache.slider.server.appmaster.web.rest.agent.AgentCommandType; @@ -71,22 +71,23 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.io.IOException; -import java.io.InputStream; import java.net.MalformedURLException; import java.net.URI; +import java.net.URISyntaxException; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; -import java.util.LinkedHashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.TreeMap; import java.util.concurrent.atomic.AtomicInteger; +import static org.apache.slider.server.appmaster.web.rest.RestPaths.SLIDER_PATH_AGENTS; + /** This class implements the server-side aspects of an agent deployment */ public class AgentProviderService extends AbstractProviderService implements ProviderCore, @@ -752,4 +753,20 @@ public class AgentProviderService extend } } + @Override + public void applyInitialRegistryDefinitions(URL amWebAPI, + ServiceInstanceData instanceData) throws IOException { + super.applyInitialRegistryDefinitions(amWebAPI, instanceData); + + try { + instanceData.internalView.endpoints.put( + CustomRegistryConstants.AGENT_REST_API, + new RegisteredEndpoint( + new URL(amWebAPI, SLIDER_PATH_AGENTS), + "Agent REST API") ); + } catch (URISyntaxException e) { + throw new IOException(e); + } + + } } Added: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/slideram/SliderAMProviderService.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/slideram/SliderAMProviderService.java?rev=1595950&view=auto ============================================================================== --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/slideram/SliderAMProviderService.java (added) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/slideram/SliderAMProviderService.java Mon May 19 16:25:08 2014 @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.providers.slideram; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.Path; +import org.apache.hadoop.hdfs.HdfsConfiguration; +import org.apache.hadoop.yarn.api.records.Container; +import org.apache.hadoop.yarn.conf.YarnConfiguration; +import org.apache.slider.common.SliderKeys; +import org.apache.slider.common.tools.ConfigHelper; +import org.apache.slider.common.tools.SliderFileSystem; +import org.apache.slider.core.conf.AggregateConf; +import org.apache.slider.core.conf.MapOperations; +import org.apache.slider.core.exceptions.BadCommandArgumentsException; +import org.apache.slider.core.exceptions.SliderException; +import org.apache.slider.core.launch.ContainerLauncher; +import org.apache.slider.core.registry.docstore.PublishedConfiguration; +import org.apache.slider.core.registry.info.CommonRegistryConstants; +import org.apache.slider.core.registry.info.CustomRegistryConstants; +import org.apache.slider.core.registry.info.RegisteredEndpoint; +import org.apache.slider.core.registry.info.RegistryView; +import org.apache.slider.core.registry.info.ServiceInstanceData; +import org.apache.slider.providers.AbstractProviderService; +import org.apache.slider.providers.ProviderCore; +import org.apache.slider.providers.ProviderRole; +import org.apache.slider.providers.agent.AgentKeys; +import org.apache.slider.server.appmaster.PublishedArtifacts; +import org.apache.slider.server.appmaster.state.StateAccessForProviders; +import org.apache.slider.server.appmaster.web.rest.RestPaths; +import org.apache.slider.server.services.utility.EventCallback; + +import java.io.File; +import java.io.IOException; +import java.net.URISyntaxException; +import java.net.URL; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import static org.apache.slider.server.appmaster.web.rest.RestPaths.SLIDER_PATH_AGENTS; +import static org.apache.slider.server.appmaster.web.rest.RestPaths.SLIDER_PATH_MANAGEMENT; +import static org.apache.slider.server.appmaster.web.rest.RestPaths.SLIDER_PATH_PUBLISHER; + +/** + * Exists just to move some functionality out of AppMaster into a peer class + * of the actual service provider doing the real work + */ +public class SliderAMProviderService extends AbstractProviderService implements + ProviderCore, + AgentKeys, + SliderKeys { + + public SliderAMProviderService() { + super("SliderAMProviderService"); + } + + @Override + public Configuration loadProviderConfigurationInformation(File confDir) throws + BadCommandArgumentsException, + IOException { + return null; + } + + @Override + public void buildContainerLaunchContext(ContainerLauncher containerLauncher, + AggregateConf instanceDefinition, + Container container, + String role, + SliderFileSystem sliderFileSystem, + Path generatedConfPath, + MapOperations resourceComponent, + MapOperations appComponent, + Path containerTmpDirPath) throws IOException, SliderException { + + } + + @Override + public boolean exec(AggregateConf instanceDefinition, + File confDir, + Map<String, String> env, + EventCallback execInProgress) throws IOException, SliderException { + return false; + } + + @Override + public List<ProviderRole> getRoles() { + return new ArrayList<>(0); + } + + @Override + public void validateInstanceDefinition(AggregateConf instanceDefinition) throws + SliderException { + + } + + @Override + public void applyInitialRegistryDefinitions(URL amWebAPI, + ServiceInstanceData instanceData) throws IOException { + super.applyInitialRegistryDefinitions(amWebAPI, instanceData); + + // now publish site.xml files + YarnConfiguration defaultYarnConfig = new YarnConfiguration(); + stateAccessor.getPublishedConfigurations().put( + PublishedArtifacts.COMPLETE_CONFIG, + new PublishedConfiguration( + "Complete slider application settings", + getConfig(), getConfig()) + ); + stateAccessor.getPublishedConfigurations().put( + PublishedArtifacts.YARN_SITE_CONFIG, + new PublishedConfiguration( + "YARN site settings", + ConfigHelper.loadFromResource("yarn-site.xml"), + defaultYarnConfig) + ); + + stateAccessor.getPublishedConfigurations().put( + PublishedArtifacts.CORE_SITE_CONFIG, + new PublishedConfiguration( + "Core site settings", + ConfigHelper.loadFromResource("core-site.xml"), + defaultYarnConfig) + ); + stateAccessor.getPublishedConfigurations().put( + PublishedArtifacts.HDFS_SITE_CONFIG, + new PublishedConfiguration( + "HDFS site settings", + ConfigHelper.loadFromResource("hdfs-site.xml"), + new HdfsConfiguration(true)) + ); + + + try { + RegistryView externalView = instanceData.externalView; + RegisteredEndpoint webUI = + new RegisteredEndpoint(amWebAPI, "Application Master Web UI"); + + externalView.endpoints.put(CommonRegistryConstants.WEB_UI, webUI); + + externalView.endpoints.put( + CustomRegistryConstants.MANAGEMENT_REST_API, + new RegisteredEndpoint( + new URL(amWebAPI, SLIDER_PATH_MANAGEMENT), + "Management REST API") + ); + + externalView.endpoints.put( + CustomRegistryConstants.REGISTRY_REST_API, + new RegisteredEndpoint( + new URL(amWebAPI, RestPaths.SLIDER_PATH_REGISTRY + "/" + + RestPaths.REGISTRY_SERVICE), + "Registry Web Service" + ) + ); + + URL publisherURL = new URL(amWebAPI, SLIDER_PATH_PUBLISHER); + externalView.endpoints.put( + CustomRegistryConstants.PUBLISHER_REST_API, + new RegisteredEndpoint( + publisherURL, + "Publisher Service") + ); + + /* + * Set the configurations URL. + */ + externalView.configurationsURL = publisherURL.toExternalForm(); + + } catch (URISyntaxException e) { + throw new IOException(e); + } + + } +} Propchange: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/providers/slideram/SliderAMProviderService.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java?rev=1595950&r1=1595949&r2=1595950&view=diff ============================================================================== --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java Mon May 19 16:25:08 2014 @@ -23,7 +23,6 @@ import org.apache.hadoop.conf.Configurat import org.apache.hadoop.fs.CommonConfigurationKeysPublic; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.DFSConfigKeys; -import org.apache.hadoop.hdfs.HdfsConfiguration; import org.apache.hadoop.io.DataOutputBuffer; import org.apache.hadoop.ipc.ProtocolSignature; import org.apache.hadoop.security.Credentials; @@ -85,16 +84,15 @@ import org.apache.slider.core.main.Launc import org.apache.slider.core.main.RunService; import org.apache.slider.core.main.ServiceLauncher; import org.apache.slider.core.persist.ConfTreeSerDeser; -import org.apache.slider.core.registry.docstore.PublishedConfiguration; -import org.apache.slider.core.registry.info.CommonRegistryConstants; import org.apache.slider.core.registry.info.CustomRegistryConstants; import org.apache.slider.core.registry.info.RegisteredEndpoint; -import org.apache.slider.core.registry.info.RegistryView; +import org.apache.slider.core.registry.info.RegistryNaming; import org.apache.slider.core.registry.info.ServiceInstanceData; import org.apache.slider.providers.ProviderRole; import org.apache.slider.providers.ProviderService; import org.apache.slider.providers.SliderProviderFactory; import org.apache.slider.providers.slideram.SliderAMClientProvider; +import org.apache.slider.providers.slideram.SliderAMProviderService; import org.apache.slider.server.appmaster.rpc.RpcBinder; import org.apache.slider.server.appmaster.rpc.SliderAMPolicyProvider; import org.apache.slider.server.appmaster.rpc.SliderClusterProtocolPBImpl; @@ -111,7 +109,6 @@ import org.apache.slider.server.appmaste import org.apache.slider.server.appmaster.web.WebAppApi; import org.apache.slider.server.appmaster.web.WebAppApiImpl; import org.apache.slider.server.appmaster.web.rest.RestPaths; -import org.apache.slider.core.registry.info.RegistryNaming; import org.apache.slider.server.services.registry.SliderRegistryService; import org.apache.slider.server.services.utility.AbstractSliderLaunchedService; import org.apache.slider.server.services.utility.EventCallback; @@ -137,9 +134,6 @@ import java.util.concurrent.atomic.Atomi import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.ReentrantLock; -import static org.apache.slider.server.appmaster.web.rest.RestPaths.SLIDER_PATH_AGENTS; -import static org.apache.slider.server.appmaster.web.rest.RestPaths.SLIDER_PATH_MANAGEMENT; -import static org.apache.slider.server.appmaster.web.rest.RestPaths.SLIDER_PATH_PUBLISHER; import static org.apache.slider.server.appmaster.web.rest.RestPaths.WS_CONTEXT_ROOT; /** @@ -286,6 +280,7 @@ public class SliderAppMaster extends Abs private SliderAMWebApp webApp; private InetSocketAddress rpcServiceAddress; + private ProviderService sliderAMProvider; /** * Service Constructor @@ -461,6 +456,9 @@ public class SliderAppMaster extends Abs providerService = factory.createServerProvider(); // init the provider BUT DO NOT START IT YET initAndAddService(providerService); + // create a slider AM provider + sliderAMProvider = new SliderAMProviderService(); + initAndAddService(sliderAMProvider); InetSocketAddress address = SliderUtils.getRmSchedulerAddress(conf); log.info("RM is at {}", address); @@ -553,13 +551,11 @@ public class SliderAppMaster extends Abs //registry - - registry = startRegistrationService(); //build the role map List<ProviderRole> providerRoles = - new ArrayList<ProviderRole>(providerService.getRoles()); + new ArrayList<>(providerService.getRoles()); providerRoles.addAll(SliderAMClientProvider.ROLES); // Start up the WebApp and track the URL for it @@ -670,9 +666,15 @@ public class SliderAppMaster extends Abs //Give the provider restricted access to the state, registry providerService.bind(appState, registry); + sliderAMProvider.bind(appState, registry); + + // now do the registration registerServiceInstance(clustername, appid); + sliderAMProvider.start(); + + // launch the provider; this is expected to trigger a callback that // starts the node review process launchProviderService(instanceDefinition, confDir); @@ -699,7 +701,7 @@ public class SliderAppMaster extends Abs private void registerServiceInstance(String instanceName, ApplicationId appid) throws Exception { // the registry is running, so register services - URL amWeb = new URL(appMasterTrackingUrl); + URL amWebAPI = new URL(appMasterTrackingUrl); String serviceName = SliderKeys.APP_TYPE; int id = appid.getId(); String appServiceType = RegistryNaming.createRegistryServiceType( @@ -713,98 +715,34 @@ public class SliderAppMaster extends Abs List<String> serviceInstancesRunning = registry.instanceIDs(serviceName); log.info("service instances already running: {}", serviceInstancesRunning); - - // now publish site.xml files - YarnConfiguration defaultYarnConfig = new YarnConfiguration(); - appState.getPublishedConfigurations().put( - PublishedArtifacts.COMPLETE_CONFIG, - new PublishedConfiguration( - "Complete slider application settings", - getConfig(), getConfig())); - appState.getPublishedConfigurations().put( - PublishedArtifacts.YARN_SITE_CONFIG, - new PublishedConfiguration( - "YARN site settings", - ConfigHelper.loadFromResource("yarn-site.xml"), - defaultYarnConfig)); - - appState.getPublishedConfigurations().put( - PublishedArtifacts.CORE_SITE_CONFIG, - new PublishedConfiguration( - "Core site settings", - ConfigHelper.loadFromResource("core-site.xml"), - defaultYarnConfig)); - appState.getPublishedConfigurations().put( - PublishedArtifacts.HDFS_SITE_CONFIG, - new PublishedConfiguration( - "HDFS site settings", - ConfigHelper.loadFromResource("hdfs-site.xml"), - new HdfsConfiguration(true))); - ServiceInstanceData instanceData = new ServiceInstanceData(); instanceData.id = registryId; instanceData.serviceType = appServiceType; - RegisteredEndpoint webUI = - new RegisteredEndpoint(amWeb, "Application Master Web UI"); - - - // public REST services - - RegistryView externalView = instanceData.externalView; - externalView.endpoints.put(CommonRegistryConstants.WEB_UI, webUI); - - externalView.endpoints.put( - CustomRegistryConstants.MANAGEMENT_REST_API, - new RegisteredEndpoint( - new URL(amWeb, SLIDER_PATH_MANAGEMENT), - "Management REST API" ) - ); - - externalView.endpoints.put( - CustomRegistryConstants.REGISTRY_REST_API, - new RegisteredEndpoint( - new URL(amWeb, RestPaths.SLIDER_PATH_REGISTRY + "/"+ - RestPaths.REGISTRY_SERVICE), - "Registry Web Service" ) - ); - - URL publisherURL = new URL(amWeb, SLIDER_PATH_PUBLISHER); - externalView.endpoints.put( - CustomRegistryConstants.PUBLISHER_REST_API, - new RegisteredEndpoint( - publisherURL, - "Publisher Service" ) - ); // IPC services - externalView.endpoints.put( + instanceData.externalView.endpoints.put( CustomRegistryConstants.AM_IPC_PROTOCOL, new RegisteredEndpoint(rpcServiceAddress, RegisteredEndpoint.PROTOCOL_HADOOP_PROTOBUF, "Slider AM RPC") ); - /** - * Set the configurations URL. - */ - externalView.configurationsURL = publisherURL.toExternalForm(); - // internal services + + sliderAMProvider.applyInitialRegistryDefinitions(amWebAPI, instanceData); + + // provider service dynamic definitions. + providerService.applyInitialRegistryDefinitions(amWebAPI, instanceData); - instanceData.internalView.endpoints.put( - CustomRegistryConstants.AGENT_REST_API, - new RegisteredEndpoint( - new URL(amWeb, SLIDER_PATH_AGENTS), - "Agent REST API" ) - ); + // push the registration info to ZK registry.registerSelf( appServiceType, registryId, - amWeb, + amWebAPI, instanceData); } Modified: incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/registry/RegistryViewForProviders.java URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/registry/RegistryViewForProviders.java?rev=1595950&r1=1595949&r2=1595950&view=diff ============================================================================== --- incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/registry/RegistryViewForProviders.java (original) +++ incubator/slider/trunk/slider-core/src/main/java/org/apache/slider/server/services/registry/RegistryViewForProviders.java Mon May 19 16:25:08 2014 @@ -30,5 +30,9 @@ public interface RegistryViewForProvider List<ServiceInstanceData> listInstancesByType(String serviceType) throws IOException; + /** + * Get the registration of slider itself + * @return the registration of slider + */ ServiceInstanceData getSelfRegistration(); } Modified: incubator/slider/trunk/slider-core/src/test/groovy/org/apache/slider/server/appmaster/model/mock/MockProviderService.groovy URL: http://svn.apache.org/viewvc/incubator/slider/trunk/slider-core/src/test/groovy/org/apache/slider/server/appmaster/model/mock/MockProviderService.groovy?rev=1595950&r1=1595949&r2=1595950&view=diff ============================================================================== --- incubator/slider/trunk/slider-core/src/test/groovy/org/apache/slider/server/appmaster/model/mock/MockProviderService.groovy (original) +++ incubator/slider/trunk/slider-core/src/test/groovy/org/apache/slider/server/appmaster/model/mock/MockProviderService.groovy Mon May 19 16:25:08 2014 @@ -31,6 +31,7 @@ import org.apache.slider.core.conf.MapOp import org.apache.slider.core.exceptions.BadCommandArgumentsException import org.apache.slider.core.exceptions.SliderException import org.apache.slider.core.launch.ContainerLauncher +import org.apache.slider.core.registry.info.ServiceInstanceData import org.apache.slider.providers.ProviderRole import org.apache.slider.providers.ProviderService import org.apache.slider.server.appmaster.state.StateAccessForProviders @@ -217,7 +218,15 @@ class MockProviderService implements Pro } @Override - void buildEndpointDetails(Map<String, URL> details) { + void buildEndpointDetails(Map<String, String> details) { + + } + + @Override + void applyInitialRegistryDefinitions( + URL amWebAPI, + ServiceInstanceData registryInstanceData) + throws MalformedURLException, IOException { } }