java:5: error: package org.apache.hadoop.conf does not
来源:互联网 发布:qqsmtp服务器端口 编辑:程序博客网 时间:2024/06/06 17:41
异常描述
产生于:javac wordcount.java
编译mapreduce编译中
异常提示
WordCount.java:4: error: package org.apache.hadoop.conf does not existimport org.apache.hadoop.conf.Configuration; ^WordCount.java:5: error: package org.apache.hadoop.fs does not existimport org.apache.hadoop.fs.Path; ^WordCount.java:6: error: package org.apache.hadoop.io does not existimport org.apache.hadoop.io.IntWritable; ^WordCount.java:7: error: package org.apache.hadoop.io does not existimport org.apache.hadoop.io.Text; ^WordCount.java:8: error: package org.apache.hadoop.mapreduce does not existimport org.apache.hadoop.mapreduce.Job; ^WordCount.java:9: error: package org.apache.hadoop.mapreduce does not existimport org.apache.hadoop.mapreduce.Mapper; ^WordCount.java:10: error: package org.apache.hadoop.mapreduce does not existimport org.apache.hadoop.mapreduce.Reducer; ^WordCount.java:11: error: package org.apache.hadoop.mapreduce.lib.input does not existimport org.apache.hadoop.mapreduce.lib.input.FileInputFormat; ^WordCount.java:12: error: package org.apache.hadoop.mapreduce.lib.output does not existimport org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; ^WordCount.java:13: error: package org.apache.hadoop.util does not existimport org.apache.hadoop.util.GenericOptionsParser; ^WordCount.java:38: error: cannot find symbol public static class IntSumReducer extends Reducer<Text, IntWritable, Text, IntWritable>
问题原因:
您使用的是jdk,Javac编译MapRedce,他肯定不含Hadoop的依赖包!对么。
解决方案:
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$CLASSPATHexport CLASSPATH=.:$HADOOP_HOME/share/hadoop/common/hadoop-common-2.2.0:$HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.2.0.jar:$HADOOP_HOME/share/hadoop/common/lib/commons-cli-1.2.jar:$CLASSPATH
注意:
1: 注意包路径,注意版本。 2: 新窗口并不会加载classpath。 3:更改后刷新文件:source /etc/profile
0 0
- java:5: error: package org.apache.hadoop.conf does not
- org.apache.hadoop.conf
- org.apache.hadoop.mapred.InvalidInputException: Input path does not exist:
- "hadoop fs -conf " does not work
- hadoop执行jar包时报 org.apache.hadoop.mapred.InvalidInputException: Input path does not exis
- hadoop异常: org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exi
- #org.apache.hadoop.conf.Configuration.addDeprecations
- spark插入数据到hbase: org.apache.hadoop.conf.Configuration not Serializable Exeception
- sqoop把mysql导入hive时报错:Could not load org.apache.hadoop.hive.conf.HiveConf.
- ERROR org.apache.hadoop.conf.Configuration: Failed to set setXIncludeAware(true) for parser
- 错误:org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist: hdfs://localhost/
- org.apache.hadoop.mapred.InvalidInputException: Input path does not exist问题
- org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist:
- "main" org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: file
- org.apache.hadoop.mapred.InvalidInputException: Input path does not exist问题
- org.apache.hadoop.mapreduce.lib.input.InvalidInputException:input path does not exist:hdfs://10.0.2.
- org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist:
- org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist:
- JPA的一对多映射(单向)
- 架构师速成6.3-设计开发思路
- 为什么 chrome 不做导航页
- 进程间通信 "共享内存" 与 “信号量”的使用
- 《C语言及程序设计》实践参考——复数结构体
- java:5: error: package org.apache.hadoop.conf does not
- 制作网站过程
- SqlDateTime溢出错误解决
- 3.1.3 格式化字符串的语法
- 《C语言及程序设计》实践参考——学生成绩处理
- svn错误
- boost::asio中文文档
- C++ Builder如何使用蓝牙打印机
- eclipse 配置-插件安装