1. 程式人生 > >Hadoop 那些 命令

Hadoop 那些 命令

hdfs fsck

在HDFS中,提供了fsck命令,用於檢查HDFS上檔案和目錄的健康狀態、獲取檔案的block塊資訊和位置資訊等。

hadoop fs -ls hdfs://bdpe101:9000/user/oap/oaptest/0.5-allFileFormat/tpcds/parquet_tpcds_2/store_sales/part-00064-83f1c5b1-1f95-4830-ac17-da26ab92e183-c000.snappy.parquet

-rw-r--r--   3 root supergroup   25243183 2018-10-29 14:58 hdfs://bdpe101:9000/user/oap/oaptest/0.5-allFileFormat/tpcds/parquet_tpcds_2/store_sales/part-00064-83f1c5b1-1f95-4830-ac17-da26ab92e183-c000.snappy.parquet

hadoop fsck hdfs://bdpe101:9000/user/oap/oaptest/0.5-allFileFormat/tpcds/parquet_tpcds_2/store_sales/part-00064-83f1c5b1-1f95-4830-ac17-da26ab92e183-c000.snappy.parquet

FSCK started by root (auth:SIMPLE) from /10.239.47.134 for path /user/oap/oaptest/0.5-allFileFormat/tpcds/parquet_tpcds_2/store_sales/part-00064-83f1c5b1-1f95-4830-ac17-da26ab92e183-c000.snappy.parquet at Wed Dec 19 17:00:42 CST 2018
.Status: HEALTHY
 Total size:	25243183 B
 Total dirs:	0
 Total files:	1
 Total symlinks:		0
 Total blocks (validated):	1 (avg. block size 25243183 B)
 Minimally replicated blocks:	1 (100.0 %)
 Over-replicated blocks:	0 (0.0 %)
 Under-replicated blocks:	0 (0.0 %)
 Mis-replicated blocks:		0 (0.0 %)
 Default replication factor:	3
 Average block replication:	3.0
 Corrupt blocks:		0
 Missing replicas:		0 (0.0 %)
 Number of data-nodes:		4
 Number of racks:		1
FSCK ended at Wed Dec 19 17:00:42 CST 2018 in 1 milliseconds


The filesystem under path '/user/oap/oaptest/0.5-allFileFormat/tpcds/parquet_tpcds_2/store_sales/part-00064-83f1c5b1-1f95-4830-ac17-da26ab92e183-c000.snappy.parquet' is HEALTHY