org.apache.hadoop.fs
Class Options.CreateOpts
java.lang.Object
org.apache.hadoop.fs.Options.CreateOpts
- Direct Known Subclasses:
- Options.CreateOpts.BlockSize, Options.CreateOpts.BufferSize, Options.CreateOpts.BytesPerChecksum, Options.CreateOpts.CreateParent, Options.CreateOpts.Perms, Options.CreateOpts.Progress, Options.CreateOpts.ReplicationFactor
- Enclosing class:
- Options
public static class Options.CreateOpts
- extends Object
Class to support the varargs for create() options.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
blockSize
public static Options.CreateOpts.BlockSize blockSize(long bs)
bufferSize
public static Options.CreateOpts.BufferSize bufferSize(int bs)
repFac
public static Options.CreateOpts.ReplicationFactor repFac(short rf)
bytesPerChecksum
public static Options.CreateOpts.BytesPerChecksum bytesPerChecksum(short crc)
perms
public static Options.CreateOpts.Perms perms(FsPermission perm)
createParent
public static Options.CreateOpts.CreateParent createParent()
donotCreateParent
public static Options.CreateOpts.CreateParent donotCreateParent()
getOpt
protected static Options.CreateOpts getOpt(Class<? extends Options.CreateOpts> theClass,
Options.CreateOpts... opts)
- Get an option of desired type
- Parameters:
theClass
- is the desired class of the optopts
- - not null - at least one opt must be passed
- Returns:
- an opt from one of the opts of type theClass.
returns null if there isn't any
setOpt
protected static <T extends Options.CreateOpts> Options.CreateOpts[] setOpt(T newValue,
Options.CreateOpts... opts)
- set an option
- Parameters:
newValue
- the option to be setopts
- - the option is set into this array of opts
- Returns:
- updated CreateOpts[] == opts + newValue
Copyright © 2009 The Apache Software Foundation