You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by st...@apache.org on 2014/08/04 15:03:52 UTC
[06/11] git commit: SLIDER-149 yarn-registry alongside slider registry
SLIDER-149 yarn-registry alongside slider 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/d8d3671d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/d8d3671d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/d8d3671d
Branch: refs/heads/feature/SLIDER-149_Support_a_YARN_service_registry
Commit: d8d3671da22b65b67ee94ff620e39b6661722130
Parents: adc4640
Author: Steve Loughran <st...@apache.org>
Authored: Fri Aug 1 19:55:15 2014 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Fri Aug 1 19:55:15 2014 +0100
----------------------------------------------------------------------
.../core/registry/info/RegisteredEndpoint.java | 41 +++-----------
.../providers/AbstractProviderService.java | 24 ++++----
.../slider/providers/ProviderService.java | 14 +++--
.../providers/agent/AgentProviderService.java | 25 +++++++--
.../slideram/SliderAMProviderService.java | 9 +--
.../server/appmaster/SliderAppMaster.java | 58 ++++++++++++++------
.../utility/AbstractSliderLaunchedService.java | 53 +++++++++++++++---
.../model/mock/MockProviderService.groovy | 8 ++-
.../publisher/TestAgentProviderService.java | 7 ++-
.../providers/hbase/HBaseProviderService.java | 8 ++-
10 files changed, 155 insertions(+), 92 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/d8d3671d/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 f3477d0..8c065e2 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
@@ -18,6 +18,8 @@
package org.apache.slider.core.registry.info;
+import org.apache.hadoop.yarn.registry.client.types.AddressTypes;
+import org.apache.hadoop.yarn.registry.client.types.ProtocolTypes;
import org.apache.slider.core.exceptions.SliderException;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.map.annotate.JsonSerialize;
@@ -37,58 +39,29 @@ public class RegisteredEndpoint {
/**
* URL: {@value}
*/
- public static final String TYPE_URL = "url";
+ public static final String TYPE_URL = AddressTypes.ADDRESS_URI;
- /**
- * hostname: {@value}
- */
- public static final String TYPE_HOSTNAME = "hostname";
/**
* "hostname:port" pair: {@value}
*/
- public static final String TYPE_INETADDRESS = "inetaddress";
+ public static final String TYPE_INETADDRESS = AddressTypes.ADDRESS_HOSTNAME_AND_PORT;
/**
* simple path string: {@value}
*/
- public static final String TYPE_PATH = "path";
+ public static final String TYPE_PATH = AddressTypes.ADDRESS_PATH;
// standard protocols
-
- /**
- * Generic TCP protocol: {@value}
- */
-
- public static final String PROTOCOL_TCP = "tcp";
-
- /**
- * Generic TCP protocol: {@value}
- */
-
- public static final String PROTOCOL_UDP = "udp";
-
- /**
- * HTTP: {@value}
- */
-
- public static final String PROTOCOL_HTTP = "http";
-
- /**
- * HTTPS: {@value}
- */
-
- public static final String PROTOCOL_HTTPS = "http";
-
/**
* Classic "Writable" Hadoop IPC: {@value}
*/
- public static final String PROTOCOL_HADOOP_RPC = "org.apache.hadoop.ipc.RPC";
+ public static final String PROTOCOL_HADOOP_RPC = ProtocolTypes.PROTOCOL_HADOOP_IPC;
/**
* Protocol buffer based Hadoop IPC: {@value}
*/
- public static final String PROTOCOL_HADOOP_PROTOBUF = "org.apache.hadoop.ipc.Protobuf";
+ public static final String PROTOCOL_HADOOP_PROTOBUF = ProtocolTypes.PROTOCOL_HADOOP_IPC_PROTOBUF;
/**
* The address -format is driven by the type entry
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/d8d3671d/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java b/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java
index e35227c..b60328f 100644
--- a/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java
+++ b/slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java
@@ -20,6 +20,8 @@ package org.apache.slider.providers;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.service.Service;
+import org.apache.hadoop.yarn.registry.client.binding.zk.YarnRegistryService;
+import org.apache.hadoop.yarn.registry.client.types.ServiceEntry;
import org.apache.slider.api.ClusterDescription;
import org.apache.slider.common.SliderKeys;
import org.apache.slider.common.tools.ConfigHelper;
@@ -42,7 +44,6 @@ import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
-import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collection;
import java.util.HashMap;
@@ -69,6 +70,7 @@ public abstract class AbstractProviderService
protected ServiceInstanceData registryInstanceData;
protected AMViewForProviders amView;
protected URL amWebAPI;
+ private YarnRegistryService yarnRegistry;
public AbstractProviderService(String name) {
super(name);
@@ -93,9 +95,12 @@ public abstract class AbstractProviderService
@Override
public void bind(StateAccessForProviders stateAccessor,
- RegistryViewForProviders reg, AMViewForProviders amView) {
+ RegistryViewForProviders reg,
+ YarnRegistryService yarnRegistry,
+ AMViewForProviders amView) {
this.amState = stateAccessor;
this.registry = reg;
+ this.yarnRegistry = yarnRegistry;
this.amView = amView;
}
@@ -297,11 +302,6 @@ public abstract class AbstractProviderService
@Override
public void buildEndpointDetails(Map<String, String> details) {
ServiceInstanceData self = registry.getSelfRegistration();
- buildEndpointDetails(details, self);
- }
-
- public static void buildEndpointDetails(Map<String, String> details,
- ServiceInstanceData self) {
Map<String, RegisteredEndpoint> endpoints =
self.getRegistryView(true).endpoints;
for (Map.Entry<String, RegisteredEndpoint> endpoint : endpoints.entrySet()) {
@@ -311,13 +311,15 @@ public abstract class AbstractProviderService
}
}
}
+
@Override
public void applyInitialRegistryDefinitions(URL unsecureWebAPI,
- URL secureWebAPI,
- ServiceInstanceData registryInstanceData) throws MalformedURLException,
- IOException {
+ URL secureWebAPI,
+ ServiceInstanceData registryInstanceData,
+ ServiceEntry serviceEntry)
+ throws IOException {
- this.amWebAPI = unsecureWebAPI;
+ this.amWebAPI = unsecureWebAPI;
this.registryInstanceData = registryInstanceData;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/d8d3671d/slider-core/src/main/java/org/apache/slider/providers/ProviderService.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/providers/ProviderService.java b/slider-core/src/main/java/org/apache/slider/providers/ProviderService.java
index 56e24e9..ad0e25d 100644
--- a/slider-core/src/main/java/org/apache/slider/providers/ProviderService.java
+++ b/slider-core/src/main/java/org/apache/slider/providers/ProviderService.java
@@ -22,6 +22,8 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.service.Service;
import org.apache.hadoop.yarn.api.records.Container;
+import org.apache.hadoop.yarn.registry.client.binding.zk.YarnRegistryService;
+import org.apache.hadoop.yarn.registry.client.types.ServiceEntry;
import org.apache.slider.api.ClusterDescription;
import org.apache.slider.common.tools.SliderFileSystem;
import org.apache.slider.core.conf.AggregateConf;
@@ -139,11 +141,12 @@ public interface ProviderService extends ProviderCore, Service,
* bind operation -invoked before the service is started
* @param stateAccessor interface offering read access to the state
* @param registry
+ * @param yarnRegistry
* @param amView
*/
void bind(StateAccessForProviders stateAccessor,
- RegistryViewForProviders registry,
- AMViewForProviders amView);
+ RegistryViewForProviders registry,
+ YarnRegistryService yarnRegistry, AMViewForProviders amView);
/**
* Returns the agent rest operations interface.
@@ -162,9 +165,10 @@ public interface ProviderService extends ProviderCore, Service,
* @param unsecureWebAPI
* @param secureWebAPI
* @param registryInstanceData
+ * @param serviceEntry
*/
void applyInitialRegistryDefinitions(URL unsecureWebAPI,
- URL secureWebAPI,
- ServiceInstanceData registryInstanceData) throws MalformedURLException,
- IOException;
+ URL secureWebAPI,
+ ServiceInstanceData registryInstanceData,
+ ServiceEntry serviceEntry) throws IOException;
}
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/d8d3671d/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java b/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java
index a73aaab..4d0254d 100644
--- a/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java
+++ b/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java
@@ -26,6 +26,9 @@ import org.apache.hadoop.yarn.api.ApplicationConstants;
import org.apache.hadoop.yarn.api.records.Container;
import org.apache.hadoop.yarn.api.records.LocalResource;
import org.apache.hadoop.yarn.api.records.LocalResourceType;
+import org.apache.hadoop.yarn.registry.client.types.Endpoint;
+import org.apache.hadoop.yarn.registry.client.types.ProtocolTypes;
+import org.apache.hadoop.yarn.registry.client.types.ServiceEntry;
import org.apache.slider.api.ClusterDescription;
import org.apache.slider.api.ClusterDescriptionKeys;
import org.apache.slider.api.ClusterNode;
@@ -1018,19 +1021,29 @@ public class AgentProviderService extends AbstractProviderService implements
@Override
public void applyInitialRegistryDefinitions(URL unsecureWebAPI,
- URL secureWebAPI,
- ServiceInstanceData instanceData) throws IOException {
+ URL secureWebAPI,
+ ServiceInstanceData instanceData, ServiceEntry serviceEntry) throws IOException {
super.applyInitialRegistryDefinitions(unsecureWebAPI,
- secureWebAPI,
- instanceData
- );
+ secureWebAPI,
+ instanceData,
+ serviceEntry);
try {
+ URL url = new URL(secureWebAPI, SLIDER_PATH_AGENTS);
+
+ URI uri = url.toURI();
instanceData.internalView.endpoints.put(
CustomRegistryConstants.AGENT_REST_API,
new RegisteredEndpoint(
- new URL(secureWebAPI, SLIDER_PATH_AGENTS),
+ url,
"Agent REST API"));
+
+ serviceEntry.putInternalEndpoint(
+ CustomRegistryConstants.AGENT_REST_API,
+ new Endpoint(CustomRegistryConstants.AGENT_REST_API,
+ ProtocolTypes.PROTOCOL_REST,
+ "Agent REST API",
+ uri));
} catch (URISyntaxException e) {
throw new IOException(e);
}
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/d8d3671d/slider-core/src/main/java/org/apache/slider/providers/slideram/SliderAMProviderService.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/providers/slideram/SliderAMProviderService.java b/slider-core/src/main/java/org/apache/slider/providers/slideram/SliderAMProviderService.java
index 184c25a..5eb3cb4 100644
--- a/slider-core/src/main/java/org/apache/slider/providers/slideram/SliderAMProviderService.java
+++ b/slider-core/src/main/java/org/apache/slider/providers/slideram/SliderAMProviderService.java
@@ -23,6 +23,7 @@ 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.hadoop.yarn.registry.client.types.ServiceEntry;
import org.apache.slider.common.SliderKeys;
import org.apache.slider.common.tools.ConfigHelper;
import org.apache.slider.common.tools.SliderFileSystem;
@@ -111,12 +112,12 @@ public class SliderAMProviderService extends AbstractProviderService implements
@Override
public void applyInitialRegistryDefinitions(URL unsecureWebAPI,
- URL secureWebAPI,
- ServiceInstanceData instanceData) throws IOException {
+ URL secureWebAPI,
+ ServiceInstanceData instanceData, ServiceEntry serviceEntry) throws IOException {
super.applyInitialRegistryDefinitions(unsecureWebAPI,
secureWebAPI,
- instanceData
- );
+ instanceData,
+ serviceEntry);
// now publish site.xml files
YarnConfiguration defaultYarnConfig = new YarnConfiguration();
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/d8d3671d/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 3b061d5..e469d6b 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
@@ -50,6 +50,9 @@ import org.apache.hadoop.yarn.client.api.async.impl.NMClientAsyncImpl;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.apache.hadoop.yarn.exceptions.YarnException;
import org.apache.hadoop.yarn.ipc.YarnRPC;
+import org.apache.hadoop.yarn.registry.client.binding.zk.YarnRegistryService;
+import org.apache.hadoop.yarn.registry.client.types.RegistryTypeUtils;
+import org.apache.hadoop.yarn.registry.client.types.ServiceEntry;
import org.apache.hadoop.yarn.security.AMRMTokenIdentifier;
import org.apache.hadoop.yarn.security.client.ClientToAMTokenSecretManager;
import org.apache.hadoop.yarn.util.ConverterUtils;
@@ -179,6 +182,7 @@ public class SliderAppMaster extends AbstractSliderLaunchedService
public static final int HEARTBEAT_INTERVAL = 1000;
public static final int NUM_RPC_HANDLERS = 5;
+ public static final String SLIDER_AM_RPC = "Slider AM RPC";
/** YARN RPC to communicate with the Resource Manager or Node Manager */
private YarnRPC yarnRPC;
@@ -288,6 +292,14 @@ public class SliderAppMaster extends AbstractSliderLaunchedService
@SuppressWarnings("FieldAccessedSynchronizedAndUnsynchronized")
private SliderRegistryService registry;
+
+ /**
+ * The YARN registry service
+ */
+ @SuppressWarnings("FieldAccessedSynchronizedAndUnsynchronized")
+ private YarnRegistryService yarnRegistry;
+
+
/**
* Record of the max no. of cores allowed in this cluster
*/
@@ -590,6 +602,7 @@ public class SliderAppMaster extends AbstractSliderLaunchedService
//registry
registry = startRegistrationService();
+ yarnRegistry = startYarnRegistryService();
//build the role map
List<ProviderRole> providerRoles =
@@ -714,8 +727,8 @@ public class SliderAppMaster extends AbstractSliderLaunchedService
//Give the provider restricted access to the state, registry
- providerService.bind(stateForProviders, registry, this);
- sliderAMProvider.bind(stateForProviders, registry, null);
+ providerService.bind(stateForProviders, registry, yarnRegistry, this);
+ sliderAMProvider.bind(stateForProviders, registry, yarnRegistry, null);
// now do the registration
registerServiceInstance(clustername, appid);
@@ -785,7 +798,7 @@ public class SliderAppMaster extends AbstractSliderLaunchedService
URL secureWebAPI = new URL(agentAccessUrl);
String serviceName = SliderKeys.APP_TYPE;
int id = appid.getId();
- String appServiceType = RegistryNaming.createRegistryServiceType(
+ String serviceType = RegistryNaming.createRegistryServiceType(
instanceName,
service_user_name,
serviceName);
@@ -797,37 +810,48 @@ public class SliderAppMaster extends AbstractSliderLaunchedService
log.info("service instances already running: {}", serviceInstancesRunning);
+ // slider instance data
ServiceInstanceData instanceData = new ServiceInstanceData(registryId,
- appServiceType);
+ serviceType);
+ // Yarn registry
+ ServiceEntry registryEntry = new ServiceEntry();
// IPC services
instanceData.externalView.endpoints.put(
CustomRegistryConstants.AM_IPC_PROTOCOL,
new RegisteredEndpoint(rpcServiceAddress,
RegisteredEndpoint.PROTOCOL_HADOOP_PROTOBUF,
- "Slider AM RPC") );
-
-
+ SLIDER_AM_RPC) );
+
+ registryEntry.putExternalEndpoint(CustomRegistryConstants.AM_IPC_PROTOCOL,
+ RegistryTypeUtils.ipcEndpoint(
+ CustomRegistryConstants.AM_IPC_PROTOCOL,
+ SLIDER_AM_RPC,
+ true,
+ RegistryTypeUtils.toWireFormat(rpcServiceAddress)));
+
// internal services
-
+
sliderAMProvider.applyInitialRegistryDefinitions(unsecureWebAPI,
- secureWebAPI,
- instanceData
- );
+ secureWebAPI,
+ instanceData,
+ registryEntry);
// provider service dynamic definitions.
providerService.applyInitialRegistryDefinitions(unsecureWebAPI,
- secureWebAPI,
- instanceData
- );
+ secureWebAPI,
+ instanceData,
+ registryEntry);
// push the registration info to ZK
- registry.registerSelf(
- instanceData, unsecureWebAPI
- );
+ registry.registerSelf(instanceData, unsecureWebAPI);
+ yarnRegistry.putServiceEntry(service_user_name,
+ SliderKeys.APP_TYPE, instanceName,
+ registryEntry );
+
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/d8d3671d/slider-core/src/main/java/org/apache/slider/server/services/utility/AbstractSliderLaunchedService.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/server/services/utility/AbstractSliderLaunchedService.java b/slider-core/src/main/java/org/apache/slider/server/services/utility/AbstractSliderLaunchedService.java
index 6c0edb8..e7c678d 100644
--- a/slider-core/src/main/java/org/apache/slider/server/services/utility/AbstractSliderLaunchedService.java
+++ b/slider-core/src/main/java/org/apache/slider/server/services/utility/AbstractSliderLaunchedService.java
@@ -19,7 +19,10 @@
package org.apache.slider.server.services.utility;
+import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
+import org.apache.hadoop.yarn.registry.client.api.RegistryConstants;
+import org.apache.hadoop.yarn.registry.client.binding.zk.YarnRegistryService;
import org.apache.slider.common.SliderXmlConfKeys;
import org.apache.slider.common.tools.SliderUtils;
import org.apache.slider.core.exceptions.BadCommandArgumentsException;
@@ -30,7 +33,6 @@ import org.apache.slider.server.services.registry.SliderRegistryService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import static org.apache.slider.common.SliderXmlConfKeys.DEFAULT_REGISTRY_PATH;
import static org.apache.slider.common.SliderXmlConfKeys.REGISTRY_PATH;
/**
@@ -56,8 +58,10 @@ public abstract class AbstractSliderLaunchedService extends
throws BadConfigException {
String registryQuorum = lookupZKQuorum();
- String zkPath = getConfig().get(REGISTRY_PATH, DEFAULT_REGISTRY_PATH);
- return startRegistrationService(registryQuorum, zkPath);
+ String zkPath = getConfig().get(RegistryConstants.REGISTRY_ZK_ROOT,
+ RegistryConstants.DEFAULT_REGISTRY_ROOT);
+ zkPath = getConfig().get(REGISTRY_PATH, zkPath);
+ return startSliderRegistrationService(registryQuorum, zkPath);
}
/**
@@ -67,11 +71,14 @@ public abstract class AbstractSliderLaunchedService extends
*/
public String lookupZKQuorum() throws BadConfigException {
String registryQuorum = getConfig().get(
- SliderXmlConfKeys.REGISTRY_ZK_QUORUM);
+ RegistryConstants.ZK_QUORUM);
+ registryQuorum = getConfig().get(
+ SliderXmlConfKeys.REGISTRY_ZK_QUORUM,
+ registryQuorum);
if (SliderUtils.isUnset(registryQuorum)) {
throw new BadConfigException(
"No Zookeeper quorum provided in the"
- + " configuration property " + SliderXmlConfKeys.REGISTRY_ZK_QUORUM
+ + " configuration property " + RegistryConstants.ZK_QUORUM
);
}
ZookeeperUtils.splitToHostsAndPortsStrictly(registryQuorum);
@@ -84,8 +91,9 @@ public abstract class AbstractSliderLaunchedService extends
* @param zkPath
* @return
*/
- public SliderRegistryService startRegistrationService(
- String zkConnection, String zkPath) {
+ public SliderRegistryService startSliderRegistrationService(
+ String zkConnection,
+ String zkPath) {
CuratorHelper curatorHelper =
new CuratorHelper(getConfig(), zkConnection);
@@ -96,9 +104,36 @@ public abstract class AbstractSliderLaunchedService extends
return registryBinderService;
}
- protected void requireArgumentSet(String argname, String argfield)
+ /**
+ * Start the YARN registration service
+ * @param zkConnection
+ * @param zkPath
+ * @return
+ */
+ public YarnRegistryService startYarnRegistryService()
+ throws BadConfigException {
+
+ String quorum = lookupZKQuorum();
+ Configuration conf = getConfig();
+ // push back the slider registry entry if needed
+ if (conf.get(RegistryConstants.ZK_QUORUM) == null) {
+ conf.set(RegistryConstants.ZK_QUORUM, quorum);
+ }
+ YarnRegistryService yarnRegistryService =
+ new YarnRegistryService("YarnRegistry");
+ deployChildService(yarnRegistryService);
+ return yarnRegistryService;
+ }
+
+ /**
+ * Utility method to require an argument to be set (non null, non-empty)
+ * @param argname argument name
+ * @param value value
+ * @throws BadCommandArgumentsException if the condition is not met
+ */
+ protected static void requireArgumentSet(String argname, String value)
throws BadCommandArgumentsException {
- if (isUnset(argfield)) {
+ if (isUnset(value)) {
throw new BadCommandArgumentsException("Required argument "
+ argname
+ " missing");
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/d8d3671d/slider-core/src/test/groovy/org/apache/slider/server/appmaster/model/mock/MockProviderService.groovy
----------------------------------------------------------------------
diff --git a/slider-core/src/test/groovy/org/apache/slider/server/appmaster/model/mock/MockProviderService.groovy b/slider-core/src/test/groovy/org/apache/slider/server/appmaster/model/mock/MockProviderService.groovy
index 7b73451..43bd8f4 100644
--- a/slider-core/src/test/groovy/org/apache/slider/server/appmaster/model/mock/MockProviderService.groovy
+++ b/slider-core/src/test/groovy/org/apache/slider/server/appmaster/model/mock/MockProviderService.groovy
@@ -23,6 +23,8 @@ import org.apache.hadoop.fs.Path
import org.apache.hadoop.service.LifecycleEvent
import org.apache.hadoop.service.ServiceStateChangeListener
import org.apache.hadoop.yarn.api.records.Container
+import org.apache.hadoop.yarn.registry.client.binding.zk.YarnRegistryService
+import org.apache.hadoop.yarn.registry.client.types.ServiceEntry
import org.apache.slider.api.ClusterDescription
import org.apache.slider.common.tools.SliderFileSystem
import org.apache.slider.core.conf.AggregateConf
@@ -195,6 +197,7 @@ class MockProviderService implements ProviderService {
void bind(
StateAccessForProviders stateAccessor,
RegistryViewForProviders registry,
+ YarnRegistryService yarnRegistry,
AMViewForProviders amView) {
}
@@ -225,7 +228,10 @@ class MockProviderService implements ProviderService {
@Override
void applyInitialRegistryDefinitions(
- URL unsecureWebAPI, URL secureWebAPI, ServiceInstanceData registryInstanceData)
+ URL unsecureWebAPI,
+ URL secureWebAPI,
+ ServiceInstanceData registryInstanceData,
+ ServiceEntry serviceEntry)
throws MalformedURLException, IOException {
}
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/d8d3671d/slider-core/src/test/java/org/apache/slider/server/appmaster/web/rest/publisher/TestAgentProviderService.java
----------------------------------------------------------------------
diff --git a/slider-core/src/test/java/org/apache/slider/server/appmaster/web/rest/publisher/TestAgentProviderService.java b/slider-core/src/test/java/org/apache/slider/server/appmaster/web/rest/publisher/TestAgentProviderService.java
index 2427009..3f2c7fd 100644
--- a/slider-core/src/test/java/org/apache/slider/server/appmaster/web/rest/publisher/TestAgentProviderService.java
+++ b/slider-core/src/test/java/org/apache/slider/server/appmaster/web/rest/publisher/TestAgentProviderService.java
@@ -16,6 +16,7 @@
*/
package org.apache.slider.server.appmaster.web.rest.publisher;
+import org.apache.hadoop.yarn.registry.client.binding.zk.YarnRegistryService;
import org.apache.slider.providers.agent.AgentProviderService;
import org.apache.slider.server.appmaster.AMViewForProviders;
import org.apache.slider.server.appmaster.state.StateAccessForProviders;
@@ -40,8 +41,10 @@ public class TestAgentProviderService extends AgentProviderService{
@Override
public void bind(StateAccessForProviders stateAccessor,
- RegistryViewForProviders reg, AMViewForProviders amView) {
- super.bind(stateAccessor, reg, amView);
+ RegistryViewForProviders reg,
+ YarnRegistryService yarnRegistry,
+ AMViewForProviders amView) {
+ super.bind(stateAccessor, reg, yarnRegistry, amView);
Map<String,String> dummyProps = new HashMap<>();
dummyProps.put("prop1", "val1");
dummyProps.put("prop2", "val2");
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/d8d3671d/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 6fa7ca8..dccb805 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
@@ -22,6 +22,7 @@ package org.apache.slider.providers.hbase;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.yarn.api.records.Container;
+import org.apache.hadoop.yarn.registry.client.types.ServiceEntry;
import org.apache.slider.common.SliderKeys;
import org.apache.slider.api.ClusterDescription;
import org.apache.slider.api.OptionKeys;
@@ -210,10 +211,11 @@ public class HBaseProviderService extends AbstractProviderService implements
@Override
public void applyInitialRegistryDefinitions(URL web,
- URL secureWebAPI,
- ServiceInstanceData instanceData) throws
+ URL secureWebAPI,
+ ServiceInstanceData instanceData, ServiceEntry serviceEntry) throws
IOException {
- super.applyInitialRegistryDefinitions(web, secureWebAPI, instanceData);
+ super.applyInitialRegistryDefinitions(web, secureWebAPI, instanceData,
+ serviceEntry);
}
@Override