@InterfaceAudience.Public
@InterfaceStability.Evolving
public static interface Options.CreateFileOptionKeys
createFile()
options.
If an option is not supported during file creation and it is considered part of a commit protocol, then, when supplied in a must() option, it MUST be rejected.
Modifier and Type | Field and Description |
---|---|
static String |
FS_OPTION_CREATE_CONDITIONAL_OVERWRITE
createFile() option to write a file in the close() operation iff
there is nothing at the destination. |
static String |
FS_OPTION_CREATE_CONDITIONAL_OVERWRITE_ETAG
Overwrite a file only if there is an Etag match.
|
static String |
FS_OPTION_CREATE_CONTENT_TYPE
String to define the content filetype.
|
static String |
FS_OPTION_CREATE_IN_CLOSE
A flag which requires the filesystem to create files/objects in close(),
rather than create/createFile.
|
static final String FS_OPTION_CREATE_CONDITIONAL_OVERWRITE
createFile()
option to write a file in the close() operation iff
there is nothing at the destination.
this is the equivalent of create(path, overwrite=true)
except that the existence check is postponed to the end of the write.
Value "fs.option.create.conditional.overwrite".
This can be set in the builder.
must()
parameter where
the option value is true
, and it is supported/enabled,
the FS SHALL omit all overwrite checks in create
,
including for the existence of an object or a directory underneath.
Instead, during close()
the object will only be manifest
at the target path if there is no object at the destination.
must()
parameter where
the option value is true
, and the FS does not recognise
the feature, or it is recognized but disabled on this FS instance,
the filesystem SHALL reject the request.
opt()
parameter where
the option value is true
, the filesystem MAY ignore
the request, or it MAY enable the feature.
Any filesystem which does not support the feature, including
from older releases, SHALL ignore it.
static final String FS_OPTION_CREATE_CONDITIONAL_OVERWRITE_ETAG
This is similar to FS_OPTION_CREATE_CONDITIONAL_OVERWRITE
.
EtagSource.getEtag()
org.apache.hadoop.fs.FileAlreadyExistsException
exception, or ajava.nio.file.FileAlreadyExistsException
org.apache.hadoop.fs.FileAlreadyExistsException
exception, or ajava.nio.file.FileAlreadyExistsException
close()
,
or it MAY be in the create()
operation. That is: some stores
MAY perform the check earlystatic final String FS_OPTION_CREATE_IN_CLOSE
Object stores with this behavior should also export it as a path capability. Value "fs.option.create.in.close".
static final String FS_OPTION_CREATE_CONTENT_TYPE
Copyright © 2025 Apache Software Foundation. All rights reserved.