【问题标题】:Check redshift cluster status programmatically以编程方式检查 redshift 集群状态
【发布时间】:2019-05-15 08:34:28
【问题描述】:

有没有办法 ping redshift 集群并获取它的状态。在 JAVA 中,它是否“可用”。我必须在停机期间 ping 集群并检查它是否可用。

【问题讨论】:

    标签: java amazon-web-services amazon-redshift


    【解决方案1】:

    这取决于您如何定义“可用”。

    DescribeClusters() API 调用返回一个ClusterStatus,从 AWS 角度提供集群状态。

    或者,您可以使用 SQL 客户端连接到 Redshift 集群并查看它是否接受连接。这将检查 Redshift 本身是否响应的状态。

    如果您报告的“停机时间”也影响 ClusterStatus,那么 API 调用将是更简单的方法。

    【讨论】:

    • 我使用此代码“AmazonRedshift 客户端 = AmazonRedshiftClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(credentials)).withRegion(region).build();DescribeClustersResult 结果 = client.describeClusters(new DescribeClustersRequest().withClusterIdentifier(clusterIdentifier));"抱歉格式不好
    猜你喜欢
    • 2019-11-25
    • 2012-04-10
    • 2016-11-16
    • 2014-01-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-01-09
    • 2016-06-06
    相关资源
    最近更新 更多