davidktw
Arch-Supremacy Member
- Joined
- Apr 15, 2010
- Messages
- 13,547
- Reaction score
- 1,301
Hi Gurus,
Problem again.
Objective : Use Fsck line command to list the blocks that make up each file in HDFS.
Book’s command : % hadoop fsck / -files –blocks
Error message : Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it. Fsck on path “/” failed
So I removed the % hadoop and / and tried this :
Hdfs fsck –files –blocks
And I got this response that does not seem to achieve the objective :
Usage: hdfs fsck <path> [-list-corruptfileblocks | [-move | -delete | -openforwrite] [-files [-blocks [-locations | -racks]]]]
<path>start checking from this path
-movemove corrupted files to /lost+found
-deletedelete corrupted files
-filesprint out files being checked
-openforwriteprint out files opened for write
-includeSnapshotsinclude snapshot data if the given path indicates a snapshottable directory or there are snapshottable directories under it
-list-corruptfileblocksprint out list of missing blocks and files they belong to
-blocksprint out block report
-locationsprint out locations for every block
-racksprint out network topology for data-node locations
-storagepoliciesprint out storage policy summary for the blocks
-blockIdprint out which file this blockId belongs to, locations (nodes, racks) of this block, and other diagnostics info (under replicated, corrupted or not, etc)
Please Note:
1. By default fsck ignores files opened for write, use -openforwrite to report such files. They are usually tagged CORRUPT or HEALTHY depending on their block allocation status
2. Option -includeSnapshots should not be used for comparing stats, should be used only for HEALTH check, as this may contain duplicates if the same file present in both original fs tree and inside snapshots.
Generic options supported are
-conf <configuration file> specify an application configuration file
-D <property=value> use value for given property
-fs <local|namenodeort> specify a namenode
-jt <local|resourcemanagerort> 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.
The general command line syntax is
bin/hadoop command [genericOptions] [commandOptions]
Generic options supported are
-conf <configuration file> specify an application configuration file
-D <property=value> use value for given property
-fs <local|namenodeort> specify a namenode
-jt <local|resourcemanagerort> 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.
The general command line syntax is
bin/hadoop command [genericOptions] [commandOptions]
How? Please advise......
Code:
hdfs fsck / -files -blocks
. The book didn't explain this thoroughly. It only ask us to run fsck in order to see the details of the split.