use of co.cask.cdap.data2.metadata.system.ProgramSystemMetadataWriter in project cdap by caskdata.
the class ExistingEntitySystemMetadataWriter method writeSystemMetadataForPrograms.
private void writeSystemMetadataForPrograms(ApplicationId app, ProgramType programType, Collection<? extends ProgramSpecification> programSpecs) {
for (ProgramSpecification programSpec : programSpecs) {
ProgramId programId = app.program(programType, programSpec.getName());
SystemMetadataWriter writer = new ProgramSystemMetadataWriter(metadataStore, programId, programSpec, true);
writer.write();
}
}
use of co.cask.cdap.data2.metadata.system.ProgramSystemMetadataWriter in project cdap by caskdata.
the class SystemMetadataWriterStage method writeProgramSystemMetadata.
private void writeProgramSystemMetadata(ApplicationId appId, ProgramType programType, Iterable<? extends ProgramSpecification> specs) {
for (ProgramSpecification spec : specs) {
ProgramId programId = appId.program(programType, spec.getName());
Map<String, String> properties = metadataStore.getProperties(MetadataScope.SYSTEM, programId);
ProgramSystemMetadataWriter writer = new ProgramSystemMetadataWriter(metadataStore, programId, spec, !properties.isEmpty());
writer.write();
}
}
Aggregations