美文网首页
hdfs 清理空间

hdfs 清理空间

作者: A文艺钦年 | 来源:发表于2018-12-08 14:55 被阅读16次

You can also flush your current trash folders as follows, though below I've detailed the related commands to see what is going on:

$ hadoop fs -df -h
Filesystem Size Used Available Use%
hdfs://soptct52-01.hursley.ibm.com:8020 284.7 G 132.5 G 10.7 G 47%

So we can see the current state of the related local filesystem.

$ hdfs dfs -du -h /
908.2 K /app-logs
20.0 K /apps
0 /benchmarks
380.3 M /iop
0 /mapred
9.4 M /mr-history
1.1 M /tmp
53.3 G /user

With a break-down of the filesystem structure to see where the most data is held.

$ hadoop dfsadmin -report

Configured Capacity: 305667547136 (284.68 GB)
Present Capacity: 153351950336 (142.82 GB)
DFS Remaining: 11116261376 (10.35 GB)
DFS Used: 142235688960 (132.47 GB)
DFS Used%: 92.75%
Under replicated blocks: 855
Blocks with corrupt replicas: 0
Missing blocks: 4
Missing blocks (with replication factor 1): 136


Live datanodes (3):

Name: 9.20.170.23:50010 (soptct52-01.hursley.ibm.com)
Hostname: soptct52-01.hursley.ibm.com
Decommission Status : Normal
Configured Capacity: 101844443136 (94.85 GB)
DFS Used: 58115502080 (54.12 GB)
Non DFS Used: 39498178560 (36.79 GB)
DFS Remaining: 4230762496 (3.94 GB)
DFS Used%: 57.06%
DFS Remaining%: 4.15%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 3
Last contact: Thu Aug 13 15:49:44 BST 2015

Name: 9.20.170.39:50010 (soptct52-05.hursley.ibm.com)
Hostname: soptct52-05.hursley.ibm.com
Decommission Status : Normal
Configured Capacity: 101844443136 (94.85 GB)
DFS Used: 41994641408 (39.11 GB)
Non DFS Used: 59849801728 (55.74 GB)
DFS Remaining: 0 (0 B)
DFS Used%: 41.23%
DFS Remaining%: 0.00%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 3
Last contact: Thu Aug 13 15:49:44 BST 2015

Name: 9.20.170.35:50010 (soptct52-03.hursley.ibm.com)
Hostname: soptct52-03.hursley.ibm.com
Decommission Status : Normal
Configured Capacity: 101978660864 (94.98 GB)
DFS Used: 42125545472 (39.23 GB)
Non DFS Used: 52967616512 (49.33 GB)
DFS Remaining: 6885498880 (6.41 GB)
DFS Used%: 41.31%
DFS Remaining%: 6.75%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 2
Last contact: Thu Aug 13 15:49:44 BST 2015

Then we have a breakdown of the HDFS across the cluster and each of the related nodes.

[hdfs@soptct52-01 ~]$ hadoop fs -expunge
15/08/13 16:03:18 INFO fs.TrashPolicyDefault: Namenode trash configuration: Deletion interval = 360 minutes, Emptier interval = 0 minutes.
15/08/13 16:03:18 INFO fs.TrashPolicyDefault: Created trash checkpoint: /user/hdfs/.Trash/150813160318

The other option when cleaning up your data is to the the -skipTrash flag:

$ hadoop fs -rm -R -skipTrash /folder-path

相关文章

  • hdfs 清理空间

    You can also flush your current trash folders as follows,...

  • HDFS清理坏块

    报错 Failed with exception java.io.IOException:org.apache.h...

  • HADOOP——HA

    一概述 (一)HDFS 1)基础架构 (1)NameNode(Master) 命名空间管理:命名空间支持对HDFS...

  • Spark任务中Partition分区与HDFS中的Block数

    1. hdfs-block位于存储空间;spark-partition位于计算空间; 2. hdfs-block的...

  • 至今未解决问题备忘录

    HDFS的dfsadmin的空间配额问题: 我在复习HDFS中dfsadmin的setSpaceQuota的内容。...

  • 清理空间

    有的时候你不是想赢,而只是不想输。听老光说“损失规避”:当失去时产生的心理痛苦远大于得到时的快乐,所以人们...

  • 清理空间

    看到这么漂亮的房子和花园,有种梦想的家的感觉,这花园该是多么精致的心灵体现,发愿也要过这样别致用心的生活! 第二场...

  • 清理空间

    很多时候很多东西没用了我都不舍得扔,总觉得以后也许用得着,于是堆在那里,空纸盒子,塑料袋,过时的衣服,手...

  • 清理空间

    清理空间 昨天迎来一年一度的大扫除,早上7点就开始清理,扫除是请了钟点工的,可首尾的工作是要自己做的。 扫除第一步...

  • Hadoop HDFS操作指南

    1 HDFS 组成架构 NameNode(NN)管理HDFS的名称空间配置副本策略管理数据块(Block)映射信息...

网友评论

      本文标题:hdfs 清理空间

      本文链接:https://www.haomeiwen.com/subject/ttyqhqtx.html