what-is-fsck in hadoop

8/10/2021
All Articles

#hadoop #fsck #fileinhadoop #fileformate #hadoopfsck

what-is-fsck in hadoop

What-is-fsck in hadoop ?

 fsck stands for File System Check. below is some key of  fsck  commands:

  1. Fsck is used to resolve error in file.
  2. It is a command used by HDFS file  system
  3. By default fsck ignores open files but provides an option to select all files during reporting.
  4. he HDFS fsck command is not a Hadoop shell command.
  5. fsck can be run on the whole file system or on a subset of files.
  6. fsck command to check for various inconsistencies.
  7. fsck  is checking the missing blocks for a file or under-replicated blocks.

 

bin/hdfs fsck

below is parameter in command

Usage: hadoop fsck [GENERIC_OPTIONS] <path> [-move | -delete | -openforwrite] [-files [-blocks [-locations | -racks]]]

 

<path> Start checking from this path.
-move Move corrupted files to /lost+found
-delete Delete corrupted files.
-openforwrite Print out files opened for write.
-files Print out files being checked.
-blocks Print out block report.
-locations Print out locations for every block.
-racks Print out network topology for data-node locations.

 

for more detail please refer and click here

Article