Accessing Metadata Programmatically
Programs
@Override
public void initialize() throws Exception {
MapReduceContext context = getContext();
// construct the metadata entity
MetadataEntity entity = MetadataEntity.builder().append(MetadataEntity.NAMESPACE, "myNamespace")
.appendAsType(MetadataEntity.DATASET, "myDataset").build();
// get the metadata
Map<MetadataScope, Metadata> metadata = context.getMetadata(entity);
}Nodes
Last updated