= Debug = {{{ #!java public class HelloHadoop { public class HelloMapper extends Mapper { .... } public class HelloReducer extends Reducer { ... } } public static void main(String[] args) throws IOException, InterruptedException, ClassNotFoundException { } } }}} 此一內部類別會引發 java.lang.RuntimeException: java.lang.NoSuchMethodException: WordIndex$wordindexM.() 問題出在 宣告內部類別的 map 或 reduce 的class 前面沒有宣告 static public ,因此正確的應該如下 {{{ #!java public class HelloHadoop { static public class HelloMapper extends Mapper { .... } static public class HelloReducer extends Reducer { ... } } public static void main(String[] args) throws IOException, InterruptedException, ClassNotFoundException { } } }}}