ASF GitHub Bot logged work on BEAM-4028:

                Author: ASF GitHub Bot
            Created on: 13/Apr/18 00:17
            Start Date: 13/Apr/18 00:17
    Worklog Time Spent: 10m 
      Work Description: pabloem commented on a change in pull request #5043: 
[BEAM-4028] Adding NameContext to Python SDK.
URL: https://github.com/apache/beam/pull/5043#discussion_r181257183

 File path: sdks/python/apache_beam/runners/worker/operations.py
 @@ -104,34 +104,45 @@ class Operation(object):
   one or more receiver operations that will take that as input.
-  def __init__(self, operation_name, spec, counter_factory, state_sampler):
+  def __init__(self, name_context, spec, counter_factory, state_sampler):
     """Initializes a worker operation instance.
-      operation_name: The system name assigned by the runner for this
-        operation.
+      name_context: A NameContext instance or string(deprecated), with the
+        name information for this operation.
       spec: A operation_specs.Worker* instance.
       counter_factory: The CounterFactory to use for our counters.
       state_sampler: The StateSampler for the current operation.
-    self.operation_name = operation_name
+    if isinstance(name_context, common.NameContext):
+      #TODO(pabloem) - Clean this up once it's completely migrated.
 Review comment:

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:

Issue Time Tracking

    Worklog Id:     (was: 90645)
    Time Spent: 2h 40m  (was: 2.5h)

> Step / Operation naming should rely on a NameContext class
> ----------------------------------------------------------
>                 Key: BEAM-4028
>                 URL: https://issues.apache.org/jira/browse/BEAM-4028
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Pablo Estrada
>            Assignee: Pablo Estrada
>            Priority: Major
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
> Steps can have different names depending on the runner (stage, step, user, 
> system name...). 
> Depending on the needs of different components (operations, logging, metrics, 
> statesampling) these step names are passed around without a specific order.
> Instead, SDK should rely on `NameContext` objects that carry all the naming 
> information for a single step.

This message was sent by Atlassian JIRA

Reply via email to