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 2020/01/25 11:17:18 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #7252: [AIRFLOW-6531] Initial Yandex.Cloud Dataproc support

potiuk commented on a change in pull request #7252: [AIRFLOW-6531] Initial Yandex.Cloud Dataproc support
URL: https://github.com/apache/airflow/pull/7252#discussion_r370928134
 
 

 ##########
 File path: airflow/contrib/operators/yandexcloud_base_operator.py
 ##########
 @@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+from airflow.contrib.hooks.yandexcloud_base_hook import YandexCloudBaseHook
+from airflow.models import BaseOperator
+from airflow.utils.decorators import apply_defaults
+
+
+class YandexCloudBaseOperator(BaseOperator):
+    """The base class for operators that poll on a Dataproc Operation."""
+    @apply_defaults
+    def __init__(self,
+                 folder_id=None,
+                 connection_id='yandexcloud_default',
+                 *args,
+                 **kwargs):
+        super(YandexCloudBaseOperator, self).__init__(*args, **kwargs)
 
 Review comment:
   @peter-volkov We have no python2 support in 2.0. And we are not going to cherry-pick new operators to 1.10.line any more. 
   
   Instead we will backport all "providers" operators and release separately installable packages so that they will be installable and runnable in 1.10.x series but only for python3.6.
   
   See AIP-21 improvement proposal: https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-21%3A+Changes+in+import+paths#AIP-21:Changesinimportpaths-Updatetoinclude1.10.*backportabilityanddetailsaboutnon-cloud-providerspackage(2019-11-16).
   
   
   This is going to happen soon when we release the backportable packages (I am working on this).

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services