Package org.apache.hadoop.fs.s3a.impl
Class CreateFileBuilder
java.lang.Object
org.apache.hadoop.fs.impl.AbstractFSBuilderImpl<S,B>
org.apache.hadoop.fs.FSDataOutputStreamBuilder<org.apache.hadoop.fs.FSDataOutputStream,CreateFileBuilder>
org.apache.hadoop.fs.s3a.impl.CreateFileBuilder
- All Implemented Interfaces:
org.apache.hadoop.fs.FSBuilder<org.apache.hadoop.fs.FSDataOutputStream,CreateFileBuilder>
public class CreateFileBuilder
extends org.apache.hadoop.fs.FSDataOutputStreamBuilder<org.apache.hadoop.fs.FSDataOutputStream,CreateFileBuilder>
Builder used in create file; takes a callback to the operation
to create the file.
Is non-recursive unless explicitly changed.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCallbacks for creating the file.static final classCreate file options as built from the builder set or the classic entry point. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EnumSet<org.apache.hadoop.fs.CreateFlag>Flag set to create without overwrite.static final EnumSet<org.apache.hadoop.fs.CreateFlag>Flag set to create with overwrite.static final CreateFileBuilder.CreateFileOptionsClassic create file option set: no overwrite.static final CreateFileBuilder.CreateFileOptionsClassic create file option set: overwriting.static final CreateFileBuilder.CreateFileOptionsPerformance create options.Fields inherited from class org.apache.hadoop.fs.impl.AbstractFSBuilderImpl
UNKNOWN_MANDATORY_KEY -
Constructor Summary
ConstructorsConstructorDescriptionCreateFileBuilder(org.apache.hadoop.fs.FileSystem fileSystem, org.apache.hadoop.fs.Path path, CreateFileBuilder.CreateFileBuilderCallbacks callbacks) Constructor. -
Method Summary
Methods inherited from class org.apache.hadoop.fs.FSDataOutputStreamBuilder
append, blockSize, bufferSize, checksumOpt, create, getBlockSize, getBufferSize, getChecksumOpt, getFS, getPermission, getProgress, getReplication, isRecursive, overwrite, permission, progress, recursive, replicationMethods 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
-
Field Details
-
CREATE_OVERWRITE_FLAGS
Flag set to create with overwrite. -
CREATE_NO_OVERWRITE_FLAGS
Flag set to create without overwrite. -
OPTIONS_CREATE_FILE_OVERWRITE
Classic create file option set: overwriting. -
OPTIONS_CREATE_FILE_NO_OVERWRITE
Classic create file option set: no overwrite. -
OPTIONS_CREATE_FILE_PERFORMANCE
Performance create options.
-
-
Constructor Details
-
CreateFileBuilder
public CreateFileBuilder(@Nonnull org.apache.hadoop.fs.FileSystem fileSystem, @Nonnull org.apache.hadoop.fs.Path path, @Nonnull CreateFileBuilder.CreateFileBuilderCallbacks callbacks) Constructor.- Parameters:
fileSystem- fs; used by superclass.path- qualified path to createcallbacks- callbacks.
-
-
Method Details
-
getThisBuilder
- Specified by:
getThisBuilderin classorg.apache.hadoop.fs.FSDataOutputStreamBuilder<org.apache.hadoop.fs.FSDataOutputStream,CreateFileBuilder>
-
build
- Specified by:
buildin interfaceorg.apache.hadoop.fs.FSBuilder<org.apache.hadoop.fs.FSDataOutputStream,CreateFileBuilder> - Specified by:
buildin classorg.apache.hadoop.fs.FSDataOutputStreamBuilder<org.apache.hadoop.fs.FSDataOutputStream,CreateFileBuilder> - Throws:
IOException
-
withFlags
Pass flags down.- Parameters:
flags- input flags.- Returns:
- this builder.
-
getFlags
make the flag getter public.- Overrides:
getFlagsin classorg.apache.hadoop.fs.FSDataOutputStreamBuilder<org.apache.hadoop.fs.FSDataOutputStream,CreateFileBuilder> - Returns:
- creation flags.
-