Jonathan Seidman created SQOOP-2687:
---------------------------------------
Summary: Recent interface changes appear to have broken shell
functionality
Key: SQOOP-2687
URL: https://issues.apache.org/jira/browse/SQOOP-2687
Project: Sqoop
Issue Type: Bug
Components: sqoop2-shell
Affects Versions: 1.99.7
Reporter: Jonathan Seidman
Recent interface changes (e.g. SQOOP-2674 and 2675) seem to have broken some
shell functionality. For example:
sqoop:000> create link -c hdfs-connector
Creating link for connector with id hdfs-connector
Please fill following values to create new link object
Name: My HDFS Link
sqoop:000> create link -c generic-jdbc-connector
Creating link for connector with id generic-jdbc-connector
Please fill following values to create new link object
Name: My DB Link
sqoop:000> show link
+----+--------------+--------------+------------------------+---------+
| Id | Name | Connector Id | Connector Name | Enabled |
+----+--------------+--------------+------------------------+---------+
| 1 | My HDFS Link | 6 | hdfs-connector | true |
| 2 | My DB Link | 7 | generic-jdbc-connector | true |
+----+--------------+--------------+------------------------+---------+
sqoop:000> create job -f 1 -t 2
Creating job for links with from id 1 and to id 2
Exception has occurred during processing command
Exception: org.apache.sqoop.common.SqoopException Message: CLIENT_0001:Server
has returned exception
(org.apache.sqoop.common.SqoopException: SERVER_0006:Entity requested doesn't
exist - Invalid link name: 1 doesn't exist)
This seems as expected, so:
sqoop:000> create job -f My HDFS Link -t My DB Link
Invalid command invocation: Missing required option: t
Assuming that the Options library parses out first word, then maybe:
sqoop:000> create job -f "My HDFS Link" -t "My DB Link"
Exception has occurred during processing command
Exception: org.codehaus.groovy.control.MultipleCompilationErrorsException
Message: startup failed:
Script3.groovy: 1: unexpected char: '"' @ line 1, column 5.
""My"
^
1 error
Nope, so...
sqoop:000> create link -c hdfs-connector
Creating link for connector with id hdfs-connector
Please fill following values to create new link object
Name: hdfs-link
...
New link was successfully created with validation status OK and persistent id 3
sqoop:000> create link -c generic-jdbc-connector
Creating link for connector with id generic-jdbc-connector
Please fill following values to create new link object
Name: db-link
...
New link was successfully created with validation status OK and persistent id 4
Thus looks good, but...
sqoop:000> create job -f hdfs-link -t db-link
Creating job for links with from id hdfs-link and to id db-link
Please fill following values to create new job object
Name: my first job
...
New job was successfully created with validation status OK and persistent id 1
sqoop:000> show job
Exception has occurred during processing command
Exception: org.apache.sqoop.common.SqoopException Message: CLIENT_0001:Server
has returned exception
(org.apache.sqoop.common.SqoopException: SERVER_0006:Entity requested doesn't
exist - Invalid link name: 3 doesn't exist)
and so on...
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)