我试图在Sqoop for Hadoop中使用generic-jdbc-connector创建一个链接。但是,当我尝试获得数字格式异常时:
sqoop:000> show connector
+----+------------------------+---------+------------------------------------------------------+----------------------+
| Id | Name | Version | Class | Supported Directions |
+----+------------------------+---------+------------------------------------------------------+----------------------+
| 1 | generic-jdbc-connector | 1.99.6 | org.apache.sqoop.connector.jdbc.GenericJdbcConnector | FROM/TO |
| 2 | kite-connector | 1.99.6 | org.apache.sqoop.connector.kite.KiteConnector | FROM/TO |
| 3 | hdfs-connector | 1.99.6 | org.apache.sqoop.connector.hdfs.HdfsConnector | FROM/TO |
| 4 | kafka-connector | 1.99.6 | org.apache.sqoop.connector.kafka.KafkaConnector | TO |
+----+------------------------+---------+------------------------------------------------------+----------------------+
sqoop:000> create link --connector generic-jdbc-connector
Invalid command invocation: Missing required option: c
sqoop:000> create link -c generic-jdbc-connector
Exception has occurred during processing command
Exception: java.lang.NumberFormatException Message: For input string: "generic-jdbc-connector"
我使用了来自http://sqoop.apache.org/docs/1.99.7/user/Sqoop5MinutesDemo.html
的示例有什么想法吗?
答案 0 :(得分:2)
请使用以下命令,它应该可以工作。
sqoop:000> create link -connector generic-jdbc-connector
问题:您已多次尝试过。
1st time : In your command you have given --connector in place of -connector
2nd time : In place of -connector you have given -c which is wrong, that is the reason you are getting exception.