org.apache.hadoop.fs
Class Options.CreateOpts

java.lang.Object
  extended by org.apache.hadoop.fs.Options.CreateOpts
Direct Known Subclasses:
Options.CreateOpts.BlockSize, Options.CreateOpts.BufferSize, Options.CreateOpts.BytesPerChecksum, Options.CreateOpts.ChecksumParam, 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.


Nested Class Summary
static class Options.CreateOpts.BlockSize
           
static class Options.CreateOpts.BufferSize
           
static class Options.CreateOpts.BytesPerChecksum
          This is not needed if ChecksumParam is specified.
static class Options.CreateOpts.ChecksumParam
           
static class Options.CreateOpts.CreateParent
           
static class Options.CreateOpts.Perms
           
static class Options.CreateOpts.Progress
           
static class Options.CreateOpts.ReplicationFactor
           
 
Method Summary
static Options.CreateOpts.BlockSize blockSize(long bs)
           
static Options.CreateOpts.BufferSize bufferSize(int bs)
           
static Options.CreateOpts.BytesPerChecksum bytesPerChecksum(short crc)
           
static Options.CreateOpts.ChecksumParam checksumParam(Options.ChecksumOpt csumOpt)
           
static Options.CreateOpts.CreateParent createParent()
           
static Options.CreateOpts.CreateParent donotCreateParent()
           
protected static Options.CreateOpts getOpt(Class<? extends Options.CreateOpts> theClass, Options.CreateOpts... opts)
          Get an option of desired type
static Options.CreateOpts.Perms perms(FsPermission perm)
           
static Options.CreateOpts.ReplicationFactor repFac(short rf)
           
protected static
<T extends Options.CreateOpts>
Options.CreateOpts[]
setOpt(T newValue, Options.CreateOpts... opts)
          set an option
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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)

checksumParam

public static Options.CreateOpts.ChecksumParam checksumParam(Options.ChecksumOpt csumOpt)

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 opt
opts - - 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 set
opts - - the option is set into this array of opts
Returns:
updated CreateOpts[] == opts + newValue


Copyright © 2013 Apache Software Foundation. All Rights Reserved.