public abstract class AbstractClientProvider
extends org.apache.hadoop.conf.Configured
| Modifier and Type | Field and Description |
|---|---|
static String |
PROVIDER_RESOURCE_BASE |
static String |
PROVIDER_RESOURCE_BASE_ROOT |
protected static ProviderUtils |
providerUtils |
| Constructor and Description |
|---|
AbstractClientProvider(org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getApplicationTags(SliderFileSystem fileSystem,
String appDef)
Return a set of application specific string tags.
|
abstract String |
getName() |
abstract List<ProviderRole> |
getRoles() |
protected void |
mergeTemplates(AggregateConf instanceConf,
String internalTemplate,
String resourceTemplate,
String appConfTemplate)
Load in and merge in templates.
|
void |
preflightValidateClusterConfiguration(SliderFileSystem sliderFileSystem,
String clustername,
org.apache.hadoop.conf.Configuration configuration,
AggregateConf instanceDefinition,
org.apache.hadoop.fs.Path clusterDirPath,
org.apache.hadoop.fs.Path generatedConfDirPath,
boolean secure)
This is called pre-launch to validate that the cluster specification
is valid.
|
void |
prepareAMAndConfigForLaunch(SliderFileSystem fileSystem,
org.apache.hadoop.conf.Configuration serviceConf,
AbstractLauncher launcher,
AggregateConf instanceDescription,
org.apache.hadoop.fs.Path snapshotConfDirPath,
org.apache.hadoop.fs.Path generatedConfDirPath,
org.apache.hadoop.conf.Configuration clientConfExtras,
String libdir,
org.apache.hadoop.fs.Path tempPath,
boolean miniClusterTestRun)
Prepare the AM settings for launch
|
void |
prepareInstanceConfiguration(AggregateConf aggregateConf)
Any provider-side alteration of a configuration can take place here.
|
void |
processClientOperation(SliderFileSystem fileSystem,
String operation,
File clientInstallPath,
File clientPackage,
org.codehaus.jettison.json.JSONObject config,
String name)
Process client operations for applications such as install, configure
|
void |
validateInstanceDefinition(AggregateConf instanceDefinition,
SliderFileSystem fs)
Verify that an instance definition is considered valid by the provider
|
protected static final ProviderUtils providerUtils
public static final String PROVIDER_RESOURCE_BASE
public static final String PROVIDER_RESOURCE_BASE_ROOT
public AbstractClientProvider(org.apache.hadoop.conf.Configuration conf)
public abstract String getName()
public abstract List<ProviderRole> getRoles()
public void validateInstanceDefinition(AggregateConf instanceDefinition, SliderFileSystem fs) throws SliderException
instanceDefinition - instance definitionSliderException - if the configuration is not validpublic void prepareInstanceConfiguration(AggregateConf aggregateConf) throws SliderException, IOException
aggregateConf - config to patchIOException - IO problemsSliderException - Slider-specific issuespublic void prepareAMAndConfigForLaunch(SliderFileSystem fileSystem, org.apache.hadoop.conf.Configuration serviceConf, AbstractLauncher launcher, AggregateConf instanceDescription, org.apache.hadoop.fs.Path snapshotConfDirPath, org.apache.hadoop.fs.Path generatedConfDirPath, org.apache.hadoop.conf.Configuration clientConfExtras, String libdir, org.apache.hadoop.fs.Path tempPath, boolean miniClusterTestRun) throws IOException, SliderException
fileSystem - filesystemserviceConf - configuration of the clientlauncher - launcher to set upinstanceDescription - instance description being launchedsnapshotConfDirPath - generatedConfDirPath - clientConfExtras - libdir - tempPath - miniClusterTestRun - flag set to true on a mini cluster runIOExceptionSliderExceptionprotected void mergeTemplates(AggregateConf instanceConf, String internalTemplate, String resourceTemplate, String appConfTemplate) throws IOException
instanceConf - instance to patchinternalTemplate - patch to internal.jsonresourceTemplate - path to resources.jsonappConfTemplate - path to app_conf.jsonIOException - any IO problemspublic void preflightValidateClusterConfiguration(SliderFileSystem sliderFileSystem, String clustername, org.apache.hadoop.conf.Configuration configuration, AggregateConf instanceDefinition, org.apache.hadoop.fs.Path clusterDirPath, org.apache.hadoop.fs.Path generatedConfDirPath, boolean secure) throws SliderException, IOException
sliderFileSystem - filesystemclustername - name of the clusterconfiguration - cluster configurationinstanceDefinition - cluster specificationclusterDirPath - directory of the clustergeneratedConfDirPath - path to place generated artifactssecure - flag to indicate that the cluster is secureSliderException - on any validation issueIOException - on any IO problempublic Set<String> getApplicationTags(SliderFileSystem fileSystem, String appDef) throws SliderException
SliderExceptionpublic void processClientOperation(SliderFileSystem fileSystem, String operation, File clientInstallPath, File clientPackage, org.codehaus.jettison.json.JSONObject config, String name) throws SliderException
fileSystem - operation - clientInstallPath - clientPackage - config - name - SliderExceptionCopyright © 2014–2015 The Apache Software Foundation. All rights reserved.