You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by " Ron Mahoney (JIRA)" <ji...@apache.org> on 2017/12/04 20:00:03 UTC
[jira] [Created] (BEAM-3284) Python SDK, dataflow runner, the
method modify_job_status is calling the wrong API endpoint
Ron Mahoney created BEAM-3284:
----------------------------------
Summary: Python SDK, dataflow runner, the method modify_job_status is calling the wrong API endpoint
Key: BEAM-3284
URL: https://issues.apache.org/jira/browse/BEAM-3284
Project: Beam
Issue Type: Bug
Components: runner-dataflow
Affects Versions: 2.2.0, 2.1.0
Reporter: Ron Mahoney
Assignee: Thomas Groh
Priority: Minor
In the Python SDK, for dataflow runner, the method modify_job_status is calling the wrong API endpoint. Discovered while trying to cancel a job by setting the status to JOB_STATE_CANCELLED, received the following error:
{noformat}
WARNING:root:Retry with exponential backoff: waiting for 154.109699453 seconds before retrying modify_job_state because we caught exception:
TypecheckError: Type of arg is "<class 'apache_beam.runners.dataflow.internal.clients.dataflow.dataflow_v1b3_messages.DataflowProjectsLocationsJobsUpdateRequest'>", not "<class 'apache_beam.runners.dataflow.internal.clients.dataflow.dataflow_v1b3_messages.DataflowProjectsJobsUpdateRequest'>"
{noformat}
The following change fixes this:
{noformat}
diff --git a/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py b/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py
index edac9d7d5..1124ee182 100644
--- a/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py
+++ b/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py
@@ -512,7 +512,7 @@ class DataflowApplicationClient(object):
# Other states could only be set by the service.
return False
- request = dataflow.DataflowProjectsLocationsJobsUpdateRequest()
+ request = dataflow.DataflowProjectsJobsUpdateRequest()
request.jobId = job_id
request.projectId = self.google_cloud_options.project
request.location = self.google_cloud_options.region
{noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)