【发布时间】:2016-08-28 21:27:54
【问题描述】:
问题说明: 确保每个表文件被分区为 3 个文件,例如部分 00000、部分 00002、部分 00003
sqoop import-all-tables -m 3 --connect jdbc:mysql://localhost/retail_db --username retail_dba --hive-import --hive-overwrite --create-hive-table --compress --compression-codec snappy --outdir java_output
/08/29 02:42:57 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop- training/compile/9cf789b552995b98bd700d07f4cb3de2/categories.jar
16/08/29 02:42:57 WARN manager.MySQLManager: It looks like you are importing from mysql.
16/08/29 02:42:57 WARN manager.MySQLManager: This transfer can be faster! Use the --direct
16/08/29 02:42:57 WARN manager.MySQLManager: option to exercise a MySQL-specific fast path.
16/08/29 02:42:57 INFO manager.MySQLManager: Setting zero DATETIME behavior to convertToNull (mysql)
16/08/29 02:42:57 ERROR tool.ImportAllTablesTool: Error during import: No primary key could be found for table categories. Please specify one with --split-by or perform a sequential import with '-m 1'.
【问题讨论】: