You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by bo...@apache.org on 2017/03/13 04:45:26 UTC

[28/45] incubator-airflow git commit: [AIRFLOW-925] Revert airflow.hooks change that cherry-pick picked

[AIRFLOW-925] Revert airflow.hooks change that cherry-pick picked

Please accept this PR that addresses the following
issues:
-
https://issues.apache.org/jira/browse/AIRFLOW-925

Testing Done:
- Fixes bug in prod

Closes #2112 from saguziel/aguziel-
hivemetastorehook-import-apache


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/f04ea97d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/f04ea97d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/f04ea97d

Branch: refs/heads/v1-8-stable
Commit: f04ea97d066093abf898fec81f96eeb4b82eaf13
Parents: ab37f8d
Author: Li Xuanji <xu...@airbnb.com>
Authored: Tue Feb 28 12:17:33 2017 -0800
Committer: Bolke de Bruin <bo...@Bolkes-MacBook-Pro.local>
Committed: Sun Mar 12 08:20:19 2017 -0700

----------------------------------------------------------------------
 airflow/operators/sensors.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/f04ea97d/airflow/operators/sensors.py
----------------------------------------------------------------------
diff --git a/airflow/operators/sensors.py b/airflow/operators/sensors.py
index 5fbd21c..c0aba27 100644
--- a/airflow/operators/sensors.py
+++ b/airflow/operators/sensors.py
@@ -300,7 +300,7 @@ class NamedHivePartitionSensor(BaseSensorOperator):
     def poke(self, context):
 
         if not hasattr(self, 'hook'):
-            self.hook = airflow.hooks.hive_hooks.HiveMetastoreHook(
+            self.hook = hooks.HiveMetastoreHook(
                 metastore_conn_id=self.metastore_conn_id)
 
         def poke_partition(partition):
@@ -369,7 +369,7 @@ class HivePartitionSensor(BaseSensorOperator):
             'Poking for table {self.schema}.{self.table}, '
             'partition {self.partition}'.format(**locals()))
         if not hasattr(self, 'hook'):
-            self.hook = airflow.hooks.hive_hooks.HiveMetastoreHook(
+            self.hook = hooks.HiveMetastoreHook(
                 metastore_conn_id=self.metastore_conn_id)
         return self.hook.check_for_partition(
             self.schema, self.table, self.partition)