@AfterClass public static void cleanupTests() throws Exception { synchronized (MaprDBTestsSuite.class) { if (initCount.decrementAndGet() == 0) { HBaseTestsSuite.tearDownCluster(); admin.close(); } } }
Table createOrGetTable(String tableName, int recordNum) { if (admin.tableExists(tableName)) { return MapRDBImpl.getTable(tableName); // admin.deleteTable(tableName); } else { TableDescriptor desc = new TableDescriptorImpl(new Path(tableName)); int splits = (recordNum / SPLIT_SIZE) - (((recordNum % SPLIT_SIZE) > 1)? 0 : 1); String[] splitsStr = new String[splits]; StringBuilder strBuilder = new StringBuilder("Splits:"); for (int i = 0; i < splits; ++i) { splitsStr[i] = String.format("%d", (i+1)*SPLIT_SIZE); strBuilder.append(splitsStr[i] + ", "); } System.out.print(strBuilder.toString()); return admin.createTable(desc, splitsStr); } }
try { Set<DrillIndexDescriptor> idxSet = new HashSet<>(); Collection<IndexDesc> indexes = admin().getTableIndexes(new Path(tableName)); if (indexes.size() == 0 ) { logger.error("No index returned from Admin.getTableIndexes for table {}", tableName);
Admin admin = MaprDBTestsSuite.getAdmin(); if (admin != null) { if (admin.tableExists(PRIMARY_TABLE_NAME)) { admin.deleteTable(PRIMARY_TABLE_NAME);
@AfterClass public static void cleanupTableIndexes() throws Exception { Admin admin = MaprDBTestsSuite.getAdmin(); if (admin != null) { if (admin.tableExists(PRIMARY_TABLE_NAME)) { // admin.deleteTable(PRIMARY_TABLE_NAME); } } test(defaultnonCoveringSelectivityThreshold); }
DBTests.setTableStatsSendInterval(1); if (admin.tableExists(tablePath)) {
try { Set<DrillIndexDescriptor> idxSet = new HashSet<>(); Collection<IndexDesc> indexes = admin().getTableIndexes(new Path(tableName)); if (indexes.size() == 0 ) { logger.error("No index returned from Admin.getTableIndexes for table {}", tableName);