Examples of tableExists()


Examples of edu.american.student.redis.foreman.RedisForeman.tableExists()

  @Override
  public void checkOutputSpecs(JobContext arg0) throws IOException, InterruptedException
  {
    RedisForeman foreman = new RedisForeman();
    boolean tableExists = foreman.tableExists(RedisBigTableOutputFormat.table);
    if (!tableExists)
    {
      throw new IOException(MessageFactory.objective("Validate output format").issue("Table does not exist").objects(table).toString());
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.HConnection.tableExists()

  public ReturnMsg execute(final Configuration conf) {
    if (this.tableName == null)
      return new ReturnMsg(0, "Syntax error : Please check 'Describe' syntax");
    try {
      HConnection conn = HConnectionManager.getConnection(conf);
      if (!conn.tableExists(this.tableName)) {
        return new ReturnMsg(0, "Table not found");
      }
      HTableDescriptor [] tables = conn.listTables();
      HColumnDescriptor [] columns = null;
      for (int i = 0; i < tables.length; i++) {
View Full Code Here

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

    assertFalse("No table deleted yet", cp.wasDeleteTableCalled());
    assertFalse("Delete table handler should not be called.",
        cp.wasDeleteTableHandlerCalled());
    admin.deleteTable(TEST_TABLE);
    assertFalse("Test table should have been deleted",
        admin.tableExists(TEST_TABLE));
    assertTrue("Coprocessor should have been called on table delete",
        cp.wasDeleteTableCalled());
    assertTrue("Delete table handler should be called.",
        cp.wasDeleteTableHandlerCalled());
  }
View Full Code Here

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

    final byte[] family2 = Bytes.toBytes("f2");
    final byte[] qualifier = Bytes.toBytes("q");

    // create table
    HBaseAdmin admin = TEST_UTIL.getHBaseAdmin();
    if (admin.tableExists(tableName)) {
      admin.disableTable(tableName);
      admin.deleteTable(tableName);
    }
    HTableDescriptor htd = new HTableDescriptor(tableName);
    htd.addFamily(new HColumnDescriptor(family1));
View Full Code Here

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

    final byte[] family2 = Bytes.toBytes("f2");
    final byte[] qualifier = Bytes.toBytes("q");

    // create table
    HBaseAdmin admin = TEST_UTIL.getHBaseAdmin();
    if (admin.tableExists(tableName)) {
      admin.disableTable(tableName);
      admin.deleteTable(tableName);
    }
    HTableDescriptor htd = new HTableDescriptor(tableName);
    htd.addFamily(new HColumnDescriptor(family1));
View Full Code Here

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

    final byte[] qualifier = Bytes.toBytes("q");
    final byte[] user = Bytes.toBytes("user");

    // create table
    HBaseAdmin admin = TEST_UTIL.getHBaseAdmin();
    if (admin.tableExists(tableName)) {
      admin.disableTable(tableName);
      admin.deleteTable(tableName);
    }
    HTableDescriptor htd = new HTableDescriptor(tableName);
    htd.addFamily(new HColumnDescriptor(family1));
View Full Code Here

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

      cp.preModifyColumnCalledOnly());

    // delete table
    admin.deleteTable(TEST_TABLE);
    assertFalse("Test table should have been deleted",
        admin.tableExists(TEST_TABLE));
    // preDeleteTable can't bypass default action.
    assertTrue("Coprocessor should have been called on table delete",
      cp.wasDeleteTableCalled());

View Full Code Here

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

    // delete table
    assertFalse("No table deleted yet", cp.wasDeleteTableCalled());
    admin.deleteTable(TEST_TABLE);
    assertFalse("Test table should have been deleted",
        admin.tableExists(TEST_TABLE));
    assertTrue("Coprocessor should have been called on table delete",
        cp.wasDeleteTableCalled());
  }

  private void modifyTableSync(HBaseAdmin admin, byte[] tableName, HTableDescriptor htd)
View Full Code Here

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

    HTableDescriptor htd = new HTableDescriptor(TEST_TABLE);
    htd.addFamily(new HColumnDescriptor(TEST_FAMILY));
    HBaseAdmin admin = UTIL.getHBaseAdmin();

    // delete table if exists
    if (admin.tableExists(TEST_TABLE)) {
      UTIL.deleteTable(TEST_TABLE);
    }

    admin.createTable(htd);
    admin.disableTable(TEST_TABLE);
View Full Code Here

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

    job.setMapperClass(mapperClass);

    String hfileOutPath = conf.get(BULK_OUTPUT_CONF_KEY);
    String columns[] = conf.getStrings(COLUMNS_CONF_KEY);
    if (hfileOutPath != null) {
      if (!admin.tableExists(tableName)) {
        LOG.warn(format("Table '%s' does not exist.", tableName));
        // TODO: this is backwards. Instead of depending on the existence of a table,
        // create a sane splits file for HFileOutputFormat based on data sampling.
        createTable(admin, tableName, columns);
      }
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.