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>:未完成

  • 相关阅读:
    angular的路由例子
    angular自定义module
    docker配置phpadmin需要注意的地方
    linux下钉钉,微信
    debian shell脚本关联
    debian下安装带界面的qemu
    ros的一些设置
    新闻排重方案设计
    细解动态规划(一)
    漫画谈-微积分(二)
  • 原文地址:https://www.cnblogs.com/eva_sj/p/3971172.html
Copyright © 2011-2022 走看看