org.apache.hadoop.streaming
Class MustangFile

java.lang.Object
  extended by java.io.File
      extended by org.apache.hadoop.streaming.MustangFile
All Implemented Interfaces:
Serializable, Comparable<File>

public class MustangFile
extends File

A simulation of some Java SE 6 File methods. http://java.sun.com/developer/technicalArticles/J2SE/Desktop/mustang/enhancements/ Limitations of this version: requires Cygwin on Windows, does not perform SecurityManager checks, always returns true (success) without verifying that the operation worked. Note: not specifying ownerOnly maps to ownerOnly = false From man chmod: If no user specs are given, the effect is as if `a' were given. This class is mainly used to change permissions when files are unjarred from the job.jar. The executable specified in the mappper/reducer is set to be executable using this class.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
MustangFile(File parent, String child)
           
MustangFile(String pathname)
           
MustangFile(String parent, String child)
           
 
Method Summary
 boolean setExecutable(boolean executable)
           
 boolean setExecutable(boolean executable, boolean ownerOnly)
           
 boolean setReadable(boolean readable)
           
 boolean setReadable(boolean readable, boolean ownerOnly)
           
 boolean setWritable(boolean writable)
           
 boolean setWritable(boolean writable, boolean ownerOnly)
           
 
Methods inherited from class java.io.File
canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getParentFile, getPath, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toString, toURI, toURL
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MustangFile

public MustangFile(File parent,
                   String child)

MustangFile

public MustangFile(String pathname)

MustangFile

public MustangFile(String parent,
                   String child)
Method Detail

setReadable

public boolean setReadable(boolean readable,
                           boolean ownerOnly)

setReadable

public boolean setReadable(boolean readable)

setWritable

public boolean setWritable(boolean writable,
                           boolean ownerOnly)

setWritable

public boolean setWritable(boolean writable)

setExecutable

public boolean setExecutable(boolean executable,
                             boolean ownerOnly)

setExecutable

public boolean setExecutable(boolean executable)


Copyright © 2006 The Apache Software Foundation