diff --git common/src/java/org/apache/hadoop/hive/common/metrics/common/MetricsConstant.java common/src/java/org/apache/hadoop/hive/common/metrics/common/MetricsConstant.java index deca7e8..11fb0e7 100644 --- common/src/java/org/apache/hadoop/hive/common/metrics/common/MetricsConstant.java +++ common/src/java/org/apache/hadoop/hive/common/metrics/common/MetricsConstant.java @@ -28,6 +28,7 @@ public static final String OPEN_CONNECTIONS = "open_connections"; public static final String OPEN_OPERATIONS = "open_operations"; + public static final String TOTAL_OPEN_CONNECTIONS = "total_open_connections"; public static final String METASTORE_HIVE_LOCKS = "metastore_hive_locks"; public static final String ZOOKEEPER_HIVE_SHAREDLOCKS = "zookeeper_hive_sharedlocks"; diff --git service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java index 5c8fa3c..aa237d1 100644 --- service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java +++ service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java @@ -159,6 +159,7 @@ public ServerContext createContext( if (metrics != null) { try { metrics.incrementCounter(MetricsConstant.OPEN_CONNECTIONS); + metrics.incrementCounter(MetricsConstant.TOTAL_OPEN_CONNECTIONS); } catch (Exception e) { LOG.warn("Error Reporting JDO operation to Metrics system", e); }