You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/03/02 03:46:00 UTC

[GitHub] [airflow] EricGao888 commented on a change in pull request #21785: Add oss_task_handler into alibaba-provider and enable remote logging to OSS

EricGao888 commented on a change in pull request #21785:
URL: https://github.com/apache/airflow/pull/21785#discussion_r817324387



##########
File path: airflow/providers/alibaba/cloud/hooks/oss.py
##########
@@ -269,6 +279,74 @@ def create_bucket(
             self.log.error(e)
             raise AirflowException(f"Errors when create bucket: {bucket_name}")
 
+    @provide_bucket_name
+    @unify_bucket_name_and_key
+    def append_string(self, bucket_name: Optional[str], content: str, key: str, pos: int):
+        """
+        Append string to a remote existing file
+
+        :param bucket_name: the name of the bucket
+        :param content: content to be appended
+        :param key: oss bucket key
+        :param pos: position of the existing file where the content will be appended
+        """
+        self.log.info("Write oss bucket key: " + key)
+        self.log.info("Write oss bucket pos: " + str(pos))

Review comment:
       Thx for the suggestions, will fix it in the following commit.




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org