@InterfaceAudience.Private public class RemoteAdmin extends Object
Modifier and Type | Field and Description |
---|---|
(package private) String |
accessToken |
(package private) org.apache.hadoop.hbase.rest.client.Client |
client |
(package private) org.apache.hadoop.conf.Configuration |
conf |
(package private) int |
maxRetries |
(package private) long |
sleepTime |
private static Unmarshaller |
versionClusterUnmarshaller |
Constructor and Description |
---|
RemoteAdmin(org.apache.hadoop.hbase.rest.client.Client client,
org.apache.hadoop.conf.Configuration conf)
Constructor
|
RemoteAdmin(org.apache.hadoop.hbase.rest.client.Client client,
org.apache.hadoop.conf.Configuration conf,
String accessToken)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
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 |
getClusterStatus() |
org.apache.hadoop.hbase.rest.model.StorageClusterVersionModel |
getClusterVersion() |
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 |
getRestVersion() |
org.apache.hadoop.hbase.rest.model.TableListModel |
getTableList() |
(package private) static Unmarshaller |
getUnmarsheller() |
boolean |
isTableAvailable(byte[] tableName) |
boolean |
isTableAvailable(String tableName) |
final org.apache.hadoop.hbase.rest.client.Client client
final org.apache.hadoop.conf.Configuration conf
final String accessToken
final int maxRetries
final long sleepTime
private static volatile Unmarshaller versionClusterUnmarshaller
public RemoteAdmin(org.apache.hadoop.hbase.rest.client.Client client, org.apache.hadoop.conf.Configuration conf)
client
- conf
- public RemoteAdmin(org.apache.hadoop.hbase.rest.client.Client client, org.apache.hadoop.conf.Configuration conf, String accessToken)
client
- conf
- accessToken
- static Unmarshaller getUnmarsheller() throws JAXBException
JAXBException
public boolean isTableAvailable(String tableName) throws IOException
tableName
- name of table to checkIOException
- if a remote or network exception occurspublic org.apache.hadoop.hbase.rest.model.VersionModel getRestVersion() throws IOException
IOException
- if the endpoint does not exist, there is a timeout, or some other
general failure modepublic org.apache.hadoop.hbase.rest.model.StorageClusterStatusModel getClusterStatus() throws IOException
IOException
- if the endpoint does not exist, there is a timeout, or some other general failure modepublic org.apache.hadoop.hbase.rest.model.StorageClusterVersionModel getClusterVersion() throws IOException
IOException
- if the endpoint does not exist, there is a timeout, or some other
general failure modepublic boolean isTableAvailable(byte[] tableName) throws IOException
tableName
- name of table to checkIOException
- if a remote or network exception occurspublic void createTable(org.apache.hadoop.hbase.HTableDescriptor desc) throws IOException
desc
- table descriptor for tableIOException
- if a remote or network exception occurspublic void deleteTable(String tableName) throws IOException
tableName
- name of table to deleteIOException
- if a remote or network exception occurspublic void deleteTable(byte[] tableName) throws IOException
tableName
- name of table to deleteIOException
- if a remote or network exception occurspublic org.apache.hadoop.hbase.rest.model.TableListModel getTableList() throws IOException
IOException
- if the endpoint does not exist, there is a timeout, or some other
general failure modeprivate XMLStreamReader getInputStream(org.apache.hadoop.hbase.rest.client.Response response) throws IOException
response
- The REST server's response.IOException
- If the document fails to parseCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.