airflow.providers.apache.hdfs.log.hdfs_task_handler¶
Classes¶
Convenience super-class to have a logger configured with the class name. |
|
HdfsTaskHandler is a Python logging handler that handles and reads task instance logs. |
Module Contents¶
- class airflow.providers.apache.hdfs.log.hdfs_task_handler.HdfsRemoteLogIO(context=None)[source]¶
Bases:
airflow.utils.log.logging_mixin.LoggingMixin
Convenience super-class to have a logger configured with the class name.
- base_log_folder: pathlib.Path[source]¶
- class airflow.providers.apache.hdfs.log.hdfs_task_handler.HdfsTaskHandler(base_log_folder, hdfs_log_folder, **kwargs)[source]¶
Bases:
airflow.utils.log.file_task_handler.FileTaskHandler
,airflow.utils.log.logging_mixin.LoggingMixin
HdfsTaskHandler is a Python logging handler that handles and reads task instance logs.
It extends airflow FileTaskHandler and uploads to and reads from HDFS.
- handler: logging.FileHandler | None = None[source]¶
- set_context(ti, *, identifier=None)[source]¶
Provide task_instance context to airflow task handler.
Generally speaking returns None. But if attr maintain_propagate has been set to propagate, then returns sentinel MAINTAIN_PROPAGATE. This has the effect of overriding the default behavior to set propagate to False whenever set_context is called. At time of writing, this functionality is only used in unit testing.
- Parameters:
ti (airflow.models.taskinstance.TaskInstance) – task instance object
identifier (str | None) – if set, adds suffix to log file. For use when relaying exceptional messages to task logs from a context other than task or trigger run