当hdfs空间不足时,除了删除临时数据或垃圾数据之外,还可以适当调整部分大目录的副本数量,多管齐下;

$ hdfs dfs -ls /user/hive/warehouse/temp.db/test_ext_o
-rwxr-xr-x 3 hadoop supergroup 44324200 2019-02-28 16:36 /user/hive/warehouse/temp.db/test_ext_o/000000_0

权限后边的3即为副本数量

2 修改

$ hadoop fs -setrep [-w] 2 /user/hive/warehouse/temp.db/test_ext_o/000000_0
or
$ hdfs dfs -setrep [-w] 2 /user/hive/warehouse/temp.db/test_ext_o/000000_0
WARNING: the waiting time may be long for DECREASING the number of replications.

修改副本数量为2,启动路径可以指定文件,也可以指定目录;
可以增加-w参数,会一直等待操作完成;

The -w flag requests that the command wait for the replication to complete. This can potentially take a very long time.

相关文章:

  • 2021-10-12
  • 2021-12-28
  • 2021-12-14
  • 2021-08-02
  • 2021-12-01
  • 2021-07-21
  • 2022-03-08
  • 2021-12-30
猜你喜欢
  • 2021-12-29
  • 2021-07-20
  • 2021-06-06
  • 2021-09-01
  • 2022-02-28
  • 2021-09-26
  • 2021-07-18
相关资源
相似解决方案