我有一个应用程序,它在嵌入式模式下运行Hazelcast。我已经使用https://docs.hazelcast.com/imdg/4.1/management/diagnostics.html启用了诊断,这是记录度量来分离文件的工具。
-Dhazelcast.diagnostics.enabled=true
-Dhazelcast.diagnostics.metric.level=debug
-Dhazelcast.diagnostics.invocation.sample.period.seconds=300
-Dhazelcast.diagnostics.pending.invocations.period.seconds=300
-Dhazelcast.diagnostics.slowoperations.period.seconds=300
-Dhazelcast.diagnostics.storeLatency.period.seconds=300
-Dhazelcast.diagnostics.metrics.period.seconds=300
-Dhazelcast.diagnostics.memberinfo.period.second=300
-Dhazelcast.diagnostics.directory=/u/tomcat/appn/logs
-Dhazelcast.diagnostics.max.rolled.file.size.mb=200
-Dhazelcast.diagnostics.max.rolled.file.count=5 这里的问题是,在为操作概要生成的度量中,没有提到正在使用的iMap。日志片段如下所示:
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=ms,metric=map.totalPutLatency]=102]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=ms,metric=map.totalSetLatency]=0]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=ms,metric=map.totalGetLatency]=0]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=ms,metric=map.totalMaxPutLatency]=94]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=ms,metric=map.totalMaxSetLatency]=0]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=ms,metric=map.totalMaxGetLatency]=0]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=ms,metric=map.totalMaxRemoveLatency]=0]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=ms,metric=map.totalRemoveLatency]=0]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=ms,metric=map.lastAccessTime]=0]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=ms,metric=map.lastUpdateTime]=1623429796822]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=count,metric=map.hits]=0]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=count,metric=map.numberOfOtherOperations]=1]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=count,metric=map.numberOfEvents]=30]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=count,metric=map.getCount]=0]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=count,metric=map.putCount]=30]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=count,metric=map.setCount]=0]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=count,metric=map.removeCount]=0]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=ms,metric=map.creationTime]=1623429781163]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=count,metric=map.ownedEntryCount]=30]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=count,metric=map.backupEntryCount]=0]
11-06-2021 12:47:56 1623430076148 Metric[[name=employeeCache,unit=bytes,metric=map.ownedEntryMemoryCost]=52775]然而,当我查看下面的操作配置文件时,它确实显示了正在执行的操作,如Get、Put,但没有显示在哪个缓存上,即缓存的名称。
显示操作概要的日志:
11-06-2021 13:54:11 1623434051149 OperationsProfiler[
com.hazelcast.map.impl.operation.ContainsKeyOperation[
count=21
totalTime(us)=1,637
avg(us)=77
max(us)=589
latency-distribution[
16..31us=9
32..63us=11
256..511us=1]]
com.hazelcast.client.impl.operations.GetConnectedClientsOperation[
count=1
totalTime(us)=6,896
avg(us)=6,896
max(us)=6,896
latency-distribution[
4096..8191us=1]]
com.hazelcast.spi.impl.eventservice.impl.operations.RegistrationOperation[
count=125
totalTime(us)=2,879
avg(us)=23
max(us)=108
latency-distribution[
8..15us=100
16..31us=21
32..63us=3
64..127us=1]]
com.hazelcast.map.impl.operation.MapGetInvalidationMetaDataOperation[
count=191
totalTime(us)=140,066
avg(us)=733
max(us)=40,709
latency-distribution[
32..63us=7
64..127us=31
128..255us=79
256..511us=61
512..1023us=9
1024..2047us=1
2048..4095us=1
8192..16383us=1
16384..32767us=1]]
com.hazelcast.map.impl.query.QueryOperation[
count=178
totalTime(us)=276,769
avg(us)=1,554
max(us)=21,650
latency-distribution[
64..127us=32
128..255us=10
256..511us=24
512..1023us=65
1024..2047us=38
2048..4095us=3
4096..8191us=2
8192..16383us=4]]
com.hazelcast.map.impl.operation.PutOperation[
count=8,905
totalTime(us)=555,519
avg(us)=62
max(us)=95,164
latency-distribution[
8..15us=377
16..31us=6,869
32..63us=1,176
64..127us=408
128..255us=51
256..511us=15
512..1023us=3
1024..2047us=1
8192..16383us=4
32768..65535us=1]]]这里的要求是在hazelcast.的诊断日志中显示操作分析器中的两个缓存名称。
发布于 2021-06-15 03:58:41
诊断中缓存的名称并不真正相关,因为诊断日志是关于提供有关操作的信息的。这些操作是到达成员的事件(get、put、query等),诊断是如何处理这些事件,即这些事件是如何被内部处理线程使用的。Map/缓存名也是无关的,因为所有映射/缓存都是分布的,即数据分布在集群中的所有成员。如果一个特定的操作是慢的,那么它就意味着存储在该成员上的数据在所有映射/缓存中的缓慢。
然而,如果这对你的案例是绝对必要的,并且如果你热衷于建立这件事,那么可以自由地创建一个公关并在https://github.com/hazelcast/hazelcast上提交。
https://stackoverflow.com/questions/67941671
复制相似问题