例:https://issues.apache.org/jira/secure/attachment/12790079/AMBARI-15100-trunk_4.patch
上記パッチだと、putMetricが追加されたことがわかります。
Ambari Metrics Systemがインストールされたノードにログインしps auxwww | grep metricsなどでAMSのPIDを見つけます。
それらしいのが2つ見つかったので、procからJarファイルを探します。
ls -l /proc/{3195,3241}/fd | grep .jar$
または、パッチのパスからたぶんambari-metrics-commonがファイル名に含まれると思いますので、
[root@node1 ~]# ls -l /proc/{3195,3241}/fd | grep -E ambari-metrics-common.*\.jar$
lr-x------ 1 ams hadoop 64 Nov 21 02:42 86 -> /usr/lib/ambari-metrics-collector/ambari-metrics-common-2.2.2.0.460.jar
[root@node1 ~]# less /usr/lib/ambari-metrics-collector/ambari-metrics-common-2.2.2.0.460.jar | grep TimelineMetricsCache
-rw-r--r-- 2.0 unx 5208 b- defN 16-May-05 18:35 org/apache/hadoop/metrics2/sink/timeline/cache/TimelineMetricsCache.class
-rw-r--r-- 2.0 unx 3120 b- defN 16-May-05 18:35 org/apache/hadoop/metrics2/sink/timeline/cache/TimelineMetricsCache$TimelineMetricHolder.class
-rw-r--r-- 2.0 unx 3251 b- defN 16-May-05 18:35 org/apache/hadoop/metrics2/sink/timeline/cache/TimelineMetricsCache$TimelineMetricWrapper.class
[root@node1 ~]# /usr/jdk64/jdk1.8.0_60/bin/javap -classpath /usr/lib/ambari-metrics-collector/ambari-metrics-common-2.2.2.0.460.jar org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCacheあれ、putMetricないですね。
Compiled from "TimelineMetricsCache.java"
public class org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache {
public static final int MAX_RECS_PER_NAME_DEFAULT;
public static final int MAX_EVICTION_TIME_MILLIS;
public org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache(int, int);
public org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache(int, int, boolean);
public org.apache.hadoop.metrics2.sink.timeline.TimelineMetric getTimelineMetric(java.lang.String);
public int getMaxEvictionTimeInMillis();
public void putTimelineMetric(org.apache.hadoop.metrics2.sink.timeline.TimelineMetric);
public void putTimelineMetric(org.apache.hadoop.metrics2.sink.timeline.TimelineMetric, boolean);
static int access$000(org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache);
static int access$100(org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache);
static org.apache.commons.logging.Log access$200();
static {};
}
[root@node1 ~]# zipgrep putMetric /usr/lib/ambari-metrics-collector/ambari-metrics-common-2.2.2.0.460.jar
org/apache/hadoop/metrics2/sink/timeline/cache/TimelineMetricsCache$TimelineMetricHolder.class:Binary file (standard input) matches
org/apache/hadoop/metrics2/sink/timeline/cache/TimelineMetricsCache$TimelineMetricWrapper.class:Binary file (standard input) matches
[root@node1 ~]# /usr/jdk64/jdk1.8.0_60/bin/javap -classpath /usr/lib/ambari-metrics-collector/ambari-metrics-common-2.2.2.0.460.jar org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache\$TimelineMetricHolder
Compiled from "TimelineMetricsCache.java"
class org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache$TimelineMetricHolder extends java.util.concurrent.ConcurrentSkipListMap<java.lang.String, org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache$TimelineMetricWrapper> {
final org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache this$0;
org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache$TimelineMetricHolder(org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache);
public org.apache.hadoop.metrics2.sink.timeline.TimelineMetric evict(java.lang.String);
public void put(java.lang.String, org.apache.hadoop.metrics2.sink.timeline.TimelineMetric);
}
[root@node1 ~]# /usr/jdk64/jdk1.8.0_60/bin/javap -classpath /usr/lib/ambari-metrics-collector/ambari-metrics-common-2.2.2.0.460.jar org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache\$TimelineMetricWrapper
Compiled from "TimelineMetricsCache.java"
class org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache$TimelineMetricWrapper {
final org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache this$0;
org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache$TimelineMetricWrapper(org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache, org.apache.hadoop.metrics2.sink.timeline.TimelineMetric);
public synchronized void putMetric(org.apache.hadoop.metrics2.sink.timeline.TimelineMetric);
public synchronized long getTimeDiff();
public synchronized org.apache.hadoop.metrics2.sink.timeline.TimelineMetric getTimelineMetric();
}
0 件のコメント:
コメントを投稿