MR编写之读取linux上(指定目录下的)配置文件

我首先把main函数和调用方式写一下函数

/**
 *
 * @param args
 * 一、传入参数
 * 二、传出参数
 * 三、业务参数:①stg_log_  ②stg_log_class_perform_
 * 四、配置文件路径:如xetl.properties
 */
public static void main(String[] args) {
    if (args.length < 2) {
        System.out.println("args must more than 2.");
        System.exit(0);
    }
    // day=(args[0].split("/"))[3];
    Configuration conf = new Configuration();
    FileSystem hdfs = null;
    try {
        int res = ToolRunner.run(conf, new AutoActLogParseMr(), args);
        System.exit(res);
    } catch (Exception e) {
        logger.error("", e);
    }
}
相关文章
相关标签/搜索