[ https://issues.apache.org/jira/browse/BEAM-5326?focusedWorklogId=152848&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-152848 ]
ASF GitHub Bot logged work on BEAM-5326: ---------------------------------------- Author: ASF GitHub Bot Created on: 09/Oct/18 18:37 Start Date: 09/Oct/18 18:37 Worklog Time Spent: 10m Work Description: herohde closed pull request #6615: [BEAM-5326] Shim main class and fix Go artifact naming mismatch for c… URL: https://github.com/apache/beam/pull/6615 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/runners/google-cloud-dataflow-java/worker/src/main/java/com/google/cloud/dataflow/worker/DataflowRunnerHarness.java b/runners/google-cloud-dataflow-java/worker/src/main/java/com/google/cloud/dataflow/worker/DataflowRunnerHarness.java new file mode 100644 index 00000000000..4aca8dd567f --- /dev/null +++ b/runners/google-cloud-dataflow-java/worker/src/main/java/com/google/cloud/dataflow/worker/DataflowRunnerHarness.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package com.google.cloud.dataflow.worker; + +/** Temporary redirect for org.apache.beam.runners.dataflow.worker.DataflowRunnerHarness. */ +public class DataflowRunnerHarness { + public static void main(String[] args) throws Exception { + org.apache.beam.runners.dataflow.worker.DataflowRunnerHarness.main(args); + } +} diff --git a/sdks/go/pkg/beam/runners/dataflow/dataflow.go b/sdks/go/pkg/beam/runners/dataflow/dataflow.go index 293bab2b7a8..9c56dbc66c1 100644 --- a/sdks/go/pkg/beam/runners/dataflow/dataflow.go +++ b/sdks/go/pkg/beam/runners/dataflow/dataflow.go @@ -149,10 +149,12 @@ func Execute(ctx context.Context, p *beam.Pipeline) error { return fmt.Errorf("failed to generate model pipeline: %v", err) } - id := atomic.AddInt32(&unique, 1) - modelURL := gcsx.Join(*stagingLocation, fmt.Sprintf("model-%v-%v", id, time.Now().UnixNano())) - workerURL := gcsx.Join(*stagingLocation, fmt.Sprintf("worker-%v-%v", id, time.Now().UnixNano())) - jarURL := gcsx.Join(*stagingLocation, fmt.Sprintf("dataflow-worker-%v-%v.jar", id, time.Now().UnixNano())) + // NOTE(herohde) 10/8/2018: the last segment of the names must be "worker" and "dataflow-worker.jar". + id := fmt.Sprintf("go-%v-%v", atomic.AddInt32(&unique, 1), time.Now().UnixNano()) + + modelURL := gcsx.Join(*stagingLocation, id, "model") + workerURL := gcsx.Join(*stagingLocation, id, "worker") + jarURL := gcsx.Join(*stagingLocation, id, "dataflow-worker.jar") if *dryRun { log.Info(ctx, "Dry-run: not submitting job!") diff --git a/sdks/go/pkg/beam/util/gcsx/gcs.go b/sdks/go/pkg/beam/util/gcsx/gcs.go index dd9470fa7a4..c426988f633 100644 --- a/sdks/go/pkg/beam/util/gcsx/gcs.go +++ b/sdks/go/pkg/beam/util/gcsx/gcs.go @@ -142,10 +142,10 @@ func ParseObject(object string) (bucket, path string, err error) { // Join joins a GCS path with an element. Preserves // the gs:// prefix. -func Join(object string, elm string) string { +func Join(object string, elms ...string) string { bucket, prefix, err := ParseObject(object) if err != nil { panic(err) } - return MakeObject(bucket, path.Join(prefix, elm)) + return MakeObject(bucket, path.Join(prefix, path.Join(elms...))) } ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 152848) Time Spent: 1.5h (was: 1h 20m) > SDK support for custom dataflow worker jar > ------------------------------------------ > > Key: BEAM-5326 > URL: https://issues.apache.org/jira/browse/BEAM-5326 > Project: Beam > Issue Type: Improvement > Components: runner-dataflow > Reporter: Henning Rohde > Assignee: Boyuan Zhang > Priority: Major > Time Spent: 1.5h > Remaining Estimate: 0h > > Doc: > https://docs.google.com/document/d/1-m-GzkYWIODKOEl1ZSUNXYbcGRvRr3QkasfHsJxbuoA/edit?usp=sharing -- This message was sent by Atlassian JIRA (v7.6.3#76005)