use of alluxio.table.common.transform.TransformDefinition in project alluxio by Alluxio.
the class AlluxioCatalogTest method getTransformPlanTransformedLayout.
@Test
public void getTransformPlanTransformedLayout() throws Exception {
String dbName = "testdb";
TestDatabase.genTable(1, 1, false);
mCatalog.attachDatabase(NoopJournalContext.INSTANCE, TestUdbFactory.TYPE, "connect_URI", TestDatabase.TEST_UDB_NAME, dbName, Collections.emptyMap(), false);
String tableName = TestDatabase.getTableName(0);
ServerConfiguration.set(PropertyKey.MASTER_HOSTNAME, "localhost");
final TransformDefinition transformDefinition = TransformDefinition.parse("file.count.max=100;file.parquet.compression=uncompressed");
List<TransformPlan> plans = mCatalog.getTransformPlan(dbName, tableName, transformDefinition);
assertEquals(1, plans.size());
alluxio.job.plan.transform.PartitionInfo transformedPartitionInfo = TransformActionUtils.generatePartitionInfo(plans.get(0).getTransformedLayout());
assertEquals("uncompressed", transformedPartitionInfo.getSerdeProperties().get("file.parquet.compression"));
}
use of alluxio.table.common.transform.TransformDefinition in project alluxio by Alluxio.
the class CompactActionTest method parse.
public CompactAction parse(String definition) {
TransformDefinition transformDefinition = TransformDefinition.parse(definition);
final List<TransformAction> actions = transformDefinition.getActions();
assertEquals(1, actions.size());
final TransformAction action = actions.get(0);
assertEquals(CompactAction.class, action.getClass());
return (CompactAction) action;
}
Aggregations