【问题标题】:Multiple Hadoop clusters in one Google Cloud project一个 Google Cloud 项目中的多个 Hadoop 集群
【发布时间】:2015-06-05 10:04:09
【问题描述】:

是否可以在一个 Google Cloud 项目中部署多个 Hadoop 集群?

【问题讨论】:

    标签: google-cloud-platform google-hadoop


    【解决方案1】:

    使用bdutil,您可以在单个Google 项目中部署任意多个不同的Hadoop 集群,只要您获得足够的Google Compute Engine quota 即可。 instructions here 描述了 bdutil 的用法,但简而言之,bdutil 中的集群名称在使用 bdutil 时仅通过 PREFIX 变量或 --prefix 标志来区分。您可以跟踪每个 bdutil 集群中的区域和工作人员数量。

    为了轻松跟踪多个集群,强烈建议使用 bdutil 的 generate_config 命令。例如,假设您需要 3 个集群:teststagingprod。也许它们的大小和区域不同。你会想要运行类似的东西:

    ./bdutil --prefix my-test-cluster -n 2 -z us-central1-f -b test-bucket  \
        generate_config test-cluster_env.sh
    
    ./bdutil --prefix my-staging-cluster -n 5 -z us-central1-b -b staging-bucket  \
        generate_config staging-cluster_env.sh
    
    ./bdutil --prefix my-prod-cluster -n 10 -z us-central1-f -b prod-bucket  \
        generate_config prod-cluster_env.sh
    

    完成此操作后,文件test-cluster_env.shstaging-cluster_env.shprod-cluster_env.sh 从现在开始可用于引用您的三个不同集群。例如,假设您要删除测试集群:

    ./bdutil -e test-cluster_env.sh delete
    

    或者只是部署您的产品集群:

    ./bdutil -e prod-cluster_env.sh deploy
    

    或者通过 SSH 连接到暂存集群的主节点:

    ./bdutil -e staging-cluster_env.sh shell
    

    当您这样做时,您可以将 *_cluster_env.sh 文件存储在源代码管理中,并且每当您使用新的 Google 版本升级 bdutil 时,它们将向后兼容。

    如果您需要更广泛地自定义 bdutil,您可以考虑直接从 GitHub 获取 bdutil:

    git clone https://github.com/GoogleCloudPlatform/bdutil.git
    

    这样您就可以使用 git 定期更新到 bdutil 的新版本,同时让 git 解决任何自定义的合并冲突。

    【讨论】:

    • 感谢您的详细解答!
    猜你喜欢
    • 1970-01-01
    • 2014-12-25
    • 2014-06-03
    • 2021-10-25
    • 1970-01-01
    • 2015-01-25
    • 1970-01-01
    • 2019-12-04
    • 1970-01-01
    相关资源
    最近更新 更多