You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by da...@apache.org on 2016/05/23 21:10:07 UTC
[1/2] incubator-airflow git commit: Updated HiveServer2Hook.to_csv()
to add fetch_size
Repository: incubator-airflow
Updated Branches:
refs/heads/master 8d7297573 -> ee248559f
Updated HiveServer2Hook.to_csv() to add fetch_size
Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/a5c00b3f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/a5c00b3f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/a5c00b3f
Branch: refs/heads/master
Commit: a5c00b3f1581580818b585b21abd3df3fa68af64
Parents: 5e40d98
Author: Michael Musson <mi...@airbnb.com>
Authored: Thu May 19 16:31:27 2016 -0700
Committer: Michael Musson <mi...@airbnb.com>
Committed: Thu May 19 16:31:27 2016 -0700
----------------------------------------------------------------------
airflow/hooks/hive_hooks.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/a5c00b3f/airflow/hooks/hive_hooks.py
----------------------------------------------------------------------
diff --git a/airflow/hooks/hive_hooks.py b/airflow/hooks/hive_hooks.py
index 6ea5ba7..d712e16 100644
--- a/airflow/hooks/hive_hooks.py
+++ b/airflow/hooks/hive_hooks.py
@@ -489,7 +489,8 @@ class HiveServer2Hook(BaseHook):
schema='default',
delimiter=',',
lineterminator='\r\n',
- output_header=True):
+ output_header=True,
+ fetch_size=1000):
schema = schema or 'default'
with self.get_conn() as conn:
with conn.cursor() as cur:
@@ -504,7 +505,7 @@ class HiveServer2Hook(BaseHook):
for c in cur.description])
i = 0
while True:
- rows = [row for row in cur.fetchmany() if row]
+ rows = [row for row in cur.fetchmany(fetch_size) if row]
if not rows:
break
[2/2] incubator-airflow git commit: Merge branch '1526'
Posted by da...@apache.org.
Merge branch '1526'
Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/ee248559
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/ee248559
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/ee248559
Branch: refs/heads/master
Commit: ee248559f3c29f093ddc4123d4a1f0d818d1dc90
Parents: 8d72975 a5c00b3
Author: Dan Davydov <da...@airbnb.com>
Authored: Mon May 23 14:09:39 2016 -0700
Committer: Dan Davydov <da...@airbnb.com>
Committed: Mon May 23 14:09:39 2016 -0700
----------------------------------------------------------------------
airflow/hooks/hive_hooks.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------