You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Colin Son (JIRA)" <ji...@apache.org> on 2017/10/24 23:03:00 UTC
[jira] [Updated] (AIRFLOW-1756) S3 Task Handler Cannot Read Logs
With New S3Hook
[ https://issues.apache.org/jira/browse/AIRFLOW-1756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Colin Son updated AIRFLOW-1756:
-------------------------------
Description:
With the changes to the S3Hook, it seems like it cannot read the S3 task logs.
In the `s3_read` in the S3TaskHandler.py:
{code}
s3_key = self.hook.get_key(remote_log_location)
if s3_key:
return s3_key.get_contents_as_string().decode()
{code}
Since the s3_key object is now a dict, you cannot call `get_contents_as_string()` on a dict object. You have to use the S3Hook's `read_key()` method to read the contents of the task logs now.
was:
With the changes to the S3Hook, it seems like it cannot read the S3 task logs. This is because the Key object is no longer an object.
In the `s3_read` in the S3TaskHandler.py:
{code}
s3_key = self.hook.get_key(remote_log_location)
if s3_key:
return s3_key.get_contents_as_string().decode()
{code}
Since the s3_key object is now a dict, you cannot call `get_contents_as_string()` on a dict object. You have to use the S3Hook's `read_key()` method to read the contents of the task logs now.
> S3 Task Handler Cannot Read Logs With New S3Hook
> ------------------------------------------------
>
> Key: AIRFLOW-1756
> URL: https://issues.apache.org/jira/browse/AIRFLOW-1756
> Project: Apache Airflow
> Issue Type: Bug
> Affects Versions: 1.9.0
> Reporter: Colin Son
>
> With the changes to the S3Hook, it seems like it cannot read the S3 task logs.
> In the `s3_read` in the S3TaskHandler.py:
> {code}
> s3_key = self.hook.get_key(remote_log_location)
> if s3_key:
> return s3_key.get_contents_as_string().decode()
> {code}
> Since the s3_key object is now a dict, you cannot call `get_contents_as_string()` on a dict object. You have to use the S3Hook's `read_key()` method to read the contents of the task logs now.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)