public class YarnRegistryViewForProviders extends Object
| Constructor and Description |
|---|
YarnRegistryViewForProviders(org.apache.hadoop.registry.client.api.RegistryOperations registryOperations,
String user,
String sliderServiceClass,
String instanceName,
org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId) |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteChildren(String path,
boolean recursive)
Delete the children of a path -but not the path itself.
|
void |
deleteComponent(String componentName)
Delete a component
|
String |
getAbsoluteSelfRegistrationPath()
Get the absolute path to where the service has registered itself.
|
org.apache.hadoop.yarn.api.records.ApplicationAttemptId |
getApplicationAttemptId() |
String |
getInstanceName() |
org.apache.hadoop.registry.client.api.RegistryOperations |
getRegistryOperations() |
org.apache.hadoop.registry.client.types.ServiceRecord |
getSelfRegistration() |
String |
getSelfRegistrationPath()
Get the path to where the service has registered itself.
|
String |
getSliderServiceClass() |
String |
getUser() |
void |
putComponent(String componentName,
org.apache.hadoop.registry.client.types.ServiceRecord record)
Add a component under the slider name/entry
|
void |
putComponent(String serviceClass,
String serviceName,
String componentName,
org.apache.hadoop.registry.client.types.ServiceRecord record)
Add a component
|
String |
putService(String serviceClass,
String serviceName,
org.apache.hadoop.registry.client.types.ServiceRecord record,
boolean deleteTreeFirst)
Add a service under a path for the current user
|
String |
putService(String username,
String serviceClass,
String serviceName,
org.apache.hadoop.registry.client.types.ServiceRecord record,
boolean deleteTreeFirst)
Add a service under a path, optionally purging any history
|
String |
registerSelf(org.apache.hadoop.registry.client.types.ServiceRecord record,
boolean deleteTreeFirst)
Add a service under a path for the current user
|
void |
updateSelf()
Update the self record by pushing out the latest version of the service
registration record.
|
public org.apache.hadoop.yarn.api.records.ApplicationAttemptId getApplicationAttemptId()
public String getUser()
public String getSliderServiceClass()
public String getInstanceName()
public org.apache.hadoop.registry.client.api.RegistryOperations getRegistryOperations()
public org.apache.hadoop.registry.client.types.ServiceRecord getSelfRegistration()
public String getSelfRegistrationPath()
public String getAbsoluteSelfRegistrationPath()
public void putComponent(String componentName, org.apache.hadoop.registry.client.types.ServiceRecord record) throws IOException
componentName - component namerecord - record to putIOExceptionpublic void putComponent(String serviceClass, String serviceName, String componentName, org.apache.hadoop.registry.client.types.ServiceRecord record) throws IOException
serviceClass - service class to use under ~usercomponentName - component namerecord - record to putIOExceptionpublic String putService(String username, String serviceClass, String serviceName, org.apache.hadoop.registry.client.types.ServiceRecord record, boolean deleteTreeFirst) throws IOException
username - userserviceClass - service class to use under ~userserviceName - name of the servicerecord - service recorddeleteTreeFirst - perform recursive delete of the path first.IOExceptionpublic String putService(String serviceClass, String serviceName, org.apache.hadoop.registry.client.types.ServiceRecord record, boolean deleteTreeFirst) throws IOException
serviceClass - service class to use under ~userserviceName - name of the servicerecord - service recorddeleteTreeFirst - perform recursive delete of the path firstIOExceptionpublic String registerSelf(org.apache.hadoop.registry.client.types.ServiceRecord record, boolean deleteTreeFirst) throws IOException
serviceClass - service class to use under ~userserviceName - name of the servicerecord - service recorddeleteTreeFirst - perform recursive delete of the path firstIOExceptionpublic void updateSelf()
throws IOException
IOException - any failure.public void deleteComponent(String componentName) throws IOException
componentName - component nameIOExceptionpublic void deleteChildren(String path, boolean recursive) throws IOException
path - path to deleterecursive - flag to request recursive deletesIOException - IO problemsCopyright © 2014–2015 The Apache Software Foundation. All rights reserved.