New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AIRFLOW-244] Modify hive operator to inject analysis data #1607
[AIRFLOW-244] Modify hive operator to inject analysis data #1607
Conversation
f759942
to
888ef8b
Compare
Current coverage is 64.07%@@ master #1607 diff @@
==========================================
Files 120 121 +1
Lines 8443 8462 +19
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 5419 5422 +3
- Misses 3024 3040 +16
Partials 0 0
|
3dc61f3
to
3b32e4b
Compare
@@ -107,6 +115,10 @@ def run_cli(self, hql, schema=None, verbose=True): | |||
if conn.password: | |||
cmd_extra += ['-p', conn.password] | |||
|
|||
if hive_conf: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need the if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait why not? If hive_conf
is None
won't this cause issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can make hive_conf default to dict()/frozendict() (and pass in dict() instead of None in hive_operator.py)
LGTM once landscape check is green. Might get another +1 from Max just in case. |
import unicodecsv as csv | ||
import logging | ||
import re | ||
import subprocess | ||
from frozendict import frozendict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't need that, let's not bring a dep on an external lib just for this.
bfd79fd
to
ace79c0
Compare
code-quality is a false-positive, merging. |
A little unit test? |
@artwr I'll add some tests in a new PR |
Our code coverage thanks you :) |
Testing Done: Test dags were run as backfills on an Airbnb Airflow dev box. This PR exposes task/dag id/run data through the HiveOperator for ingestion by performance analysis tools like Dr. Elephant. Closes apache#1607 from paulbramsen/paulbramsen/modify_hive_operator_to_inject_analysis_data
Dear Airflow Maintainers,
Please accept this PR that addresses the following issues:
Testing Done:
Test dags were run as backfills on an Airbnb Airflow dev box.
This PR exposes task/dag id/run data through the HiveOperator for ingestion by performance analysis tools like Dr. Elephant.
As per discussion this supersedes #1594
@krishnap @artwr @aoen @mistercrunch