监视Apache Ignite。做对了

我们在Apache Ignite中创建了2个子系统。


在本文中,我将介绍它们的体系结构:


  • 度量子系统和系统如何查看子系统。
  • 已经做了什么,我们要做什么?


大家好!我叫Nikolai Izhikov。我在Sberbank Technologies工作,开发开源产品。


注意1:“完成”表示此功能在主Apache Ignite中可用,您可以构建并查看所有功能。该功能将包含在2.8 Apache Ignite发行版中,该发行版将于2020年初发布。


注意2:有关体系结构的文章将没有监视Apache Ignite所需的特定编号。


注3:该功能将在2.8版中提供,该版本将很快或更早地出现。


Apache Ignite分布式内存平台。它提供了许多API:对于缓存,分布式计算,服务(构建微服务架构),它提供了事务性。


做什么的



假设您有一个系统,并且该系统某种程度上可以在产品中运行。管理员肯定会来问您:“但是如何查看内部正在发生的事情,系统如何运行?我们想知道正在发生的过程,直到它们导致行为下降或无法隐藏的变化为止。” 本质上,问题可以归结为以下几点:


  • ? — , , .
  • ? — , , : , , , . , .
  • ? — .
  • ? — " " — ?

.


:


  • .
  • — , .
  • . : , .
  • : , , , , .

, . , , . :


  • API : transaction manager, cache manager, etc.
  • - .
  • API: JMX, SQL, Java. API.


:


  • : , ? . , , , - . , .
  • «» : , API.
  • : jmx, sql, http(Prometheus) , , .
  • : , .

Open Source community . , Ignite Enhancement Proposal (IEP), , , API, .
:



Ignite : , . , . , . , Ignite . , Ignite — . — . (prometheus, zabbix) .



Ignite . Ignite : jvm, , , . Ignite . , .


: — .


: , data region', .. , , .


: io.dataregion.myregion.TotalAllocatedPages — Data Region "myregion".



:


  • Metric, Gauge — .
  • MetricRegistry — (, ) .
  • MetricExporterSpi — .
  • ReadOnlyMetricRegistry — , exporter’-. read only access + listeners.
  • GridMetricManager — .

:


  • Metric — . .
    : LongAddterMetric, DoubleMetricImpl, ObjectMetricImpl.
  • Gauge — . , Supplier. . , , .
    : LongGauge, DoubleGauge, ObjectGauge.
  • HistogramMetric — + . , .
    : , 250 , 500 , 1 .
  • HitRateMetric — X .
    : , .

MetricExporterSpi — , . , . JMX, SQL, Log, OpenCensus.



GridMetricManager mmgr = ...;
MetricRegistry mreg = mmgr.registry("io.dataregion." + name);
LongAdderMetric replacedPages = mreg.longAdderMetric("PagesReplaced",
            "Number of pages replaced from last restart.");
//....
replacedPages.increment();


JMX

SQL

, " ?" .
.


System View — ?


— . system view, SQL. ( JMX).



  • SystemView — (). : , , compute task', sql table . .
  • SystemViewExporterSpi — .
  • ReadOnlySystemViewRegistry — exporter'. read only access + listeners.
  • GridSystemViewManager


:


  • . , , - . .
  • overhead. .
  • . . .

: . java-. :


POJO. , . . . : reflection?

:


  • compile time.
  • .
  • .
  • .

:
(SystemViewRowAttributeWalker.java), . . system view . .


        ctx.systemView().registerView(CACHES_VIEW, CACHES_VIEW_DESC,
            new CacheViewWalker(),
            registeredCaches.values(),
            CacheView::new);

        ctx.systemView().registerView(CACHE_GRPS_VIEW, CACHE_GRPS_VIEW_DESC,
            new CacheGroupViewWalker(),
            registeredCacheGrps.values(),
            CacheGroupView::new);

Reflection — , . dev-list JMH benchmark. reflection . walker . Walker 4 .



SQL

JMX

, " ?" .



  • : , . .
  • « » (prometheus, zabbix)
  • . , . — .
  • . Oracle , , : , , , .
  • — Ignite , . . threshold «compute 30 », , .


  • dev@ignite.apache.org
  • user@ignite.apache.org
    快来!我们几乎有一个俄语社区,几乎所有的贡献者都来自俄罗斯,因此您可以轻松加入并为开源做贡献。

带星号的材料

dev- " ?", API


演示文稿-https: //www.highload.ru/moscow/2019/abstracts/6111
视频:


Source: https://habr.com/ru/post/undefined/


All Articles