Package org.apache.hadoop.hbase.rest.client

Examples of org.apache.hadoop.hbase.rest.client.RemoteAdmin


   * @return True if we created the table.
   * @throws IOException
   */
  private boolean checkTable() throws IOException {
    HTableDescriptor tableDescriptor = getTableDescriptor();
    RemoteAdmin admin = new RemoteAdmin(new Client(cluster), conf);
    if (!admin.isTableAvailable(tableDescriptor.getName())) {
      admin.createTable(tableDescriptor);
      return true;
    }
    return false;
  }
View Full Code Here


   * @return True if we created the table.
   * @throws IOException
   */
  private boolean checkTable() throws IOException {
    HTableDescriptor tableDescriptor = getTableDescriptor();
    RemoteAdmin admin = new RemoteAdmin(new Client(cluster), conf);
    if (!admin.isTableAvailable(tableDescriptor.getName())) {
      admin.createTable(tableDescriptor);
      return true;
    }
    return false;
  }
View Full Code Here

   * @return True if we created the table.
   * @throws IOException
   */
  private boolean checkTable() throws IOException {
    HTableDescriptor tableDescriptor = getTableDescriptor();
    RemoteAdmin admin =
      new RemoteAdmin(new Client(cluster), conf, accessToken);
    if (!admin.isTableAvailable(tableDescriptor.getName())) {
      admin.createTable(tableDescriptor);
      return true;
    }
    return false;
  }
View Full Code Here

   * @return True if we created the table.
   * @throws IOException
   */
  private boolean checkTable() throws IOException {
    HTableDescriptor tableDescriptor = getTableDescriptor();
    RemoteAdmin admin = new RemoteAdmin(new Client(cluster), conf);
    if (!admin.isTableAvailable(tableDescriptor.getTableName().getName())) {
      admin.createTable(tableDescriptor);
      return true;
    }
    return false;
  }
View Full Code Here

   * @param cmd Command to run.
   * @throws IOException
   */
  private void runNIsMoreThanOne(final Class<? extends Test> cmd)
  throws IOException, InterruptedException, ClassNotFoundException {
    RemoteAdmin remoteAdmin = new RemoteAdmin(new Client(cluster), getConf());
    checkTable(remoteAdmin);
    if (nomapred) {
      doMultipleClients(cmd);
    } else {
      doMapReduce(cmd);
View Full Code Here

      public void setStatus(String msg) throws IOException {
        LOG.info(msg);
      }
    };

    RemoteAdmin admin = null;
    try {
      Client client = new Client(cluster);
      admin = new RemoteAdmin(client, getConf());
      checkTable(admin);
      runOneClient(cmd, 0, this.R, this.R, this.flushCommits, this.writeToWAL,
        this.useTags, this.noOfTags, this.connection, status);
    } catch (Exception e) {
      LOG.error("Failed", e);
View Full Code Here

   * @param cmd Command to run.
   * @throws IOException
   */
  private void runNIsMoreThanOne(final Class<? extends Test> cmd)
  throws IOException, InterruptedException, ClassNotFoundException {
    RemoteAdmin remoteAdmin = new RemoteAdmin(new Client(cluster), getConf());
    checkTable(remoteAdmin);
    if (nomapred) {
      doMultipleClients(cmd);
    } else {
      doMapReduce(cmd);
View Full Code Here

      public void setStatus(String msg) throws IOException {
        LOG.info(msg);
      }
    };

    RemoteAdmin admin = null;
    try {
      Client client = new Client(cluster);
      admin = new RemoteAdmin(client, getConf());
      checkTable(admin);
      runOneClient(cmd, 0, this.R, this.R, this.flushCommits, this.writeToWAL,
        this.useTags, this.noOfTags, this.connection, status);
    } catch (Exception e) {
      LOG.error("Failed", e);
View Full Code Here

   * @return True if we created the table.
   * @throws IOException
   */
  private boolean checkTable() throws IOException {
    HTableDescriptor tableDescriptor = getTableDescriptor();
    RemoteAdmin admin = new RemoteAdmin(new Client(cluster), conf);
    if (!admin.isTableAvailable(tableDescriptor.getName())) {
      admin.createTable(tableDescriptor);
      return true;
    }
    return false;
  }
View Full Code Here

    InetAddress restAddress = cluster.getInstanceMatching(RolePredicates.role(
      HBaseRestServerClusterActionHandler.ROLE)).getPublicAddress();
    restClient = new Client(new org.apache.hadoop.hbase.rest.client.Cluster()
      .add(restAddress.getHostName(), HBaseRestServerClusterActionHandler.
        PORT));
    remoteAdmin = new RemoteAdmin(restClient, conf);
    remoteMetaTable = new RemoteHTable(restClient, conf,
      HConstants.META_TABLE_NAME, null);
    waitForMaster();
    running = true;
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.rest.client.RemoteAdmin

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.