use of org.apache.hadoop.hive.metastore.client.builder.DatabaseBuilder in project hive by apache.
the class TestDropPartitions method setUp.
@Before
public void setUp() throws Exception {
// Get new client
client = metaStore.getClient();
// Clean up the database
client.dropDatabase(DB_NAME, true, true, true);
metaStore.cleanWarehouseDirs();
Database db = new DatabaseBuilder().setName(DB_NAME).build();
client.createDatabase(db);
// Create test tables with 3 partitions
createTable(TABLE_NAME, getYearAndMonthPartCols(), null);
PARTITIONS[0] = createPartition(Lists.newArrayList("2017", "march"), getYearAndMonthPartCols());
PARTITIONS[1] = createPartition(Lists.newArrayList("2017", "april"), getYearAndMonthPartCols());
PARTITIONS[2] = createPartition(Lists.newArrayList("2018", "march"), getYearAndMonthPartCols());
}
Aggregations