如何在hadoop版本1.0.3的emr中更改块大小和复制因子

wbrvyc0a  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(324)

我正在尝试将块和复制因子更改为64mb和2。
我使用javasdk创建emr clsuter。我添加了以下引导操作:

BootstrapActionConfig setBlockSize = bootStrapSetHadoopProperty("Set Block Size",
            "dfs.block.size=67108864");
    bootstrapActions.add(setBlockSize);
   BootstrapActionConfig setReplicationFactor =   bootStrapSetHadoopProperty("Set Replication Factor",
            "dfs.replication=2");
    bootstrapActions.add(setReplicationFactor);

但是当我检查主节点中的hdfs-site.xml文件时,dfs.block.size和dfs.replication remins的值没有改变。你知道怎么做吗?

jfgube3f

jfgube3f1#

最后,我可以设置引导选项:

Set Replication Factor  s3://elasticmapreduce/bootstrap-actions/configure-hadoop    -h, dfs.replication=2
Set Block Size  s3://elasticmapreduce/bootstrap-actions/configure-hadoop    -h, dfs.block.size=67108864

-s选项已弃用。此url说明创建引导选项时要使用的选项:http://docs.aws.amazon.com/elasticmapreduce/latest/developerguide/emr-plan-bootstrap.html#predefinedbootstrapactions_configurehadoop

相关问题