springhadoop 方式开发MapReduce 出现问题
来源:8-6 -Spring Hadoop其他
慕标6387096
2018-05-10
仿照老师HDFS代码
ApplicationContext context = new ClassPathXmlApplicationContext("config.xml");
Job job = (Job) context.getBean("log-job");
使用assembly 方式打包传到服务器中运行
hadoop jar hadooptrain-1.0-jar-with-dependencies.jar com.victor.hadooptrain.Project.LogApp
服务器报错:Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/context] Offending resource: class path resource [config.xml]
config中已经按照官网添加了
<hdp:job id="log-job" configuration-ref="hadoopConfiguration" input-path="/10000_access.log" output-path="/browserout" mapper="com.victor.hadooptrain.Project.Logmapper" reducer="com.victor.hadooptrain.Project.LogReducer" jar-by-class="com.victor.hadooptrain.Project.LogApp"/>
1回答
-
Michael_PK
2018-05-10
conf那个文件是否在resources类型的文件夹下,注意类型
052018-05-11
相似问题