org.apache.hadoop.tools
Class DistCh

java.lang.Object
  extended by org.apache.hadoop.tools.DistCh
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

public class DistCh
extends Object

A Map-reduce program to recursively change files properties such as owner, group and permission.


Nested Class Summary
static class DistTool.DuplicationException
          An exception class for duplicated source files.
 
Field Summary
protected  JobConf jobconf
           
protected static org.apache.commons.logging.Log LOG
           
 
Method Summary
protected static void checkSource(org.apache.hadoop.conf.Configuration conf, List<org.apache.hadoop.fs.Path> srcs)
          Sanity check for source
 JobConf getConf()
          
protected static String getRandomId()
           
static void main(String[] args)
           
protected static List<String> readFile(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path inputfile)
           
protected static String readString(DataInput in)
           
 int run(String[] args)
          This is the main driver for recursively changing files properties.
 void setConf(org.apache.hadoop.conf.Configuration conf)
          
protected static void writeString(DataOutput out, String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.commons.logging.Log LOG

jobconf

protected JobConf jobconf
Method Detail

run

public int run(String[] args)
        throws Exception
This is the main driver for recursively changing files properties.

Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

setConf

public void setConf(org.apache.hadoop.conf.Configuration conf)

Specified by:
setConf in interface org.apache.hadoop.conf.Configurable

getConf

public JobConf getConf()

Specified by:
getConf in interface org.apache.hadoop.conf.Configurable

getRandomId

protected static String getRandomId()

checkSource

protected static void checkSource(org.apache.hadoop.conf.Configuration conf,
                                  List<org.apache.hadoop.fs.Path> srcs)
                           throws InvalidInputException
Sanity check for source

Throws:
InvalidInputException

readString

protected static String readString(DataInput in)
                            throws IOException
Throws:
IOException

writeString

protected static void writeString(DataOutput out,
                                  String s)
                           throws IOException
Throws:
IOException

readFile

protected static List<String> readFile(org.apache.hadoop.conf.Configuration conf,
                                       org.apache.hadoop.fs.Path inputfile)
                                throws IOException
Throws:
IOException


Copyright © 2009 The Apache Software Foundation