|
|
@@ -356,7 +356,7 @@ class JavaAction(Action):
|
|
|
'label': _('Arguments'),
|
|
|
'value': [],
|
|
|
'help_text': _('Arguments of the main method. The value of each arg element is considered a single argument '
|
|
|
- 'and they are passed to the main method in the same order.')
|
|
|
+ 'and they are passed to the main method in the same order.')
|
|
|
},
|
|
|
'java_opts': {
|
|
|
'name': 'java_opts',
|
|
|
@@ -527,8 +527,8 @@ class HiveServer2Action(Action):
|
|
|
'label': _('Job XML'),
|
|
|
'value': [],
|
|
|
'help_text': _('Refer to a Hadoop JobConf job.xml file bundled in the workflow deployment directory. '
|
|
|
- 'Properties specified in the Job Properties element override properties specified in the '
|
|
|
- 'files specified in the Job XML element.')
|
|
|
+ 'Properties specified in the Job Properties element override properties specified in the '
|
|
|
+ 'files specified in the Job XML element.')
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -565,6 +565,62 @@ class SubWorkflowAction(Action):
|
|
|
return []
|
|
|
|
|
|
|
|
|
+class SqoopAction(Action):
|
|
|
+ TYPE = 'sqoop'
|
|
|
+ FIELDS = {
|
|
|
+ 'command': {
|
|
|
+ 'name': 'command',
|
|
|
+ 'label': _('Sqoop command'),
|
|
|
+ 'value': 'import --connect jdbc:hsqldb:file:db.hsqldb --table TT --target-dir hdfs://localhost:8020/user/foo -m 1',
|
|
|
+ 'help_text': _('The full %(type)s command. Either put it here or split it by spaces and insert the parts as multiple parameters below.') % {'type': TYPE}
|
|
|
+ },
|
|
|
+ 'parameters': {
|
|
|
+ 'name': 'parameters',
|
|
|
+ 'label': _('Arguments'),
|
|
|
+ 'value': [],
|
|
|
+ 'help_text': _('If no command is specified, split the command by spaces and insert the %(type)s parameters '
|
|
|
+ 'here e.g. import, --connect, jdbc:hsqldb:file:db.hsqldb, ...') % {'type': TYPE}
|
|
|
+ },
|
|
|
+ # Common
|
|
|
+ 'files': {
|
|
|
+ 'name': 'files',
|
|
|
+ 'label': _('Files'),
|
|
|
+ 'value': [],
|
|
|
+ 'help_text': _('List of names or paths of files to be added to the distributed cache and the task running directory.')
|
|
|
+ },
|
|
|
+ 'archives': {
|
|
|
+ 'name': 'archives',
|
|
|
+ 'label': _('Archives'),
|
|
|
+ 'value': [],
|
|
|
+ 'help_text': _('List of names or paths of the archives to be added to the distributed cache.')
|
|
|
+ },
|
|
|
+ 'job_properties': {
|
|
|
+ 'name': 'job_properties',
|
|
|
+ 'label': _('Hadoop job properties'),
|
|
|
+ 'value': [],
|
|
|
+ 'help_text': _('For the job configuration (e.g. mapred.job.queue.name=production).')
|
|
|
+ },
|
|
|
+ 'prepares': {
|
|
|
+ 'name': 'prepares',
|
|
|
+ 'label': _('Prepares'),
|
|
|
+ 'value': [],
|
|
|
+ 'help_text': _('List of absolute paths to delete and then to create before starting the application. This should be used exclusively for directory cleanup.')
|
|
|
+ },
|
|
|
+ 'job_xml': {
|
|
|
+ 'name': 'job_xml',
|
|
|
+ 'label': _('Job XML'),
|
|
|
+ 'value': [],
|
|
|
+ 'help_text': _('Refer to a Hadoop JobConf job.xml file bundled in the workflow deployment directory. '
|
|
|
+ 'Properties specified in the Job Properties element override properties specified in the '
|
|
|
+ 'files specified in the Job XML element.')
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @classmethod
|
|
|
+ def get_mandatory_fields(cls):
|
|
|
+ return [cls.FIELDS['command']]
|
|
|
+
|
|
|
+
|
|
|
class KillAction(Action):
|
|
|
TYPE = 'kill'
|
|
|
FIELDS = {
|
|
|
@@ -596,6 +652,7 @@ NODES = {
|
|
|
'hive-widget': HiveAction,
|
|
|
'hive2-widget': HiveServer2Action,
|
|
|
'subworkflow-widget': SubWorkflowAction,
|
|
|
+ 'sqoop-widget': SqoopAction,
|
|
|
'kill-widget': KillAction,
|
|
|
'join-widget': JoinAction,
|
|
|
}
|