@Override public MetadataEntity toMetadataEntity() { return MetadataEntity.builder().append(MetadataEntity.NAMESPACE, namespace) .appendAsType(MetadataEntity.ARTIFACT, artifact) .append(MetadataEntity.VERSION, version) .build(); }
/** * Creates a {@link MetadataEntity} representing the given datasetName. To create a {@link MetadataEntity} for a * dataset in a specified namespace please use {@link MetadataEntity#ofDataset(String, String)}. * * @param datasetName the name of the dataset * @return {@link MetadataEntity} representing the dataset name */ public static MetadataEntity ofDataset(String datasetName) { return builder().appendAsType(MetadataEntity.DATASET, datasetName).build(); }
@Override public String toString() { return scope.name() + ':' + name; } }
private static MDSKey.Builder getKeyPart(MetadataEntity metadataEntity) { MDSKey.Builder builder = new MDSKey.Builder(); builder.add(ROW_PREFIX); builder.add(metadataEntity.getType()); for (MetadataEntity.KeyValue keyValue : metadataEntity) { builder.add(keyValue.getKey()); builder.add(keyValue.getValue()); } return builder; } }
@Override public MetadataEntity toMetadataEntity() { return MetadataEntity.ofDataset(namespace, dataset); }
@Override public MetadataEntity toMetadataEntity() { return MetadataEntity.builder().append(MetadataEntity.NAMESPACE, namespace) .appendAsType(MetadataEntity.APPLICATION, application) .append(MetadataEntity.VERSION, version) .build(); }
/** * Creates a {@link MetadataEntity} representing the given namespace. * * @param namespace the name of the namespace * @return {@link MetadataEntity} representing the namespace name * @throws IllegalArgumentException if the key is a CDAP entity and the MetadataEntity is not correct to represent * the CDAP entity */ public static MetadataEntity ofNamespace(String namespace) { return builder().appendAsType(MetadataEntity.NAMESPACE, namespace).build(); }
private static MDSKey.Builder getKeyPart(MetadataEntity metadataEntity) { MDSKey.Builder builder = new MDSKey.Builder(); builder.add(ROW_PREFIX); builder.add(metadataEntity.getType()); for (MetadataEntity.KeyValue keyValue : metadataEntity) { builder.add(keyValue.getKey()); builder.add(keyValue.getValue()); } return builder; } }
@Override public MetadataEntity toMetadataEntity() { return MetadataEntity.builder().append(MetadataEntity.NAMESPACE, namespace) .appendAsType(MetadataEntity.ARTIFACT, artifact) .append(MetadataEntity.VERSION, version) .build(); }
@Override public MetadataEntity toMetadataEntity() { return MetadataEntity.builder().append(MetadataEntity.NAMESPACE, namespace) .appendAsType(MetadataEntity.STREAM, stream) .build(); }
@Override public MetadataEntity toMetadataEntity() { return MetadataEntity.builder().append(MetadataEntity.NAMESPACE, namespace) .append(MetadataEntity.APPLICATION, application).append(MetadataEntity.VERSION, version) .append(MetadataEntity.FLOW, flow).appendAsType(MetadataEntity.FLOWLET, flowlet) .build(); }
@Override public MetadataEntity toMetadataEntity() { return MetadataEntity.builder().append(MetadataEntity.NAMESPACE, namespace) .appendAsType(MetadataEntity.APPLICATION, application) .append(MetadataEntity.VERSION, version) .build(); }
@Override public MetadataEntity toMetadataEntity() { return MetadataEntity.builder().append(MetadataEntity.NAMESPACE, namespace).append(MetadataEntity.STREAM, stream) .appendAsType(MetadataEntity.VIEW, view) .build(); }
/** * Creates a {@link MetadataEntity} representing the given datasetName in the specified namespace. * * @param namespace the name of the namespace * @param datasetName the name of the dataset * @return {@link MetadataEntity} representing the dataset name * @throws IllegalArgumentException if the key is a CDAP entity and the MetadataEntity is not correct to represent * the CDAP entity */ public static MetadataEntity ofDataset(String namespace, String datasetName) { return builder().append(MetadataEntity.NAMESPACE, namespace) .appendAsType(MetadataEntity.DATASET, datasetName).build(); }
@Override public MetadataEntity toMetadataEntity() { return MetadataEntity.builder().append(MetadataEntity.NAMESPACE, namespace) .append(MetadataEntity.APPLICATION, application) .append(MetadataEntity.VERSION, version).append(MetadataEntity.TYPE, type.getPrettyName()) .append(MetadataEntity.PROGRAM, program) .appendAsType(MetadataEntity.PROGRAM_RUN, run) .build(); }
@Override public MetadataEntity toMetadataEntity() { return MetadataEntity.builder().append(MetadataEntity.NAMESPACE, namespace) .append(MetadataEntity.APPLICATION, application) .append(MetadataEntity.VERSION, version).append(MetadataEntity.TYPE, type.getPrettyName()) .append(MetadataEntity.PROGRAM, program) .appendAsType(MetadataEntity.PROGRAM_RUN, run) .build(); }
@Override public MetadataEntity toMetadataEntity() { return MetadataEntity.builder().append(MetadataEntity.NAMESPACE, namespace) .append(MetadataEntity.APPLICATION, application) .append(MetadataEntity.VERSION, version).append(MetadataEntity.TYPE, type.getPrettyName()) .appendAsType(MetadataEntity.PROGRAM, program) .build(); }
@Override public MetadataEntity toMetadataEntity() { return MetadataEntity.builder().append(MetadataEntity.NAMESPACE, namespace) .append(MetadataEntity.APPLICATION, application) .append(MetadataEntity.VERSION, version).append(MetadataEntity.TYPE, type.getPrettyName()) .appendAsType(MetadataEntity.PROGRAM, program) .build(); }