Examples of truncateTable()


Examples of com.alibaba.wasp.client.MasterAdminKeepAliveConnection.truncateTable()

              .getTableNames()) {
            byte[] byteName = Bytes.toBytes(tableName);
            if (this.connection.isTableDisabled(byteName)) {
              MasterAdminProtos.TruncateTableRequest request = RequestConverter
                  .buildTruncateTableRequest(byteName);
              responses.add(masterAdminKeepAliveConnection.truncateTable(null,
                  request));
            } else {
              throw new TableNotDisabledException(tableName);
            }
          }
View Full Code Here

Examples of com.foundationdb.server.api.DMLFunctions.truncateTable()

        DMLFunctions dml = new BasicDMLFunctions(schemaManager(), store(), listenerService);
        if(table.isRoot()) {
            // Root table and no child tables, can delete all associated trees
            store().removeTrees(session, table);
        } else {
            dml.truncateTable(session, table.getTableId(), false);
            store().deleteIndexes(session, table.getIndexesIncludingInternal());
            store().deleteIndexes(session, table.getGroupIndexes());

            if (table.getIdentityColumn() != null) {
                Collection<Sequence> sequences = Collections.singleton(table.getIdentityColumn().getIdentityGenerator());
View Full Code Here

Examples of com.nearinfinity.honeycomb.mysql.HandlerProxy.truncateTable()

            }

            assertNull(proxy.getNextRow());

            proxy.endScan();
            proxy.truncateTable();
        }

        proxy.closeTable();
        proxy.dropTable(tableName);
    }
View Full Code Here

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

    admin.modifyColumn(TEST_TABLE, hcd1);
    assertTrue("Second column family should be modified",
      cp.preModifyColumnCalledOnly());

    // truncate table
    admin.truncateTable(TEST_TABLE, false);

    // delete table
    admin.disableTable(TEST_TABLE);
    assertTrue(admin.isTableDisabled(TEST_TABLE));
    admin.deleteTable(TEST_TABLE);
View Full Code Here

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

    Admin admin = util.getHBaseAdmin();

    boolean preserveSplits = random.nextBoolean();
    LOG.info("Performing action: Truncate table " + tableName.getNameAsString() +
             "preserve splits " + preserveSplits);
    admin.truncateTable(tableName, preserveSplits);
  }
}
View Full Code Here

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

    admin.modifyColumn(TEST_TABLE, hcd1);
    assertTrue("Second column family should be modified",
      cp.preModifyColumnCalledOnly());

    // truncate table
    admin.truncateTable(TEST_TABLE, false);

    // delete table
    admin.disableTable(TEST_TABLE);
    assertTrue(admin.isTableDisabled(TEST_TABLE));
    admin.deleteTable(TEST_TABLE);
View Full Code Here

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

   * @param preserveRegions keep the existing split points
   * @return HTable for the new table
   */
  public HTable truncateTable(final TableName tableName, final boolean preserveRegions) throws IOException {
    Admin admin = getHBaseAdmin();
    admin.truncateTable(tableName, preserveRegions);
    return new HTable(getConfiguration(), tableName);
  }

  /**
   * Truncate a table using the admin command.
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.