zoukankan      html  css  js  c++  java
  • 实战Hadoop中遇到的几个类、接口说明

    1. Configuration :public 类型接口,这个接口包含的多数方法是进行与数据属性<key,value>有关的操作。

        几个方法:

        1)addProperty(String key, Object value): Add a property to configuration

        2)setProperty(String key, Object value): Set a property

        3)clear(): remove all properties from the configuration

        4)clearProperty(String key): remove a property from the configuration

    2. Class GenericOptionsParser: 继承自Object 类。

        用来解析hadoop 框架中的命令行参数,该类可以识别很多命令行参数,使得应用程序知道哪个是namenode,哪个是jobTracker。

        GenericOptionsParser(Configuration conf, String[] args): 创建一个GenericOptionsParser 对象来解析hadoop的args参数。

        方法:getRemainingArgs() 返回应用相关的参数的一组字符串。

    3. System:

        内部成员变量和成员方法都是static 的,只能用作类对象,不能实例化。

        方法:System.exit(int status); //status为0表示正常退出,JVM关闭,status非0表示非正常退出。exit 和return 的区别:return 返回上一层,exit 返回最上层。

    4. class FileInputFormat<key,value>:未完成

  • 相关阅读:
    语文成语的积累
    关于翻译
    关于文常
    语文小说
    语文 散文阅读
    矩佬的博客
    字词
    语文病句
    地理
    寒假某cg的数学卷子....
  • 原文地址:https://www.cnblogs.com/eva_sj/p/3971172.html
Copyright © 2011-2022 走看看