public interface RolesResource
Modifier and Type | Method and Description |
---|---|
ApiRoleList |
createRoles(ApiRoleList roles)
Create new roles in a given service.
|
ApiRole |
deleteRole(String roleName)
Deletes a role from a given service.
|
InputStream |
getFullLog(String roleName)
Retrieves the log file for the role's main process.
|
ApiMetricList |
getMetrics(String roleName,
String from,
String to,
List<String> metrics,
DataView dataView)
Deprecated.
This endpoint is not supported as of v6. Use the timeseries API
instead. To get all metrics for a role with the timeseries API use
the query:
'select * where roleName = $ROLE_NAME'. To get specific metrics for a role use the query: 'select $METRIC_NAME1, $METRIC_NAME2 where roleName = $ROLE_NAME'. For more information see the tsquery language documentation. |
InputStream |
getStandardError(String roleName)
Retrieves the role's standard error output.
|
InputStream |
getStandardOutput(String roleName)
Retrieves the role's standard output.
|
ApiCommandList |
listActiveCommands(String roleName,
DataView dataView)
List active role commands.
|
ApiRole |
readRole(String roleName)
Retrieves detailed information about a role.
|
ApiConfigList |
readRoleConfig(String roleName,
DataView dataView)
Retrieves the configuration of a specific role.
|
ApiRoleList |
readRoles()
Lists all roles of a given service.
|
ApiConfigList |
updateRoleConfig(String roleName,
String message,
ApiConfigList config)
Updates the role configuration with the given values.
|
@Path(value="/") ApiRoleList createRoles(ApiRoleList roles)
Service Type | Available Role Types |
---|---|
HDFS (CDH3) | NAMENODE, DATANODE, SECONDARYNAMENODE, BALANCER, GATEWAY |
HDFS (CDH4) | NAMENODE, DATANODE, SECONDARYNAMENODE, BALANCER, HTTPFS, FAILOVERCONTROLLER, GATEWAY, JOURNALNODE |
HDFS (CDH5) | NAMENODE, DATANODE, SECONDARYNAMENODE, BALANCER, HTTPFS, FAILOVERCONTROLLER, GATEWAY, JOURNALNODE, NFSGATEWAY | MAPREDUCE | JOBTRACKER, TASKTRACKER, GATEWAY, FAILOVERCONTROLLER, | HBASE | MASTER, REGIONSERVER, GATEWAY, HBASETHRIFTSERVER, HBASERESTSERVER |
YARN | RESOURCEMANAGER, NODEMANAGER, JOBHISTORY, GATEWAY |
OOZIE | OOZIE_SERVER |
ZOOKEEPER | SERVER |
HUE (CDH3) | HUE_SERVER, BEESWAX_SERVER, KT_RENEWER, JOBSUBD |
HUE (CDH4) | HUE_SERVER, BEESWAX_SERVER, KT_RENEWER |
HUE (CDH5) | HUE_SERVER, KT_RENEWER |
HUE (CDH5 5.5+) | HUE_SERVER, KT_RENEWER, HUE_LOAD_BALANCER |
FLUME | AGENT |
IMPALA (CDH4) | IMPALAD, STATESTORE, CATALOGSERVER |
IMPALA (CDH5) | IMPALAD, STATESTORE, CATALOGSERVER, LLAMA |
HIVE | HIVESERVER2, HIVEMETASTORE, WEBHCAT, GATEWAY |
SOLR | SOLR_SERVER, GATEWAY |
SQOOP | SQOOP_SERVER |
SQOOP_CLIENT | GATEWAY |
SENTRY | SENTRY_SERVER |
ACCUMULO16 | GARBAGE_COLLECTOR, GATEWAY, ACCUMULO16_MASTER, MONITOR, ACCUMULO16_TSERVER, TRACER |
KMS | KMS |
KS_INDEXER | HBASE_INDEXER |
SPARK_ON_YARN | GATEWAY, SPARK_YARN_HISTORY_SERVER |
roles
- Roles to create.@Path(value="/{roleName}") ApiRole deleteRole(String roleName)
roleName
- The role name.@Path(value="/") ApiRoleList readRoles()
@Path(value="/{roleName}") ApiRole readRole(String roleName)
roleName
- The role name.@Path(value="/{roleName}/config") ApiConfigList readRoleConfig(String roleName, DataView dataView)
roleName
- The role to look up.dataView
- The view of the data to materialize,
either "summary" or "full".@Path(value="/{roleName}/config") ApiConfigList updateRoleConfig(String roleName, String message, ApiConfigList config)
If a value is set in the given configuration, it will be added to the role's configuration, replacing any existing entries. If a value is unset (its value is null), the existing configuration for the attribute will be erased, if any.
Attributes that are not listed in the input will maintain their current values in the configuration.
roleName
- The role to modify.message
- Optional message describing the changes.config
- Configuration changes.@Deprecated @Path(value="/{roleName}/metrics") ApiMetricList getMetrics(String roleName, String from, String to, List<String> metrics, DataView dataView)
By default, this call will look up all metrics available for the role. If only specific metrics are desired, use the metrics parameter.
By default, the returned results correspond to a 5 minute window based on the provided end time (which defaults to the current server time). The from and to parameters can be used to control the window being queried. A maximum window of 3 hours is enforced.
When requesting a "full" view, aside from the extended properties of the returned metric data, the collection will also contain information about all metrics available for the role, even if no readings are available in the requested window.
roleName
- The name of the role.from
- Start of the period to query.to
- End of the period to query.metrics
- Filter for which metrics to query.dataView
- The view of the data to materialize,
either "summary" or "full".@Path(value="/{roleName}/commands") ApiCommandList listActiveCommands(String roleName, DataView dataView)
roleName
- The role to start.dataView
- The view of the data to materialize,
either "summary" or "full".@Path(value="/{roleName}/logs/full") InputStream getFullLog(String roleName)
If the role is not started, this will be the log file associated with the last time the role was run.
Log files are returned as plain text (type "text/plain").
roleName
- The role to fetch logs from.@Path(value="/{roleName}/logs/stdout") InputStream getStandardOutput(String roleName)
If the role is not started, this will be the output associated with the last time the role was run.
Log files are returned as plain text (type "text/plain").
roleName
- The role to fetch stdout from.@Path(value="/{roleName}/logs/stderr") InputStream getStandardError(String roleName)
If the role is not started, this will be the output associated with the last time the role was run.
Log files are returned as plain text (type "text/plain").
roleName
- The role to fetch stderr from.Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.