public class SliderApplicationApiRestClient extends BaseRestClient implements SliderApplicationApi
SliderApplicationApi| Constructor and Description |
|---|
SliderApplicationApiRestClient(com.sun.jersey.api.client.Client jerseyClient,
String appmaster)
Create an instance
|
SliderApplicationApiRestClient(com.sun.jersey.api.client.Client jerseyClient,
com.sun.jersey.api.client.WebResource appResource)
Create an instance
|
| Modifier and Type | Method and Description |
|---|---|
com.sun.jersey.api.client.WebResource |
applicationResource(String subpath)
Create a resource under the application path
|
<T> T |
appResourceOperation(HttpVerb method,
String subpath,
Class<T> c) |
<T> T |
appResourceOperation(HttpVerb method,
String subpath,
com.sun.jersey.api.client.GenericType<T> t)
Get operation against a path under the Application
|
Map<String,ComponentInformation> |
enumComponents()
List all components into a map of [name:info]
|
Map<String,ContainerInformation> |
enumContainers()
Get a map of live containers [containerId:info]
|
ApplicationLivenessInformation |
getApplicationLiveness()
Get the application liveness
|
<T> T |
getApplicationResource(String subpath,
Class<T> c)
Get operation against a path under the Application
|
<T> T |
getApplicationResource(String subpath,
com.sun.jersey.api.client.GenericType<T> t)
Get operation against a path under the Application
|
ComponentInformation |
getComponent(String componentName)
Get information about a component
|
ContainerInformation |
getContainer(String containerId)
Get a container from the container Id
|
ConfTreeOperations |
getDesiredAppconf()
Get the desired application configuration
|
AggregateConf |
getDesiredModel()
Get the aggregate desired model
|
ConfTreeOperations |
getDesiredResources()
Get the desired YARN resources
|
NodeInformation |
getLiveNode(String hostname)
Get information about a node
|
NodeInformationList |
getLiveNodes()
List all nodes into a map of [name:info]
|
ConfTreeOperations |
getLiveResources()
Get the live YARN resources
|
ConfTreeOperations |
getResolvedAppconf()
Get the resolved application configuration
|
AggregateConf |
getResolvedModel()
Get the aggregate resolved model
|
ConfTreeOperations |
getResolvedResources()
Get the resolved YARN resources
|
PingInformation |
ping(String text)
Ping as a GET
|
PingInformation |
pingGet(String text)
Ping as a GET
|
PingInformation |
pingPost(String text)
Ping as a POST
|
PingInformation |
pingPut(String text)
Ping as a POST
|
void |
putDesiredResources(ConfTree updated)
Put an updated resources structure.
|
void |
stop(String text)
Stop the AM (async operation)
|
String |
toString() |
public SliderApplicationApiRestClient(com.sun.jersey.api.client.Client jerseyClient,
com.sun.jersey.api.client.WebResource appResource)
jerseyClient - jersey client for operationsappResource - resource of application APIpublic SliderApplicationApiRestClient(com.sun.jersey.api.client.Client jerseyClient,
String appmaster)
jerseyClient - jersey client for operationsappmaster - URL of appmaster/proxy to AMpublic com.sun.jersey.api.client.WebResource applicationResource(String subpath)
subpath - path under applicationpublic <T> T getApplicationResource(String subpath, Class<T> c) throws IOException
T - type expectedsubpath - pathc - class to instantiateIOException - on any problempublic <T> T getApplicationResource(String subpath, com.sun.jersey.api.client.GenericType<T> t) throws IOException
T - type expectedsubpath - patht - type infoIOException - on any problempublic <T> T appResourceOperation(HttpVerb method, String subpath, Class<T> c) throws IOException
T - type expectedmethod - method to execsubpath - pathc - class to instantiateIOException - on any problempublic <T> T appResourceOperation(HttpVerb method, String subpath, com.sun.jersey.api.client.GenericType<T> t) throws IOException
T - type expectedsubpath - patht - type infoIOException - on any problempublic AggregateConf getDesiredModel() throws IOException
SliderApplicationApigetDesiredModel in interface SliderApplicationApiIOException - on any failurepublic ConfTreeOperations getDesiredAppconf() throws IOException
SliderApplicationApigetDesiredAppconf in interface SliderApplicationApiIOException - on any failurepublic ConfTreeOperations getDesiredResources() throws IOException
SliderApplicationApigetDesiredResources in interface SliderApplicationApiIOException - on any failurepublic void putDesiredResources(ConfTree updated) throws IOException
SliderApplicationApiputDesiredResources in interface SliderApplicationApiupdated - updated resourcesIOException - on any problem.public AggregateConf getResolvedModel() throws IOException
SliderApplicationApigetResolvedModel in interface SliderApplicationApiIOException - on any failurepublic ConfTreeOperations getResolvedAppconf() throws IOException
SliderApplicationApigetResolvedAppconf in interface SliderApplicationApiIOException - on any failurepublic ConfTreeOperations getResolvedResources() throws IOException
SliderApplicationApigetResolvedResources in interface SliderApplicationApiIOException - on any failurepublic ConfTreeOperations getLiveResources() throws IOException
SliderApplicationApigetLiveResources in interface SliderApplicationApiIOException - on any failurepublic Map<String,ContainerInformation> enumContainers() throws IOException
SliderApplicationApienumContainers in interface SliderApplicationApiIOException - on any failurepublic ContainerInformation getContainer(String containerId) throws IOException
SliderApplicationApigetContainer in interface SliderApplicationApicontainerId - YARN container IDIOException - on any failurepublic Map<String,ComponentInformation> enumComponents() throws IOException
SliderApplicationApienumComponents in interface SliderApplicationApiIOException - on any failurepublic ComponentInformation getComponent(String componentName) throws IOException
SliderApplicationApigetComponent in interface SliderApplicationApicomponentName - name of the componentIOException - on any failurepublic NodeInformationList getLiveNodes() throws IOException
SliderApplicationApigetLiveNodes in interface SliderApplicationApiIOException - on any failurepublic NodeInformation getLiveNode(String hostname) throws IOException
SliderApplicationApigetLiveNode in interface SliderApplicationApihostname - name of the nodeIOException - on any failurepublic PingInformation ping(String text) throws IOException
SliderApplicationApiping in interface SliderApplicationApitext - text to includeIOException - on any failurepublic PingInformation pingGet(String text) throws IOException
text - text to includeIOException - on any failurepublic PingInformation pingPost(String text) throws IOException
text - text to includeIOException - on any failurepublic PingInformation pingPut(String text) throws IOException
text - text to includeIOException - on any failurepublic void stop(String text) throws IOException
SliderApplicationApistop in interface SliderApplicationApitext - text to includeIOException - on any failurepublic ApplicationLivenessInformation getApplicationLiveness() throws IOException
SliderApplicationApigetApplicationLiveness in interface SliderApplicationApiIOExceptionCopyright © 2014–2015 The Apache Software Foundation. All rights reserved.