You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ds...@apache.org on 2015/09/22 19:25:52 UTC
ambari git commit: AMBARI-13192 Metrics data for last one month is
missing many data points that should exist (dsen)
Repository: ambari
Updated Branches:
refs/heads/trunk 0fc88bed2 -> e159406c4
AMBARI-13192 Metrics data for last one month is missing many data points that should exist (dsen)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e159406c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e159406c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e159406c
Branch: refs/heads/trunk
Commit: e159406c408012d0d918d596f1470c2bc445d17f
Parents: 0fc88be
Author: Dmytro Sen <ds...@apache.org>
Authored: Tue Sep 22 20:25:40 2015 +0300
Committer: Dmytro Sen <ds...@apache.org>
Committed: Tue Sep 22 20:25:40 2015 +0300
----------------------------------------------------------------------
.../metrics/timeline/query/PhoenixTransactSQL.java | 4 ++--
.../metrics/timeline/TestPhoenixTransactSQL.java | 8 ++++----
.../AMBARI_METRICS/0.1.0/configuration/ams-log4j.xml | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/e159406c/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/query/PhoenixTransactSQL.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/query/PhoenixTransactSQL.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/query/PhoenixTransactSQL.java
index 1d669eb..5bb8149 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/query/PhoenixTransactSQL.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/query/PhoenixTransactSQL.java
@@ -285,7 +285,7 @@ public class PhoenixTransactSQL {
long endTime = condition.getEndTime() == null ? System.currentTimeMillis() : condition.getEndTime();
long startTime = condition.getStartTime() == null ? 0 : condition.getStartTime();
Long timeRange = endTime - startTime;
- if (timeRange > 7 * DAY) {
+ if (timeRange > 30 * DAY) {
metricsTable = METRICS_AGGREGATE_DAILY_TABLE_NAME;
query = GET_METRIC_AGGREGATE_ONLY_SQL;
condition.setPrecision(Precision.DAYS);
@@ -529,7 +529,7 @@ public class PhoenixTransactSQL {
long endTime = condition.getEndTime() == null ? System.currentTimeMillis() : condition.getEndTime();
long startTime = condition.getStartTime() == null ? 0 : condition.getStartTime();
Long timeRange = endTime - startTime;
- if (timeRange > 7 * DAY) {
+ if (timeRange > 30 * DAY) {
metricsAggregateTable = METRICS_CLUSTER_AGGREGATE_DAILY_TABLE_NAME;
queryStmt = GET_CLUSTER_AGGREGATE_TIME_SQL;
condition.setPrecision(Precision.DAYS);
http://git-wip-us.apache.org/repos/asf/ambari/blob/e159406c/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestPhoenixTransactSQL.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestPhoenixTransactSQL.java b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestPhoenixTransactSQL.java
index a3b5c72..b21bcae 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestPhoenixTransactSQL.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestPhoenixTransactSQL.java
@@ -191,7 +191,7 @@ public class TestPhoenixTransactSQL {
verify(connection, preparedStatement);
// HOURS precision
- startTime = endTime-PhoenixTransactSQL.DAY*7/1000;
+ startTime = endTime-PhoenixTransactSQL.DAY*30/1000;
condition = new DefaultCondition(
Arrays.asList("cpu_user", "mem_free"), Collections.singletonList("h1"),
"a1", "i1", startTime, endTime, null, null, false);
@@ -209,7 +209,7 @@ public class TestPhoenixTransactSQL {
verify(connection, preparedStatement);
// DAYS precision
- startTime = endTime-PhoenixTransactSQL.DAY*7*2/1000;
+ startTime = endTime-PhoenixTransactSQL.DAY*30*2/1000;
condition = new DefaultCondition(
Arrays.asList("cpu_user", "mem_free"), Collections.singletonList("h1"),
"a1", "i1", startTime, endTime, null, null, false);
@@ -320,7 +320,7 @@ public class TestPhoenixTransactSQL {
verify(connection, preparedStatement);
// HOURS precision
- startTime = endTime-PhoenixTransactSQL.DAY*7/1000;
+ startTime = endTime-PhoenixTransactSQL.DAY*30/1000;
condition = new DefaultCondition(
Arrays.asList("cpu_user", "mem_free"), Collections.singletonList("h1"),
"a1", "i1", startTime, endTime, null, null, false);
@@ -337,7 +337,7 @@ public class TestPhoenixTransactSQL {
verify(connection, preparedStatement);
// DAYS precision
- startTime = endTime-PhoenixTransactSQL.DAY*7*2/1000;
+ startTime = endTime-PhoenixTransactSQL.DAY*30*2/1000;
condition = new DefaultCondition(
Arrays.asList("cpu_user", "mem_free"), Collections.singletonList("h1"),
"a1", "i1", startTime, endTime, null, null, false);
http://git-wip-us.apache.org/repos/asf/ambari/blob/e159406c/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-log4j.xml b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-log4j.xml
index 53e2587..2b0a4cf 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-log4j.xml
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-log4j.xml
@@ -55,7 +55,7 @@ log4j.appender.file.File=${ams.log.dir}/${ams.log.file}
log4j.appender.file.MaxFileSize=80MB
log4j.appender.file.MaxBackupIndex=60
log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p [%t] %c{1}:%L - %m%n
+log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
</value>
<value-attributes>
<show-property-name>false</show-property-name>