wiki:hadoop_tools

Version 3 (modified by liaojiaohe, 14 years ago) (diff)

--

该工作包实现的功能:

  • HBASE分布式查询,用户输入表名,filter,输出目录等信息查询相应的结果
  • 查看HDFS压缩文件文件里面的前几行数据
   public static void main(String[] args) throws Exception {
        Configuration conf = HBaseConfiguration.create();  //建立Configuration
        String[] otherArgs = new GenericOptionsParser(conf, args).getRemainingArgs();  //输入参数parser  
 

参数传递的规则:hadoop jar xxxx.jar program [genericOptions] [commandOptions]
genericOptions:

     -conf <configuration file>     specify a configuration file
     -D <property=value>            use value for given property
     -fs <local|namenode:port>      specify a namenode
     -jt <local|jobtracker:port>    specify a job tracker
     -files <comma separated list of files>    specify comma separated
                            files to be copied to the map reduce cluster
     -libjars <comma separated list of jars>   specify comma separated
                            jar files to include in the classpath.
     -archives <comma separated list of archives>    specify comma
             separated archives to be unarchived on the compute machines.v

Attachments