use of io.cdap.cdap.proto.DatasetTypeMeta in project cdap by caskdata.
the class DescribeDatasetTypeCommand method perform.
@Override
public void perform(Arguments arguments, PrintStream output) throws Exception {
DatasetTypeId type = cliConfig.getCurrentNamespace().datasetType(arguments.get(ArgumentName.DATASET_TYPE.toString()));
DatasetTypeMeta datasetTypeMeta = datasetTypeClient.get(type);
Table table = Table.builder().setHeader("name", "modules").setRows(ImmutableList.of(datasetTypeMeta), new RowMaker<DatasetTypeMeta>() {
@Override
public List<?> makeRow(DatasetTypeMeta object) {
return Lists.newArrayList(object.getName(), Joiner.on(", ").join(object.getModules()));
}
}).build();
cliConfig.getTableRenderer().render(cliConfig, output, table);
}
Aggregations