public static final class DistributedFileSystem.HdfsDataOutputStreamBuilder extends org.apache.hadoop.fs.FSDataOutputStreamBuilder<org.apache.hadoop.fs.FSDataOutputStream,DistributedFileSystem.HdfsDataOutputStreamBuilder>
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.fs.FSDataOutputStream |
build()
Build HdfsDataOutputStream to write.
|
DistributedFileSystem.HdfsDataOutputStreamBuilder |
ecPolicyName(String policyName)
Enforce the file to be a striped file with erasure coding policy
'policyName', no matter what its parent directory's replication
or erasure coding policy is.
|
DistributedFileSystem.HdfsDataOutputStreamBuilder |
favoredNodes(InetSocketAddress[] nodes)
Set favored DataNodes.
|
protected EnumSet<org.apache.hadoop.fs.CreateFlag> |
getFlags() |
DistributedFileSystem.HdfsDataOutputStreamBuilder |
getThisBuilder() |
DistributedFileSystem.HdfsDataOutputStreamBuilder |
ignoreClientLocality()
Advise that the first block replica be written without regard to the
client locality.
|
DistributedFileSystem.HdfsDataOutputStreamBuilder |
lazyPersist()
Create the block on transient storage if possible.
|
DistributedFileSystem.HdfsDataOutputStreamBuilder |
newBlock()
Append data to a new block instead of the end of the last partial block.
|
DistributedFileSystem.HdfsDataOutputStreamBuilder |
noLocalRack()
Advise that a block replica NOT be written to the local rack DataNode.
|
DistributedFileSystem.HdfsDataOutputStreamBuilder |
noLocalWrite()
Advise that a block replica NOT be written to the local DataNode.
|
DistributedFileSystem.HdfsDataOutputStreamBuilder |
replicate()
Enforce the file to be a replicated file, no matter what its parent
directory's replication or erasure coding policy is.
|
DistributedFileSystem.HdfsDataOutputStreamBuilder |
storagePolicyName(String policyName)
Enforce a file to follow the specified storage policy irrespective of the
storage policy of its parent directory.
|
DistributedFileSystem.HdfsDataOutputStreamBuilder |
syncBlock()
Force closed blocks to disk.
|
append, blockSize, bufferSize, checksumOpt, create, getBlockSize, getBufferSize, getChecksumOpt, getFS, getPermission, getProgress, getReplication, isRecursive, overwrite, permission, progress, recursive, replication
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
public DistributedFileSystem.HdfsDataOutputStreamBuilder getThisBuilder()
getThisBuilder
in class org.apache.hadoop.fs.FSDataOutputStreamBuilder<org.apache.hadoop.fs.FSDataOutputStream,DistributedFileSystem.HdfsDataOutputStreamBuilder>
public DistributedFileSystem.HdfsDataOutputStreamBuilder favoredNodes(@Nonnull InetSocketAddress[] nodes)
nodes
- the addresses of the favored DataNodes.public DistributedFileSystem.HdfsDataOutputStreamBuilder syncBlock()
for the details.
public DistributedFileSystem.HdfsDataOutputStreamBuilder lazyPersist()
for the details.
public DistributedFileSystem.HdfsDataOutputStreamBuilder newBlock()
for the details.
public DistributedFileSystem.HdfsDataOutputStreamBuilder noLocalWrite()
for the details.
public DistributedFileSystem.HdfsDataOutputStreamBuilder noLocalRack()
for the details.
public DistributedFileSystem.HdfsDataOutputStreamBuilder storagePolicyName(@Nonnull String policyName)
public DistributedFileSystem.HdfsDataOutputStreamBuilder ecPolicyName(@Nonnull String policyName)
public DistributedFileSystem.HdfsDataOutputStreamBuilder replicate()
public DistributedFileSystem.HdfsDataOutputStreamBuilder ignoreClientLocality()
for the details.
@VisibleForTesting protected EnumSet<org.apache.hadoop.fs.CreateFlag> getFlags()
getFlags
in class org.apache.hadoop.fs.FSDataOutputStreamBuilder<org.apache.hadoop.fs.FSDataOutputStream,DistributedFileSystem.HdfsDataOutputStreamBuilder>
public org.apache.hadoop.fs.FSDataOutputStream build() throws IOException
build
in interface org.apache.hadoop.fs.FSBuilder<org.apache.hadoop.fs.FSDataOutputStream,DistributedFileSystem.HdfsDataOutputStreamBuilder>
build
in class org.apache.hadoop.fs.FSDataOutputStreamBuilder<org.apache.hadoop.fs.FSDataOutputStream,DistributedFileSystem.HdfsDataOutputStreamBuilder>
IOException
- on I/O errors.Copyright © 2008–2024 Apache Software Foundation. All rights reserved.