14/09/08 01:28:56 ERROR security.UserGroupInformation: PriviledgedActionException as:linuxidc cause:org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory project already exists
14/09/08 01:28:56 ERROR tool.ImportTool: Encountered IOException running import job: org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory project already exists
删除目录问题解决:
[linuxidc@jifeng01 ~]$ hadoop dfs -rmr /user/linuxidc/project
Warning: $HADOOP_HOME is deprecated.
Deleted hdfs://linuxidc01:9000/user/linuxidc/project
[linuxidc@jifeng01 ~]$
[linuxidc@jifeng02 sqoop]$ bin/sqoop import --connect jdbc:mysql://10.X.X.:3306/lir --table project --username dss -P --hive-import -- --default-character-set=utf-8
Warning: /home/linuxidc/sqoop/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /home/linuxidc/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Warning: $HADOOP_HOME is deprecated.
14/09/08 01:58:02 INFO sqoop.Sqoop: Running Sqoop version: 1.4.5
Enter password:
14/09/08 01:58:07 INFO tool.BaseSqoopTool: Using Hive-specific delimiters for output. You can override
14/09/08 01:58:07 INFO tool.BaseSqoopTool: delimiters with --fields-terminated-by, etc.
14/09/08 01:58:07 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
14/09/08 01:58:07 INFO tool.CodeGenTool: Beginning code generation
14/09/08 01:58:07 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `project` AS t LIMIT 1
14/09/08 01:58:07 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `project` AS t LIMIT 1
14/09/08 01:58:07 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /home/linuxidc/hadoop/hadoop-1.2.1
注: /tmp/sqoop-linuxidc/compile/437963d234f778a27f8aa27fec8e18aa/project.java使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
14/09/08 01:58:08 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-linuxidc/compile/437963d234f778a27f8aa27fec8e18aa/project.jar
14/09/08 01:58:08 WARN manager.MySQLManager: It looks like you are importing from mysql.
14/09/08 01:58:08 WARN manager.MySQLManager: This transfer can be faster! Use the --direct
14/09/08 01:58:08 WARN manager.MySQLManager: option to exercise a MySQL-specific fast path.
14/09/08 01:58:08 INFO manager.MySQLManager: Setting zero DATETIME behavior to convertToNull (mysql)
14/09/08 01:58:08 INFO mapreduce.ImportJobBase: Beginning import of project
14/09/08 01:58:08 INFO db.DBInputFormat: Using read commited transaction isolation
14/09/08 01:58:08 INFO db.DataDrivenDBInputFormat: BoundingValsQuery: SELECT MIN(`id`), MAX(`id`) FROM `project`
14/09/08 01:58:09 INFO mapred.JobClient: Running job: job_201409072150_0005
14/09/08 01:58:10 INFO mapred.JobClient: map 0% reduce 0%
14/09/08 01:58:15 INFO mapred.JobClient: map 33% reduce 0%
14/09/08 01:58:16 INFO mapred.JobClient: map 66% reduce 0%
14/09/08 01:58:18 INFO mapred.JobClient: map 100% reduce 0%
14/09/08 01:58:20 INFO mapred.JobClient: Job complete: job_201409072150_0005
14/09/08 01:58:20 INFO mapred.JobClient: Counters: 18
14/09/08 01:58:20 INFO mapred.JobClient: Job Counters
14/09/08 01:58:20 INFO mapred.JobClient: SLOTS_MILLIS_MAPS=11968
14/09/08 01:58:20 INFO mapred.JobClient: Total time spent by all reduces waiting after reserving slots (ms)=0
14/09/08 01:58:20 INFO mapred.JobClient: Total time spent by all maps waiting after reserving slots (ms)=0
14/09/08 01:58:20 INFO mapred.JobClient: Launched map tasks=3
14/09/08 01:58:20 INFO mapred.JobClient: SLOTS_MILLIS_REDUCES=0
14/09/08 01:58:20 INFO mapred.JobClient: File Output Format Counters
14/09/08 01:58:20 INFO mapred.JobClient: Bytes Written=201
14/09/08 01:58:20 INFO mapred.JobClient: FileSystemCounters
14/09/08 01:58:20 INFO mapred.JobClient: HDFS_BYTES_READ=295
14/09/08 01:58:20 INFO mapred.JobClient: FILE_BYTES_WRITTEN=206338
14/09/08 01:58:20 INFO mapred.JobClient: HDFS_BYTES_WRITTEN=201
14/09/08 01:58:20 INFO mapred.JobClient: File Input Format Counters
14/09/08 01:58:20 INFO mapred.JobClient: Bytes Read=0
14/09/08 01:58:20 INFO mapred.JobClient: Map-Reduce Framework
14/09/08 01:58:20 INFO mapred.JobClient: Map input records=3
14/09/08 01:58:20 INFO mapred.JobClient: Physical memory (bytes) snapshot=163192832
14/09/08 01:58:20 INFO mapred.JobClient: Spilled Records=0
14/09/08 01:58:20 INFO mapred.JobClient: CPU time spent (ms)=1480
14/09/08 01:58:20 INFO mapred.JobClient: Total committed heap usage (bytes)=64421888
14/09/08 01:58:20 INFO mapred.JobClient: Virtual memory (bytes) snapshot=1208586240
14/09/08 01:58:20 INFO mapred.JobClient: Map output records=3
14/09/08 01:58:20 INFO mapred.JobClient: SPLIT_RAW_BYTES=295
14/09/08 01:58:20 INFO mapreduce.ImportJobBase: Transferred 201 bytes in 11.6303 seconds (17.2825 bytes/sec)
14/09/08 01:58:20 INFO mapreduce.ImportJobBase: Retrieved 3 records.
14/09/08 01:58:20 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `project` AS t LIMIT 1
14/09/08 01:58:20 WARN hive.TableDefWriter: Column create_at had to be cast to a less precise type in Hive
14/09/08 01:58:20 WARN hive.TableDefWriter: Column update_at had to be cast to a less precise type in Hive
14/09/08 01:58:20 INFO hive.HiveImport: Removing temporary files from import process: hdfs://linuxidc01:9000/user/linuxidc/project/_logs
14/09/08 01:58:20 INFO hive.HiveImport: Loading uploaded data into Hive
14/09/08 01:58:21 INFO hive.HiveImport:
14/09/08 01:58:21 INFO hive.HiveImport: Logging initialized using configuration in jar:file:/home/linuxidc/hadoop/hive-0.12.0-bin/lib/hive-common-0.12.0.jar!/hive-log4j.properties
14/09/08 01:58:27 INFO hive.HiveImport: OK
14/09/08 01:58:27 INFO hive.HiveImport: Time taken: 6.069 seconds
14/09/08 01:58:27 INFO hive.HiveImport: Loading data to table default.project
14/09/08 01:58:27 INFO hive.HiveImport: Table default.project stats: [num_partitions: 0, num_files: 4, num_rows: 0, total_size: 201, raw_data_size: 0]
14/09/08 01:58:27 INFO hive.HiveImport: OK
14/09/08 01:58:27 INFO hive.HiveImport: Time taken: 0.345 seconds
14/09/08 01:58:27 INFO hive.HiveImport: Hive import complete.
14/09/08 01:58:27 INFO hive.HiveImport: Export directory is empty, removing it.
相关阅读: