用tomcat跑一個web工程,用mapreduce從mysql導入數據時遇到如下問題,求解:
13/12/05 20:39:35 INFO mapred.JobClient: Running job: job_201311251041_0681
13/12/05 20:39:36 INFO mapred.JobClient: map 0% reduce 0%
13/12/05 20:39:40 INFO mapred.JobClient: Task Id : attempt_201311251041_0681_m_000003_0, Status : FAILED
Error initializing attempt_201311251041_0681_m_000003_0:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:36)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:815)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)
13/12/05 20:39:40 WARN mapred.JobClient: Error reading task outputhttp://dell4:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000003_0&filter=stdout
13/12/05 20:39:40 WARN mapred.JobClient: Error reading task outputhttp://dell4:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000003_0&filter=stderr
13/12/05 20:39:43 INFO mapred.JobClient: Task Id : attempt_201311251041_0681_r_000002_0, Status : FAILED
Error initializing attempt_201311251041_0681_r_000002_0:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:36)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:815)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)
13/12/05 20:39:43 WARN mapred.JobClient: Error reading task outputhttp://dell4:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_r_000002_0&filter=stdout
13/12/05 20:39:43 WARN mapred.JobClient: Error reading task outputhttp://dell4:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_r_000002_0&filter=stderr
13/12/05 20:39:46 INFO mapred.JobClient: Task Id : attempt_201311251041_0681_m_000003_1, Status : FAILED
Error initializing attempt_201311251041_0681_m_000003_1:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:36)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:815)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)
13/12/05 20:39:46 WARN mapred.JobClient: Error reading task outputhttp://dell1:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000003_1&filter=stdout
13/12/05 20:39:46 WARN mapred.JobClient: Error reading task outputhttp://dell1:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000003_1&filter=stderr
13/12/05 20:39:49 INFO mapred.JobClient: Task Id : attempt_201311251041_0681_r_000002_1, Status : FAILED
Error initializing attempt_201311251041_0681_r_000002_1:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:36)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:815)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)
13/12/05 20:39:49 WARN mapred.JobClient: Error reading task outputhttp://dell1:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_r_000002_1&filter=stdout
13/12/05 20:39:49 WARN mapred.JobClient: Error reading task outputhttp://dell1:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_r_000002_1&filter=stderr
13/12/05 20:39:52 INFO mapred.JobClient: Task Id : attempt_201311251041_0681_m_000003_2, Status : FAILED
Error initializing attempt_201311251041_0681_m_000003_2:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:36)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:815)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)
13/12/05 20:39:52 WARN mapred.JobClient: Error reading task outputhttp://dell2:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000003_2&filter=stdout
13/12/05 20:39:52 WARN mapred.JobClient: Error reading task outputhttp://dell2:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000003_2&filter=stderr
13/12/05 20:39:58 INFO mapred.JobClient: Task Id : attempt_201311251041_0681_m_000002_0, Status : FAILED
Error initializing attempt_201311251041_0681_m_000002_0:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:36)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:815)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)
13/12/05 20:39:58 WARN mapred.JobClient: Error reading task outputhttp://dell2:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000002_0&filter=stdout
13/12/05 20:39:58 WARN mapred.JobClient: Error reading task outputhttp://dell2:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000002_0&filter=stderr
13/12/05 20:40:01 INFO mapred.JobClient: Task Id : attempt_201311251041_0681_r_000001_0, Status : FAILED
Error initializing attempt_201311251041_0681_r_000001_0:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:36)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:815)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)
13/12/05 20:40:01 WARN mapred.JobClient: Error reading task outputhttp://dell2:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_r_000001_0&filter=stdout
13/12/05 20:40:01 WARN mapred.JobClient: Error reading task outputhttp://dell2:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_r_000001_0&filter=stderr
13/12/05 20:40:07 INFO mapred.JobClient: Task Id : attempt_201311251041_0681_m_000002_1, Status : FAILED
Error initializing attempt_201311251041_0681_m_000002_1:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:36)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:815)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)
13/12/05 20:40:07 WARN mapred.JobClient: Error reading task outputhttp://dell4:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000002_1&filter=stdout
13/12/05 20:40:07 WARN mapred.JobClient: Error reading task outputhttp://dell4:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000002_1&filter=stderr
13/12/05 20:40:10 INFO mapred.JobClient: Task Id : attempt_201311251041_0681_r_000001_1, Status : FAILED
Error initializing attempt_201311251041_0681_r_000001_1:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:36)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:815)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)
13/12/05 20:40:10 WARN mapred.JobClient: Error reading task outputhttp://dell4:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_r_000001_1&filter=stdout
13/12/05 20:40:10 WARN mapred.JobClient: Error reading task outputhttp://dell4:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_r_000001_1&filter=stderr
我是調用hadoop中對數據庫操作的庫,實現把某一個表從mysql數據庫並行導入hdfs,我單獨寫一個java程序可以成功導入,但是放到web工程裡邊,mapreduce就會出現這個ZipException問題
我也遇到這個問題,應該是web工程啟動hadoop的job時出了問題,因為java工程啟動的時候可以選擇run on hadoop,但是到了web就不受我們控制了,可能是成了run on Application,才出現這些問題。。現在還不知道該怎麼解決,解決了嗎?可以加我qq交流一下嗎。(270104832)