[
https://issues.apache.org/jira/browse/BEAM-8882?focusedWorklogId=354514&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-354514
]
ASF GitHub Bot logged work on BEAM-8882:
----------------------------------------
Author: ASF GitHub Bot
Created on: 05/Dec/19 17:43
Start Date: 05/Dec/19 17:43
Worklog Time Spent: 10m
Work Description: lukecwik commented on pull request #10292: [BEAM-8882]
Fully populate log messages.
URL: https://github.com/apache/beam/pull/10292#discussion_r354453931
##########
File path: sdks/python/apache_beam/runners/worker/log_handler.py
##########
@@ -81,16 +83,36 @@ def connect(self):
self._log_channel)
return self._logging_stub.Logging(self._write_log_entries())
+ def map_log_level(self, level):
+ try:
+ return self.LOG_LEVEL_MAP[level]
+ except KeyError:
+ return max(
+ beam_level for python_level, beam_level in self.LOG_LEVEL_MAP.items()
+ if python_level <= level)
+
def emit(self, record):
log_entry = beam_fn_api_pb2.LogEntry()
- log_entry.severity = self.LOG_LEVEL_MAP[record.levelno]
+ log_entry.severity = self.map_log_level(record.levelno)
log_entry.message = self.format(record)
log_entry.thread = record.threadName
log_entry.log_location = record.module + '.' + record.funcName
Review comment:
I'm not sure if it would be more natural to put filename:lineno instead of
module.funcname but up to you. I understand that the LogEntry proto description
lists Python to be module.funcname but that could be changed. Depends on what
is more natural for Python developers.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 354514)
Time Spent: 2h 20m (was: 2h 10m)
> Allow Dataflow to automatically choose portability or not.
> ----------------------------------------------------------
>
> Key: BEAM-8882
> URL: https://issues.apache.org/jira/browse/BEAM-8882
> Project: Beam
> Issue Type: Bug
> Components: sdk-py-core
> Reporter: Robert Bradshaw
> Assignee: Robert Bradshaw
> Priority: Critical
> Fix For: 2.18.0
>
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
> We would like the Dataflow service to be able to automatically choose whether
> to run pipelines in a portable way. In order to do this, we need to provide
> more information even if portability is not explicitly requested.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)