SQOOP:表导入错误

时间:2016-04-24 20:27:21

标签: mysql hadoop sqoop

我使用sqoop将表从MySQL导入HDFS。这是我使用的命令:

sqoop import --connect jdbc:mysql://localhost/classicmodels --table customers -m 1

这是我得到的错误:

Warning: /usr/lib/sqoop/../hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: /usr/lib/sqoop/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Warning: /usr/lib/sqoop/../zookeeper does not exist! Accumulo imports will fail.
Please set $ZOOKEEPER_HOME to the root of your Zookeeper installation.
16/04/25 01:50:59 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6
16/04/25 01:50:59 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
16/04/25 01:50:59 INFO tool.CodeGenTool: Beginning code generation
16/04/25 01:51:00 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `customers` AS t LIMIT 1
16/04/25 01:51:00 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `customers` AS t LIMIT 1
16/04/25 01:51:00 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /usr/local/hadoop
Note: /tmp/sqoop-hduser/compile/38225a594823ca7d954daaae1d92f825/customers.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
16/04/25 01:51:02 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-hduser/compile/38225a594823ca7d954daaae1d92f825/customers.jar
16/04/25 01:51:02 WARN manager.MySQLManager: It looks like you are importing from mysql.
16/04/25 01:51:02 WARN manager.MySQLManager: This transfer can be faster! Use the --direct
16/04/25 01:51:02 WARN manager.MySQLManager: option to exercise a MySQL-specific fast path.
16/04/25 01:51:02 INFO manager.MySQLManager: Setting zero DATETIME behavior to convertToNull (mysql)
16/04/25 01:51:02 INFO mapreduce.ImportJobBase: Beginning import of customers
16/04/25 01:51:02 INFO Configuration.deprecation: mapred.job.tracker is deprecated. Instead, use mapreduce.jobtracker.address
16/04/25 01:51:03 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
16/04/25 01:51:03 INFO Configuration.deprecation: mapred.jar is deprecated. Instead, use mapreduce.job.jar
16/04/25 01:51:03 INFO Configuration.deprecation: mapred.job.tracker is deprecated. Instead, use mapreduce.jobtracker.address
16/04/25 01:51:03 INFO Configuration.deprecation: mapred.map.tasks is deprecated. Instead, use mapreduce.job.maps
16/04/25 01:51:03 INFO Configuration.deprecation: session.id is deprecated. Instead, use dfs.metrics.session-id
16/04/25 01:51:03 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId=
16/04/25 01:51:03 INFO db.DBInputFormat: Using read commited transaction isolation
16/04/25 01:51:04 INFO mapreduce.JobSubmitter: number of splits:1
16/04/25 01:51:04 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_local246282231_0001
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264505/sqoop-1.4.6.jar <- /home/hduser/sqoop-1.4.6.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/sqoop-1.4.6.jar as file:/app/hadoop/tmp/mapred/local/1461529264505/sqoop-1.4.6.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264506/parquet-format-2.0.0.jar <- /home/hduser/parquet-format-2.0.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/parquet-format-2.0.0.jar as file:/app/hadoop/tmp/mapred/local/1461529264506/parquet-format-2.0.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264507/avro-mapred-1.7.5-hadoop2.jar <- /home/hduser/avro-mapred-1.7.5-hadoop2.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/avro-mapred-1.7.5-hadoop2.jar as file:/app/hadoop/tmp/mapred/local/1461529264507/avro-mapred-1.7.5-hadoop2.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264508/ant-eclipse-1.0-jvm1.2.jar <- /home/hduser/ant-eclipse-1.0-jvm1.2.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/ant-eclipse-1.0-jvm1.2.jar as file:/app/hadoop/tmp/mapred/local/1461529264508/ant-eclipse-1.0-jvm1.2.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264509/xz-1.0.jar <- /home/hduser/xz-1.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/xz-1.0.jar as file:/app/hadoop/tmp/mapred/local/1461529264509/xz-1.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264510/paranamer-2.3.jar <- /home/hduser/paranamer-2.3.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/paranamer-2.3.jar as file:/app/hadoop/tmp/mapred/local/1461529264510/paranamer-2.3.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264511/parquet-generator-1.4.1.jar <- /home/hduser/parquet-generator-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/parquet-generator-1.4.1.jar as file:/app/hadoop/tmp/mapred/local/1461529264511/parquet-generator-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264512/commons-codec-1.4.jar <- /home/hduser/commons-codec-1.4.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/commons-codec-1.4.jar as file:/app/hadoop/tmp/mapred/local/1461529264512/commons-codec-1.4.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264513/parquet-avro-1.4.1.jar <- /home/hduser/parquet-avro-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/parquet-avro-1.4.1.jar as file:/app/hadoop/tmp/mapred/local/1461529264513/parquet-avro-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264514/jackson-annotations-2.3.0.jar <- /home/hduser/jackson-annotations-2.3.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/jackson-annotations-2.3.0.jar as file:/app/hadoop/tmp/mapred/local/1461529264514/jackson-annotations-2.3.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264515/parquet-jackson-1.4.1.jar <- /home/hduser/parquet-jackson-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/parquet-jackson-1.4.1.jar as file:/app/hadoop/tmp/mapred/local/1461529264515/parquet-jackson-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264516/opencsv-2.3.jar <- /home/hduser/opencsv-2.3.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/opencsv-2.3.jar as file:/app/hadoop/tmp/mapred/local/1461529264516/opencsv-2.3.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264517/commons-io-1.4.jar <- /home/hduser/commons-io-1.4.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/commons-io-1.4.jar as file:/app/hadoop/tmp/mapred/local/1461529264517/commons-io-1.4.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264518/parquet-hadoop-1.4.1.jar <- /home/hduser/parquet-hadoop-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/parquet-hadoop-1.4.1.jar as file:/app/hadoop/tmp/mapred/local/1461529264518/parquet-hadoop-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264519/kite-hadoop-compatibility-1.0.0.jar <- /home/hduser/kite-hadoop-compatibility-1.0.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/kite-hadoop-compatibility-1.0.0.jar as file:/app/hadoop/tmp/mapred/local/1461529264519/kite-hadoop-compatibility-1.0.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264520/parquet-common-1.4.1.jar <- /home/hduser/parquet-common-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/parquet-common-1.4.1.jar as file:/app/hadoop/tmp/mapred/local/1461529264520/parquet-common-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264521/snappy-java-1.0.5.jar <- /home/hduser/snappy-java-1.0.5.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/snappy-java-1.0.5.jar as file:/app/hadoop/tmp/mapred/local/1461529264521/snappy-java-1.0.5.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264522/jackson-core-asl-1.9.13.jar <- /home/hduser/jackson-core-asl-1.9.13.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/jackson-core-asl-1.9.13.jar as file:/app/hadoop/tmp/mapred/local/1461529264522/jackson-core-asl-1.9.13.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264523/jackson-core-2.3.1.jar <- /home/hduser/jackson-core-2.3.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/jackson-core-2.3.1.jar as file:/app/hadoop/tmp/mapred/local/1461529264523/jackson-core-2.3.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264524/mysql-connector-java-5.1.38-bin.jar <- /home/hduser/mysql-connector-java-5.1.38-bin.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/mysql-connector-java-5.1.38-bin.jar as file:/app/hadoop/tmp/mapred/local/1461529264524/mysql-connector-java-5.1.38-bin.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264525/jackson-mapper-asl-1.9.13.jar <- /home/hduser/jackson-mapper-asl-1.9.13.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/jackson-mapper-asl-1.9.13.jar as file:/app/hadoop/tmp/mapred/local/1461529264525/jackson-mapper-asl-1.9.13.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264526/parquet-encoding-1.4.1.jar <- /home/hduser/parquet-encoding-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/parquet-encoding-1.4.1.jar as file:/app/hadoop/tmp/mapred/local/1461529264526/parquet-encoding-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264527/kite-data-hive-1.0.0.jar <- /home/hduser/kite-data-hive-1.0.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/kite-data-hive-1.0.0.jar as file:/app/hadoop/tmp/mapred/local/1461529264527/kite-data-hive-1.0.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264528/ant-contrib-1.0b3.jar <- /home/hduser/ant-contrib-1.0b3.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/ant-contrib-1.0b3.jar as file:/app/hadoop/tmp/mapred/local/1461529264528/ant-contrib-1.0b3.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264529/kite-data-core-1.0.0.jar <- /home/hduser/kite-data-core-1.0.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/kite-data-core-1.0.0.jar as file:/app/hadoop/tmp/mapred/local/1461529264529/kite-data-core-1.0.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264530/slf4j-api-1.6.1.jar <- /home/hduser/slf4j-api-1.6.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/slf4j-api-1.6.1.jar as file:/app/hadoop/tmp/mapred/local/1461529264530/slf4j-api-1.6.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264531/commons-jexl-2.1.1.jar <- /home/hduser/commons-jexl-2.1.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/commons-jexl-2.1.1.jar as file:/app/hadoop/tmp/mapred/local/1461529264531/commons-jexl-2.1.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264532/kite-data-mapreduce-1.0.0.jar <- /home/hduser/kite-data-mapreduce-1.0.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/kite-data-mapreduce-1.0.0.jar as file:/app/hadoop/tmp/mapred/local/1461529264532/kite-data-mapreduce-1.0.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264533/avro-1.7.5.jar <- /home/hduser/avro-1.7.5.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/avro-1.7.5.jar as file:/app/hadoop/tmp/mapred/local/1461529264533/avro-1.7.5.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264534/hsqldb-1.8.0.10.jar <- /home/hduser/hsqldb-1.8.0.10.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/hsqldb-1.8.0.10.jar as file:/app/hadoop/tmp/mapred/local/1461529264534/hsqldb-1.8.0.10.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264535/commons-logging-1.1.1.jar <- /home/hduser/commons-logging-1.1.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/commons-logging-1.1.1.jar as file:/app/hadoop/tmp/mapred/local/1461529264535/commons-logging-1.1.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264536/parquet-column-1.4.1.jar <- /home/hduser/parquet-column-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/parquet-column-1.4.1.jar as file:/app/hadoop/tmp/mapred/local/1461529264536/parquet-column-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264537/commons-compress-1.4.1.jar <- /home/hduser/commons-compress-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/commons-compress-1.4.1.jar as file:/app/hadoop/tmp/mapred/local/1461529264537/commons-compress-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Creating symlink: /app/hadoop/tmp/mapred/local/1461529264538/jackson-databind-2.3.1.jar <- /home/hduser/jackson-databind-2.3.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: Localized file:/usr/lib/sqoop/lib/jackson-databind-2.3.1.jar as file:/app/hadoop/tmp/mapred/local/1461529264538/jackson-databind-2.3.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264505/sqoop-1.4.6.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264506/parquet-format-2.0.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264507/avro-mapred-1.7.5-hadoop2.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264508/ant-eclipse-1.0-jvm1.2.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264509/xz-1.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264510/paranamer-2.3.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264511/parquet-generator-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264512/commons-codec-1.4.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264513/parquet-avro-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264514/jackson-annotations-2.3.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264515/parquet-jackson-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264516/opencsv-2.3.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264517/commons-io-1.4.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264518/parquet-hadoop-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264519/kite-hadoop-compatibility-1.0.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264520/parquet-common-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264521/snappy-java-1.0.5.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264522/jackson-core-asl-1.9.13.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264523/jackson-core-2.3.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264524/mysql-connector-java-5.1.38-bin.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264525/jackson-mapper-asl-1.9.13.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264526/parquet-encoding-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264527/kite-data-hive-1.0.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264528/ant-contrib-1.0b3.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264529/kite-data-core-1.0.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264530/slf4j-api-1.6.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264531/commons-jexl-2.1.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264532/kite-data-mapreduce-1.0.0.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264533/avro-1.7.5.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264534/hsqldb-1.8.0.10.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264535/commons-logging-1.1.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264536/parquet-column-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264537/commons-compress-1.4.1.jar
16/04/25 01:51:05 INFO mapred.LocalDistributedCacheManager: file:/app/hadoop/tmp/mapred/local/1461529264538/jackson-databind-2.3.1.jar
16/04/25 01:51:05 INFO mapreduce.Job: The url to track the job: http://localhost:8080/
16/04/25 01:51:05 INFO mapreduce.Job: Running job: job_local246282231_0001
16/04/25 01:51:05 INFO mapred.LocalJobRunner: OutputCommitter set in config null
16/04/25 01:51:05 INFO output.FileOutputCommitter: File Output Committer Algorithm version is 1
16/04/25 01:51:05 INFO mapred.LocalJobRunner: OutputCommitter is org.apache.hadoop.mapreduce.lib.output.FileOutputCommitter
16/04/25 01:51:05 INFO mapred.LocalJobRunner: Waiting for map tasks
16/04/25 01:51:05 INFO mapred.LocalJobRunner: Starting task: attempt_local246282231_0001_m_000000_0
16/04/25 01:51:05 INFO output.FileOutputCommitter: File Output Committer Algorithm version is 1
16/04/25 01:51:05 INFO mapred.Task:  Using ResourceCalculatorProcessTree : [ ]
16/04/25 01:51:05 INFO db.DBInputFormat: Using read commited transaction isolation
16/04/25 01:51:05 INFO mapred.MapTask: Processing split: 1=1 AND 1=1
16/04/25 01:51:05 INFO mapred.LocalJobRunner: map task executor complete.
16/04/25 01:51:05 WARN mapred.LocalJobRunner: job_local246282231_0001
java.lang.Exception: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class customers not found
    at org.apache.hadoop.mapred.LocalJobRunner$Job.runTasks(LocalJobRunner.java:462)
    at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:522)
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class customers not found
    at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2195)
    at org.apache.sqoop.mapreduce.db.DBConfiguration.getInputClass(DBConfiguration.java:403)
    at org.apache.sqoop.mapreduce.db.DataDrivenDBInputFormat.createDBRecordReader(DataDrivenDBInputFormat.java:237)
    at org.apache.sqoop.mapreduce.db.DBInputFormat.createRecordReader(DBInputFormat.java:263)
    at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.<init>(MapTask.java:515)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:758)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
    at org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:243)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: Class customers not found
    at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2101)
    at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2193)
    ... 12 more
16/04/25 01:51:06 INFO mapreduce.Job: Job job_local246282231_0001 running in uber mode : false
16/04/25 01:51:06 INFO mapreduce.Job:  map 0% reduce 0%
16/04/25 01:51:06 INFO mapreduce.Job: Job job_local246282231_0001 failed with state FAILED due to: NA
16/04/25 01:51:06 INFO mapreduce.Job: Counters: 0
16/04/25 01:51:06 WARN mapreduce.Counters: Group FileSystemCounters is deprecated. Use org.apache.hadoop.mapreduce.FileSystemCounter instead
16/04/25 01:51:06 INFO mapreduce.ImportJobBase: Transferred 0 bytes in 3.104 seconds (0 bytes/sec)
16/04/25 01:51:06 WARN mapreduce.Counters: Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead
16/04/25 01:51:06 INFO mapreduce.ImportJobBase: Retrieved 0 records.
16/04/25 01:51:06 ERROR tool.ImportTool: Error during import: Import job failed!

我不知道我做错了什么。我正在学习自己,这是一切中最困难的部分。

老实说,我甚至不知道在哪里寻找错误。

请帮忙!

1 个答案:

答案 0 :(得分:0)

sqoop import --connect jdbc:mysql:// localhost / classicmodels --table customers -m 1

命令不完整。您尚未指定mysql db的用户名和密码

完整的命令命令将是这样的:

sqoop import --connect jdbc:mysql:// localhost / classicmodels --username mysqlusername --password --mysqlpassword --table customers --target -dir / target / hadoop / directory / -m 1