Search in sources :

Example 1 with RemoteAdmin

use of org.apache.hadoop.hbase.rest.client.RemoteAdmin in project hbase by apache.

the class PerformanceEvaluation method runNIsOne.

private void runNIsOne(final Class<? extends Test> cmd) {
    Status status = new Status() {

        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);
    }
}
Also used : FileStatus(org.apache.hadoop.fs.FileStatus) RemoteAdmin(org.apache.hadoop.hbase.rest.client.RemoteAdmin) Client(org.apache.hadoop.hbase.rest.client.Client) IOException(java.io.IOException)

Example 2 with RemoteAdmin

use of org.apache.hadoop.hbase.rest.client.RemoteAdmin in project hbase by apache.

the class PerformanceEvaluation method runNIsMoreThanOne.

/*
   * We're to run multiple clients concurrently.  Setup a mapreduce job.  Run
   * one map per client.  Then run a single reduce to sum the elapsed times.
   * @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);
    }
}
Also used : RemoteAdmin(org.apache.hadoop.hbase.rest.client.RemoteAdmin) Client(org.apache.hadoop.hbase.rest.client.Client)

Aggregations

Client (org.apache.hadoop.hbase.rest.client.Client)2 RemoteAdmin (org.apache.hadoop.hbase.rest.client.RemoteAdmin)2 IOException (java.io.IOException)1 FileStatus (org.apache.hadoop.fs.FileStatus)1