Repository: incubator-airflow Updated Branches: refs/heads/master 57e8956b5 -> a700cd8d5
[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/a700cd8d Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/a700cd8d Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/a700cd8d Branch: refs/heads/master Commit: a700cd8d565769540b17a63d68ee1fa1a68a693a Parents: 57e8956 Author: Li Xuanji <[email protected]> Authored: Tue Feb 28 12:17:33 2017 -0800 Committer: Dan Davydov <[email protected]> Committed: Tue Feb 28 12:17:40 2017 -0800 ---------------------------------------------------------------------- airflow/operators/sensors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/a700cd8d/airflow/operators/sensors.py ---------------------------------------------------------------------- diff --git a/airflow/operators/sensors.py b/airflow/operators/sensors.py index 5830cbc..44a97e0 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)
