Class RemoteAdmin

java.lang.Object
org.apache.hadoop.hbase.rest.client.RemoteAdmin

@Private public class RemoteAdmin extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (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
     
    private String
     
    (package private) final long
     
    private static javax.xml.bind.Unmarshaller
     
  • Constructor Summary

    Constructors
    Constructor
    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
    RemoteAdmin(org.apache.hadoop.hbase.rest.client.Client client, org.apache.hadoop.conf.Configuration conf, String accessToken, String pathPrefix)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    createTable(org.apache.hadoop.hbase.client.TableDescriptor 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
     
    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 javax.xml.bind.Unmarshaller
     
    boolean
    isTableAvailable(byte[] tableName)
     
    boolean
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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

      static javax.xml.bind.Unmarshaller getUnmarsheller() throws javax.xml.bind.JAXBException
      Throws:
      javax.xml.bind.JAXBException
    • isTableAvailable

      public boolean isTableAvailable(String tableName) throws IOException
      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

      public org.apache.hadoop.hbase.rest.model.VersionModel getRestVersion() throws IOException
      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

      public boolean isTableAvailable(byte[] tableName) throws IOException
      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

      public void createTable(org.apache.hadoop.hbase.client.TableDescriptor desc) throws IOException
      Creates a new table.
      Parameters:
      desc - table descriptor for table
      Throws:
      IOException - if a remote or network exception occurs
    • deleteTable

      public void deleteTable(String tableName) throws IOException
      Deletes a table.
      Parameters:
      tableName - name of table to delete
      Throws:
      IOException - if a remote or network exception occurs
    • deleteTable

      public void deleteTable(byte[] tableName) throws IOException
      Deletes a table.
      Parameters:
      tableName - name of table to delete
      Throws:
      IOException - if a remote or network exception occurs
    • getTableList

      public org.apache.hadoop.hbase.rest.model.TableListModel getTableList() 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
    • 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