0
問題聲明:確保每個表文件分區爲3個文件部分00000,部分00002,部分00003使用sqoop無法將表導入到不同文件中的配置單元(例如,part-0000,part-00001,part-00002)
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'.