Class RemoteAdmin
java.lang.Object
org.apache.hadoop.hbase.rest.client.RemoteAdmin
-
Field Summary
Modifier and TypeFieldDescription(package private) final String
(package private) final org.apache.hadoop.hbase.rest.client.Client
(package private) final org.apache.hadoop.conf.Configuration
(package private) final int
(package private) final long
private static Unmarshaller
-
Constructor Summary
ConstructorDescriptionRemoteAdmin
(org.apache.hadoop.hbase.rest.client.Client client, org.apache.hadoop.conf.Configuration conf) ConstructorRemoteAdmin
(org.apache.hadoop.hbase.rest.client.Client client, org.apache.hadoop.conf.Configuration conf, String accessToken) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
createTable
(org.apache.hadoop.hbase.HTableDescriptor desc) Creates a new table.void
deleteTable
(byte[] tableName) Deletes a table.void
deleteTable
(String tableName) Deletes a table.org.apache.hadoop.hbase.rest.model.StorageClusterStatusModel
org.apache.hadoop.hbase.rest.model.StorageClusterVersionModel
private XMLStreamReader
getInputStream
(org.apache.hadoop.hbase.rest.client.Response response) Convert the REST server's response to an XML reader.org.apache.hadoop.hbase.rest.model.VersionModel
org.apache.hadoop.hbase.rest.model.TableListModel
(package private) static Unmarshaller
boolean
isTableAvailable
(byte[] tableName) boolean
isTableAvailable
(String tableName)
-
Field Details
-
client
-
conf
-
accessToken
-
maxRetries
-
sleepTime
-
versionClusterUnmarshaller
-
-
Constructor Details
-
RemoteAdmin
public RemoteAdmin(org.apache.hadoop.hbase.rest.client.Client client, org.apache.hadoop.conf.Configuration conf) Constructor -
RemoteAdmin
public RemoteAdmin(org.apache.hadoop.hbase.rest.client.Client client, org.apache.hadoop.conf.Configuration conf, String accessToken) Constructor
-
-
Method Details
-
getUnmarsheller
- Throws:
JAXBException
-
isTableAvailable
- Parameters:
tableName
- name of table to check- Returns:
- true if all regions of the table are available
- Throws:
IOException
- if a remote or network exception occurs
-
getRestVersion
- Returns:
- string representing the rest api's version if the endpoint does not exist, there is a timeout, or some other general failure mode
- Throws:
IOException
-
getClusterStatus
public org.apache.hadoop.hbase.rest.model.StorageClusterStatusModel getClusterStatus() throws IOException- Returns:
- string representing the cluster's version
- Throws:
IOException
- if the endpoint does not exist, there is a timeout, or some other general failure mode
-
getClusterVersion
public org.apache.hadoop.hbase.rest.model.StorageClusterVersionModel getClusterVersion() throws IOException- Returns:
- string representing the cluster's version if the endpoint does not exist, there is a timeout, or some other general failure mode
- Throws:
IOException
-
isTableAvailable
- Parameters:
tableName
- name of table to check- Returns:
- true if all regions of the table are available
- Throws:
IOException
- if a remote or network exception occurs
-
createTable
Creates a new table.- Parameters:
desc
- table descriptor for table- Throws:
IOException
- if a remote or network exception occurs
-
deleteTable
Deletes a table.- Parameters:
tableName
- name of table to delete- Throws:
IOException
- if a remote or network exception occurs
-
deleteTable
Deletes a table.- Parameters:
tableName
- name of table to delete- Throws:
IOException
- if a remote or network exception occurs
-
getTableList
- Returns:
- string representing the cluster's version if the endpoint does not exist, there is a timeout, or some other general failure mode
- Throws:
IOException
-
getInputStream
private XMLStreamReader getInputStream(org.apache.hadoop.hbase.rest.client.Response response) throws IOException Convert the REST server's response to an XML reader.- Parameters:
response
- The REST server's response.- Returns:
- A reader over the parsed XML document.
- Throws:
IOException
- If the document fails to parse
-