How to change HDFS replication factor for HIVE alone

核能气质少年 提交于 2019-12-12 05:25:42

问题


Our current HDFS Cluster has replication factor 1.But to improve the performance and reliability(node failure) we want to increase Hive intermediate files (hive.exec.scratchdir) replication factor alone to 5. Is it possible to implement that ?

Regards, Selva


回答1:


See if -setrep helps you.

setrep

Usage:

hadoop fs -setrep [-R] [-w] <numReplicas> <path>

Changes the replication factor of a file. If path is a directory then the command recursively changes the replication factor of all files under the directory tree rooted at path.

Options:

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.

Example:

hadoop fs -setrep -w 3 /user/hadoop/dir1

hadoop fs -setrep -R -w 100 /path/to/hive/warehouse

Reference: -setrep



来源:https://stackoverflow.com/questions/33292277/how-to-change-hdfs-replication-factor-for-hive-alone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!