Artifact API Cleanup

Have an explicit checksum message to encapsulate a (algorithm, value)

Include the entire metadata when uploading an artifact.


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/465ecfc3
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/465ecfc3
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/465ecfc3

Branch: refs/heads/master
Commit: 465ecfc39606ad5d936492f38015311e24d5641f
Parents: 74a5c9e
Author: Thomas Groh <tg...@google.com>
Authored: Tue Sep 19 11:45:22 2017 -0700
Committer: Thomas Groh <tg...@google.com>
Committed: Fri Sep 22 15:02:43 2017 -0700

----------------------------------------------------------------------
 .../src/main/proto/beam_artifact_api.proto      | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/465ecfc3/sdks/common/runner-api/src/main/proto/beam_artifact_api.proto
----------------------------------------------------------------------
diff --git a/sdks/common/runner-api/src/main/proto/beam_artifact_api.proto 
b/sdks/common/runner-api/src/main/proto/beam_artifact_api.proto
index 6e39d88..f713fa7 100644
--- a/sdks/common/runner-api/src/main/proto/beam_artifact_api.proto
+++ b/sdks/common/runner-api/src/main/proto/beam_artifact_api.proto
@@ -55,20 +55,28 @@ service ArtifactRetrievalService {
 }
 
 // An artifact identifier and associated metadata.
-message Artifact {
+message ArtifactMetadata {
   // (Required) The name of the artifact.
   string name = 1;
 
   // (Optional) The Unix-like permissions of the artifact
   int32 permissions = 2;
 
-  // (Optional) The md5 checksum of the artifact.
-  string md5 = 3;
+  // (Optional) The checksum of the artifact.
+  Checksum checksum = 3;
+}
+
+message Checksum {
+  // (Required) the algorithm used to generate this checksum
+  string algorithm = 1;
+
+  // (Required) the value of this checksum
+  bytes value = 2;
 }
 
 // A collection of artifacts.
 message Manifest {
-  repeated Artifact artifact = 1;
+  repeated ArtifactMetadata artifact = 1;
 }
 
 // A request to get the manifest of a Job.
@@ -94,9 +102,9 @@ message ArtifactChunk {
 message PutArtifactRequest {
   // (Required)
   oneof content {
-    // The name of the artifact. The first message in a PutArtifact call must 
contain the name
+    // The Artifact metadata. The first message in a PutArtifact call must 
contain the name
     // of the artifact.
-    string name = 1;
+    ArtifactMetadata metadata = 1;
 
     // A chunk of the artifact. All messages after the first in a PutArtifact 
call must contain a
     // chunk.

Reply via email to