Options
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Expert Contributor
Created on 01-26-2018 06:05 PM
Generally we are used to use chown/chmod to change permissions. When we try chown/chmod on a directory which contains some x million objects it takes very long sometime even days. So to reduce the time and make the changes in one command instead of 2 chown and chmod, you can use DistCh faster then regular chown and chmod.
Below is the command to use DistCh
hadoop jar /usr/hdp/current/hadoop-mapreduce-client/hadoop-extras.jar org.apache.hadoop.tools.DistCh
java org.apache.hadoop.tools.DistCh [OPTIONS] <path:owner:group:permission> The values of owner, group and permission can be empty. Permission is a octal number. OPTIONS: -f <urilist_uri> Use list at <urilist_uri> as src list -i Ignore failures -log <logdir> Write logs to <logdir> Generic options supported are -conf <configuration file> specify an application configuration file -D <property=value> use value for given property -fs <local|namenode:port> specify a namenode -jt <local|resourcemanager:port> specify a ResourceManager -files <comma separated list of files> specify comma separated files to be copied to the map reduce cluster -libjars <comma separated list of jars> specify comma separated jar files to include in the classpath. -archives <comma separated list of archives> specify comma separated archives to be unarchived on the compute machines.
1,485 Views
Comments
New Contributor
Created on 11-16-2020 10:33 AM
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I use this tool to get a set hdfs permission https://github.com/hadoopol/hdfs_copy_permission