【问题标题】:How to use newer versions of HBase on Amazon Elastic MapReduce?如何在 Amazon Elastic MapReduce 上使用较新版本的 HBase?
【发布时间】:2015-08-25 15:52:00
【问题描述】:
【问题讨论】:
标签:
amazon-web-services
hbase
emr
amazon-emr
【解决方案1】:
经过几天的试用、错误和 AWS 支持票证后,我能够在 Amazon 的 ElasticMapReduce 服务上实施 HBase 0.98。以下是使用 Java SDK、一些基于 bash 和 ruby 的引导操作的方法。
这些 bash 和 ruby 脚本的功劳归于 Amazon 支持。它们是开发中的脚本,不受官方支持。这是一个黑客。
支持的版本: HBase 0.98.2 for Hadoop 2
我还在 Google Drive 中为支持文件创建了镜像,以防亚马逊从 S3 中提取它们。
Java SDK 示例
RunJobFlowRequest jobFlowRequest = new RunJobFlowRequest()
.withSteps(new ArrayList<StepConfig>())
.withName("HBase 0.98 Test")
.withAmiVersion("3.1.0")
.withInstances(instancesConfig)
.withLogUri(String.format("s3://bucket/path/to/logs")
.withVisibleToAllUsers(true)
.withBootstrapActions(new BootstrapActionConfig()
.withName("Download HBase")
.withScriptBootstrapAction(new ScriptBootstrapActionConfig()
.withPath("s3://bucket/path/to/wget/ssh/script.sh"))
)
.withBootstrapActions(new BootstrapActionConfig()
.withName("Install HBase")
.withScriptBootstrapAction(new ScriptBootstrapActionConfig()
.withPath("s3://bucket/path/to/hbase/install/ruby/script"))
)
.withServiceRole("EMR_DefaultRole")
.withJobFlowRole("EMR_EC2_DefaultRole");
“下载 HBase”引导操作(bash 脚本)
Original from S3
Mirror from Google Drive
“安装 HBase”引导操作(ruby 脚本)
Original from S3
Mirror from Google Drive
HBase 安装压缩包(用于“下载 HBase”脚本)
Original from S3
Mirror from Google Drive
复制这些文件
我强烈建议您下载这些文件并将它们上传到您自己的 S3 存储桶中,以便在您的引导操作/和脚本中使用。必要时进行调整。