python - Airflow Exception: DataFlow failed with return code 1 -


i trying execute dataflow jar through airflow script. using dataflowjavaoperator. in param jar,i passing path of executable jar file present in local system.but when try run job error as

{gcp_dataflow_hook.py:108} info - start waiting dataflow process complete. [2017-09-12 16:59:38,225] {models.py:1417} error - dataflow failed return code 1 traceback (most recent call last):   file "/usr/lib/python2.7/site-packages/airflow/models.py", line 1374, in run     result = task_copy.execute(context=context)   file "/usr/lib/python2.7/site-packages/airflow/contrib/operators/dataflow_operator.py", line 116, in execute     hook.start_java_dataflow(self.task_id, dataflow_options, self.jar)   file "/usr/lib/python2.7/site-packages/airflow/contrib/hooks/gcp_dataflow_hook.py", line 146, in start_java_dataflow     task_id, variables, dataflow, name, ["java", "-jar"])   file "/usr/lib/python2.7/site-packages/airflow/contrib/hooks/gcp_dataflow_hook.py", line 138, in _start_dataflow     _dataflow(cmd).wait_for_done()   file "/usr/lib/python2.7/site-packages/airflow/contrib/hooks/gcp_dataflow_hook.py", line 119, in wait_for_done     self._proc.returncode)) exception: dataflow failed return code 1` 

my airflow script :

from airflow.contrib.operators.dataflow_operator import dataflowjavaoperator airflow.contrib.hooks.gcs_hook import googlecloudstoragehook airflow.models import baseoperator airflow.utils.decorators import apply_defaults datetime import datetime, timedelta   default_args = { 'owner': 'airflow', 'start_date': datetime(2017, 03, 16), 'email': [<emailid>],  'dataflow_default_options': {         'project': '<projectid>',        # 'zone': 'europe-west1-d', (i not sure should pass here)         'staginglocation': 'gs://spark_3/staging/'     }  }   dag = dag('dataflow',schedule_interval=timedelta(minutes=2),   default_args=default_args)   dataflow1 = dataflowjavaoperator(  task_id='dataflow_example',  jar ='/root/airflow_scripts/csvwriter.jar',  gcp_conn_id  = 'gcp_smoke',   dag=dag) 

i not sure mistake making ,can please me out of

note :i creating jar while selecting option runnable jar file packaging external dependencies.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -