You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by tg...@apache.org on 2017/09/25 17:35:42 UTC
[2/2] beam git commit: [BEAM-2876] Add preliminary provision API
[BEAM-2876] Add preliminary provision API
Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/ef1e7191
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/ef1e7191
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/ef1e7191
Branch: refs/heads/master
Commit: ef1e71917278c7998634734111fe9043d005b4a7
Parents: aa2604a
Author: Henning Rohde <he...@google.com>
Authored: Fri Sep 22 10:41:28 2017 -0700
Committer: Thomas Groh <tg...@google.com>
Committed: Mon Sep 25 10:35:29 2017 -0700
----------------------------------------------------------------------
sdks/common/fn-api/pom.xml | 5 ++
.../src/main/proto/beam_provision_api.proto | 54 ++++++++++++++++++++
2 files changed, 59 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/beam/blob/ef1e7191/sdks/common/fn-api/pom.xml
----------------------------------------------------------------------
diff --git a/sdks/common/fn-api/pom.xml b/sdks/common/fn-api/pom.xml
index 6810667..d7e7584 100644
--- a/sdks/common/fn-api/pom.xml
+++ b/sdks/common/fn-api/pom.xml
@@ -92,6 +92,11 @@
</dependency>
<dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-core</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/beam/blob/ef1e7191/sdks/common/fn-api/src/main/proto/beam_provision_api.proto
----------------------------------------------------------------------
diff --git a/sdks/common/fn-api/src/main/proto/beam_provision_api.proto b/sdks/common/fn-api/src/main/proto/beam_provision_api.proto
new file mode 100644
index 0000000..fb4f252
--- /dev/null
+++ b/sdks/common/fn-api/src/main/proto/beam_provision_api.proto
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * Protocol Buffers describing the Provision API, for communicating with a runner
+ * for job and environment provisioning information over GRPC.
+ */
+
+syntax = "proto3";
+
+package org.apache.beam.fn.v1;
+
+option java_package = "org.apache.beam.fn.v1";
+option java_outer_classname = "ProvisionApi";
+
+import "google/protobuf/struct.proto";
+
+// A service to provide runtime provisioning information to the SDK harness
+// worker instances -- such as pipeline options, resource constaints and
+// other job metadata -- needed by an SDK harness instance to initialize.
+service ProvisionService {
+ // Get provision information for the SDK harness worker instance.
+ rpc GetProvisionInfo(GetProvisionInfoRequest) returns (GetProvisionInfoResponse);
+}
+
+// A request to get the provision info of a SDK harness worker instance.
+message GetProvisionInfoRequest { }
+
+// A response containing the provision info of a SDK harness worker instance.
+message GetProvisionInfoResponse {
+ // (required) The job ID.
+ string job_id = 1;
+ // (required) The job name.
+ string job_name = 2;
+
+ // (required) Pipeline options. For non-template jobs, the options are
+ // identical to what is passed to job submission.
+ google.protobuf.Struct pipeline_options = 3;
+}