Class RemoteAdmin
java.lang.Object
org.apache.hadoop.hbase.rest.client.RemoteAdmin
-
Field Summary
FieldsModifier 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 intprivate String(package private) final longprivate static javax.xml.bind.Unmarshaller -
Constructor Summary
ConstructorsConstructorDescriptionRemoteAdmin(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) ConstructorRemoteAdmin(org.apache.hadoop.hbase.rest.client.Client client, org.apache.hadoop.conf.Configuration conf, String accessToken, String pathPrefix) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateTable(org.apache.hadoop.hbase.client.TableDescriptor desc) Creates a new table.voiddeleteTable(byte[] tableName) Deletes a table.voiddeleteTable(String tableName) Deletes a table.org.apache.hadoop.hbase.rest.model.StorageClusterStatusModelorg.apache.hadoop.hbase.rest.model.StorageClusterVersionModelprivate XMLStreamReadergetInputStream(org.apache.hadoop.hbase.rest.client.Response response) Convert the REST server's response to an XML reader.org.apache.hadoop.hbase.rest.model.VersionModelorg.apache.hadoop.hbase.rest.model.TableListModel(package private) static javax.xml.bind.UnmarshallerbooleanisTableAvailable(byte[] tableName) booleanisTableAvailable(String tableName)
-
Field Details
-
client
-
conf
-
accessToken
-
maxRetries
-
sleepTime
-
pathPrefix
-
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 -
RemoteAdmin
public RemoteAdmin(org.apache.hadoop.hbase.rest.client.Client client, org.apache.hadoop.conf.Configuration conf, String accessToken, String pathPrefix) Constructor
-
-
Method Details
-
getUnmarsheller
- Throws:
javax.xml.bind.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
-