def __init__(self, qubole_conn_id="qubole_default", *args, **kwargs):
        self.args = args
        self.kwargs = kwargs
        self.kwargs['qubole_conn_id'] = qubole_conn_id
        self.hook = QuboleHook(*self.args, **self.kwargs)
        super(QuboleOperator, self).__init__(*args, **kwargs)

        if self.on_failure_callback is None:
            self.on_failure_callback = QuboleHook.handle_failure_retry

        if self.on_retry_callback is None:
            self.on_retry_callback = QuboleHook.handle_failure_retry
예제 #2
0
 def execute(self, context):
     # Reinitiating the hook, as some template fields might have changed
     self.hook = QuboleHook(*self.args, **self.kwargs)
     return self.hook.execute(context)
예제 #3
0
 def __init__(self, qubole_conn_id="qubole_default", *args, **kwargs):
     self.args = args
     self.kwargs = kwargs
     self.kwargs['qubole_conn_id'] = qubole_conn_id
     self.hook = QuboleHook(*self.args, **self.kwargs)
     super(QuboleOperator, self).__init__(*args, **kwargs)
예제 #4
0
 def get_hook(self):
     # Reinitiating the hook, as some template fields might have changed
     return QuboleHook(*self.args, **self.kwargs)