You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by pr...@apache.org on 2017/07/14 02:18:20 UTC
hive git commit: HIVE-17086: LLAP: JMX Metric for max file
descriptors used so far (Prasanth Jayachandran reviewed by Gopal V)
Repository: hive
Updated Branches:
refs/heads/master 4514ec969 -> 6e182257b
HIVE-17086: LLAP: JMX Metric for max file descriptors used so far (Prasanth Jayachandran reviewed by Gopal V)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/6e182257
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/6e182257
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/6e182257
Branch: refs/heads/master
Commit: 6e182257b38dda0e950fe7a19d18849be7bb2b9d
Parents: 4514ec9
Author: Prasanth Jayachandran <pr...@apache.org>
Authored: Thu Jul 13 19:18:00 2017 -0700
Committer: Prasanth Jayachandran <pr...@apache.org>
Committed: Thu Jul 13 19:18:00 2017 -0700
----------------------------------------------------------------------
.../apache/hadoop/hive/llap/metrics/LlapDaemonJvmInfo.java | 3 ++-
.../apache/hadoop/hive/llap/metrics/LlapDaemonJvmMetrics.java | 7 +++++--
2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/6e182257/llap-server/src/java/org/apache/hadoop/hive/llap/metrics/LlapDaemonJvmInfo.java
----------------------------------------------------------------------
diff --git a/llap-server/src/java/org/apache/hadoop/hive/llap/metrics/LlapDaemonJvmInfo.java b/llap-server/src/java/org/apache/hadoop/hive/llap/metrics/LlapDaemonJvmInfo.java
index 11ac5a4..a817ed0 100644
--- a/llap-server/src/java/org/apache/hadoop/hive/llap/metrics/LlapDaemonJvmInfo.java
+++ b/llap-server/src/java/org/apache/hadoop/hive/llap/metrics/LlapDaemonJvmInfo.java
@@ -37,7 +37,8 @@ public enum LlapDaemonJvmInfo implements MetricsInfo {
LlapDaemonMappedBufferTotalCapacity("Estimate of total capacity of all mapped byte buffers in bytes"),
LlapDaemonMappedBufferMemoryUsed("Estimate of memory that JVM is using for mapped byte buffers in bytes"),
LlapDaemonOpenFileDescriptorCount("Number of open file descriptors"),
- LlapDaemonMaxFileDescriptorCount("Maximum number of file descriptors"),
+ LlapDaemonMaxFileDescriptorCount("Maximum number of file descriptors used so far"),
+ LlapDaemonLimitFileDescriptorCount("Limit for file descriptors allowed by system"),
LlapDaemonResidentSetSize("Resident memory (RSS) used by llap daemon process in bytes"),
LlapDaemonVirtualMemorySize("Virtual memory (VMEM) used by llap daemon process in bytes")
;
http://git-wip-us.apache.org/repos/asf/hive/blob/6e182257/llap-server/src/java/org/apache/hadoop/hive/llap/metrics/LlapDaemonJvmMetrics.java
----------------------------------------------------------------------
diff --git a/llap-server/src/java/org/apache/hadoop/hive/llap/metrics/LlapDaemonJvmMetrics.java b/llap-server/src/java/org/apache/hadoop/hive/llap/metrics/LlapDaemonJvmMetrics.java
index be25846..e9e53d0 100644
--- a/llap-server/src/java/org/apache/hadoop/hive/llap/metrics/LlapDaemonJvmMetrics.java
+++ b/llap-server/src/java/org/apache/hadoop/hive/llap/metrics/LlapDaemonJvmMetrics.java
@@ -24,6 +24,7 @@ import static org.apache.hadoop.hive.llap.metrics.LlapDaemonJvmInfo.LlapDaemonJV
import static org.apache.hadoop.hive.llap.metrics.LlapDaemonJvmInfo.LlapDaemonMappedBufferCount;
import static org.apache.hadoop.hive.llap.metrics.LlapDaemonJvmInfo.LlapDaemonMappedBufferMemoryUsed;
import static org.apache.hadoop.hive.llap.metrics.LlapDaemonJvmInfo.LlapDaemonMappedBufferTotalCapacity;
+import static org.apache.hadoop.hive.llap.metrics.LlapDaemonJvmInfo.LlapDaemonLimitFileDescriptorCount;
import static org.apache.hadoop.hive.llap.metrics.LlapDaemonJvmInfo.LlapDaemonMaxFileDescriptorCount;
import static org.apache.hadoop.hive.llap.metrics.LlapDaemonJvmInfo.LlapDaemonOpenFileDescriptorCount;
import static org.apache.hadoop.hive.llap.metrics.LlapDaemonJvmInfo.LlapDaemonResidentSetSize;
@@ -38,7 +39,6 @@ import java.util.List;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hive.llap.LlapDaemonInfo;
-import org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon;
import org.apache.hadoop.metrics2.MetricsCollector;
import org.apache.hadoop.metrics2.MetricsRecordBuilder;
import org.apache.hadoop.metrics2.MetricsSource;
@@ -60,6 +60,7 @@ public class LlapDaemonJvmMetrics implements MetricsSource {
private final MetricsRegistry registry;
private final ResourceCalculatorProcessTree processTree;
private final String daemonPid = LlapDaemonInfo.INSTANCE.getPID();
+ private long maxOpenFdCountSoFar = 0;
private LlapDaemonJvmMetrics(String displayName, String sessionId, final Configuration conf) {
this.name = displayName;
@@ -116,6 +117,7 @@ public class LlapDaemonJvmMetrics implements MetricsSource {
if(os instanceof UnixOperatingSystemMXBean){
openFileHandles = ((UnixOperatingSystemMXBean) os).getOpenFileDescriptorCount();
maxFileHandles = ((UnixOperatingSystemMXBean) os).getMaxFileDescriptorCount();
+ maxOpenFdCountSoFar = openFileHandles > maxOpenFdCountSoFar ? openFileHandles : maxOpenFdCountSoFar;
}
long rss = 0;
long vmem = 0;
@@ -130,7 +132,8 @@ public class LlapDaemonJvmMetrics implements MetricsSource {
.addGauge(LlapDaemonMappedBufferTotalCapacity, mappedBufferTotalCapacity)
.addGauge(LlapDaemonMappedBufferMemoryUsed, mappedBufferMemoryUsed)
.addGauge(LlapDaemonOpenFileDescriptorCount, openFileHandles)
- .addGauge(LlapDaemonMaxFileDescriptorCount, maxFileHandles)
+ .addGauge(LlapDaemonMaxFileDescriptorCount, maxOpenFdCountSoFar)
+ .addGauge(LlapDaemonLimitFileDescriptorCount, maxFileHandles)
.addGauge(LlapDaemonResidentSetSize, rss)
.addGauge(LlapDaemonVirtualMemorySize, vmem);
}