summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ambari-metrics/ambari-metrics-assembly/pom.xml7
-rw-r--r--ambari-metrics/ambari-metrics-timelineservice/pom.xml10
-rw-r--r--ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java3
-rw-r--r--ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java8
-rw-r--r--ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/ITPhoenixHBaseAccessor.java8
5 files changed, 20 insertions, 16 deletions
diff --git a/ambari-metrics/ambari-metrics-assembly/pom.xml b/ambari-metrics/ambari-metrics-assembly/pom.xml
index ea180f5796..6cc7d2cac3 100644
--- a/ambari-metrics/ambari-metrics-assembly/pom.xml
+++ b/ambari-metrics/ambari-metrics-assembly/pom.xml
@@ -240,6 +240,9 @@
<sources>
<source>
<location>${collector.dir}/target/lib</location>
+ <excludes>
+ <exclude>*tests.jar</exclude>
+ </excludes>
</source>
<source>
<location>
@@ -257,6 +260,7 @@
<excludes>
<exclude>bin/**</exclude>
<exclude>bin/*</exclude>
+ <exclude>lib/*tests.jar</exclude>
</excludes>
</source>
</sources>
@@ -770,6 +774,7 @@
<data>
<src>${collector.dir}/target/lib</src>
<type>directory</type>
+ <excludes>*tests.jar</excludes>
<mapper>
<type>perm</type>
<filemode>644</filemode>
@@ -779,7 +784,7 @@
<data>
<src>${collector.dir}/target/embedded/${hbase.folder}</src>
<type>directory</type>
- <excludes>bin/**,bin/*</excludes>
+ <excludes>bin/**,bin/*,lib/*tests.jar</excludes>
<mapper>
<type>perm</type>
<prefix>/usr/lib/ams-hbase</prefix>
diff --git a/ambari-metrics/ambari-metrics-timelineservice/pom.xml b/ambari-metrics/ambari-metrics-timelineservice/pom.xml
index a0e4adf322..4444cceef3 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/pom.xml
+++ b/ambari-metrics/ambari-metrics-timelineservice/pom.xml
@@ -124,6 +124,9 @@
<sources>
<source>
<location>target/lib</location>
+ <excludes>
+ <exclude>*tests.jar</exclude>
+ </excludes>
</source>
<source>
<location>${project.build.directory}/${project.artifactId}-${project.version}.jar</location>
@@ -139,6 +142,7 @@
<excludes>
<exclude>bin/**</exclude>
<exclude>bin/*</exclude>
+ <exclude>lib/*tests.jar</exclude>
</excludes>
</source>
</sources>
@@ -251,12 +255,6 @@
<dependencies>
<dependency>
<groupId>org.apache.phoenix</groupId>
- <artifactId>phoenix-server</artifactId>
- <version>${phoenix.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.phoenix</groupId>
<artifactId>phoenix-core</artifactId>
<version>${phoenix.version}</version>
<exclusions>
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java
index dd1ae3f256..0b82506b25 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java
@@ -210,7 +210,8 @@ public class HBaseTimelineMetricStore extends AbstractService implements Timelin
} else {
LOG.info("Invalid Input for TopN query. Ignoring TopN Request.");
}
- } else if (hostnames != null && hostnames.size() > defaultTopNHostsLimit) {
+ } else if (startTime != null && hostnames != null && hostnames.size() > defaultTopNHostsLimit) {
+ // if (timeseries query AND hostnames passed AND size(hostnames) > limit)
LOG.info("Requesting data for more than " + defaultTopNHostsLimit + " Hosts. " +
"Defaulting to Top " + defaultTopNHostsLimit);
conditionBuilder.topN(defaultTopNHostsLimit);
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
index 16ebcd9995..dfd730d50d 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
@@ -488,7 +488,7 @@ public class PhoenixHBaseAccessor {
}
protected void initPoliciesAndTTL() {
- boolean enableNormalizer = hbaseConf.getBoolean("hbase.normalizer.enabled", true);
+ boolean enableNormalizer = hbaseConf.getBoolean("hbase.normalizer.enabled", false);
boolean enableFifoCompaction = metricsConf.getBoolean("timeline.metrics.hbase.fifo.compaction.enabled", true);
HBaseAdmin hBaseAdmin = null;
@@ -504,9 +504,9 @@ public class PhoenixHBaseAccessor {
boolean modifyTable = false;
HTableDescriptor tableDescriptor = hBaseAdmin.getTableDescriptor(tableName.getBytes());
- if (enableNormalizer && !tableDescriptor.isNormalizationEnabled()) {
- tableDescriptor.setNormalizationEnabled(true);
- LOG.info("Enabling normalizer for " + tableName);
+ if (enableNormalizer ^ tableDescriptor.isNormalizationEnabled()) {
+ tableDescriptor.setNormalizationEnabled(enableNormalizer);
+ LOG.info("Normalizer set to " + enableNormalizer + " for " + tableName);
modifyTable = true;
}
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/ITPhoenixHBaseAccessor.java b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/ITPhoenixHBaseAccessor.java
index 7c6e7f4210..d93cabc215 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/ITPhoenixHBaseAccessor.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/ITPhoenixHBaseAccessor.java
@@ -325,8 +325,8 @@ public class ITPhoenixHBaseAccessor extends AbstractMiniHBaseClusterTest {
// Verify policies are unset
for (String tableName : PHOENIX_TABLES) {
HTableDescriptor tableDescriptor = hBaseAdmin.getTableDescriptor(tableName.getBytes());
-
- Assert.assertFalse("Normalizer disabled by default.", tableDescriptor.isNormalizationEnabled());
+ tableDescriptor.setNormalizationEnabled(true);
+ Assert.assertTrue("Normalizer enabled.", tableDescriptor.isNormalizationEnabled());
Assert.assertNull("Default compaction policy is null.",
tableDescriptor.getConfigurationValue(HSTORE_COMPACTION_CLASS_KEY));
@@ -364,7 +364,7 @@ public class ITPhoenixHBaseAccessor extends AbstractMiniHBaseClusterTest {
LOG.debug("Table: " + tableName + ", normalizerEnabled = " + normalizerEnabled);
LOG.debug("Table: " + tableName + ", compactionPolicy = " + compactionPolicy);
// Best effort for 20 seconds
- if (!normalizerEnabled || compactionPolicy == null) {
+ if (normalizerEnabled || compactionPolicy == null) {
Thread.sleep(2000l);
}
if (tableName.equals(METRICS_RECORD_TABLE_NAME)) {
@@ -375,7 +375,7 @@ public class ITPhoenixHBaseAccessor extends AbstractMiniHBaseClusterTest {
}
}
- Assert.assertTrue("Normalizer enabled.", normalizerEnabled);
+ Assert.assertFalse("Normalizer disabled.", normalizerEnabled);
Assert.assertTrue("Durability Set.", tableDurabilitySet);
Assert.assertEquals("FIFO compaction policy is set.", FIFO_COMPACTION_POLICY_CLASS, compactionPolicy);
Assert.assertEquals("Precision TTL value not changed.", String.valueOf(2 * 86400), precisionTtl);