Hadoop @ Ubuntu :~ /Hadoop-0.20.2/bin $./hadoop jar ~ /Finger. Jar finger kaoqin output
Error:
11/10/14 13:52:07 warn mapred. jobclient: Use genericoptionsparser for parsing the arguments. Applications shocould implement tool for the same.
11/10/14 13:52:07 warn mapred. jobclient: no job jar file set. User classes may not be found. See jobconf (class) or jobconf # setjar (string ).
11/10/14 13:52:07 info input. fileinputformat: total input paths to process: 5
11/10/14 13:52:07 info mapred. jobclient: running job: job_201110141041_0014
11/10/14 13:52:08 info mapred. jobclient: Map 0% reduce 0%
11/10/14 13:52:19 info mapred. jobclient: task id: attempt_201110141041_0014_m_000000_0, status: Failed
Java. Lang. runtimeexception: Java. Lang. classnotfoundexception: Finger $ fingermapper1
At org. Apache. hadoop. conf. configuration. getclass (config. Java: 809)
At org. Apache. hadoop. mapreduce. jobcontext. getmapperclass (jobcontext. Java: 157)
At org. Apache. hadoop. mapred. maptask. runnewmapper (maptask. Java: 569)
At org. Apache. hadoop. mapred. maptask. Run (maptask. Java: 305)
At org. Apache. hadoop. mapred. Child. Main (child. Java: 170)
Caused by: Java. Lang. classnotfoundexception: Finger $ fingermapper1
At java.net. urlclassloader $ 1.run( urlclassloader. Java: 200)
At java. Security. accesscontroller. doprivileged (native method)
At java.net. urlclassloader. findclass (urlclassloader. Java: 188)
At java. Lang. classloader. loadclass (classloader. Java: 307)
At sun. Misc. launcher $ appclassloader. loadclass (launcher. Java: 301)
At java. Lang. classloader. loadclass (classloader. Java: 252)
At java. Lang. classloader. loadclassinternal (classloader. Java: 320)
At java. Lang. Class. forname0 (native method)
At java. Lang. Class. forname (class. Java: 247)
At org. Apache. hadoop. conf. configuration. getclassbyname (configuration. Java: 762)
At org. Apache. hadoop. conf. configuration. getclass (config. Java: 807)
... 4 more
11/10/14 13:52:19 info mapred. jobclient: task id: attempt_201110141041_0014_m_0000000000, status: Failed
Java. Lang. runtimeexception: Java. Lang. classnotfoundexception: Finger $ fingermapper1
At org. Apache. hadoop. conf. configuration. getclass (config. Java: 809)
At org. Apache. hadoop. mapreduce. jobcontext. getmapperclass (jobcontext. Java: 157)
At org. Apache. hadoop. mapred. maptask. runnewmapper (maptask. Java: 569)
At org. Apache. hadoop. mapred. maptask. Run (maptask. Java: 305)
At org. Apache. hadoop. mapred. Child. Main (child. Java: 170)
Caused by: Java. Lang. classnotfoundexception: Finger $ fingermapper1
At java.net. urlclassloader $ 1.run( urlclassloader. Java: 200)
At java. Security. accesscontroller. doprivileged (native method)
At java.net. urlclassloader. findclass (urlclassloader. Java: 188)
At java. Lang. classloader. loadclass (classloader. Java: 307)
At sun. Misc. launcher $ appclassloader. loadclass (launcher. Java: 301)
At java. Lang. classloader. loadclass (classloader. Java: 252)
At java. Lang. classloader. loadclassinternal (classloader. Java: 320)
At java. Lang. Class. forname0 (native method)
At java. Lang. Class. forname (class. Java: 247)
At org. Apache. hadoop. conf. configuration. getclassbyname (configuration. Java: 762)
At org. Apache. hadoop. conf. configuration. getclass (config. Java: 807)
... 4 more
11/10/14 13:52:25 info mapred. jobclient: task id: attempt_201110141041_0014_m_000001_1, status: Failed
Java. Lang. runtimeexception: Java. Lang. classnotfoundexception: Finger $ fingermapper1
At org. Apache. hadoop. conf. configuration. getclass (config. Java: 809)
At org. Apache. hadoop. mapreduce. jobcontext. getmapperclass (jobcontext. Java: 157)
At org. Apache. hadoop. mapred. maptask. runnewmapper (maptask. Java: 569)
At org. Apache. hadoop. mapred. maptask. Run (maptask. Java: 305)
At org. Apache. hadoop. mapred. Child. Main (child. Java: 170)
Caused by: Java. Lang. classnotfoundexception: Finger $ fingermapper1
At java.net. urlclassloader $ 1.run( urlclassloader. Java: 200)
At java. Security. accesscontroller. doprivileged (native method)
At java.net. urlclassloader. findclass (urlclassloader. Java: 188)
At java. Lang. classloader. loadclass (classloader. Java: 307)
At sun. Misc. launcher $ appclassloader. loadclass (launcher. Java: 301)
At java. Lang. classloader. loadclass (classloader. Java: 252)
At java. Lang. classloader. loadclassinternal (classloader. Java: 320)
At java. Lang. Class. forname0 (native method)
At java. Lang. Class. forname (class. Java: 247)
At org. Apache. hadoop. conf. configuration. getclassbyname (configuration. Java: 762)
At org. Apache. hadoop. conf. configuration. getclass (config. Java: 807)
... 4 more
11/10/14 13:52:25 info mapred. jobclient: task id: attempt_201110141041_0014_m_000000_1, status: Failed
Java. Lang. runtimeexception: Java. Lang. classnotfoundexception: Finger $ fingermapper1
At org. Apache. hadoop. conf. configuration. getclass (config. Java: 809)
At org. Apache. hadoop. mapreduce. jobcontext. getmapperclass (jobcontext. Java: 157)
At org. Apache. hadoop. mapred. maptask. runnewmapper (maptask. Java: 569)
At org. Apache. hadoop. mapred. maptask. Run (maptask. Java: 305)
At org. Apache. hadoop. mapred. Child. Main (child. Java: 170)
Caused by: Java. Lang. classnotfoundexception: Finger $ fingermapper1
At java.net. urlclassloader $ 1.run( urlclassloader. Java: 200)
At java. Security. accesscontroller. doprivileged (native method)
At java.net. urlclassloader. findclass (urlclassloader. Java: 188)
At java. Lang. classloader. loadclass (classloader. Java: 307)
At sun. Misc. launcher $ appclassloader. loadclass (launcher. Java: 301)
At java. Lang. classloader. loadclass (classloader. Java: 252)
At java. Lang. classloader. loadclassinternal (classloader. Java: 320)
At java. Lang. Class. forname0 (native method)
At java. Lang. Class. forname (class. Java: 247)
At org. Apache. hadoop. conf. configuration. getclassbyname (configuration. Java: 762)
At org. Apache. hadoop. conf. configuration. getclass (config. Java: 807)
... 4 more
11/10/14 13:52:31 info mapred. jobclient: task id: attempt_201110141041_0014_m_000000_2, status: Failed
Java. Lang. runtimeexception: Java. Lang. classnotfoundexception: Finger $ fingermapper1
At org. Apache. hadoop. conf. configuration. getclass (config. Java: 809)
At org. Apache. hadoop. mapreduce. jobcontext. getmapperclass (jobcontext. Java: 157)
At org. Apache. hadoop. mapred. maptask. runnewmapper (maptask. Java: 569)
At org. Apache. hadoop. mapred. maptask. Run (maptask. Java: 305)
At org. Apache. hadoop. mapred. Child. Main (child. Java: 170)
Caused by: Java. Lang. classnotfoundexception: Finger $ fingermapper1
At java.net. urlclassloader $ 1.run( urlclassloader. Java: 200)
At java. Security. accesscontroller. doprivileged (native method)
At java.net. urlclassloader. findclass (urlclassloader. Java: 188)
At java. Lang. classloader. loadclass (classloader. Java: 307)
At sun. Misc. launcher $ appclassloader. loadclass (launcher. Java: 301)
At java. Lang. classloader. loadclass (classloader. Java: 252)
At java. Lang. classloader. loadclassinternal (classloader. Java: 320)
At java. Lang. Class. forname0 (native method)
At java. Lang. Class. forname (class. Java: 247)
At org. Apache. hadoop. conf. configuration. getclassbyname (configuration. Java: 762)
At org. Apache. hadoop. conf. configuration. getclass (config. Java: 807)
... 4 more
11/10/14 13:52:31 info mapred. jobclient: task id: attempt_201110141041_0014_m_000001_2, status: Failed
Java. Lang. runtimeexception: Java. Lang. classnotfoundexception: Finger $ fingermapper1
At org. Apache. hadoop. conf. configuration. getclass (config. Java: 809)
At org. Apache. hadoop. mapreduce. jobcontext. getmapperclass (jobcontext. Java: 157)
At org. Apache. hadoop. mapred. maptask. runnewmapper (maptask. Java: 569)
At org. Apache. hadoop. mapred. maptask. Run (maptask. Java: 305)
At org. Apache. hadoop. mapred. Child. Main (child. Java: 170)
Caused by: Java. Lang. classnotfoundexception: Finger $ fingermapper1
At java.net. urlclassloader $ 1.run( urlclassloader. Java: 200)
At java. Security. accesscontroller. doprivileged (native method)
At java.net. urlclassloader. findclass (urlclassloader. Java: 188)
At java. Lang. classloader. loadclass (classloader. Java: 307)
At sun. Misc. launcher $ appclassloader. loadclass (launcher. Java: 301)
At java. Lang. classloader. loadclass (classloader. Java: 252)
At java. Lang. classloader. loadclassinternal (classloader. Java: 320)
At java. Lang. Class. forname0 (native method)
At java. Lang. Class. forname (class. Java: 247)
At org. Apache. hadoop. conf. configuration. getclassbyname (configuration. Java: 762)
At org. Apache. hadoop. conf. configuration. getclass (config. Java: 807)
... 4 more
11/10/14 13:52:40 info mapred. jobclient: job complete: job_201110141041_0014
11/10/14 13:52:40 info mapred. jobclient: counters: 3
11/10/14 13:52:40 info mapred. jobclient: Job counters
11/10/14 13:52:40 info mapred. jobclient: Launched map tasks = 8
11/10/14 13:52:40 info mapred. jobclient: Data-local map tasks = 8
11/10/14 13:52:40 info mapred. jobclient: Failed map tasks = 1
From the error information, I thought at the beginning that we wanted to put the map and reduce classes together in the main class, and then set the map and reduce classes used during job customization, then I tried to run the package again.
Later I discovered that no job jar file set. user classes may not be found. see jobconf (class) or jobconf # setjar (string ). it is related to the hadoop version. In the new version, jobs cannot be used.
Solution: Use job. setjarbyclass (finger. Class). Because the JAR file containing map is to be distributed to datanode, I encountered this problem at the beginning and then figured it out. The test is also easy to use ~~