【Hive實戰】 HiveMetaStore的指標分析

HiveMetaStore的指標分析(一)

文章目錄

  • HiveMetaStore的指標分析(一)
    • 背景
      • 目標部署架構
    • hive-site.xml相關配置
      • 元數據服務的指標相關配置
    • 源碼部分(hive2.3系)
      • `JvmPauseMonitor.java`
      • `HiveMetaStore`的內部類`HMSHandler`
      • MetricsFactory的init(conf)方法
      • `CodahaleMetrics.java`
        • 具體指標對象
      • 指標導出
        • JsonFileReporter輸出的文件內容示例
      • 其他
    • 騰訊云的hive-metastore指標
    • 參考資料

背景

對當前單獨部署的HiveMetaStore服務進行指標監控。

目標部署架構

HiveServer2組
Metastore組
mysql組
HiveServer2_1
HiveServer2_2
HiveServer2_3
Metastore1
Metastore2
Metastore3
master
slave

驗證步驟

  • 場景一:

    Metastore服務開啟監控,指標輸出方式采用默認。HiveServer2采用直連數據庫的方式創建MetaStoreClient,其配置文件中也開啟了metastore指標監控,同時開啟WebUI。

    現象:每個HiveServer2服務都可以通過WebUI看到指標dump。但是,每個HiveServer2的實際訪問的指標并非從Metastore組中獲取的指標。是Client端側的指標,且每個節點之間沒有關聯。

  • 場景二:

    Metastore服務開啟監控,指標輸出方式采用默認。。HiveServer2采用連接Metastore服務組的方式工作,其配置文件中也開啟了metastore指標監控,同時開啟WebUI。

    現象:每個HiveServer2服務都可以通過WebUI看到指標dump。但是沒有Metastore相關的指標。

結論:以上兩種方式,通過HiveServer2的WebUI服務都無法獲取到單獨的Metastore的服務指標。

  • 場景三:

    單純的開啟Metastore服務的監控,并將指標輸出json文件中。

    現象:每個Metastore服務都生成自己的json文件,但是目前的版本在更新問價的時候會無法.json文件,只會定時的更新.json.tmp文件。

說明,以目標部署架構為例,單純的MetaStore服務的指標是單純的自己輸出的。要么讀取json文件,通過開啟服務的JMX,在通過分別訪問各個Metastore節點的JMX服務獲取指標。

hive-site.xml相關配置

元數據服務的指標相關配置

  • 開啟指標功能

    hive.metastore.metrics.enabledtrue

  • 指定指標功能實現類

    hive.service.metrics.classorg.apache.hadoop.hive.common.metrics.metrics2.CodahaleMetrics

  • 指標輸出的類型

    hive.service.metrics.reporter"JMX,CONSOLE,JSON_FILE,HADOOP2"

  • 指標輸出的JSON文件位置

    hive.service.metrics.file.location:“/tmp/report.json

  • 指標輸出的JSON文件更新頻率

    hive.service.metrics.file.frequency5s

  • 指標輸出到hadoop2組件指標中的名稱

    hive.service.metrics.hadoop2.component"hivemetestore"

  • 指標輸出到hadoop2組件指標中的時間間隔

    hive.service.metrics.hadoop2.frequency30s

源碼部分(hive2.3系)

HiveMetaStore.java文件中main方法內,會根據配置去決定是否啟動指標服務類。

      //Start Metrics for Standalone (Remote) Mode - hive.metastore.metrics.enabledif (conf.getBoolVar(ConfVars.METASTORE_METRICS)) {try {MetricsFactory.init(conf);} catch (Exception e) {// log exception, but ignore inability to startLOG.error("error in Metrics init: " + e.getClass().getName() + " "+ e.getMessage(), e);}}Lock startLock = new ReentrantLock();Condition startCondition = startLock.newCondition();AtomicBoolean startedServing = new AtomicBoolean();// 方法中會啟動JvmPauseMonitor監控器startMetaStoreThreads(conf, startLock, startCondition, startedServing);// 方法中去實例化了HMSHandler,用戶處理客戶端過來的請求startMetaStore(cli.getPort(), ShimLoader.getHadoopThriftAuthBridge(), conf, startLock,startCondition, startedServing);

JvmPauseMonitor.java

用來監控JVM的暫停情況。通過Daemon線程,默認每隔500ms計算一次。jvm暫停統計級別分為warn和info級別。如果暫停超過1000ms則info級別次數+1,如果超過10000ms,則warn級別+1。

  private class Monitor implements Runnable {@Overridepublic void run() {Stopwatch sw = new Stopwatch();// 獲取GC情況,GC次數和GC耗時msMap<String, GcTimes> gcTimesBeforeSleep = getGcTimes();while (shouldRun) {sw.reset().start();try {// 監控線程自我休眠500msThread.sleep(SLEEP_INTERVAL_MS);} catch (InterruptedException ie) {return;}// 上次查詢時間-減去休眠就是暫停的耗時long extraSleepTime = sw.elapsed(TimeUnit.MILLISECONDS) - SLEEP_INTERVAL_MS;Map<String, GcTimes> gcTimesAfterSleep = getGcTimes();// warnThresholdMs默認10000msif (extraSleepTime > warnThresholdMs) {++numGcWarnThresholdExceeded;LOG.warn(formatMessage(extraSleepTime, gcTimesAfterSleep, gcTimesBeforeSleep));// 指標jvm.pause.info-threshold進行+1incrementMetricsCounter(MetricsConstant.JVM_PAUSE_WARN, 1);} // infoThresholdMs默認1000ms else if (extraSleepTime > infoThresholdMs) {++numGcInfoThresholdExceeded;LOG.info(formatMessage(extraSleepTime, gcTimesAfterSleep, gcTimesBeforeSleep));// 指標jvm.pause.warn-threshold進行+1incrementMetricsCounter(MetricsConstant.JVM_PAUSE_INFO, 1);}// jvm.pause.extraSleepTime 累計時間? msincrementMetricsCounter(MetricsConstant.JVM_EXTRA_SLEEP, extraSleepTime);totalGcExtraSleepTime += extraSleepTime;gcTimesBeforeSleep = gcTimesAfterSleep;}}private void incrementMetricsCounter(String name, long count) {Metrics metrics = MetricsFactory.getInstance();if (metrics != null) {try {metrics.incrementCounter(name, count);} catch (Exception e) {LOG.warn("Error Reporting JvmPauseMonitor to Metrics system", e);}}}}

HiveMetaStore的內部類HMSHandler

HMSHandler
-String startFunction(String function, String extraLogInfo)
-void endFunction(String function, MetaStoreEndFunctionContext context)

startFunctionendFunction是包裹以下元數據的操作,進行指標的采集控制。由這兩個包裹的方法,除了本身的Timer指標(增加前綴api_)外,還會增加counters類型指標,不過在Timer指標名的基礎上再增加active_calls_前綴,即active_calls_api_

以下指標還會增加前綴api_

  • 庫相關

    1. create_database
    2. get_database
    3. alter_database
    4. drop_database
    5. get_databases
    6. get_all_databases
  • 表相關

    1. create_table
    2. drop_table
    3. get_table
    4. get_tables
    5. get_tables_by_type
    6. get_all_tables
    7. get_table_metas
    8. get_multi_table
    9. get_table_names_by_filter
    10. get_table_statistics_req
    11. alter_table
  • 分區相關

    1. append_partition
    2. append_partition_by_name
    3. drop_partition_by_name
    4. get_partitions_ps
    5. get_partitions_ps_with_auth
    6. get_partitions_names_ps
    7. add_partitions
    8. add_partition
    9. drop_partition
    10. get_partition
    11. alter_partition
    12. get_partition_with_auth
    13. get_partitions_pspec
    14. get_partition_names
    15. get_partition_by_name
    16. get_partitions_by_expr
    17. get_num_partitions_by_filter
    18. get_num_partitions_by_expr
    19. get_partitions_by_names
    20. get_partitions_by_filter
    21. get_partitions_by_filter_pspec
    22. get_partitions_statistics_req
  • 其他

    1. create_type
    2. get_type
    3. drop_type
    4. drop_constraint
    5. add_primary_key
    6. add_foreign_key
    7. get_column_privilege_set
    8. add_index
    9. alter_index
    10. drop_index_by_name
    11. get_index_by_name
    12. get_index_names
    13. get_indexes
    14. get_column_statistics_by_table
    15. get_fields_with_environment_context
    16. get_schema_with_environment_context
    17. get_column_statistics_by_partition
    18. write_column_statistics
    19. write_partition_column_statistics
    20. delete_column_statistics_by_partition
    21. delete_column_statistics_by_table
    22. get_config_value
    23. delete_column_statistics_by_partition
    24. cancel_delegation_token
    25. renew_delegation_token
    26. get_delegation_token
    27. add_token
    28. remove_token
    29. get_token for+XXX
    30. get_all_token_identifiers.
    31. add_master_key.
    32. update_master_key.
    33. remove_master_key.
    34. get_master_keys.
    35. partition_name_has_valid_characters
    36. get_functions
    37. get_all_functions
    38. get_function
    39. get_aggr_stats_for
    40. get_foreign_keys

例如get_database操作

    public Database get_database(final String name) throws NoSuchObjectException, MetaException {startFunction("get_database", ": " + name);Database db = null;Exception ex = null;try {db = get_database_core(name);firePreEvent(new PreReadDatabaseEvent(db, this));} catch (MetaException e) {ex = e;throw e;} catch (NoSuchObjectException e) {ex = e;throw e;} finally {endFunction("get_database", db != null, ex);}return db;}

MetricsFactory的init(conf)方法

/*** Initializes static Metrics instance. 目前默認的實現類是 org.apache.hadoop.hive.common.metrics.metrics2.CodahaleMetrics*/
public synchronized static void init(HiveConf conf) throws Exception {if (metrics == null) {Class metricsClass = conf.getClassByName(conf.getVar(HiveConf.ConfVars.HIVE_METRICS_CLASS));Constructor constructor = metricsClass.getConstructor(HiveConf.class);metrics = (Metrics) constructor.newInstance(conf);}
}

CodahaleMetrics.java

通過有參構造函數,實例化CodahaleMetrics。里面一共涉及4個指標類型。timers,counters,meters,gauges

    public CodahaleMetrics(HiveConf conf) {this.conf = conf;//Codahale artifacts are lazily-created.timers = CacheBuilder.newBuilder().build(new CacheLoader<String, com.codahale.metrics.Timer>() {@Overridepublic com.codahale.metrics.Timer load(String key) {Timer timer = new Timer(new ExponentiallyDecayingReservoir());metricRegistry.register(key, timer);return timer;}});counters = CacheBuilder.newBuilder().build(new CacheLoader<String, Counter>() {@Overridepublic Counter load(String key) {Counter counter = new Counter();metricRegistry.register(key, counter);return counter;}});meters = CacheBuilder.newBuilder().build(new CacheLoader<String, Meter>() {@Overridepublic Meter load(String key) {Meter meter = new Meter();metricRegistry.register(key, meter);return meter;}});gauges = new ConcurrentHashMap<String, Gauge>();//register JVM metrics - java虛擬機的相關指標集registerAll("gc", new GarbageCollectorMetricSet());registerAll("buffers", new BufferPoolMetricSet(ManagementFactory.getPlatformMBeanServer()));registerAll("memory", new MemoryUsageGaugeSet());registerAll("threads", new ThreadStatesGaugeSet());registerAll("classLoading", new ClassLoadingGaugeSet());//Metrics reporter -進行指標的輸出Set<MetricsReporting> finalReporterList = new HashSet<MetricsReporting>();// 默認的導出類型是JSON_FILE, JMX。List<String> metricsReporterNames = Lists.newArrayList(Splitter.on(",").trimResults().omitEmptyStrings().split(conf.getVar(HiveConf.ConfVars.HIVE_METRICS_REPORTER)));if (metricsReporterNames != null) {for (String metricsReportingName : metricsReporterNames) {try {MetricsReporting reporter = MetricsReporting.valueOf(metricsReportingName.trim().toUpperCase());finalReporterList.add(reporter);} catch (IllegalArgumentException e) {LOGGER.warn("Metrics reporter skipped due to invalid configured reporter: " + metricsReportingName);}}}initReporting(finalReporterList);}
具體指標對象
  • GarbageCollectorMetricSet:一組用于垃圾收集計數和運行時間的儀表。
  • BufferPoolMetricSet:一組測量JVM的直接和映射緩沖池的計數、使用情況和容量的指標。這些JMX對象僅在Java 7及以上版本上可用。
  • MemoryUsageGaugeSet:一組用于JVM內存使用的指標,包括堆與非堆內存的統計信息,以及特定于gc的內存池。
  • ThreadStatesGaugeSet:一組用于各種狀態和死鎖檢測的線程數量的量規。
  • ClassLoadingGaugeSet:JVM類加載器使用情況的一組指標。
?interface?
MetricSet
Map getMetrics()
GarbageCollectorMetricSet
BufferPoolMetricSet
MemoryUsageGaugeSet
ThreadStatesGaugeSet
ClassLoadingGaugeSet

指標導出

    /*** Should be only called once to initialize the reporters*/private void initReporting(Set<MetricsReporting> reportingSet) {for (MetricsReporting reporting : reportingSet) {switch (reporting) {case CONSOLE:final ConsoleReporter consoleReporter = ConsoleReporter.forRegistry(metricRegistry).convertRatesTo(TimeUnit.SECONDS).convertDurationsTo(TimeUnit.MILLISECONDS).build();consoleReporter.start(1, TimeUnit.SECONDS);reporters.add(consoleReporter);break;case JMX:final JmxReporter jmxReporter = JmxReporter.forRegistry(metricRegistry).convertRatesTo(TimeUnit.SECONDS).convertDurationsTo(TimeUnit.MILLISECONDS).build();jmxReporter.start();reporters.add(jmxReporter);break;case JSON_FILE:final JsonFileReporter jsonFileReporter = new JsonFileReporter();jsonFileReporter.start();reporters.add(jsonFileReporter);break;case HADOOP2:String applicationName = conf.get(HiveConf.ConfVars.HIVE_METRICS_HADOOP2_COMPONENT_NAME.varname);long reportingInterval = HiveConf.toTime(conf.get(HiveConf.ConfVars.HIVE_METRICS_HADOOP2_INTERVAL.varname),TimeUnit.SECONDS, TimeUnit.SECONDS);final HadoopMetrics2Reporter metrics2Reporter = HadoopMetrics2Reporter.forRegistry(metricRegistry).convertRatesTo(TimeUnit.SECONDS).convertDurationsTo(TimeUnit.MILLISECONDS).build(DefaultMetricsSystem.initialize(applicationName), // The application-level nameapplicationName, // Component nameapplicationName, // Component description"General"); // Name for each metric recordmetrics2Reporter.start(reportingInterval, TimeUnit.SECONDS);break;}}}
?interface?
org.apache.hadoop.metrics2.MetricsSource
void getMetrics(MetricsCollector collector, boolean all)
?interface?
Reporter
?abstract?
ScheduledReporter
- final ScheduledExecutorService executor
+void start(long period, TimeUnit unit)
+public void report()
JmxReporter
JsonFileReporter
- java.util.Timer timer
+void start()
HadoopMetrics2Reporter
- SortedMap dropwizardGauges;
- SortedMap dropwizardCounters;
- SortedMap dropwizardHistograms;
- SortedMap dropwizardMeters;
- SortedMap dropwizardTimers;
void snapshotAllMetrics(MetricsRecordBuilder builder)
ConsoleReporter

在hive2版本有4類導出器

  • ConsoleReporter:通過調度線程,按周期將指標輸出到日志里面。
  • JmxReporter:一個報告器,用于監聽新指標,并將發送其作為名稱標注的 MBeans。
  • JsonFileReporter:通過Timer,定時調度,將指標寫入目標文件中。
  • HadoopMetrics2Reporter:通過調度線程,按周期將指標更新到度量對象dropwizardGauges,dropwizardCounters,dropwizardHistograms,dropwizardMeters,dropwizardTimers中,再由hadoop2的指標系統去獲取轉換由 dropwizard 收集的當前指標,并將其添加到Hadoop2的指標系統中。
JsonFileReporter輸出的文件內容示例
  • 回收

    • gc.PS-MarkSweep.count:標記次數
    • gc.PS-MarkSweep.time:標記耗時ms
    • gc.PS-Scavenge.count:清除次數
    • gc.PS-Scavenge.time:清除耗時ms
  • 內存

    • memory.heap.committed:JVM 已經提交的 HeapMemory 的大小, byte

    • memory.heap.init:JVM 初始 HeapMem 的大小

    • memory.heap.usage:已使用內存占比

    • memory.heap.max:JVM 配置的 HeapMemory 的大小

    • memory.heap.used:已使用堆內存大小, byte

    • memory.non-heap.committed:JVM 當前已經提交的 NonHeapMemory 的大小, byte

    • memory.non-heap.init:JVM 初始 NonHeapMem 的大小, byte

    • memory.non-heap.max:JVM 配置的 NonHeapMemory 的數大小, byte

    • memory.non-heap.usage:已使用NonHeapMemory 內存占比

    • memory.non-heap.used:JVM 當前已經使用的 NonHeapMemory 的大小, byte

    • memory.pools.Code-Cache.usage:代碼緩存區使用占比

    • memory.pools.Compressed-Class-Space.usage:壓縮類空間空間使用占比

    • memory.pools.Metaspace.usage:Metaspace 區內存使用占比

    • memory.pools.PS-Eden-Space.usage:Eden區內存使用占比

    • memory.pools.PS-Old-Gen.usage:Old區內存使用占比

    • memory.pools.PS-Survivor-Space.usage:Survivo區內存使用占比

    • memory.total.committed:保證可用于堆或非堆的總內存量

    • memory.total.init:堆或非堆初始化的內存量

    • memory.total.max:堆或非堆配置的最大中內存量

    • memory.total.used:堆或非堆使用的總內存量

  • 線程

    • threads.count:總線程數
    • threads.daemon.count:常駐線程數
    • threads.deadlock.count:死鎖線程數
  • counters下active_calls_*系列:正在執行的方法的個數,方法主要在HiveMetaStore的內部類HMSHandler中。

  • timers下api_系列:執行的方法響應(個數,平均、最大、最小、中位數耗時等等),方法主要在HiveMetaStore的內部類HMSHandler中。

{"version" : "3.0.0","gauges" : {"buffers.direct.capacity" : {"value" : 0},"buffers.direct.count" : {"value" : 0},"buffers.direct.used" : {"value" : 0},"buffers.mapped.capacity" : {"value" : 0},"buffers.mapped.count" : {"value" : 0},"buffers.mapped.used" : {"value" : 0},"classLoading.loaded" : {"value" : 6932},"classLoading.unloaded" : {"value" : 0},"gc.PS-MarkSweep.count" : {"value" : 2},"gc.PS-MarkSweep.time" : {"value" : 250},"gc.PS-Scavenge.count" : {"value" : 5},"gc.PS-Scavenge.time" : {"value" : 92},"init_total_count_dbs" : {"value" : 489},"init_total_count_partitions" : {"value" : 51089},"init_total_count_tables" : {"value" : 13733},"memory.heap.committed" : {"value" : 991428608},"memory.heap.init" : {"value" : 1073741824},"memory.heap.max" : {"value" : 991428608},"memory.heap.usage" : {"value" : 0.22776332070498415},"memory.heap.used" : {"value" : 225811072},"memory.non-heap.committed" : {"value" : 62717952},"memory.non-heap.init" : {"value" : 2555904},"memory.non-heap.max" : {"value" : -1},"memory.non-heap.usage" : {"value" : -6.1740872E7},"memory.non-heap.used" : {"value" : 61740872},"memory.pools.Code-Cache.usage" : {"value" : 0.04560165405273438},"memory.pools.Compressed-Class-Space.usage" : {"value" : 0.004726290702819824},"memory.pools.Metaspace.usage" : {"value" : 0.9850643484933036},"memory.pools.PS-Eden-Space.usage" : {"value" : 0.5518231919863521},"memory.pools.PS-Old-Gen.usage" : {"value" : 0.07657499299391471},"memory.pools.PS-Survivor-Space.usage" : {"value" : 0.9316617525540866},"memory.total.committed" : {"value" : 1054146560},"memory.total.init" : {"value" : 1076297728},"memory.total.max" : {"value" : 991428607},"memory.total.used" : {"value" : 287551944},"threads.blocked.count" : {"value" : 0},"threads.count" : {"value" : 27},"threads.daemon.count" : {"value" : 16},"threads.deadlock.count" : {"value" : 0},"threads.deadlocks" : {"value" : [ ]},"threads.new.count" : {"value" : 0},"threads.runnable.count" : {"value" : 4},"threads.terminated.count" : {"value" : 0},"threads.timed_waiting.count" : {"value" : 7},"threads.waiting.count" : {"value" : 16}},"counters" : {"active_calls_api_get_database" : {"count" : 0},"active_calls_api_get_tables" : {"count" : 0},"active_calls_api_init" : {"count" : 0},"active_calls_api_set_ugi" : {"count" : 0},"jvm.pause.extraSleepTime" : {"count" : 6},"open_connections" : {"count" : 1}},"histograms" : { },"meters" : { },"timers" : {"api_get_database" : {"count" : 54,"max" : 99.228759,"mean" : 11.107232182804301,"min" : 10.091598,"p50" : 11.098374,"p75" : 11.503314,"p95" : 12.130782,"p98" : 12.130782,"p99" : 12.130782,"p999" : 12.913863,"stddev" : 0.6771821794059291,"m15_rate" : 0.0,"m1_rate" : 0.0,"m5_rate" : 0.0,"mean_rate" : 0.0,"duration_units" : "milliseconds","rate_units" : "calls/millisecond"},"api_get_tables" : {"count" : 18,"max" : 31.114395,"mean" : 9.939109200622983,"min" : 9.404240999999999,"p50" : 9.841852,"p75" : 10.122354,"p95" : 10.122354,"p98" : 10.122354,"p99" : 10.122354,"p999" : 10.203377999999999,"stddev" : 0.18434488642295546,"m15_rate" : 0.0,"m1_rate" : 0.0,"m5_rate" : 0.0,"mean_rate" : 0.0,"duration_units" : "milliseconds","rate_units" : "calls/millisecond"},"api_init" : {"count" : 1,"max" : 3225.4620339999997,"mean" : 3225.4620339999997,"min" : 3225.4620339999997,"p50" : 3225.4620339999997,"p75" : 3225.4620339999997,"p95" : 3225.4620339999997,"p98" : 3225.4620339999997,"p99" : 3225.4620339999997,"p999" : 3225.4620339999997,"stddev" : 0.0,"m15_rate" : 0.0,"m1_rate" : 0.0,"m5_rate" : 0.0,"mean_rate" : 0.0,"duration_units" : "milliseconds","rate_units" : "calls/millisecond"},"api_set_ugi" : {"count" : 1,"max" : 0.284408,"mean" : 0.284408,"min" : 0.284408,"p50" : 0.284408,"p75" : 0.284408,"p95" : 0.284408,"p98" : 0.284408,"p99" : 0.284408,"p999" : 0.284408,"stddev" : 0.0,"m15_rate" : 0.0,"m1_rate" : 0.0,"m5_rate" : 0.0,"mean_rate" : 0.0,"duration_units" : "milliseconds","rate_units" : "calls/millisecond"}}
}

其他

#這個類定義了Hive進程生成的一些指標。
org.apache.hadoop.hive.common.metrics.common.MetricsConstant#可以用來度量和記錄一段代碼所花費的時間。
org.apache.hadoop.hive.ql.log.PerfLogger

騰訊云的hive-metastore指標

標題指標名稱指標單位指標含義
GC 次數YGCYoung GC 次數
FGCFull GC 次數
GC 時間FGCTsFull GC 消耗時間
GCTs垃圾回收時間消耗
YGCTsYoung GC 消耗時間
內存區域占比S0%Survivor 0區內存使用占比
E%Eden 區內存使用占比
CCS%Compressed class space 區內存使用占比
S1%Survivor 1區內存使用占比
O%Old 區內存使用占比
M%Metaspace 區內存使用占比
JVM 內存MemHeapUsedMMBJVM 當前已經使用的 HeapMemory 的數量
MemHeapCommittedMMBJVM 已經提交的 HeapMemory 的數量
MemHeapMaxMMBJVM 配置的 HeapMemory 的數量
MemHeapInitMMBJVM 初始 HeapMem 的數量
MemNonHeapUsedMMBJVM 當前已經使用的 NonHeapMemory 的數量
MemNonHeapCommittedMMBJVM 當前已經提交的 NonHeapMemory 的數量
MemNonHeapInitMMBJVM 初始 NonHeapMem 的數量
文件描述符數OpenFileDescriptorCount已打開文件描述符數量
MaxFileDescriptorCount最大文件描述符數
CPU 利用率ProcessCpuLoad%進程 CPU 利用率
SystemCpuLoad%系統 CPU 利用率
CPU 使用時間占比CPURateseconds/secondCPU 使用時間占比
工作線程數DaemonThreadCount守護線程數
ThreadCount線程總數
CPU 累計使用時間ProcessCpuTimemsCPU 累計使用時間
進程運行時長Uptimes進程運行時長
GC 額外睡眠時間ExtraSleepTimems/sGC 額外睡眠時間
alter table 請求時間HIVE.HMS.API_ALTER_TABLEmsalter table 請求平均時間
alter table with env context 請求時間HIVE.HMS.API_ALTER_TABLE_WITH_ENV_CONTEXTmsalter table with env context 請求平均時間
create table 請求時間HIVE.HMS.API_CREATE_TABLEmscreate table 請求平均時間
create table with env context 請求時間HIVE.HMS.API_CREATE_TABLE_WITH_ENV_CONTEXTmscreate table with env context 請求平均時間
drop table 請求時間HIVE.HMS.API_DROP_TABLEmsdrop table 平均請求時間
drop table with env context 請求時間HIVE.HMS.API_DROP_TABLE_WITH_ENV_CONTEXTmsdrop table with env context 平均請求時間
get table 請求時間HIVE.HMS.API_GET_TABLEmsget table 平均請求時間
get tables 請求時間HIVE.HMS.API_GET_TABLESmsget tables 平均請求時間
get multi table 請求時間HIVE.HMS.API_GET_MULTI_TABLEmsget multi table 平均請求時間
get table req 請求時間HIVE.HMS.API_GET_TABLE_REQmsget table req 平均請求時間
get database 請求時間HIVE.HMS.API_GET_DATABASEmsget database 平均請求時間
get databases 請求時間HIVE.HMS.API_GET_DATABASESmsget databases 平均請求時間
get all database 請求時間HIVE.HMS.API_GET_ALL_DATABASESmsget all databases 平均請求時間
get all functions 請求時間HIVE.HMS.API_GET_ALL_FUNCTIONSmsget all functions 平均請求時間
當前活躍 create table 請求數HIVE.HMS.ACTIVE_CALLS_API_CREATE_TABLE當前活躍 create table 請求數
當前活躍 drop table 請求數HIVE.HMS.ACTIVE_CALLS_API_DROP_TABLE當前活躍 drop table 請求數
當前活躍 alter table 請求數HIVE.HMS.ACTIVE_CALLS_API_ALTER_TABLE當前活躍 alter table 請求數

參考資料

相關CWiki

  1. Hive+Metrics:指標的總覽頁。提供部分指標的issues鏈接。

  2. WebUIforHiveServer2:介紹WebUI可以查詢展示指標。

  3. ConfigurationProperties-Metrics :介紹指標的部分配置。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/diannao/41261.shtml
繁體地址,請注明出處:http://hk.pswp.cn/diannao/41261.shtml
英文地址,請注明出處:http://en.pswp.cn/diannao/41261.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

【anaconda】—“conda info“命令后conda配置和環境信息的理解

文章目錄 conda配置和環境信息的理解 conda配置和環境信息的理解 安裝anaconda成功后&#xff0c;打開cmd&#xff0c;輸入"conda info"命令&#xff0c;結果顯示如下&#xff1a; conda的配置和環境信息的輸出。以下是對每個字段的解釋&#xff1a; active environm…

H2 Database Console未授權訪問漏洞封堵

背景 H2 Database Console未授權訪問&#xff0c;默認情況下自動創建不存在的數據庫&#xff0c;從而導致未授權訪問。各種未授權訪問的教程&#xff0c;但是它怎么封堵呢&#xff1f; -ifExists 很簡單&#xff0c;啟動參數添加 -ifExists &#xff0c;它的含義&#xff1a…

中電金信:加快企業 AI 平臺升級,構建金融智能業務新引擎

在當今數字化時代的浪潮下&#xff0c;人工智能&#xff08;AI&#xff09;技術的蓬勃發展正為各行業帶來前所未有的變革與創新契機。尤其是在金融領域&#xff0c;AI 模型的廣泛應用已然成為提升競爭力、優化業務流程以及實現智能化轉型的關鍵驅動力。然而&#xff0c;企業在積…

【C++ 】解決 C++ 語言報錯:Null Pointer Dereferenc

文章目錄 引言 在 C 編程中&#xff0c;空指針解引用&#xff08;Null Pointer Dereference&#xff09;是一種常見且危險的錯誤。當程序試圖通過空指針訪問內存時&#xff0c;會導致程序崩潰或產生不可預期的行為。本文將詳細探討空指針解引用的成因、檢測方法及其預防和解決…

微信新寵!淘寶扭蛋機小程序,讓購物更添樂趣

在移動互聯網飛速發展的今天&#xff0c;微信小程序以其便捷性、即用即走的特點&#xff0c;迅速成為了用戶日常生活中不可或缺的一部分。而在眾多小程序中&#xff0c;一款名為“淘寶扭蛋機”的新晉“網紅”&#xff0c;正以其獨特的玩法和豐富的驚喜&#xff0c;為購物體驗增…

【Hive實戰】HiveMetaStore的指標采集告警

HiveMetaStore的指標采集告警 文章目錄 HiveMetaStore的指標采集告警背景部署概要圖 開啟HiveMetaStore的JMX指標采集&#xff08;Hadoop2指標系統&#xff09;指標監控查詢指標核心指標選擇告警 遺留問題 背景 在遠程模式的Metastore下&#xff0c;對其開啟Hadoop2指標采集以…

簡單配置VScode輕量級C++競賽環境

1. 安裝拓展 Chinese是中文&#xff0c;需要重啟才可以運行&#xff0c;C/C拓展只是進行語法代碼提示&#xff0c;不需要進行任何配置修改&#xff0c;默認即可。 2. 創建文件 如上圖創建好各級文件夾&#xff0c;其中C是工作文件夾&#xff0c;.vscode是配置文件夾&#xff0…

【網絡安全】Host碰撞漏洞原理+工具+腳本

文章目錄 漏洞原理虛擬主機配置Host頭部字段Host碰撞漏洞漏洞場景工具漏洞原理 Host 碰撞漏洞,也稱為主機名沖突漏洞,是一種網絡攻擊手段。常見危害有:繞過訪問控制,通過公網訪問一些未經授權的資源等。 虛擬主機配置 在Web服務器(如Nginx或Apache)上,多個網站可以共…

學習測試2-方法

設計測試用例 設計測試用例的萬能公式 (在沒有需求文檔的情況下&#xff09; 軟件質量模型 效率就是性能 兼容性測試 瀏覽器 谷歌 IE 火狐 蘋果 百度 Windows7 10 11 蘋果系統 app 不同品牌 小米 vivo 華為 蘋果 不同的操作系統 安卓 鴻蒙 蘋果 -----------------------…

TikTok馬來西亞直播網絡怎么配置?

TikTok是一款全球流行的社交媒體應用&#xff0c;在東南亞地區擁有大量用戶。在馬來西亞這個多元化的國家&#xff0c;配置高效穩定的直播網絡對TikTok的運營至關重要。 配置馬來西亞直播網絡的必要性 廣泛的地理覆蓋&#xff1a;馬來西亞包括大片陸地和眾多島嶼&#xff0c;網…

OpenSSH遠程代碼執行漏洞(CVE-2024-6387)

OpenSSH遠程代碼執行漏洞(CVE-2024-6387) 漏洞簡介及影響范圍 OpenSSH 遠程代碼執行漏洞&#xff08;CVE-2024-6387&#xff09;是影響 OpenSSH 服務器的一個高危安全漏洞&#xff0c;允許未經身份驗證的遠程攻擊者在受影響的 Linux 系統上以 root 身份執行任意代碼。這個嚴重…

性能壓測 -優化 Nginx的動靜分離

兩件事情 1.以后將所有的項目的靜態資源都應該放在nginx里面 2.nginx 規則&#xff1a;/static/***所有請求都有nginx直接返回 nginx 配置一下配置文件&#xff0c;然后把html 的靜態資源&#xff0c;綁定好是Nginx優先級高的靜態資源路徑&#xff0c;就去交給nginx靜態資源…

使用openssl生成公私鑰并進行RSA加密

生成私鑰 openssl genrsa -out private.pem 1024通過私鑰生成公鑰 openssl rsa -in private.pem -pubout -out public.pem通過公鑰加密數據 openssl pkeyutl -encrypt -in data.txt -inkey public.pem -pubin -out encData.txtdata.txt &#xff1a;為我們要加密的數據enc…

skimage.io與matplotlib.image.imread讀取圖片的區別

以前沒用過matplotlib的讀圖方式&#xff0c;今天在別人的工程里看到這個用法&#xff0c;自己改寫別人工程時&#xff0c;怎么都找不到問題&#xff0c;最后在最初&#xff0c;開始讀圖的時候發現了問題。 目錄 &#x1f337;&#x1f337;1.對于png格式的3波段uint8圖像 &a…

Prometheus + Grafana 監控系統搭建使用指南-Nacos 接入 Prometheus 監控

Nacos 接入 Prometheus 監控 系列文章目錄 Prometheus 的安裝部署Grafana的安裝部署Linux服務器接入Prometheus監控-Node Exporter 安裝指南Prometheus 接入SpringBoot微服務監控Mysql 接入 Prometheus RocketMQ 接入Prometheus 監控ElasticSearch 接入 PrometheusNacos 接入…

在Android運行時切換Retrofit Base URL:簡化開發環境與生產環境的切換

在運行時切換Retrofit Base URL:簡化開發環境與生產環境的切換 在Android開發中,Retrofit是一個由Square開發的類型安全的HTTP客戶端庫。它為API認證和網絡請求提供了一個強大的框架。然而,在開發過程中,我們常常需要在不同的環境(如開發環境和生產環境)之間切換Base UR…

解決剛申請下來的AWS EC2,無法用finalshell連接的問題

在AWS的命令頁面創建一個root用戶 切換到root 模式,輸入密碼 su root 不知道密碼的可以使用一下命令來設置root用戶的密碼&#xff1a; su passwd root 再切換到root用戶 su 修改配置文件 輸入 vim /etc/ssh/sshd_config進入文件&#xff0c;鍵入’i’ &#xff0c;進行…

YOLOv8改進 添加CVPR2024 PKINet中注意力機制CAAttention

一、PKINet論文 論文地址:2403.06258 (arxiv.org) 二、CAAttention結構 CAA(Context Anchor Attention)注意力模塊是一種用于捕捉長距離上下文信息的并行模塊。 在計算機視覺領域中,上下文信息是指與目標物體或任務相關的周圍環境和語境信息。上下文信息可以幫助我們更好…

【碼銀送書第二十二期】《Python數據分析從入門到精通(第2版)》

&#x1f490;大家好&#xff01;我是碼銀~&#xff0c;歡迎關注&#x1f490;&#xff1a; CSDN&#xff1a;碼銀 公眾號&#xff1a;碼銀學編程 前言 &#x1f340;叢書說明&#xff1a;“軟件開發視頻大講堂‘’叢書第1版于2008年8月出版&#xff0c;因其編寫細膩、易學實用…

MySql主從同步延遲怎么辦?

文章目錄 什么是MySQL主從架構主從架構的組成工作原理主從復制的步驟主從架構的優點主從架構的缺點 什么是主從同步延遲為什么會導致主從延遲主從延時的排查和解決如果發現主從數據不一致怎么辦&#xff1f; 我們常說的業務量越來越大&#xff0c;I/O訪問頻率過高&#xff0c;單…