Search in sources :

Example 1 with ArtifactSystemMetadataWriter

use of io.cdap.cdap.data2.metadata.system.ArtifactSystemMetadataWriter in project cdap by caskdata.

the class ExistingEntitySystemMetadataWriter method writeSystemMetadataForArtifacts.

private void writeSystemMetadataForArtifacts(NamespaceId namespace) throws IOException {
    for (ArtifactDetail artifactDetail : artifactStore.getArtifacts(namespace)) {
        co.cask.cdap.api.artifact.ArtifactId artifact = artifactDetail.getDescriptor().getArtifactId();
        ArtifactInfo artifactInfo = new ArtifactInfo(artifact, artifactDetail.getMeta().getClasses(), artifactDetail.getMeta().getProperties());
        ArtifactId artifactId = namespace.artifact(artifact.getName(), artifact.getVersion().getVersion());
        SystemMetadataWriter writer = new ArtifactSystemMetadataWriter(metadataStore, artifactId, artifactInfo);
        writer.write();
    }
}
Also used : ArtifactInfo(co.cask.cdap.api.artifact.ArtifactInfo) ArtifactId(co.cask.cdap.proto.id.ArtifactId) DatasetSystemMetadataWriter(co.cask.cdap.data2.metadata.system.DatasetSystemMetadataWriter) ProgramSystemMetadataWriter(co.cask.cdap.data2.metadata.system.ProgramSystemMetadataWriter) ViewSystemMetadataWriter(co.cask.cdap.data2.metadata.system.ViewSystemMetadataWriter) SystemMetadataWriter(co.cask.cdap.data2.metadata.system.SystemMetadataWriter) AppSystemMetadataWriter(co.cask.cdap.data2.metadata.system.AppSystemMetadataWriter) ArtifactSystemMetadataWriter(co.cask.cdap.data2.metadata.system.ArtifactSystemMetadataWriter) StreamSystemMetadataWriter(co.cask.cdap.data2.metadata.system.StreamSystemMetadataWriter) ArtifactSystemMetadataWriter(co.cask.cdap.data2.metadata.system.ArtifactSystemMetadataWriter) ArtifactDetail(co.cask.cdap.internal.app.runtime.artifact.ArtifactDetail)

Example 2 with ArtifactSystemMetadataWriter

use of io.cdap.cdap.data2.metadata.system.ArtifactSystemMetadataWriter in project cdap by caskdata.

the class DefaultArtifactRepository method writeSystemMetadata.

private void writeSystemMetadata(io.cdap.cdap.proto.id.ArtifactId artifactId, ArtifactInfo artifactInfo) {
    // add system metadata for artifacts
    ArtifactSystemMetadataWriter writer = new ArtifactSystemMetadataWriter(metadataServiceClient, artifactId, artifactInfo);
    writer.write();
}
Also used : ArtifactSystemMetadataWriter(io.cdap.cdap.data2.metadata.system.ArtifactSystemMetadataWriter)

Example 3 with ArtifactSystemMetadataWriter

use of io.cdap.cdap.data2.metadata.system.ArtifactSystemMetadataWriter in project cdap by caskdata.

the class ArtifactRepository method writeSystemMetadata.

private void writeSystemMetadata(co.cask.cdap.proto.id.ArtifactId artifactId, ArtifactInfo artifactInfo) {
    // add system metadata for artifacts
    ArtifactSystemMetadataWriter writer = new ArtifactSystemMetadataWriter(metadataStore, artifactId, artifactInfo);
    writer.write();
}
Also used : ArtifactSystemMetadataWriter(co.cask.cdap.data2.metadata.system.ArtifactSystemMetadataWriter)

Example 4 with ArtifactSystemMetadataWriter

use of io.cdap.cdap.data2.metadata.system.ArtifactSystemMetadataWriter in project cdap by caskdata.

the class DefaultArtifactRepository method writeSystemMetadata.

private void writeSystemMetadata(co.cask.cdap.proto.id.ArtifactId artifactId, ArtifactInfo artifactInfo) {
    // add system metadata for artifacts
    ArtifactSystemMetadataWriter writer = new ArtifactSystemMetadataWriter(metadataStore, artifactId, artifactInfo);
    writer.write();
}
Also used : ArtifactSystemMetadataWriter(co.cask.cdap.data2.metadata.system.ArtifactSystemMetadataWriter)

Aggregations

ArtifactSystemMetadataWriter (co.cask.cdap.data2.metadata.system.ArtifactSystemMetadataWriter)3 ArtifactInfo (co.cask.cdap.api.artifact.ArtifactInfo)1 AppSystemMetadataWriter (co.cask.cdap.data2.metadata.system.AppSystemMetadataWriter)1 DatasetSystemMetadataWriter (co.cask.cdap.data2.metadata.system.DatasetSystemMetadataWriter)1 ProgramSystemMetadataWriter (co.cask.cdap.data2.metadata.system.ProgramSystemMetadataWriter)1 StreamSystemMetadataWriter (co.cask.cdap.data2.metadata.system.StreamSystemMetadataWriter)1 SystemMetadataWriter (co.cask.cdap.data2.metadata.system.SystemMetadataWriter)1 ViewSystemMetadataWriter (co.cask.cdap.data2.metadata.system.ViewSystemMetadataWriter)1 ArtifactDetail (co.cask.cdap.internal.app.runtime.artifact.ArtifactDetail)1 ArtifactId (co.cask.cdap.proto.id.ArtifactId)1 ArtifactSystemMetadataWriter (io.cdap.cdap.data2.metadata.system.ArtifactSystemMetadataWriter)1