我们当前的HDFS群集具有复制因子1.但是为了提高性能和可靠性(节点故障),我们希望将Hive中间文件(hive.exec.scratchdir)复制因子单独增加到5.是否可以实现?
此致 Selva的
答案 0 :(得分:0)
查看 -setrep
是否可以帮助您。
<强> setrep 强>
用法:
hadoop fs -setrep [-R] [-w] <numReplicas> <path>
更改文件的 replication factor
。如果路径是目录,那么命令递归会更改以路径为根目录的目录树下所有文件的 replication factor
。
选项:强>
The -w flag requests that the command wait for the replication to complete. This can potentially take a very long time.
The -R flag is accepted for backwards compatibility. It has no effect.
示例:强>
hadoop fs -setrep -w 3 /user/hadoop/dir1
hadoop fs -setrep -R -w 100 /path/to/hive/warehouse
参考:-setrep