@Override public void alter_partition(String dbName, String tblName, Partition newPart, EnvironmentContext environmentContext) throws InvalidOperationException, MetaException, TException { alter_partition(getDefaultCatalog(conf), dbName, tblName, newPart, environmentContext); }
@Override public void alter_partition(String dbName, String tblName, Partition newPart) throws InvalidOperationException, MetaException, TException { alter_partition(getDefaultCatalog(conf), dbName, tblName, newPart, null); }
protected List<Partition> setupProjectionTestTable() throws Throwable { //String catName = "catName"; String dbName = "compdb"; String tblName = "comptbl"; String typeName = "Person"; //String catName = "catName"; Map<String, String> dummyparams = new HashMap<>(); dummyparams.put("key1", "val1"); dummyparams.put("excludeKey1", "excludeVal1"); dummyparams.put("excludeKey2", "excludeVal2"); cleanUp(dbName, tblName, typeName); List<List<String>> values = new ArrayList<>(); values.add(makeVals("2008-07-01 14:13:12", "14")); values.add(makeVals("2008-07-01 14:13:12", "15")); values.add(makeVals("2008-07-02 14:13:12", "15")); values.add(makeVals("2008-07-03 14:13:12", "151")); List<Partition> createdPartitions = createMultiPartitionTableSchema(dbName, tblName, typeName, values); Table tbl = client.getTable(dbName, tblName); // add some dummy parameters to one of the partitions to confirm the fetching logic is working Partition newPartition = createdPartitions.remove(0); //Map<String, String> sdParams = new HashMap<>(); //dummyparams.put("sdkey1", "sdval1"); newPartition.setParameters(dummyparams); //newPartition.getSd().setParameters(sdParams); client.alter_partition(dbName, tblName, newPartition); createdPartitions.add(0, newPartition); return createdPartitions; }
msc.alter_partition(dbName, tblName, part); listSize++; assertEquals(notifyList.size(), listSize);
client.alter_partition(dbName, viewName, part2, null);
part2.getSd().setNumBuckets(12); part2.getSd().getSerdeInfo().getParameters().put("abc", "1"); client.alter_partition(dbName, tblName, part2, null);