public class HdfsUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HdfsUtils.HadoopFileStatus |
Constructor and Description |
---|
HdfsUtils() |
Modifier and Type | Method and Description |
---|---|
static org.apache.hadoop.fs.Path |
getFileIdPath(org.apache.hadoop.fs.FileSystem fileSystem,
org.apache.hadoop.fs.Path path,
long fileId) |
static void |
setFullFileStatus(org.apache.hadoop.conf.Configuration conf,
HdfsUtils.HadoopFileStatus sourceStatus,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path target,
boolean recursion)
Copy the permissions, group, and ACLs from a source
HdfsUtils.HadoopFileStatus to a target Path . |
static void |
setFullFileStatus(org.apache.hadoop.conf.Configuration conf,
HdfsUtils.HadoopFileStatus sourceStatus,
String targetGroup,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path target,
boolean recursion)
Copy the permissions, group, and ACLs from a source
HdfsUtils.HadoopFileStatus to a target Path . |
public static org.apache.hadoop.fs.Path getFileIdPath(org.apache.hadoop.fs.FileSystem fileSystem, org.apache.hadoop.fs.Path path, long fileId)
public static void setFullFileStatus(org.apache.hadoop.conf.Configuration conf, HdfsUtils.HadoopFileStatus sourceStatus, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path target, boolean recursion)
HdfsUtils.HadoopFileStatus
to a target Path
. This method
will only log a warning if permissions cannot be set, no exception will be thrown.conf
- the Configuration
used when setting permissions and ACLssourceStatus
- the source HdfsUtils.HadoopFileStatus
to copy permissions and ACLs fromfs
- the FileSystem
that contains the target Path
target
- the Path
to copy permissions, group, and ACLs torecursion
- recursively set permissions and ACLs on the target Path
public static void setFullFileStatus(org.apache.hadoop.conf.Configuration conf, HdfsUtils.HadoopFileStatus sourceStatus, String targetGroup, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path target, boolean recursion)
HdfsUtils.HadoopFileStatus
to a target Path
. This method
will only log a warning if permissions cannot be set, no exception will be thrown.conf
- the Configuration
used when setting permissions and ACLssourceStatus
- the source HdfsUtils.HadoopFileStatus
to copy permissions and ACLs fromtargetGroup
- the group of the target Path
, if this is set and it is equal to the source group, an
extra set group operation is avoidedfs
- the FileSystem
that contains the target Path
target
- the Path
to copy permissions, group, and ACLs torecursion
- recursively set permissions and ACLs on the target Path
Copyright © 2021 The Apache Software Foundation. All rights reserved.