官术网_书友最值得收藏!

  • Hadoop Beginner's Guide
  • Garry Turkington
  • 126字
  • 2021-07-29 16:51:38

Time for action – setting up the classpath

To compile any Hadoop-related code, we will need to refer to the standard Hadoop-bundled classes.

Add the Hadoop-1.0.4.core.jar file from the distribution to the Java classpath as follows:

$ export CLASSPATH=.:${HADOOP_HOME}/Hadoop-1.0.4.core.jar:${CLASSPATH}

What just happened?

This adds the Hadoop-1.0.4.core.jar file explicitly to the classpath alongside the current directory and the previous contents of the CLASSPATH environment variable.

Once again, it would be good to put this in your shell startup file or a standalone file to be sourced.

Note

We will later need to also have many of the supplied third-party libraries that come with Hadoop on our classpath, and there is a shortcut to do this. For now, the explicit addition of the core JAR file will suffice.

主站蜘蛛池模板: 山西省| 贡觉县| 乳山市| 彰化市| 新干县| 修水县| 葫芦岛市| 盘山县| 大埔县| 微博| 来凤县| 沭阳县| 英吉沙县| 府谷县| 赣榆县| 荣昌县| 彭阳县| 鱼台县| 江都市| 应城市| 杭锦后旗| 朝阳市| 阿拉善盟| 安义县| 江孜县| 蛟河市| 泌阳县| 日土县| 盐亭县| 荣成市| 米脂县| 双桥区| 岫岩| 汕尾市| 昌吉市| 北辰区| 福州市| 靖西县| 宣汉县| 临沭县| 澎湖县|