MultipartUploaderBuilderImpl (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.fs.impl, class: MultipartUploaderBuilderImpl

Package org.apache.hadoop.fs.impl

# Class MultipartUploaderBuilderImpl<S extends MultipartUploader,B extends MultipartUploaderBuilder<S,B>>

java.lang.Object
org.apache.hadoop.fs.impl.AbstractFSBuilderImpl<S,B>
org.apache.hadoop.fs.impl.MultipartUploaderBuilderImpl<S,B>

All Implemented Interfaces:
  `FSBuilder<S,B>`, `MultipartUploaderBuilder<S,B>`

Direct Known Subclasses:
  `FileSystemMultipartUploaderBuilder`

@Public @Evolving public abstract class MultipartUploaderBuilderImpl<S extends MultipartUploader,B extends MultipartUploaderBuilder<S,B>> extends AbstractFSBuilderImpl<S,B> implements MultipartUploaderBuilder<S,B>
Builder for `MultipartUploader` implementations.

- ## Field Summary

  ### Fields inherited from class org.apache.hadoop.fs.impl.AbstractFSBuilderImpl

  `UNKNOWN_MANDATORY_KEY`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `MultipartUploaderBuilderImpl(FileContext fc, Path p)`
  Construct from a `FileContext`.
  `protected`
  `MultipartUploaderBuilderImpl(FileSystem fileSystem, Path p)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `B`
  `append()`
  Append to an existing file (optional operation).
  `B`
  `blockSize(long blkSize)`
  Set block size.
  `B`
  `bufferSize(int bufSize)`
  Set the size of the buffer to be used.
  `B`
  `checksumOpt(Options.ChecksumOpt chksumOpt)`
  Set checksum opt.
  `B`
  `create()`
  Create an FSDataOutputStream at the specified path.
  `protected long`
  `getBlockSize()`
  `protected int`
  `getBufferSize()`
  `protected Options.ChecksumOpt`
  `getChecksumOpt()`
  `protected EnumSet<CreateFlag>`
  `getFlags()`
  `protected FileSystem`
  `getFS()`
  `protected FsPermission`
  `getPermission()`
  `protected short`
  `getReplication()`
  `abstract B`
  `getThisBuilder()`
  Return the concrete implementation of the builder instance.
  `B`
  `overwrite(boolean overwrite)`
  Set to true to overwrite the existing file.
  `B`
  `permission(FsPermission perm)`
  Set permission for the file.
  `B`
  `replication(short replica)`
  Set replication factor.

  ### Methods inherited from class org.apache.hadoop.fs.impl.AbstractFSBuilderImpl

  `getMandatoryKeys, getOptionalKeys, getOptionalPath, getOptionalPathHandle, getOptions, getPath, getPathHandle, must, must, must, must, must, must, must, mustDouble, mustLong, opt, opt, opt, opt, opt, opt, opt, optDouble, optLong, rejectUnknownMandatoryKeys, rejectUnknownMandatoryKeys`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface org.apache.hadoop.fs.FSBuilder

  `must, must, must, must, must, must, must, mustDouble, mustLong, opt, opt, opt, opt, opt, opt, opt, optDouble, optLong`

  ### Methods inherited from interface org.apache.hadoop.fs.MultipartUploaderBuilder

  `build`

- ## Constructor Details

  - ### MultipartUploaderBuilderImpl

    protected MultipartUploaderBuilderImpl(@Nonnull FileContext fc, @Nonnull Path p) throws IOException
    Construct from a `FileContext`.
    Parameters:
      `fc` - FileContext
      `p` - path.
    Throws:
      `IOException` - failure

  - ### MultipartUploaderBuilderImpl

    protected MultipartUploaderBuilderImpl(@Nonnull FileSystem fileSystem, @Nonnull Path p)
    Constructor.
    Parameters:
      `fileSystem` - fileSystem.
      `p` - path.

- ## Method Details

  - ### getThisBuilder

    public abstract B getThisBuilder()
    Return the concrete implementation of the builder instance.
    Overrides:
      `getThisBuilder` in class `AbstractFSBuilderImpl<S extends MultipartUploader,B extends MultipartUploaderBuilder<S,B>>`
    Returns:
      this object, typecast

  - ### getFS

    protected FileSystem getFS()

  - ### getPermission

    protected FsPermission getPermission()

  - ### permission

    public B permission(@Nonnull FsPermission perm)
    Set permission for the file.
    Specified by:
      `permission` in interface `MultipartUploaderBuilder<S extends MultipartUploader,B extends MultipartUploaderBuilder<S,B>>`
    Parameters:
      `perm` - permission.
    Returns:
      B Generics Type.

  - ### getBufferSize

    protected int getBufferSize()

  - ### bufferSize

    public B bufferSize(int bufSize)
    Set the size of the buffer to be used.
    Specified by:
      `bufferSize` in interface `MultipartUploaderBuilder<S extends MultipartUploader,B extends MultipartUploaderBuilder<S,B>>`
    Parameters:
      `bufSize` - buffer size.
    Returns:
      B Generics Type.

  - ### getReplication

    protected short getReplication()

  - ### replication

    public B replication(short replica)
    Set replication factor.
    Specified by:
      `replication` in interface `MultipartUploaderBuilder<S extends MultipartUploader,B extends MultipartUploaderBuilder<S,B>>`
    Parameters:
      `replica` - replica.
    Returns:
      B Generics Type.

  - ### getBlockSize

    protected long getBlockSize()

  - ### blockSize

    public B blockSize(long blkSize)
    Set block size.
    Specified by:
      `blockSize` in interface `MultipartUploaderBuilder<S extends MultipartUploader,B extends MultipartUploaderBuilder<S,B>>`
    Parameters:
      `blkSize` - blkSize.
    Returns:
      B Generics Type.

  - ### getFlags

    protected EnumSet<CreateFlag> getFlags()

  - ### create

    public B create()
    Create an FSDataOutputStream at the specified path.
    Specified by:
      `create` in interface `MultipartUploaderBuilder<S extends MultipartUploader,B extends MultipartUploaderBuilder<S,B>>`
    Returns:
      B Generics Type.

  - ### overwrite

    public B overwrite(boolean overwrite)
    Set to true to overwrite the existing file. Set it to false, an exception will be thrown when calling `FSBuilder.build()` if the file exists.
    Specified by:
      `overwrite` in interface `MultipartUploaderBuilder<S extends MultipartUploader,B extends MultipartUploaderBuilder<S,B>>`
    Parameters:
      `overwrite` - overwrite.
    Returns:
      B Generics Type.

  - ### append

    public B append()
    Append to an existing file (optional operation).
    Specified by:
      `append` in interface `MultipartUploaderBuilder<S extends MultipartUploader,B extends MultipartUploaderBuilder<S,B>>`
    Returns:
      B Generics Type.

  - ### getChecksumOpt

    protected Options.ChecksumOpt getChecksumOpt()

  - ### checksumOpt

    public B checksumOpt(@Nonnull Options.ChecksumOpt chksumOpt)
    Set checksum opt.
    Specified by:
      `checksumOpt` in interface `MultipartUploaderBuilder<S extends MultipartUploader,B extends MultipartUploaderBuilder<S,B>>`
    Parameters:
      `chksumOpt` - chk sum opt.
    Returns:
      B Generics Type.