Package org.apache.hadoop.hbase.client

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.tableExists()



    CommandProcessorResponse responseThree = driver.run(tableQuery);

    HBaseAdmin hAdmin = new HBaseAdmin(getHbaseConf());
    boolean doesTableExist = hAdmin.tableExists(hbaseTableName);
    assertTrue(doesTableExist);

    populateHBaseTable(hbaseTableName);

    Configuration conf = new Configuration(getHbaseConf());
View Full Code Here



    CommandProcessorResponse responseThree = driver.run(tableQuery);

    HBaseAdmin hAdmin = new HBaseAdmin(getHbaseConf());
    boolean doesTableExist = hAdmin.tableExists(hbaseTableName);
    assertTrue(doesTableExist);


    createTestDataFile(POPTXT_FILE_NAME);
View Full Code Here

          + "TBLPROPERTIES ('hbase.columns.mapping'=':key,cf1:val')");

    assertEquals(0, response.getResponseCode());

    HBaseAdmin hAdmin = new HBaseAdmin(getHbaseConf());
    boolean doesTableExist = hAdmin.tableExists("test_table");

    assertTrue(doesTableExist);

    RevisionManager rm = HBaseRevisionManagerUtil.getOpenedRevisionManager(hcatConf);
    rm.open();
View Full Code Here

    rm.open();
    //Should be able to successfully query revision manager
    rm.getAbortedWriteTransactions("test_table", "cf1");

    hcatDriver.run("drop table test_table");
    doesTableExist = hAdmin.tableExists("test_table");
    assertTrue(doesTableExist == false);

    try {
      rm.getAbortedWriteTransactions("test_table", "cf1");
    } catch (Exception e) {
View Full Code Here

    assertEquals(0, response.getResponseCode());

    //HBase table gets created with lower case unless specified as a table property.
    HBaseAdmin hAdmin = new HBaseAdmin(getHbaseConf());
    boolean doesTableExist = hAdmin.tableExists("test_table");

    assertTrue(doesTableExist);

    RevisionManager rm = HBaseRevisionManagerUtil.getOpenedRevisionManager(hcatConf);
    rm.open();
View Full Code Here

    rm.open();
    //Should be able to successfully query revision manager
    rm.getAbortedWriteTransactions("test_table", "cf1");

    hcatDriver.run("drop table test_table");
    doesTableExist = hAdmin.tableExists("test_table");
    assertTrue(doesTableExist == false);

    try {
      rm.getAbortedWriteTransactions("test_table", "cf1");
    } catch (Exception e) {
View Full Code Here

          " 'hbase.table.name'='CaseSensitiveTable')");

    assertEquals(0, response.getResponseCode());

    HBaseAdmin hAdmin = new HBaseAdmin(getHbaseConf());
    boolean doesTableExist = hAdmin.tableExists("CaseSensitiveTable");

    assertTrue(doesTableExist);

    RevisionManager rm = HBaseRevisionManagerUtil.getOpenedRevisionManager(hcatConf);
    rm.open();
View Full Code Here

    rm.open();
    //Should be able to successfully query revision manager
    rm.getAbortedWriteTransactions("CaseSensitiveTable", "cf1");

    hcatDriver.run("drop table test_table");
    doesTableExist = hAdmin.tableExists("CaseSensitiveTable");
    assertTrue(doesTableExist == false);

    try {
      rm.getAbortedWriteTransactions("CaseSensitiveTable", "cf1");
    } catch (Exception e) {
View Full Code Here

          + "TBLPROPERTIES ('hbase.columns.mapping'=':key,cf1:val')");

    assertEquals(0, response.getResponseCode());

    HBaseAdmin hAdmin = new HBaseAdmin(getHbaseConf());
    boolean doesTableExist = hAdmin.tableExists("mytable");
    assertTrue(doesTableExist);

    //Now delete the table from hbase
    if (hAdmin.isTableEnabled("mytable")) {
      hAdmin.disableTable("mytable");
View Full Code Here

    //Now delete the table from hbase
    if (hAdmin.isTableEnabled("mytable")) {
      hAdmin.disableTable("mytable");
    }
    hAdmin.deleteTable("mytable");
    doesTableExist = hAdmin.tableExists("mytable");
    assertTrue(doesTableExist == false);

    CommandProcessorResponse responseTwo = hcatDriver.run("drop table mytable");
    assertTrue(responseTwo.getResponseCode() == 0);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.