天天看點

Ambari Metrics Collector 當機問題處理

今天收到現場 Ambari Metrics 當機問題。

由于 Ambari Metrics 存儲的是叢集運作情況資訊,在目前叢集運作良好情況下,不是特别重要;是以我們采取删除重建的方式修複。以下為主要步驟:

1. 删除 Ambari Metrics 中繼資料

Ambari Metrics 使用 hbase 存儲資料。hbase 中繼資料存儲在 zookeeper 上。

檢視 ams-hbase-site 配置 zookeeper.znode.parent 項,确定其中繼資料存儲路徑,然後使用zkClient進行删除。

2. 删除 Ambari Metrics 曆史資料

Ambari Metrics 使用 hbase 存儲資料。hbase 資料存儲在本地目錄(單節點)或hdfs中(高可用)。

檢視 ams-hbase-site 配置 hbase.rootdir 項,确定資料存儲路徑,使用指令行進行删除。

3. 删除 Ambari Metrics 臨時檔案

Ambari Metrics 臨時檔案包含:

a. Aggregator checkpoint 目錄:配置在 Metrics Collector 的 Aggregator checkpoint directory 項中。

b. hbase 本地檔案:配置在 ams-hbase-site 的 hbase.local.dir 項中。

c. phoenix spool 目錄:配置在 ams-hbase-site 的 phoenix.spool.directory 項中。

通常這些檔案存在于 同一個臨時目錄 (ams-hbase-site 的 hbase.tmp.dir 項)下,可進行統一删除。

如果 Ambari Metrics 采用高可用安裝,需要在各個節點分别删除。

删除以上内容後,重新啟動 Ambari Metrics Collector 服務。Ambari Metrics Collector 會重新建立所有所有中繼資料,然後運作。