From dev-return-8282-archive-asf-public=cust-asf.ponee.io@airflow.apache.org Thu Apr 18 22:36:14 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id D72CC18061A for ; Fri, 19 Apr 2019 00:36:13 +0200 (CEST) Received: (qmail 63510 invoked by uid 500); 18 Apr 2019 22:36:12 -0000 Mailing-List: contact dev-help@airflow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.apache.org Delivered-To: mailing list dev@airflow.apache.org Received: (qmail 63496 invoked by uid 99); 18 Apr 2019 22:36:12 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Apr 2019 22:36:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 99F4F1807E0 for ; Thu, 18 Apr 2019 22:36:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.81 X-Spam-Level: * X-Spam-Status: No, score=1.81 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_REMOTE_IMAGE=0.01, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=polidea.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id JOuybE_L0hng for ; Thu, 18 Apr 2019 22:36:10 +0000 (UTC) Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id C79C25FDFD for ; Thu, 18 Apr 2019 22:36:09 +0000 (UTC) Received: by mail-ot1-f44.google.com with SMTP id d24so294209otl.11 for ; Thu, 18 Apr 2019 15:36:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polidea.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=uEgA9anmXFdzH8PUUxVh+Y4bXNIYrEvHbcGYx+oHX2Q=; b=CvdSg1zBszR+LrqzfWyX2V5VWmm0czVpLpbgZOTFokvMHW3YgHqFWZ/driNToFIiSx X6G0ur62brshlZJMmuj0UcTZZCWb541M2S1bjlunJ6AKKTgA8ygq6bnS76q7Lp57VFSi /PUnmq95VmI8/1z2VbusUC3ZIRO1I5+68Vzjc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=uEgA9anmXFdzH8PUUxVh+Y4bXNIYrEvHbcGYx+oHX2Q=; b=B2SKjck5QAG/fdh6mAW9CaMTupbe6U2rV8LfFy4CwY8oIfX+iohfOLg9HHnDjrPNKg i1dF0hjuhYceeP4dtcmik4NvJ1C4bE23bYTotiQxRv9M6xoQc8PdC+tvO2e38sZU03bV /xRrEhs/zQjskToSTQmLnagpdQ3co0wPwP6txsXd3zgGpVPiJGynRlkCGb5nHyip7xxL /BdrKbEitXjvLAiTK0kXCzX+dI5KWOrQHBTYGXAF7LUShiyRkphbTbLk6Uy3aZ2+Yqks fMmNaQ/Qb5i/lIcVYtLjXGyGesshklp1aNTjq12XGCOC3Us64tBBQrDFHQLzLRsHP96V W83Q== X-Gm-Message-State: APjAAAXXNsiv9/i09hpOEdgsENrXHqvgOwerIC3W4kcsoAAFMZO7zW6/ LpZdZexoT7Q0y5kQDm4yeU9ACg0LyIXtswX0s/d4tYoICIGyFw== X-Google-Smtp-Source: APXvYqzJiczAjO6pYCzFSt5oFo2lXf9RIiSlfxmcIEp/9fEZKro8nkyqDjmoNnms10AA0DGnNG2FpZVaBx97GUlvfoc= X-Received: by 2002:a05:6830:1398:: with SMTP id d24mr233363otq.104.1555626969037; Thu, 18 Apr 2019 15:36:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?Q?Kamil_Bregu=C5=82a?= Date: Fri, 19 Apr 2019 00:35:58 +0200 Message-ID: Subject: Re: [2.0 spring cleaning] Changes in import paths To: dev@airflow.apache.org Content-Type: multipart/alternative; boundary="000000000000e489730586d5a017" --000000000000e489730586d5a017 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Inline comment On Fri, Apr 19, 2019 at 12:23 AM Arthur Wiedmer wrote: > > > > > > Case #5 Are we talking about the class name or the file name? The > > class > > > > > name is fine to me, but we could remove _operator from the file > name. > > > > > > > > > > > > > Case #2 describes the change of file names > > > > Case #5 describes the change of class names > > > > > > > > I added examples to two cases to better describe the changes. > > > > > > > > > > Thank you. I guess I see it for file names, but I am wondering about > the > > > operators and name collisions. > > > Say I need both the HiveOperator and I inline a custom operator for > > which I > > > need a hive hook. > > > # Would you recommmend the following? Or does case #5 only apply to > > > Operators? > > > from airflow.operators.hive import Hive as HiveOperator > > > from airfow.hooks.hive import Hive as HiveHook > > > > > > I was just thinking it might be nice to be able to import what I need > > > without renaming and not worry too much about names shadowing others. > > > Especially if I am new-ish to Apache Airflow. > > > > > > > > I think that the operator should describe the behavior(verb), hook shou= ld > > describe a service(noun). These are other parts of speech. > > In my opinion, HiveOperator should be named HiveExecuteQuery. Hook will > be > > called Hive. Then there will be no name conflicts. > > > > But we will still provide the backwards compatibility for a while with > aliases to the old names, correct? > Yes. It is possible to provide backward compatibility also in this case. --=20 Kamil Bregu=C5=82a Polidea | Software Engineer M: +48 505 458 451 <+48505458451> E: kamil.bregula@polidea.com [image: Polidea] We create human & business stories through technology. Check out our projects! [image: Github] [image: Facebook] [image: Twitter] [image: Linkedin] [image: Instagram] [image: Behance] --000000000000e489730586d5a017--