You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2017/04/27 19:16:08 UTC
[01/14] ambari git commit: AMBARI-20777 : AMS changes to use
instanceId for cluster based segregation of data. (Addendum patch) (avijayan)
Repository: ambari
Updated Branches:
refs/heads/branch-feature-AMBARI-12556 e3d5344a6 -> 13d806b85
AMBARI-20777 : AMS changes to use instanceId for cluster based segregation of data. (Addendum patch) (avijayan)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8a731458
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8a731458
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8a731458
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 8a73145839f4b34c2231faac04ad10e64c096a87
Parents: 6a0b2a0
Author: Aravindan Vijayan <av...@hortonworks.com>
Authored: Wed Apr 26 11:15:02 2017 -0700
Committer: Aravindan Vijayan <av...@hortonworks.com>
Committed: Wed Apr 26 11:15:02 2017 -0700
----------------------------------------------------------------------
.../timeline/HBaseTimelineMetricStore.java | 48 +++++++++++++++++++-
.../metrics/timeline/PhoenixHBaseAccessor.java | 4 +-
.../metrics/timeline/TimelineMetricStore.java | 2 +-
.../webapp/TimelineWebServices.java | 8 ++--
.../timeline/TestTimelineMetricStore.java | 2 +-
5 files changed, 56 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/8a731458/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java
----------------------------------------------------------------------
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 fa095a0..c242a2f 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
@@ -19,6 +19,7 @@ package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
+import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -51,6 +52,7 @@ import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -388,8 +390,50 @@ public class HBaseTimelineMetricStore extends AbstractService implements Timelin
}
@Override
- public Map<String, Set<String>> getInstanceHostsMetadata() throws SQLException, IOException {
- return metricMetadataManager.getHostedInstanceCache();
+ public Map<String, Map<String,Set<String>>> getInstanceHostsMetadata(String instanceId, String appId)
+ throws SQLException, IOException {
+
+ Map<String, Set<String>> hostedApps = metricMetadataManager.getHostedAppsCache();
+ Map<String, Set<String>> instanceHosts = metricMetadataManager.getHostedInstanceCache();
+ Map<String, Map<String, Set<String>>> instanceAppHosts = new HashMap<>();
+
+ if (MapUtils.isEmpty(instanceHosts)) {
+ Map<String, Set<String>> appHostMap = new HashMap<String, Set<String>>();
+ for (String host : hostedApps.keySet()) {
+ for (String app : hostedApps.get(host)) {
+ if (!appHostMap.containsKey(app)) {
+ appHostMap.put(app, new HashSet<String>());
+ }
+ appHostMap.get(app).add(host);
+ }
+ }
+ instanceAppHosts.put("", appHostMap);
+ } else {
+ for (String instance : instanceHosts.keySet()) {
+
+ if (StringUtils.isNotEmpty(instanceId) && !instance.equals(instanceId)) {
+ continue;
+ }
+ Map<String, Set<String>> appHostMap = new HashMap<String, Set<String>>();
+ instanceAppHosts.put(instance, appHostMap);
+
+ Set<String> hostsWithInstance = instanceHosts.get(instance);
+ for (String host : hostsWithInstance) {
+ for (String app : hostedApps.get(host)) {
+ if (StringUtils.isNotEmpty(appId) && !app.equals(appId)) {
+ continue;
+ }
+
+ if (!appHostMap.containsKey(app)) {
+ appHostMap.put(app, new HashSet<String>());
+ }
+ appHostMap.get(app).add(host);
+ }
+ }
+ }
+ }
+
+ return instanceAppHosts;
}
@Override
http://git-wip-us.apache.org/repos/asf/ambari/blob/8a731458/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
----------------------------------------------------------------------
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 65bbc4c..fb369e8 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
@@ -787,7 +787,9 @@ public class PhoenixHBaseAccessor {
metadataManager.putIfModifiedHostedAppsMetadata(
tm.getHostName(), tm.getAppId());
- metadataManager.putIfModifiedHostedInstanceMetadata(tm.getInstanceId(), tm.getHostName());
+ if (!tm.getAppId().equals("FLUME_HANDLER")) {
+ metadataManager.putIfModifiedHostedInstanceMetadata(tm.getInstanceId(), tm.getHostName());
+ }
}
if (!acceptMetric) {
iterator.remove();
http://git-wip-us.apache.org/repos/asf/ambari/blob/8a731458/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStore.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStore.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStore.java
index 121a8ae..bde09cb 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStore.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStore.java
@@ -94,7 +94,7 @@ public interface TimelineMetricStore {
* @throws SQLException
* @throws IOException
*/
- Map<String, Set<String>> getInstanceHostsMetadata() throws SQLException, IOException;
+ Map<String, Map<String,Set<String>>> getInstanceHostsMetadata(String instanceId, String appId) throws SQLException, IOException;
/**
* Return a list of known live collector nodes
http://git-wip-us.apache.org/repos/asf/ambari/blob/8a731458/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TimelineWebServices.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TimelineWebServices.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TimelineWebServices.java
index 6278c59..9da921a 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TimelineWebServices.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TimelineWebServices.java
@@ -415,14 +415,16 @@ public class TimelineWebServices {
@GET
@Path("/metrics/instances")
@Produces({ MediaType.APPLICATION_JSON })
- public Map<String, Set<String>> getClusterHostsMetadata(
+ public Map<String, Map<String, Set<String>>> getClusterHostsMetadata(
@Context HttpServletRequest req,
- @Context HttpServletResponse res
+ @Context HttpServletResponse res,
+ @QueryParam("appId") String appId,
+ @QueryParam("instanceId") String instanceId
) {
init(res);
try {
- return timelineMetricStore.getInstanceHostsMetadata();
+ return timelineMetricStore.getInstanceHostsMetadata(instanceId, appId);
} catch (Exception e) {
throw new WebApplicationException(e, Response.Status.INTERNAL_SERVER_ERROR);
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/8a731458/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestTimelineMetricStore.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestTimelineMetricStore.java b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestTimelineMetricStore.java
index b40481d..f00906e 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestTimelineMetricStore.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestTimelineMetricStore.java
@@ -97,7 +97,7 @@ public class TestTimelineMetricStore implements TimelineMetricStore {
}
@Override
- public Map<String, Set<String>> getInstanceHostsMetadata() throws SQLException, IOException {
+ public Map<String, Map<String,Set<String>>> getInstanceHostsMetadata(String instanceId, String appId) throws SQLException, IOException {
return Collections.emptyMap();
}
[02/14] ambari git commit: AMBARI-20820 Stack side changes to use
instanceId for cluster based segregation of data (AMS) (dsen)
Posted by jo...@apache.org.
AMBARI-20820 Stack side changes to use instanceId for cluster based segregation of data (AMS) (dsen)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/362d6eca
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/362d6eca
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/362d6eca
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 362d6ecaba8e1909e26b79928be91ae8a8103461
Parents: 8a73145
Author: Dmytro Sen <ds...@apache.org>
Authored: Wed Apr 26 21:35:45 2017 +0300
Committer: Dmytro Sen <ds...@apache.org>
Committed: Wed Apr 26 21:35:45 2017 +0300
----------------------------------------------------------------------
.../timeline/AbstractTimelineMetricsSink.java | 2 ++
.../sink/flume/FlumeTimelineMetricsSink.java | 10 +++++-
.../timeline/HadoopTimelineMetricsSink.java | 9 +++--
.../timeline/HadoopTimelineMetricsSinkTest.java | 14 +++++++-
.../main/python/core/application_metric_map.py | 7 ++--
.../src/main/python/core/config_reader.py | 6 ++++
.../src/main/python/core/emitter.py | 4 ++-
.../kafka/KafkaTimelineMetricsReporter.java | 10 ++++++
.../kafka/KafkaTimelineMetricsReporterTest.java | 4 +++
.../storm/StormTimelineMetricsReporter.java | 7 ++++
.../sink/storm/StormTimelineMetricsSink.java | 7 ++++
.../storm/StormTimelineMetricsReporter.java | 8 ++++-
.../sink/storm/StormTimelineMetricsSink.java | 8 ++++-
.../system/impl/AmbariMetricSinkImpl.java | 36 ++++++++++++--------
.../1.6.1.2.2.0/package/scripts/params.py | 15 ++++++--
.../hadoop-metrics2-accumulo.properties.j2 | 2 ++
.../0.1.0/package/scripts/params.py | 13 ++++---
.../hadoop-metrics2-hbase.properties.j2 | 2 ++
.../package/templates/metric_monitor.ini.j2 | 2 ++
.../FLUME/1.4.0.2.0/package/scripts/params.py | 21 +++++++-----
.../templates/flume-metrics2.properties.j2 | 3 ++
.../0.96.0.2.0/package/scripts/params_linux.py | 14 ++++++--
...-metrics2-hbase.properties-GANGLIA-MASTER.j2 | 2 ++
...doop-metrics2-hbase.properties-GANGLIA-RS.j2 | 3 +-
.../hadoop-metrics2.properties.xml | 2 ++
.../0.12.0.2.0/package/scripts/params_linux.py | 17 ++++++---
.../hadoop-metrics2-hivemetastore.properties.j2 | 2 ++
.../hadoop-metrics2-hiveserver2.properties.j2 | 2 ++
.../templates/hadoop-metrics2-llapdaemon.j2 | 4 ++-
.../hadoop-metrics2-llaptaskscheduler.j2 | 4 ++-
.../2.1.0.3.0/package/scripts/params_linux.py | 16 ++++++---
.../hadoop-metrics2-hivemetastore.properties.j2 | 2 ++
.../hadoop-metrics2-hiveserver2.properties.j2 | 2 ++
.../templates/hadoop-metrics2-llapdaemon.j2 | 4 ++-
.../hadoop-metrics2-llaptaskscheduler.j2 | 4 ++-
.../KAFKA/0.8.1/configuration/kafka-broker.xml | 10 ++++++
.../KAFKA/0.8.1/package/scripts/params.py | 15 ++++++--
.../STORM/0.9.1/package/scripts/params_linux.py | 12 +++++--
.../0.9.1/package/templates/config.yaml.j2 | 3 ++
.../templates/storm-metrics2.properties.j2 | 2 ++
.../2.0.6/hooks/before-START/scripts/params.py | 13 +++++--
.../templates/hadoop-metrics2.properties.j2 | 2 ++
.../hadoop-metrics2.properties.xml | 2 ++
.../3.0/hooks/before-START/scripts/params.py | 14 ++++++--
.../templates/hadoop-metrics2.properties.j2 | 2 ++
.../python/stacks/2.0.6/configs/default.json | 4 +--
46 files changed, 278 insertions(+), 69 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
index 46f32f9..2c6fae2 100644
--- a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
+++ b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
@@ -79,6 +79,8 @@ public abstract class AbstractTimelineMetricsSink {
public static final String SSL_KEYSTORE_TYPE_PROPERTY = "truststore.type";
public static final String SSL_KEYSTORE_PASSWORD_PROPERTY = "truststore.password";
public static final String COLLECTOR_LIVE_NODES_PATH = "/ws/v1/timeline/metrics/livenodes";
+ public static final String INSTANCE_ID_PROPERTY = "instanceId";
+ public static final String SET_INSTANCE_ID_PROPERTY = "set.instanceId";
protected static final AtomicInteger failedCollectorConnectionsCounter = new AtomicInteger(0);
public static int NUMBER_OF_SKIPPED_COLLECTOR_EXCEPTIONS = 100;
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-metrics/ambari-metrics-flume-sink/src/main/java/org/apache/hadoop/metrics2/sink/flume/FlumeTimelineMetricsSink.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-flume-sink/src/main/java/org/apache/hadoop/metrics2/sink/flume/FlumeTimelineMetricsSink.java b/ambari-metrics/ambari-metrics-flume-sink/src/main/java/org/apache/hadoop/metrics2/sink/flume/FlumeTimelineMetricsSink.java
index 3fdf3f4..904c916 100644
--- a/ambari-metrics/ambari-metrics-flume-sink/src/main/java/org/apache/hadoop/metrics2/sink/flume/FlumeTimelineMetricsSink.java
+++ b/ambari-metrics/ambari-metrics-flume-sink/src/main/java/org/apache/hadoop/metrics2/sink/flume/FlumeTimelineMetricsSink.java
@@ -61,6 +61,8 @@ public class FlumeTimelineMetricsSink extends AbstractTimelineMetricsSink implem
private final static String COUNTER_METRICS_PROPERTY = "counters";
private final Set<String> counterMetrics = new HashSet<String>();
private int timeoutSeconds = 10;
+ private boolean setInstanceId;
+ private String instanceId;
@Override
public void start() {
@@ -106,6 +108,8 @@ public class FlumeTimelineMetricsSink extends AbstractTimelineMetricsSink implem
zookeeperQuorum = configuration.getProperty("zookeeper.quorum");
protocol = configuration.getProperty(COLLECTOR_PROTOCOL, "http");
port = configuration.getProperty(COLLECTOR_PORT, "6188");
+ setInstanceId = Boolean.valueOf(configuration.getProperty(SET_INSTANCE_ID_PROPERTY, "false"));
+ instanceId = configuration.getProperty(INSTANCE_ID_PROPERTY, "");
// Initialize the collector write strategy
super.init();
@@ -227,7 +231,11 @@ public class FlumeTimelineMetricsSink extends AbstractTimelineMetricsSink implem
TimelineMetric timelineMetric = new TimelineMetric();
timelineMetric.setMetricName(attributeName);
timelineMetric.setHostName(hostname);
- timelineMetric.setInstanceId(component);
+ if (setInstanceId) {
+ timelineMetric.setInstanceId(instanceId + component);
+ } else {
+ timelineMetric.setInstanceId(component);
+ }
timelineMetric.setAppId("FLUME_HANDLER");
timelineMetric.setStartTime(currentTimeMillis);
timelineMetric.getMetricValues().put(currentTimeMillis, Double.parseDouble(attributeValue));
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java b/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java
index 8e0de03..11e16c2 100644
--- a/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java
+++ b/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java
@@ -52,6 +52,7 @@ public class HadoopTimelineMetricsSink extends AbstractTimelineMetricsSink imple
private TimelineMetricsCache metricsCache;
private String hostName = "UNKNOWN.example.com";
private String instanceId = null;
+ private boolean setInstanceId;
private String serviceName = "";
private Collection<String> collectorHosts;
private String collectorUri;
@@ -95,8 +96,8 @@ public class HadoopTimelineMetricsSink extends AbstractTimelineMetricsSink imple
}
serviceName = getServiceName(conf);
- String inst = conf.getString("instanceId", "");
- instanceId = StringUtils.isEmpty(inst) ? null : inst;
+ instanceId = conf.getString(INSTANCE_ID_PROPERTY);
+ setInstanceId = conf.getBoolean(SET_INSTANCE_ID_PROPERTY, false);
LOG.info("Identified hostname = " + hostName + ", serviceName = " + serviceName);
// Initialize the collector write strategy
@@ -321,7 +322,9 @@ public class HadoopTimelineMetricsSink extends AbstractTimelineMetricsSink imple
timelineMetric.setMetricName(name);
timelineMetric.setHostName(hostName);
timelineMetric.setAppId(serviceName);
- timelineMetric.setInstanceId(instanceId);
+ if (setInstanceId) {
+ timelineMetric.setInstanceId(instanceId);
+ }
timelineMetric.setStartTime(startTime);
timelineMetric.setType(metric.type() != null ? metric.type().name() : null);
timelineMetric.getMetricValues().put(startTime, value.doubleValue());
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java b/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java
index 5777639..4a009dc 100644
--- a/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java
+++ b/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java
@@ -50,12 +50,15 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
+import java.util.TreeMap;
import static org.apache.hadoop.metrics2.sink.timeline.AbstractTimelineMetricsSink.COLLECTOR_PORT;
import static org.apache.hadoop.metrics2.sink.timeline.AbstractTimelineMetricsSink.COLLECTOR_HOSTS_PROPERTY;
import static org.apache.hadoop.metrics2.sink.timeline.AbstractTimelineMetricsSink.COLLECTOR_PROTOCOL;
+import static org.apache.hadoop.metrics2.sink.timeline.AbstractTimelineMetricsSink.INSTANCE_ID_PROPERTY;
import static org.apache.hadoop.metrics2.sink.timeline.AbstractTimelineMetricsSink.MAX_METRIC_ROW_CACHE_SIZE;
import static org.apache.hadoop.metrics2.sink.timeline.AbstractTimelineMetricsSink.METRICS_SEND_INTERVAL;
+import static org.apache.hadoop.metrics2.sink.timeline.AbstractTimelineMetricsSink.SET_INSTANCE_ID_PROPERTY;
import static org.easymock.EasyMock.anyInt;
import static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyMock.anyString;
@@ -81,13 +84,17 @@ public class HadoopTimelineMetricsSinkTest {
}
@Test
- @PrepareForTest({URL.class, OutputStream.class, AbstractTimelineMetricsSink.class, HttpURLConnection.class})
+ @PrepareForTest({URL.class, OutputStream.class, AbstractTimelineMetricsSink.class, HttpURLConnection.class, TimelineMetric.class, HadoopTimelineMetricsSink.class})
public void testPutMetrics() throws Exception {
HadoopTimelineMetricsSink sink = new HadoopTimelineMetricsSink();
HttpURLConnection connection = PowerMock.createNiceMock(HttpURLConnection.class);
URL url = PowerMock.createNiceMock(URL.class);
InputStream is = IOUtils.toInputStream(gson.toJson(Collections.singletonList("localhost")));
+ TimelineMetric timelineMetric = PowerMock.createNiceMock(TimelineMetric.class);
+ expectNew(TimelineMetric.class).andReturn(timelineMetric).times(2);
+ expect(timelineMetric.getMetricValues()).andReturn(new TreeMap<Long, Double>()).anyTimes();
+ expect(timelineMetric.getMetricName()).andReturn("metricName").anyTimes();
expectNew(URL.class, anyString()).andReturn(url).anyTimes();
expect(url.openConnection()).andReturn(connection).anyTimes();
expect(connection.getInputStream()).andReturn(is).anyTimes();
@@ -106,6 +113,8 @@ public class HadoopTimelineMetricsSinkTest {
expect(conf.getInt(eq(MAX_METRIC_ROW_CACHE_SIZE), anyInt())).andReturn(10).anyTimes();
expect(conf.getInt(eq(METRICS_SEND_INTERVAL), anyInt())).andReturn(1000).anyTimes();
+ expect(conf.getBoolean(eq(SET_INSTANCE_ID_PROPERTY), eq(false))).andReturn(true).anyTimes();
+ expect(conf.getString(eq(INSTANCE_ID_PROPERTY))).andReturn("instanceId").anyTimes();
conf.setListDelimiter(eq(','));
expectLastCall().anyTimes();
@@ -145,6 +154,9 @@ public class HadoopTimelineMetricsSinkTest {
expect(record.metrics()).andReturn(Arrays.asList(metric)).anyTimes();
+ timelineMetric.setInstanceId(eq("instanceId"));
+ EasyMock.expectLastCall();
+
replay(conf, record, metric);
replayAll();
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/application_metric_map.py
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/application_metric_map.py b/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/application_metric_map.py
index 0052808..34a6787 100644
--- a/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/application_metric_map.py
+++ b/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/application_metric_map.py
@@ -66,7 +66,7 @@ class ApplicationMetricMap:
del self.app_metric_map[ app_id ]
pass
- def flatten(self, application_id = None, clear_once_flattened = False):
+ def flatten(self, application_id = None, clear_once_flattened = False, set_instanceid = False, instanceid = None):
"""
Return flatten dict to caller in json format.
Json format:
@@ -89,11 +89,14 @@ class ApplicationMetricMap:
for appId, metrics in local_metric_map.iteritems():
for metricId, metricData in dict(metrics).iteritems():
# Create a timeline metric object
+ result_instanceid = ""
+ if set_instanceid:
+ result_instanceid = instanceid
timeline_metric = {
"hostname" : self.hostname,
"metricname" : metricId,
"appid" : "HOST",
- "instanceid" : "",
+ "instanceid" : result_instanceid,
"starttime" : self.get_start_time(appId, metricId),
"metrics" : metricData
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/config_reader.py
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/config_reader.py b/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/config_reader.py
index 5686c50..2670e76 100644
--- a/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/config_reader.py
+++ b/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/config_reader.py
@@ -239,9 +239,15 @@ class Configuration:
def is_server_https_enabled(self):
return "true" == str(self.get("collector", "https_enabled")).lower()
+ def is_set_instanceid(self):
+ return "true" == str(self.get("default", "set.instanceId", 'false')).lower()
+
def get_server_host(self):
return self.get("collector", "host")
+ def get_instanceid(self):
+ return self.get("default", "instanceid")
+
def get_server_port(self):
try:
return int(self.get("collector", "port"))
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/emitter.py
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/emitter.py b/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/emitter.py
index ba3f18e..e2a7f0d 100644
--- a/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/emitter.py
+++ b/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/core/emitter.py
@@ -46,6 +46,8 @@ class Emitter(threading.Thread):
self.collector_port = config.get_server_port()
self.all_metrics_collector_hosts = config.get_metrics_collector_hosts()
self.is_server_https_enabled = config.is_server_https_enabled()
+ self.set_instanceid = config.is_set_instanceid()
+ self.instanceid = config.get_instanceid()
if self.is_server_https_enabled:
self.ca_certs = config.get_ca_certs()
@@ -74,7 +76,7 @@ class Emitter(threading.Thread):
# This call will acquire lock on the map and clear contents before returning
# After configured number of retries the data will not be sent to the
# collector
- json_data = self.application_metric_map.flatten(None, True)
+ json_data = self.application_metric_map.flatten(None, True, set_instanceid=self.set_instanceid, instanceid=self.instanceid)
if json_data is None:
logger.info("Nothing to emit, resume waiting.")
return
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java b/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
index 9d492cb..211e9cd 100644
--- a/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
+++ b/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
@@ -70,6 +70,8 @@ public class KafkaTimelineMetricsReporter extends AbstractTimelineMetricsSink
private static final String TIMELINE_METRICS_SSL_KEYSTORE_PATH_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + SSL_KEYSTORE_PATH_PROPERTY;
private static final String TIMELINE_METRICS_SSL_KEYSTORE_TYPE_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + SSL_KEYSTORE_TYPE_PROPERTY;
private static final String TIMELINE_METRICS_SSL_KEYSTORE_PASSWORD_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + SSL_KEYSTORE_PASSWORD_PROPERTY;
+ private static final String TIMELINE_METRICS_KAFKA_INSTANCE_ID_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + INSTANCE_ID_PROPERTY;
+ private static final String TIMELINE_METRICS_KAFKA_SET_INSTANCE_ID_PROPERTY = TIMELINE_METRICS_KAFKA_PREFIX + SET_INSTANCE_ID_PROPERTY;
private static final String TIMELINE_DEFAULT_HOST = "localhost";
private static final String TIMELINE_DEFAULT_PORT = "6188";
private static final String TIMELINE_DEFAULT_PROTOCOL = "http";
@@ -87,6 +89,8 @@ public class KafkaTimelineMetricsReporter extends AbstractTimelineMetricsSink
private TimelineMetricsCache metricsCache;
private int timeoutSeconds = 10;
private String zookeeperQuorum = null;
+ private boolean setInstanceId;
+ private String instanceId;
private String[] excludedMetricsPrefixes;
private String[] includedMetricsPrefixes;
@@ -162,6 +166,9 @@ public class KafkaTimelineMetricsReporter extends AbstractTimelineMetricsSink
collectorHosts = parseHostsStringIntoCollection(props.getString(TIMELINE_HOSTS_PROPERTY, TIMELINE_DEFAULT_HOST));
metricCollectorProtocol = props.getString(TIMELINE_PROTOCOL_PROPERTY, TIMELINE_DEFAULT_PROTOCOL);
+ instanceId = props.getString(TIMELINE_METRICS_KAFKA_INSTANCE_ID_PROPERTY);
+ setInstanceId = props.getBoolean(TIMELINE_METRICS_KAFKA_SET_INSTANCE_ID_PROPERTY);
+
setMetricsCache(new TimelineMetricsCache(maxRowCacheSize, metricsSendInterval));
if (metricCollectorProtocol.contains("https")) {
@@ -315,6 +322,9 @@ public class KafkaTimelineMetricsReporter extends AbstractTimelineMetricsSink
TimelineMetric timelineMetric = new TimelineMetric();
timelineMetric.setMetricName(attributeName);
timelineMetric.setHostName(hostname);
+ if (setInstanceId) {
+ timelineMetric.setInstanceId(instanceId);
+ }
timelineMetric.setAppId(component);
timelineMetric.setStartTime(currentTimeMillis);
timelineMetric.setType(ClassUtils.getShortCanonicalName(attributeValue, "Number"));
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-metrics/ambari-metrics-kafka-sink/src/test/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporterTest.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-kafka-sink/src/test/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporterTest.java b/ambari-metrics/ambari-metrics-kafka-sink/src/test/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporterTest.java
index e1ac48c..b05190c 100644
--- a/ambari-metrics/ambari-metrics-kafka-sink/src/test/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporterTest.java
+++ b/ambari-metrics/ambari-metrics-kafka-sink/src/test/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporterTest.java
@@ -84,6 +84,8 @@ public class KafkaTimelineMetricsReporterTest {
properties.setProperty("kafka.timeline.metrics.reporter.enabled", "true");
properties.setProperty("external.kafka.metrics.exclude.prefix", "a.b.c");
properties.setProperty("external.kafka.metrics.include.prefix", "a.b.c.d");
+ properties.setProperty("kafka.timeline.metrics.instanceId", "cluster");
+ properties.setProperty("kafka.timeline.metrics.set.instanceId", "false");
props = new VerifiableProperties(properties);
}
@@ -120,6 +122,8 @@ public class KafkaTimelineMetricsReporterTest {
properties.setProperty("kafka.timeline.metrics.truststore.path", "");
properties.setProperty("kafka.timeline.metrics.truststore.type", "");
properties.setProperty("kafka.timeline.metrics.truststore.password", "");
+ properties.setProperty("kafka.timeline.metrics.instanceId", "cluster");
+ properties.setProperty("kafka.timeline.metrics.set.instanceId", "false");
kafkaTimelineMetricsReporter.init(new VerifiableProperties(properties));
kafkaTimelineMetricsReporter.stopReporter();
verifyAll();
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-metrics/ambari-metrics-storm-sink-legacy/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-storm-sink-legacy/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java b/ambari-metrics/ambari-metrics-storm-sink-legacy/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
index 9a55f10..08f0598 100644
--- a/ambari-metrics/ambari-metrics-storm-sink-legacy/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
+++ b/ambari-metrics/ambari-metrics-storm-sink-legacy/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
@@ -50,6 +50,8 @@ public class StormTimelineMetricsReporter extends AbstractTimelineMetricsSink
private Collection<String> collectorHosts;
private String zkQuorum;
private String protocol;
+ private boolean setInstanceId;
+ private String instanceId;
private NimbusClient nimbusClient;
private String applicationId;
private int timeoutSeconds;
@@ -126,6 +128,8 @@ public class StormTimelineMetricsReporter extends AbstractTimelineMetricsSink
Integer.parseInt(cf.get(METRICS_POST_TIMEOUT_SECONDS).toString()) :
DEFAULT_POST_TIMEOUT_SECONDS;
applicationId = cf.get(APP_ID).toString();
+ setInstanceId = Boolean.getBoolean(cf.get(SET_INSTANCE_ID_PROPERTY).toString());
+ instanceId = cf.get(INSTANCE_ID_PROPERTY).toString();
collectorUri = constructTimelineMetricUri(protocol, findPreferredCollectHost(), port);
if (protocol.contains("https")) {
@@ -196,6 +200,9 @@ public class StormTimelineMetricsReporter extends AbstractTimelineMetricsSink
TimelineMetric timelineMetric = new TimelineMetric();
timelineMetric.setMetricName(attributeName);
timelineMetric.setHostName(hostname);
+ if (setInstanceId) {
+ timelineMetric.setInstanceId(instanceId);
+ }
timelineMetric.setAppId(component);
timelineMetric.setStartTime(currentTimeMillis);
timelineMetric.getMetricValues().put(currentTimeMillis, Double.parseDouble(attributeValue));
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-metrics/ambari-metrics-storm-sink-legacy/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsSink.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-storm-sink-legacy/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsSink.java b/ambari-metrics/ambari-metrics-storm-sink-legacy/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsSink.java
index 60c1427..20f60e1 100644
--- a/ambari-metrics/ambari-metrics-storm-sink-legacy/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsSink.java
+++ b/ambari-metrics/ambari-metrics-storm-sink-legacy/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsSink.java
@@ -59,6 +59,8 @@ public class StormTimelineMetricsSink extends AbstractTimelineMetricsSink implem
private String port;
private String topologyName;
private String applicationId;
+ private boolean setInstanceId;
+ private String instanceId;
@Override
protected String getCollectorUri(String host) {
@@ -122,6 +124,8 @@ public class StormTimelineMetricsSink extends AbstractTimelineMetricsSink implem
protocol = configuration.getProperty(COLLECTOR_PROTOCOL, "http");
port = configuration.getProperty(COLLECTOR_PORT, "6188");
+ instanceId = configuration.getProperty(INSTANCE_ID_PROPERTY);
+ setInstanceId = Boolean.valueOf(configuration.getProperty(SET_INSTANCE_ID_PROPERTY, "false"));
// Initialize the collector write strategy
super.init();
@@ -243,6 +247,9 @@ public class StormTimelineMetricsSink extends AbstractTimelineMetricsSink implem
TimelineMetric timelineMetric = new TimelineMetric();
timelineMetric.setMetricName(attributeName);
timelineMetric.setHostName(hostName);
+ if (setInstanceId) {
+ timelineMetric.setInstanceId(instanceId);
+ }
timelineMetric.setAppId(applicationId);
timelineMetric.setStartTime(currentTimeMillis);
timelineMetric.setType(ClassUtils.getShortCanonicalName(
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java b/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
index 535fae0..14f160b 100644
--- a/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
+++ b/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
@@ -46,6 +46,8 @@ public class StormTimelineMetricsReporter extends AbstractTimelineMetricsSink
private Collection<String> collectorHosts;
private String zkQuorum;
private String protocol;
+ private boolean setInstanceId;
+ private String instanceId;
private String applicationId;
private int timeoutSeconds;
@@ -115,7 +117,8 @@ public class StormTimelineMetricsReporter extends AbstractTimelineMetricsSink
Integer.parseInt(configuration.getProperty(METRICS_POST_TIMEOUT_SECONDS)) :
DEFAULT_POST_TIMEOUT_SECONDS;
applicationId = configuration.getProperty(CLUSTER_REPORTER_APP_ID, DEFAULT_CLUSTER_REPORTER_APP_ID);
-
+ setInstanceId = Boolean.valueOf(configuration.getProperty(SET_INSTANCE_ID_PROPERTY));
+ instanceId = configuration.getProperty(INSTANCE_ID_PROPERTY);
if (protocol.contains("https")) {
String trustStorePath = configuration.getProperty(SSL_KEYSTORE_PATH_PROPERTY).trim();
String trustStoreType = configuration.getProperty(SSL_KEYSTORE_TYPE_PROPERTY).trim();
@@ -226,6 +229,9 @@ public class StormTimelineMetricsReporter extends AbstractTimelineMetricsSink
TimelineMetric timelineMetric = new TimelineMetric();
timelineMetric.setMetricName(attributeName);
timelineMetric.setHostName(hostname);
+ if (setInstanceId) {
+ timelineMetric.setInstanceId(instanceId);
+ }
timelineMetric.setAppId(component);
timelineMetric.setStartTime(currentTimeMillis);
timelineMetric.setType(ClassUtils.getShortCanonicalName(attributeValue, "Number"));
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsSink.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsSink.java b/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsSink.java
index f58f549..425201c 100644
--- a/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsSink.java
+++ b/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsSink.java
@@ -68,6 +68,8 @@ public class StormTimelineMetricsSink extends AbstractTimelineMetricsSink implem
private String port;
private String topologyName;
private String applicationId;
+ private String instanceId;
+ private boolean setInstanceId;
@Override
protected String getCollectorUri(String host) {
@@ -133,7 +135,8 @@ public class StormTimelineMetricsSink extends AbstractTimelineMetricsSink implem
protocol = configuration.getProperty(COLLECTOR_PROTOCOL, "http");
port = configuration.getProperty(COLLECTOR_PORT, "6188");
-
+ instanceId = configuration.getProperty(INSTANCE_ID_PROPERTY);
+ setInstanceId = Boolean.valueOf(configuration.getProperty(SET_INSTANCE_ID_PROPERTY, "false"));
// Initialize the collector write strategy
super.init();
@@ -332,6 +335,9 @@ public class StormTimelineMetricsSink extends AbstractTimelineMetricsSink implem
TimelineMetric timelineMetric = new TimelineMetric();
timelineMetric.setMetricName(attributeName);
timelineMetric.setHostName(hostName);
+ if (setInstanceId) {
+ timelineMetric.setInstanceId(instanceId);
+ }
timelineMetric.setAppId(applicationId);
timelineMetric.setStartTime(currentTimeMillis);
timelineMetric.setType(ClassUtils.getShortCanonicalName(
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/java/org/apache/ambari/server/metrics/system/impl/AmbariMetricSinkImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/metrics/system/impl/AmbariMetricSinkImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/metrics/system/impl/AmbariMetricSinkImpl.java
index f268149..8d1f63f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/metrics/system/impl/AmbariMetricSinkImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/metrics/system/impl/AmbariMetricSinkImpl.java
@@ -20,6 +20,7 @@ package org.apache.ambari.server.metrics.system.impl;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedHashMap;
@@ -71,6 +72,8 @@ public class AmbariMetricSinkImpl extends AbstractTimelineMetricsSink implements
private AmbariManagementController ambariManagementController;
private TimelineMetricsCache timelineMetricsCache;
private boolean isInitialized = false;
+ private boolean setInstanceId = false;
+ private String instanceId;
public AmbariMetricSinkImpl(AmbariManagementController amc) {
this.ambariManagementController = amc;
@@ -98,28 +101,30 @@ public class AmbariMetricSinkImpl extends AbstractTimelineMetricsSink implements
for (Map.Entry<String, Cluster> kv : clusters.getClusters().entrySet()) {
String clusterName = kv.getKey();
+ instanceId = clusterName;
Cluster c = kv.getValue();
Resource.Type type = Resource.Type.ServiceConfigVersion;
//If Metrics Collector VIP settings are configured, use that.
- boolean vipHostConfigPresent = false;
- boolean vipPortConfigPresent = false;
+ boolean externalHostConfigPresent = false;
+ boolean externalPortConfigPresent = false;
Config clusterEnv = c.getDesiredConfigByType(ConfigHelper.CLUSTER_ENV);
if (clusterEnv != null) {
Map<String, String> configs = clusterEnv.getProperties();
- String metricsCollectorVipHost = configs.get("metrics_collector_vip_host");
- if (StringUtils.isNotEmpty(metricsCollectorVipHost)) {
- LOG.info("Setting Metrics Collector Vip Host : " + metricsCollectorVipHost);
- collectorHosts.add(metricsCollectorVipHost);
- vipHostConfigPresent = true;
+ String metricsCollectorExternalHosts = configs.get("metrics_collector_external_hosts");
+ if (StringUtils.isNotEmpty(metricsCollectorExternalHosts)) {
+ LOG.info("Setting Metrics Collector External Host : " + metricsCollectorExternalHosts);
+ collectorHosts.addAll(Arrays.asList(metricsCollectorExternalHosts.split(",")));
+ externalHostConfigPresent = true;
+ setInstanceId = true;
}
- String metricsCollectorVipPort = configs.get("metrics_collector_vip_port");
- if (StringUtils.isNotEmpty(metricsCollectorVipPort)) {
- LOG.info("Setting Metrics Collector Vip Port : " + metricsCollectorVipPort);
- port = metricsCollectorVipPort;
- vipPortConfigPresent = true;
+ String metricsCollectorExternalPort = configs.get("metrics_collector_external_port");
+ if (StringUtils.isNotEmpty(metricsCollectorExternalPort)) {
+ LOG.info("Setting Metrics Collector External Port : " + metricsCollectorExternalPort);
+ port = metricsCollectorExternalPort;
+ externalPortConfigPresent = true;
}
}
@@ -140,7 +145,7 @@ public class AmbariMetricSinkImpl extends AbstractTimelineMetricsSink implements
ambariManagementController);
try {
- if ( !vipHostConfigPresent ) {
+ if ( !externalHostConfigPresent ) {
//get collector host(s)
Service service = c.getService(ambariMetricsServiceName);
if (service != null) {
@@ -166,7 +171,7 @@ public class AmbariMetricSinkImpl extends AbstractTimelineMetricsSink implements
if (config != null && config.get("type").equals("ams-site")) {
TreeMap<Object, Object> properties = (TreeMap<Object, Object>) config.get("properties");
String timelineWebappAddress = (String) properties.get("timeline.metrics.service.webapp.address");
- if (!vipPortConfigPresent && StringUtils.isNotEmpty(timelineWebappAddress) && timelineWebappAddress.contains(":")) {
+ if (!externalPortConfigPresent && StringUtils.isNotEmpty(timelineWebappAddress) && timelineWebappAddress.contains(":")) {
port = timelineWebappAddress.split(":")[1];
}
String httpPolicy = (String) properties.get("timeline.metrics.service.http.policy");
@@ -318,6 +323,9 @@ public class AmbariMetricSinkImpl extends AbstractTimelineMetricsSink implements
TimelineMetric timelineMetric = new TimelineMetric();
timelineMetric.setMetricName(attributeName);
timelineMetric.setHostName(hostName);
+ if (setInstanceId) {
+ timelineMetric.setInstanceId(instanceId);
+ }
timelineMetric.setAppId(component);
timelineMetric.setStartTime(currentTimeMillis);
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/params.py
index 53cf002..150b0a8 100644
--- a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/params.py
@@ -122,12 +122,21 @@ info_num_logs = config['configurations']['accumulo-log4j']['info_num_logs']
# metrics2 properties
ganglia_server_hosts = default('/clusterHostInfo/ganglia_server_host', []) # is not passed when ganglia is not present
ganglia_server_host = '' if len(ganglia_server_hosts) == 0 else ganglia_server_hosts[0]
-ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
+
+set_instanceId = "false"
+cluster_name = config["clusterName"]
+
+if 'cluster-env' in config['configurations'] and \
+ 'metrics_collector_external_hosts' in config['configurations']['cluster-env']:
+ ams_collector_hosts = config['configurations']['cluster-env']['metrics_collector_external_hosts']
+ set_instanceId = "true"
+else:
+ ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
has_metric_collector = not len(ams_collector_hosts) == 0
if has_metric_collector:
if 'cluster-env' in config['configurations'] and \
- 'metrics_collector_vip_port' in config['configurations']['cluster-env']:
- metric_collector_port = config['configurations']['cluster-env']['metrics_collector_vip_port']
+ 'metrics_collector_external_port' in config['configurations']['cluster-env']:
+ metric_collector_port = config['configurations']['cluster-env']['metrics_collector_external_port']
else:
metric_collector_web_address = default("/configurations/ams-site/timeline.metrics.service.webapp.address", "0.0.0.0:6188")
if metric_collector_web_address.find(':') != -1:
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/templates/hadoop-metrics2-accumulo.properties.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/templates/hadoop-metrics2-accumulo.properties.j2 b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/templates/hadoop-metrics2-accumulo.properties.j2
index f7926d0..6873c85 100644
--- a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/templates/hadoop-metrics2-accumulo.properties.j2
+++ b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/templates/hadoop-metrics2-accumulo.properties.j2
@@ -40,6 +40,8 @@ accumulo.sink.timeline.period={{metrics_collection_period}}
accumulo.sink.timeline.sendInterval={{metrics_report_interval}}000
accumulo.sink.timeline.collector.hosts={{ams_collector_hosts}}
accumulo.sink.timeline.port={{metric_collector_port}}
+accumulo.sink.timeline.instanceId={{cluster_name}}
+accumulo.sink.timeline.set.instanceId={{set_instanceId}}
# HTTPS properties
accumulo.sink.timeline.truststore.path = {{metric_truststore_path}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
index 919f26d..50dde1c 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
@@ -66,17 +66,22 @@ embedded_mode_multiple_instances = False
if not is_ams_distributed and len(ams_collector_list) > 1:
embedded_mode_multiple_instances = True
+set_instanceId = "false"
+cluster_name = config["clusterName"]
if 'cluster-env' in config['configurations'] and \
- 'metrics_collector_vip_host' in config['configurations']['cluster-env']:
- ams_collector_hosts = config['configurations']['cluster-env']['metrics_collector_vip_host']
+ 'metrics_collector_external_hosts' in config['configurations']['cluster-env']:
+ ams_collector_hosts = config['configurations']['cluster-env']['metrics_collector_external_hosts']
+ set_instanceId = "true"
+else:
+ ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
metric_collector_host = select_metric_collector_hosts_from_hostnames(ams_collector_hosts)
random_metric_collector_host = select_metric_collector_hosts_from_hostnames(ams_collector_hosts)
if 'cluster-env' in config['configurations'] and \
- 'metrics_collector_vip_port' in config['configurations']['cluster-env']:
- metric_collector_port = config['configurations']['cluster-env']['metrics_collector_vip_port']
+ 'metrics_collector_external_port' in config['configurations']['cluster-env']:
+ metric_collector_port = config['configurations']['cluster-env']['metrics_collector_external_port']
else:
metric_collector_web_address = default("/configurations/ams-site/timeline.metrics.service.webapp.address", "0.0.0.0:6188")
if metric_collector_web_address.find(':') != -1:
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/hadoop-metrics2-hbase.properties.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/hadoop-metrics2-hbase.properties.j2 b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/hadoop-metrics2-hbase.properties.j2
index 8c6f86f..9729bbe 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/hadoop-metrics2-hbase.properties.j2
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/hadoop-metrics2-hbase.properties.j2
@@ -65,6 +65,8 @@ hbase.sink.timeline.collector.hosts={{ams_collector_hosts}}
hbase.sink.timeline.port={{metric_collector_port}}
hbase.sink.timeline.protocol={{metric_collector_protocol}}
hbase.sink.timeline.serviceName-prefix=ams
+hbase.sink.timeline.instanceId={{cluster_name}}
+hbase.sink.timeline.set.instanceId={{set_instanceId}}
# HTTPS properties
hbase.sink.timeline.truststore.path = {{metric_truststore_path}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/metric_monitor.ini.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/metric_monitor.ini.j2 b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/metric_monitor.ini.j2
index 1505f9b..769ad67 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/metric_monitor.ini.j2
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/metric_monitor.ini.j2
@@ -25,6 +25,8 @@ enable_value_threshold = false
skip_disk_patterns = {{skip_disk_metrics_patterns}}
skip_virtual_interfaces = {{skip_virtual_interfaces}}
skip_network_interfaces_patterns = {{skip_network_interfaces_patterns}}
+instanceId={{cluster_name}}
+set.instanceId={{set_instanceId}}
[emitter]
send_interval = {{metrics_report_interval}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py
index b143941..86a290f 100644
--- a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py
@@ -90,18 +90,23 @@ hostname = None
if config.has_key('hostname'):
hostname = config['hostname']
-ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
+set_instanceId = "false"
+cluster_name = config["clusterName"]
+
+if 'cluster-env' in config['configurations'] and \
+ 'metrics_collector_external_hosts' in config['configurations']['cluster-env']:
+ ams_collector_hosts = config['configurations']['cluster-env']['metrics_collector_external_hosts']
+ set_instanceId = "true"
+else:
+ ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
+
has_metric_collector = not len(ams_collector_hosts) == 0
metric_collector_port = None
if has_metric_collector:
+ metric_collector_host = select_metric_collector_hosts_from_hostnames(ams_collector_hosts)
if 'cluster-env' in config['configurations'] and \
- 'metrics_collector_vip_host' in config['configurations']['cluster-env']:
- metric_collector_host = config['configurations']['cluster-env']['metrics_collector_vip_host']
- else:
- metric_collector_host = select_metric_collector_hosts_from_hostnames(ams_collector_hosts)
- if 'cluster-env' in config['configurations'] and \
- 'metrics_collector_vip_port' in config['configurations']['cluster-env']:
- metric_collector_port = config['configurations']['cluster-env']['metrics_collector_vip_port']
+ 'metrics_collector_external_port' in config['configurations']['cluster-env']:
+ metric_collector_port = config['configurations']['cluster-env']['metrics_collector_external_port']
else:
metric_collector_web_address = default("/configurations/ams-site/timeline.metrics.service.webapp.address", "0.0.0.0:6188")
if metric_collector_web_address.find(':') != -1:
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/templates/flume-metrics2.properties.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/templates/flume-metrics2.properties.j2 b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/templates/flume-metrics2.properties.j2
index cf2bd6c..b876a3d 100644
--- a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/templates/flume-metrics2.properties.j2
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/templates/flume-metrics2.properties.j2
@@ -24,6 +24,9 @@ collectionFrequency={{metrics_collection_period}}000
maxRowCacheSize=10000
sendInterval={{metrics_report_interval}}000
+instanceId={{cluster_name}}
+set.instanceId={{set_instanceId}}
+
# HTTPS properties
truststore.path = {{metric_truststore_path}}
truststore.type = {{metric_truststore_type}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
index 3177643..efea167 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
@@ -152,12 +152,20 @@ has_ganglia_server = not len(ganglia_server_hosts) == 0
if has_ganglia_server:
ganglia_server_host = ganglia_server_hosts[0]
-ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
+set_instanceId = "false"
+cluster_name = config["clusterName"]
+
+if 'cluster-env' in config['configurations'] and \
+ 'metrics_collector_external_hosts' in config['configurations']['cluster-env']:
+ ams_collector_hosts = config['configurations']['cluster-env']['metrics_collector_external_hosts']
+ set_instanceId = "true"
+else:
+ ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
has_metric_collector = not len(ams_collector_hosts) == 0
if has_metric_collector:
if 'cluster-env' in config['configurations'] and \
- 'metrics_collector_vip_port' in config['configurations']['cluster-env']:
- metric_collector_port = config['configurations']['cluster-env']['metrics_collector_vip_port']
+ 'metrics_collector_external_port' in config['configurations']['cluster-env']:
+ metric_collector_port = config['configurations']['cluster-env']['metrics_collector_external_port']
else:
metric_collector_web_address = default("/configurations/ams-site/timeline.metrics.service.webapp.address", "0.0.0.0:6188")
if metric_collector_web_address.find(':') != -1:
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-MASTER.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-MASTER.j2 b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-MASTER.j2
index e808f5d..24535c5 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-MASTER.j2
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-MASTER.j2
@@ -76,6 +76,8 @@ hbase.sink.timeline.sendInterval={{metrics_report_interval}}000
hbase.sink.timeline.collector.hosts={{ams_collector_hosts}}
hbase.sink.timeline.protocol={{metric_collector_protocol}}
hbase.sink.timeline.port={{metric_collector_port}}
+hbase.sink.timeline.instanceId={{cluster_name}}
+hbase.sink.timeline.set.instanceId={{set_instanceId}}
# HTTPS properties
hbase.sink.timeline.truststore.path = {{metric_truststore_path}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-RS.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-RS.j2 b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-RS.j2
index 7e1abbc..9076269 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-RS.j2
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-RS.j2
@@ -74,7 +74,8 @@ hbase.sink.timeline.sendInterval={{metrics_report_interval}}000
hbase.sink.timeline.collector.hosts={{ams_collector_hosts}}
hbase.sink.timeline.protocol={{metric_collector_protocol}}
hbase.sink.timeline.port={{metric_collector_port}}
-
+hbase.sink.timeline.instanceId={{cluster_name}}
+hbase.sink.timeline.set.instanceId={{set_instanceId}}
# HTTPS properties
hbase.sink.timeline.truststore.path = {{metric_truststore_path}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/configuration/hadoop-metrics2.properties.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/configuration/hadoop-metrics2.properties.xml b/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/configuration/hadoop-metrics2.properties.xml
index 4aadb83..fae61d3 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/configuration/hadoop-metrics2.properties.xml
+++ b/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/configuration/hadoop-metrics2.properties.xml
@@ -86,6 +86,8 @@ resourcemanager.sink.ganglia.tagsForPrefix.yarn=Queue
*.sink.timeline.zookeeper.quorum={{zookeeper_quorum}}
*.sink.timeline.protocol={{metric_collector_protocol}}
*.sink.timeline.port={{metric_collector_port}}
+*.sink.timeline.instanceId={{cluster_name}}
+*.sink.timeline.set.instanceId={{set_instanceId}}
# HTTPS properties
*.sink.timeline.truststore.path = {{metric_truststore_path}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
index 7615ee7..0f03155 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
@@ -534,12 +534,21 @@ hive_site_config = dict(config['configurations']['hive-site'])
########################################################
############# AMS related params #####################
########################################################
-ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
+
+set_instanceId = "false"
+
+if 'cluster-env' in config['configurations'] and \
+ 'metrics_collector_external_hosts' in config['configurations']['cluster-env']:
+ ams_collector_hosts = config['configurations']['cluster-env']['metrics_collector_external_hosts']
+ set_instanceId = "true"
+else:
+ ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
+
has_metric_collector = not len(ams_collector_hosts) == 0
if has_metric_collector:
if 'cluster-env' in config['configurations'] and \
- 'metrics_collector_vip_port' in config['configurations']['cluster-env']:
- metric_collector_port = config['configurations']['cluster-env']['metrics_collector_vip_port']
+ 'metrics_collector_external_port' in config['configurations']['cluster-env']:
+ metric_collector_port = config['configurations']['cluster-env']['metrics_collector_external_port']
else:
metric_collector_web_address = default("/configurations/ams-site/timeline.metrics.service.webapp.address", "0.0.0.0:6188")
if metric_collector_web_address.find(':') != -1:
@@ -830,4 +839,4 @@ if enable_ranger_hive:
ranger_hive_metastore_lookup = default('/configurations/ranger-hive-plugin-properties/ranger.service.config.param.enable.hive.metastore.lookup', False)
if security_enabled:
- hive_metastore_principal_with_host = hive_metastore_principal.replace('_HOST', hostname.lower())
\ No newline at end of file
+ hive_metastore_principal_with_host = hive_metastore_principal.replace('_HOST', hostname.lower())
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-hivemetastore.properties.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-hivemetastore.properties.j2 b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-hivemetastore.properties.j2
index 82f71c5..9328f9f 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-hivemetastore.properties.j2
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-hivemetastore.properties.j2
@@ -42,6 +42,8 @@
*.sink.timeline.period={{metrics_collection_period}}
*.sink.timeline.sendInterval={{metrics_report_interval}}000
*.sink.timeline.slave.host.name = {{hostname}}
+ *.sink.timeline.instanceId={{cluster_name}}
+ *.sink.timeline.set.instanceId={{set_instanceId}}
# HTTPS properties
*.sink.timeline.truststore.path = {{metric_truststore_path}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-hiveserver2.properties.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-hiveserver2.properties.j2 b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-hiveserver2.properties.j2
index f1bfa03..9a7f9dc 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-hiveserver2.properties.j2
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-hiveserver2.properties.j2
@@ -42,6 +42,8 @@
*.sink.timeline.period={{metrics_collection_period}}
*.sink.timeline.sendInterval={{metrics_report_interval}}000
*.sink.timeline.slave.host.name = {{hostname}}
+ *.sink.timeline.instanceId={{cluster_name}}
+ *.sink.timeline.set.instanceId={{set_instanceId}}
# HTTPS properties
*.sink.timeline.truststore.path = {{metric_truststore_path}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-llapdaemon.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-llapdaemon.j2 b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-llapdaemon.j2
index d63dfb7..e9fe024 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-llapdaemon.j2
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-llapdaemon.j2
@@ -41,6 +41,8 @@
*.sink.timeline.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink
*.sink.timeline.period={{metrics_collection_period}}
*.sink.timeline.sendInterval={{metrics_report_interval}}000
+ *.sink.timeline.instanceId={{cluster_name}}
+ *.sink.timeline.set.instanceId={{set_instanceId}}
# HTTPS properties
*.sink.timeline.truststore.path = {{metric_truststore_path}}
@@ -51,4 +53,4 @@
llapdaemon.sink.timeline.port={{metric_collector_port}}
llapdaemon.sink.timeline.protocol={{metric_collector_protocol}}
-{% endif %}
\ No newline at end of file
+{% endif %}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-llaptaskscheduler.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-llaptaskscheduler.j2 b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-llaptaskscheduler.j2
index 4c9c981..bd7eb0c 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-llaptaskscheduler.j2
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/templates/hadoop-metrics2-llaptaskscheduler.j2
@@ -41,6 +41,8 @@
*.sink.timeline.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink
*.sink.timeline.period={{metrics_collection_period}}
*.sink.timeline.sendInterval={{metrics_report_interval}}000
+ *.sink.timeline.instanceId={{cluster_name}}
+ *.sink.timeline.set.instanceId={{set_instanceId}}
# HTTPS properties
*.sink.timeline.truststore.path = {{metric_truststore_path}}
@@ -51,4 +53,4 @@
llaptaskscheduler.sink.timeline.port={{metric_collector_port}}
llaptaskscheduler.sink.timeline.protocol={{metric_collector_protocol}}
-{% endif %}
\ No newline at end of file
+{% endif %}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/params_linux.py
index 7615ee7..69ef08e 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/params_linux.py
@@ -534,12 +534,20 @@ hive_site_config = dict(config['configurations']['hive-site'])
########################################################
############# AMS related params #####################
########################################################
-ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
+set_instanceId = "false"
+
+if 'cluster-env' in config['configurations'] and \
+ 'metrics_collector_external_hosts' in config['configurations']['cluster-env']:
+ ams_collector_hosts = config['configurations']['cluster-env']['metrics_collector_external_hosts']
+ set_instanceId = "true"
+else:
+ ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
+
has_metric_collector = not len(ams_collector_hosts) == 0
if has_metric_collector:
if 'cluster-env' in config['configurations'] and \
- 'metrics_collector_vip_port' in config['configurations']['cluster-env']:
- metric_collector_port = config['configurations']['cluster-env']['metrics_collector_vip_port']
+ 'metrics_collector_external_port' in config['configurations']['cluster-env']:
+ metric_collector_port = config['configurations']['cluster-env']['metrics_collector_external_port']
else:
metric_collector_web_address = default("/configurations/ams-site/timeline.metrics.service.webapp.address", "0.0.0.0:6188")
if metric_collector_web_address.find(':') != -1:
@@ -830,4 +838,4 @@ if enable_ranger_hive:
ranger_hive_metastore_lookup = default('/configurations/ranger-hive-plugin-properties/ranger.service.config.param.enable.hive.metastore.lookup', False)
if security_enabled:
- hive_metastore_principal_with_host = hive_metastore_principal.replace('_HOST', hostname.lower())
\ No newline at end of file
+ hive_metastore_principal_with_host = hive_metastore_principal.replace('_HOST', hostname.lower())
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-hivemetastore.properties.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-hivemetastore.properties.j2 b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-hivemetastore.properties.j2
index 82f71c5..9328f9f 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-hivemetastore.properties.j2
+++ b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-hivemetastore.properties.j2
@@ -42,6 +42,8 @@
*.sink.timeline.period={{metrics_collection_period}}
*.sink.timeline.sendInterval={{metrics_report_interval}}000
*.sink.timeline.slave.host.name = {{hostname}}
+ *.sink.timeline.instanceId={{cluster_name}}
+ *.sink.timeline.set.instanceId={{set_instanceId}}
# HTTPS properties
*.sink.timeline.truststore.path = {{metric_truststore_path}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-hiveserver2.properties.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-hiveserver2.properties.j2 b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-hiveserver2.properties.j2
index f1bfa03..9a7f9dc 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-hiveserver2.properties.j2
+++ b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-hiveserver2.properties.j2
@@ -42,6 +42,8 @@
*.sink.timeline.period={{metrics_collection_period}}
*.sink.timeline.sendInterval={{metrics_report_interval}}000
*.sink.timeline.slave.host.name = {{hostname}}
+ *.sink.timeline.instanceId={{cluster_name}}
+ *.sink.timeline.set.instanceId={{set_instanceId}}
# HTTPS properties
*.sink.timeline.truststore.path = {{metric_truststore_path}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-llapdaemon.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-llapdaemon.j2 b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-llapdaemon.j2
index d63dfb7..e9fe024 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-llapdaemon.j2
+++ b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-llapdaemon.j2
@@ -41,6 +41,8 @@
*.sink.timeline.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink
*.sink.timeline.period={{metrics_collection_period}}
*.sink.timeline.sendInterval={{metrics_report_interval}}000
+ *.sink.timeline.instanceId={{cluster_name}}
+ *.sink.timeline.set.instanceId={{set_instanceId}}
# HTTPS properties
*.sink.timeline.truststore.path = {{metric_truststore_path}}
@@ -51,4 +53,4 @@
llapdaemon.sink.timeline.port={{metric_collector_port}}
llapdaemon.sink.timeline.protocol={{metric_collector_protocol}}
-{% endif %}
\ No newline at end of file
+{% endif %}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-llaptaskscheduler.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-llaptaskscheduler.j2 b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-llaptaskscheduler.j2
index 4c9c981..bd7eb0c 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-llaptaskscheduler.j2
+++ b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/templates/hadoop-metrics2-llaptaskscheduler.j2
@@ -41,6 +41,8 @@
*.sink.timeline.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink
*.sink.timeline.period={{metrics_collection_period}}
*.sink.timeline.sendInterval={{metrics_report_interval}}000
+ *.sink.timeline.instanceId={{cluster_name}}
+ *.sink.timeline.set.instanceId={{set_instanceId}}
# HTTPS properties
*.sink.timeline.truststore.path = {{metric_truststore_path}}
@@ -51,4 +53,4 @@
llaptaskscheduler.sink.timeline.port={{metric_collector_port}}
llaptaskscheduler.sink.timeline.protocol={{metric_collector_protocol}}
-{% endif %}
\ No newline at end of file
+{% endif %}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/configuration/kafka-broker.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/configuration/kafka-broker.xml b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/configuration/kafka-broker.xml
index f2b4a76..e01dacd 100644
--- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/configuration/kafka-broker.xml
+++ b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/configuration/kafka-broker.xml
@@ -407,6 +407,16 @@
<on-ambari-upgrade add="true"/>
</property>
<property>
+ <name>kafka.timeline.metrics.instanceId</name>
+ <value>{{cluster_name}}</value>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>kafka.timeline.metrics.set.instanceId</name>
+ <value>{{set_instanceId}}</value>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
<name>kafka.timeline.metrics.maxRowCacheSize</name>
<value>10000</value>
<description>Timeline metrics reporter send interval</description>
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py
index 32f18f2..5b0be54 100644
--- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py
@@ -130,13 +130,22 @@ metric_truststore_path= default("/configurations/ams-ssl-client/ssl.client.trust
metric_truststore_type= default("/configurations/ams-ssl-client/ssl.client.truststore.type", "")
metric_truststore_password= default("/configurations/ams-ssl-client/ssl.client.truststore.password", "")
-ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
+set_instanceId = "false"
+cluster_name = config["clusterName"]
+
+if 'cluster-env' in config['configurations'] and \
+ 'metrics_collector_external_hosts' in config['configurations']['cluster-env']:
+ ams_collector_hosts = config['configurations']['cluster-env']['metrics_collector_external_hosts']
+ set_instanceId = "true"
+else:
+ ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
+
has_metric_collector = not len(ams_collector_hosts) == 0
if has_metric_collector:
if 'cluster-env' in config['configurations'] and \
- 'metrics_collector_vip_port' in config['configurations']['cluster-env']:
- metric_collector_port = config['configurations']['cluster-env']['metrics_collector_vip_port']
+ 'metrics_collector_external_port' in config['configurations']['cluster-env']:
+ metric_collector_port = config['configurations']['cluster-env']['metrics_collector_external_port']
else:
metric_collector_web_address = default("/configurations/ams-site/timeline.metrics.service.webapp.address", "0.0.0.0:6188")
if metric_collector_web_address.find(':') != -1:
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py
index 44b256e..d9fae76 100644
--- a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py
@@ -174,13 +174,19 @@ if stack_supports_storm_kerberos:
else:
storm_thrift_transport = config['configurations']['storm-site']['_storm.thrift.nonsecure.transport']
-ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
+set_instanceId = "false"
+if 'cluster-env' in config['configurations'] and \
+ 'metrics_collector_external_hosts' in config['configurations']['cluster-env']:
+ ams_collector_hosts = config['configurations']['cluster-env']['metrics_collector_external_hosts']
+ set_instanceId = "true"
+else:
+ ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
has_metric_collector = not len(ams_collector_hosts) == 0
metric_collector_port = None
if has_metric_collector:
if 'cluster-env' in config['configurations'] and \
- 'metrics_collector_vip_port' in config['configurations']['cluster-env']:
- metric_collector_port = config['configurations']['cluster-env']['metrics_collector_vip_port']
+ 'metrics_collector_external_port' in config['configurations']['cluster-env']:
+ metric_collector_port = config['configurations']['cluster-env']['metrics_collector_external_port']
else:
metric_collector_web_address = default("/configurations/ams-site/timeline.metrics.service.webapp.address", "0.0.0.0:6188")
if metric_collector_web_address.find(':') != -1:
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/templates/config.yaml.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/templates/config.yaml.j2 b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/templates/config.yaml.j2
index f2a75cf..51162e8 100644
--- a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/templates/config.yaml.j2
+++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/templates/config.yaml.j2
@@ -67,4 +67,7 @@ metrics_collector:
truststore.type : "{{metric_truststore_type}}"
truststore.password : "{{metric_truststore_password}}"
+ instanceId={{cluster_name}}
+ set.instanceId={{set_instanceId}}
+
{% endif %}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/templates/storm-metrics2.properties.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/templates/storm-metrics2.properties.j2 b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/templates/storm-metrics2.properties.j2
index 001ff73..0501039 100644
--- a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/templates/storm-metrics2.properties.j2
+++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/templates/storm-metrics2.properties.j2
@@ -23,6 +23,8 @@ zookeeper.quorum={{zookeeper_quorum}}
maxRowCacheSize=10000
sendInterval={{metrics_report_interval}}000
clusterReporterAppId=nimbus
+instanceId={{cluster_name}}
+set.instanceId={{set_instanceId}}
# HTTPS properties
truststore.path = {{metric_truststore_path}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
index 70ebfeb..7282bb5 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
@@ -111,7 +111,14 @@ jtnode_host = default("/clusterHostInfo/jtnode_host", [])
namenode_host = default("/clusterHostInfo/namenode_host", [])
zk_hosts = default("/clusterHostInfo/zookeeper_hosts", [])
ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_host", [])
-ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
+cluster_name = config["clusterName"]
+set_instanceId = "false"
+if 'cluster-env' in config['configurations'] and \
+ 'metrics_collector_external_hosts' in config['configurations']['cluster-env']:
+ ams_collector_hosts = config['configurations']['cluster-env']['metrics_collector_external_hosts']
+ set_instanceId = "true"
+else:
+ ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
has_namenode = not len(namenode_host) == 0
has_resourcemanager = not len(rm_host) == 0
@@ -137,8 +144,8 @@ if has_ganglia_server:
metric_collector_port = None
if has_metric_collector:
if 'cluster-env' in config['configurations'] and \
- 'metrics_collector_vip_port' in config['configurations']['cluster-env']:
- metric_collector_port = config['configurations']['cluster-env']['metrics_collector_vip_port']
+ 'metrics_collector_external_port' in config['configurations']['cluster-env']:
+ metric_collector_port = config['configurations']['cluster-env']['metrics_collector_external_port']
else:
metric_collector_web_address = default("/configurations/ams-site/timeline.metrics.service.webapp.address", "0.0.0.0:6188")
if metric_collector_web_address.find(':') != -1:
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/templates/hadoop-metrics2.properties.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/templates/hadoop-metrics2.properties.j2 b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/templates/hadoop-metrics2.properties.j2
index 2f3aab6..1b02a97 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/templates/hadoop-metrics2.properties.j2
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/templates/hadoop-metrics2.properties.j2
@@ -75,6 +75,8 @@ resourcemanager.sink.ganglia.tagsForPrefix.yarn=Queue
*.sink.timeline.zookeeper.quorum={{zookeeper_quorum}}
*.sink.timeline.protocol={{metric_collector_protocol}}
*.sink.timeline.port={{metric_collector_port}}
+*.sink.timeline.instanceId={{cluster_name}}
+*.sink.timeline.set.instanceId={{set_instanceId}}
# HTTPS properties
*.sink.timeline.truststore.path = {{metric_truststore_path}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/stacks/HDP/2.6/services/HDFS/configuration/hadoop-metrics2.properties.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/HDFS/configuration/hadoop-metrics2.properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/HDFS/configuration/hadoop-metrics2.properties.xml
index 4aadb83..fae61d3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/HDFS/configuration/hadoop-metrics2.properties.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/HDFS/configuration/hadoop-metrics2.properties.xml
@@ -86,6 +86,8 @@ resourcemanager.sink.ganglia.tagsForPrefix.yarn=Queue
*.sink.timeline.zookeeper.quorum={{zookeeper_quorum}}
*.sink.timeline.protocol={{metric_collector_protocol}}
*.sink.timeline.port={{metric_collector_port}}
+*.sink.timeline.instanceId={{cluster_name}}
+*.sink.timeline.set.instanceId={{set_instanceId}}
# HTTPS properties
*.sink.timeline.truststore.path = {{metric_truststore_path}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-START/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-START/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-START/scripts/params.py
index 5a5361c..678bbde 100644
--- a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-START/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-START/scripts/params.py
@@ -105,7 +105,15 @@ jtnode_host = default("/clusterHostInfo/jtnode_host", [])
namenode_host = default("/clusterHostInfo/namenode_host", [])
zk_hosts = default("/clusterHostInfo/zookeeper_hosts", [])
ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_host", [])
-ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
+
+cluster_name = config["clusterName"]
+set_instanceId = "false"
+if 'cluster-env' in config['configurations'] and \
+ 'metrics_collector_external_hosts' in config['configurations']['cluster-env']:
+ ams_collector_hosts = config['configurations']['cluster-env']['metrics_collector_external_hosts']
+ set_instanceId = "true"
+else:
+ ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
has_namenode = not len(namenode_host) == 0
has_resourcemanager = not len(rm_host) == 0
@@ -131,8 +139,8 @@ if has_ganglia_server:
metric_collector_port = None
if has_metric_collector:
if 'cluster-env' in config['configurations'] and \
- 'metrics_collector_vip_port' in config['configurations']['cluster-env']:
- metric_collector_port = config['configurations']['cluster-env']['metrics_collector_vip_port']
+ 'metrics_collector_external_port' in config['configurations']['cluster-env']:
+ metric_collector_port = config['configurations']['cluster-env']['metrics_collector_external_port']
else:
metric_collector_web_address = default("/configurations/ams-site/timeline.metrics.service.webapp.address", "0.0.0.0:6188")
if metric_collector_web_address.find(':') != -1:
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-START/templates/hadoop-metrics2.properties.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-START/templates/hadoop-metrics2.properties.j2 b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-START/templates/hadoop-metrics2.properties.j2
index 2f3aab6..1b02a97 100644
--- a/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-START/templates/hadoop-metrics2.properties.j2
+++ b/ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-START/templates/hadoop-metrics2.properties.j2
@@ -75,6 +75,8 @@ resourcemanager.sink.ganglia.tagsForPrefix.yarn=Queue
*.sink.timeline.zookeeper.quorum={{zookeeper_quorum}}
*.sink.timeline.protocol={{metric_collector_protocol}}
*.sink.timeline.port={{metric_collector_port}}
+*.sink.timeline.instanceId={{cluster_name}}
+*.sink.timeline.set.instanceId={{set_instanceId}}
# HTTPS properties
*.sink.timeline.truststore.path = {{metric_truststore_path}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/362d6eca/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
index 94425e0..d267bc1 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
@@ -627,8 +627,8 @@
"user_group": "hadoop",
"repo_suse_rhel_template": "[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0",
"repo_ubuntu_template": "{{package_type}} {{base_url}} {{components}}",
- "metrics_collector_vip_host": "c6402.ambari.apache.org",
- "metrics_collector_vip_port": "6189",
+ "metrics_collector_external_hosts": "c6402.ambari.apache.org",
+ "metrics_collector_external_port": "6189",
"override_uid" : "true",
"fetch_nonlocal_groups": "true",
"manage_dirs_on_root": "true",
[07/14] ambari git commit: AMBARI-20843. Client configs downloaded
via Ambari are empty with non-root ambari-server (aonishuk)
Posted by jo...@apache.org.
AMBARI-20843. Client configs downloaded via Ambari are empty with non-root ambari-server (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/101942df
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/101942df
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/101942df
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 101942df479c7e572eb3c5c984eef0903b44d05c
Parents: f4877c8
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Tue Apr 25 14:22:07 2017 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Thu Apr 27 15:11:59 2017 +0300
----------------------------------------------------------------------
.../libraries/script/script.py | 6 +--
.../internal/ClientConfigResourceProvider.java | 41 ++++++++++----------
.../stacks/2.0.6/HDFS/test_hdfs_client.py | 10 ++---
3 files changed, 28 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/101942df/ambari-common/src/main/python/resource_management/libraries/script/script.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py b/ambari-common/src/main/python/resource_management/libraries/script/script.py
index a08feab..da47351 100644
--- a/ambari-common/src/main/python/resource_management/libraries/script/script.py
+++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py
@@ -911,19 +911,19 @@ class Script(object):
for filename, dict in file_dict.iteritems():
XmlConfig(filename,
conf_dir=conf_tmp_dir,
- mode=0600,
+ mode=0644,
**self.generate_configs_get_xml_file_content(filename, dict)
)
for file_dict in env_configs_list:
for filename,dicts in file_dict.iteritems():
File(os.path.join(conf_tmp_dir, filename),
- mode=0600,
+ mode=0644,
content=InlineTemplate(self.generate_configs_get_template_file_content(filename, dicts)))
for file_dict in properties_configs_list:
for filename, dict in file_dict.iteritems():
PropertiesFile(os.path.join(conf_tmp_dir, filename),
- mode=0600,
+ mode=0644,
properties=self.generate_configs_get_xml_file_dict(filename, dict)
)
with closing(tarfile.open(output_filename, "w:gz")) as tar:
http://git-wip-us.apache.org/repos/asf/ambari/blob/101942df/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
index e42bd45..4ad01a5 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
@@ -585,28 +585,27 @@ public class ClientConfigResourceProvider extends AbstractControllerResourceProv
throws SystemException {
processExecutor.shutdown();
try {
- if (!processExecutor.awaitTermination(timeout, TimeUnit.MILLISECONDS)) {
- processExecutor.shutdownNow();
- for (CommandLineThreadWrapper commandLineThreadWrapper: pythonCmdThreads) {
- CommandLineThread commandLineThread = commandLineThreadWrapper.getCommandLineThread();
- try {
- Integer returnCode = commandLineThread.getReturnCode();
- if (returnCode == null) {
- throw new TimeoutException();
- } else if (returnCode != 0) {
- throw new ExecutionException(String.format("Execution of \"%s\" returned %d.", commandLineThreadWrapper.getCommandLine(), returnCode),
- new Throwable(commandLineThreadWrapper.getLogStream().getOutput()));
- }
- } catch (TimeoutException e) {
- LOG.error("Generate client configs script was killed due to timeout ", e);
- throw new SystemException("Generate client configs script was killed due to timeout ", e);
- } catch (ExecutionException e) {
- LOG.error(e.getMessage(), e);
- throw new SystemException(e.getMessage() + " " + e.getCause());
- } finally {
- commandLineThreadWrapper.getProcess().destroy();
+ processExecutor.awaitTermination(timeout, TimeUnit.MILLISECONDS);
+ processExecutor.shutdownNow();
+ for (CommandLineThreadWrapper commandLineThreadWrapper: pythonCmdThreads) {
+ CommandLineThread commandLineThread = commandLineThreadWrapper.getCommandLineThread();
+ try {
+ Integer returnCode = commandLineThread.getReturnCode();
+ if (returnCode == null) {
+ throw new TimeoutException();
+ } else if (returnCode != 0) {
+ throw new ExecutionException(String.format("Execution of \"%s\" returned %d.", commandLineThreadWrapper.getCommandLine(), returnCode),
+ new Throwable(commandLineThreadWrapper.getLogStream().getOutput()));
}
- }
+ } catch (TimeoutException e) {
+ LOG.error("Generate client configs script was killed due to timeout ", e);
+ throw new SystemException("Generate client configs script was killed due to timeout ", e);
+ } catch (ExecutionException e) {
+ LOG.error(e.getMessage(), e);
+ throw new SystemException(e.getMessage() + " " + e.getCause());
+ } finally {
+ commandLineThreadWrapper.getProcess().destroy();
+ }
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
http://git-wip-us.apache.org/repos/asf/ambari/blob/101942df/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py
index fc80849..bcd9c80 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py
@@ -50,25 +50,25 @@ class Test(RMFTestCase):
)
self.assertResourceCalled('XmlConfig', 'hdfs-site.xml',
conf_dir = '/tmp/123',
- mode=0600,
+ mode=0644,
configuration_attributes = self.getConfig()['configuration_attributes']['hdfs-site'],
configurations = self.getConfig()['configurations']['hdfs-site'],
)
self.assertResourceCalled('File', '/tmp/123/hadoop-env.sh',
- mode=0600,
+ mode=0644,
content = InlineTemplate(self.getConfig()['configurations']['hadoop-env']['content']),
)
self.assertResourceCalled('File', '/tmp/123/log4j.properties',
- mode=0600,
+ mode=0644,
content = InlineTemplate(self.getConfig()['configurations']['hdfs-log4j']['content']+
self.getConfig()['configurations']['yarn-log4j']['content']),
)
self.assertResourceCalled('PropertiesFile', '/tmp/123/runtime.properties',
- mode=0600,
+ mode=0644,
properties = UnknownConfigurationMock(),
)
self.assertResourceCalled('PropertiesFile', '/tmp/123/startup.properties',
- mode=0600,
+ mode=0644,
properties = UnknownConfigurationMock(),
)
self.assertResourceCalled('Directory', '/tmp/123',
[10/14] ambari git commit: AMBARI-20856 Changing Solr port in Ambari
Infra fails (mgergely)
Posted by jo...@apache.org.
AMBARI-20856 Changing Solr port in Ambari Infra fails (mgergely)
Change-Id: I76769b4465be8fdf3575b0eaca4555cab6929d78
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/30eb73a7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/30eb73a7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/30eb73a7
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 30eb73a7627512f421d7e17e16846abee5033e84
Parents: dd57239
Author: Miklos Gergely <mg...@hortonworks.com>
Authored: Thu Apr 27 17:00:25 2017 +0200
Committer: Miklos Gergely <mg...@hortonworks.com>
Committed: Thu Apr 27 17:00:25 2017 +0200
----------------------------------------------------------------------
.../AMBARI_INFRA/0.1.0/package/scripts/infra_solr.py | 6 +++---
.../AMBARI_INFRA/0.1.0/package/scripts/params.py | 1 +
.../AMBARI_INFRA/0.1.0/package/scripts/status_params.py | 6 ++++++
.../src/test/python/stacks/2.4/AMBARI_INFRA/test_infra_solr.py | 3 +++
4 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/30eb73a7/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/infra_solr.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/infra_solr.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/infra_solr.py
index 4a8b9c0..247d82a 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/infra_solr.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/infra_solr.py
@@ -59,15 +59,15 @@ class InfraSolr(Script):
Execute(format('{solr_bindir}/solr stop -all >> {infra_solr_log}'),
environment={'SOLR_INCLUDE': format('{infra_solr_conf}/infra-solr-env.sh')},
user=params.infra_solr_user,
- only_if=format("test -f {infra_solr_pidfile}")
+ only_if=format("test -f {prev_infra_solr_pidfile}")
)
- File(params.infra_solr_pidfile,
+ File(params.prev_infra_solr_pidfile,
action="delete"
)
except:
Logger.warning("Could not stop solr:" + str(sys.exc_info()[1]) + "\n Trying to kill it")
- self.kill_process(params.infra_solr_pidfile, params.infra_solr_user, params.infra_solr_log_dir)
+ self.kill_process(params.prev_infra_solr_pidfile, params.infra_solr_user, params.infra_solr_log_dir)
def status(self, env):
import status_params
http://git-wip-us.apache.org/repos/asf/ambari/blob/30eb73a7/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/params.py
index acf420e..6eb3ba8 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/params.py
@@ -54,6 +54,7 @@ infra_solr_conf = "/etc/ambari-infra-solr/conf"
infra_solr_port = status_params.infra_solr_port
infra_solr_piddir = status_params.infra_solr_piddir
infra_solr_pidfile = status_params.infra_solr_pidfile
+prev_infra_solr_pidfile = status_params.prev_infra_solr_pidfile
user_group = config['configurations']['cluster-env']['user_group']
fetch_nonlocal_groups = config['configurations']['cluster-env']["fetch_nonlocal_groups"]
http://git-wip-us.apache.org/repos/asf/ambari/blob/30eb73a7/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/status_params.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/status_params.py
index f51a321..f91a114 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/status_params.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/status_params.py
@@ -23,6 +23,7 @@ from resource_management.libraries.functions import get_kinit_path
from resource_management.libraries.functions.default import default
from resource_management.libraries.functions.format import format
from resource_management.libraries.script.script import Script
+from os import listdir, path
config = Script.get_config()
@@ -30,5 +31,10 @@ infra_solr_port = default('configurations/infra-solr-env/infra_solr_port', '8886
infra_solr_piddir = default('configurations/infra-solr-env/infra_solr_pid_dir', '/var/run/ambari-infra-solr')
infra_solr_pidfile = format("{infra_solr_piddir}/solr-{infra_solr_port}.pid")
+prev_infra_solr_pidfile = ''
+if path.isdir(infra_solr_piddir):
+ for file in listdir(infra_solr_piddir):
+ prev_infra_solr_pidfile = infra_solr_piddir + '/' + file
+
security_enabled = config['configurations']['cluster-env']['security_enabled']
kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
http://git-wip-us.apache.org/repos/asf/ambari/blob/30eb73a7/ambari-server/src/test/python/stacks/2.4/AMBARI_INFRA/test_infra_solr.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.4/AMBARI_INFRA/test_infra_solr.py b/ambari-server/src/test/python/stacks/2.4/AMBARI_INFRA/test_infra_solr.py
index 2de3fba..87304cd 100644
--- a/ambari-server/src/test/python/stacks/2.4/AMBARI_INFRA/test_infra_solr.py
+++ b/ambari-server/src/test/python/stacks/2.4/AMBARI_INFRA/test_infra_solr.py
@@ -21,7 +21,10 @@ limitations under the License.
from stacks.utils.RMFTestCase import RMFTestCase, Template, InlineTemplate, StaticFile
from resource_management.core.exceptions import ComponentIsNotRunning
from resource_management.libraries.script.config_dictionary import UnknownConfiguration
+from mock.mock import MagicMock, call, patch
+@patch("os.listdir", new = MagicMock(return_value=['solr-8886.pid']))
+@patch("os.path.isdir", new = MagicMock(return_value=True))
class TestInfraSolr(RMFTestCase):
COMMON_SERVICES_PACKAGE_DIR = "AMBARI_INFRA/0.1.0/package"
STACK_VERSION = "2.4"
[05/14] ambari git commit: AMBARI-20817. First node in the visual
explain chart is not clickable to view the json dump (pallavkul)
Posted by jo...@apache.org.
AMBARI-20817. First node in the visual explain chart is not clickable to view the json dump (pallavkul)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b11a1f0b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b11a1f0b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b11a1f0b
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: b11a1f0bae798462d7029e8d0c2662c7383da4ca
Parents: 4712bf5
Author: pallavkul <pa...@gmail.com>
Authored: Thu Apr 27 12:01:29 2017 +0530
Committer: pallavkul <pa...@gmail.com>
Committed: Thu Apr 27 12:01:29 2017 +0530
----------------------------------------------------------------------
.../src/main/resources/ui/app/utils/hive-explainer/renderer.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/b11a1f0b/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js b/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js
index 987cda9..4d9eff4 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js
@@ -138,7 +138,8 @@ function recurseC(children, onRequestDetail, isSingleReducer) {
.attr('height', d => d._operator === 'Fetch Operator' ? 150 : 55)
.attr('width', 140)
.append('xhtml:body')
- .style('margin', 0)
+ .style('height', d => d._operator === 'Fetch Operator' ? '150px' : 'auto')
+ .style('margin', 0 )
.html(d => getRenderer(d._operator, isSingleReducer)(d))
.on('click', d => {
const vertex = d3.select(Ember.$(d3.select(this).node()).closest('.vertex').get(0)).data()[0];
[09/14] ambari git commit: AMBARI-20849 Set the default value for
sun.security.krb5.debug to false
Posted by jo...@apache.org.
AMBARI-20849 Set the default value for sun.security.krb5.debug to false
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dd572397
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dd572397
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dd572397
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: dd572397c1cb87bb03816bb654ff8b8cc48a9cef
Parents: e2f7301
Author: lpuskas <lp...@apache.org>
Authored: Wed Apr 26 14:27:56 2017 +0200
Committer: lpuskas <lp...@apache.org>
Committed: Thu Apr 27 15:34:24 2017 +0200
----------------------------------------------------------------------
.../common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/dd572397/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
index ad599e0..51036a0 100644
--- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
+++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
@@ -58,7 +58,7 @@ limitations under the License.
</property>
<property>
<name>sun.security.krb5.debug</name>
- <value>true</value>
+ <value>false</value>
<description>Boolean flag indicating whether to enable debug messages for krb5 authentication</description>
<on-ambari-upgrade add="true"/>
</property>
[14/14] ambari git commit: Merge branch 'trunk' into
branch-feature-AMBARI-12556
Posted by jo...@apache.org.
Merge branch 'trunk' into branch-feature-AMBARI-12556
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/13d806b8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/13d806b8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/13d806b8
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 13d806b85d50f10f00140aea5c590f9b86832cfc
Parents: e3d5344 94795d9
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Thu Apr 27 15:15:35 2017 -0400
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Thu Apr 27 15:15:35 2017 -0400
----------------------------------------------------------------------
.../libraries/script/script.py | 6 +-
.../configurer/SolrCollectionConfigurer.java | 6 +-
.../ambari/logsearch/dao/AuditSolrDao.java | 2 +-
.../logsearch/dao/ServiceLogsSolrDao.java | 2 +-
.../ambari/logsearch/dao/UserConfigSolrDao.java | 2 +-
.../handler/AbstractSolrConfigHandler.java | 6 ++
.../handler/UploadConfigurationHandler.java | 60 +++++++++---
.../timeline/AbstractTimelineMetricsSink.java | 2 +
.../sink/flume/FlumeTimelineMetricsSink.java | 10 +-
.../timeline/HadoopTimelineMetricsSink.java | 9 +-
.../timeline/HadoopTimelineMetricsSinkTest.java | 14 ++-
.../main/python/core/application_metric_map.py | 7 +-
.../src/main/python/core/config_reader.py | 6 ++
.../src/main/python/core/emitter.py | 4 +-
.../kafka/KafkaTimelineMetricsReporter.java | 10 ++
.../kafka/KafkaTimelineMetricsReporterTest.java | 4 +
.../storm/StormTimelineMetricsReporter.java | 7 ++
.../sink/storm/StormTimelineMetricsSink.java | 7 ++
.../storm/StormTimelineMetricsReporter.java | 8 +-
.../sink/storm/StormTimelineMetricsSink.java | 8 +-
.../timeline/HBaseTimelineMetricStore.java | 48 +++++++++-
.../metrics/timeline/PhoenixHBaseAccessor.java | 4 +-
.../metrics/timeline/TimelineMetricStore.java | 2 +-
.../webapp/TimelineWebServices.java | 8 +-
.../timeline/TestTimelineMetricStore.java | 2 +-
.../ambari/server/bootstrap/BSRunner.java | 9 +-
.../internal/ClientConfigResourceProvider.java | 41 ++++-----
.../system/impl/AmbariMetricSinkImpl.java | 36 +++++---
.../1.6.1.2.2.0/package/scripts/params.py | 15 ++-
.../hadoop-metrics2-accumulo.properties.j2 | 2 +
.../0.1.0/package/scripts/infra_solr.py | 6 +-
.../0.1.0/package/scripts/params.py | 1 +
.../0.1.0/package/scripts/status_params.py | 6 ++
.../0.1.0/package/scripts/params.py | 13 ++-
.../hadoop-metrics2-hbase.properties.j2 | 2 +
.../package/templates/metric_monitor.ini.j2 | 2 +
.../FLUME/1.4.0.2.0/package/scripts/params.py | 21 +++--
.../templates/flume-metrics2.properties.j2 | 3 +
.../0.96.0.2.0/package/scripts/params_linux.py | 14 ++-
...-metrics2-hbase.properties-GANGLIA-MASTER.j2 | 2 +
...doop-metrics2-hbase.properties-GANGLIA-RS.j2 | 3 +-
.../hadoop-metrics2.properties.xml | 2 +
.../0.12.0.2.0/package/scripts/params_linux.py | 17 +++-
.../hadoop-metrics2-hivemetastore.properties.j2 | 2 +
.../hadoop-metrics2-hiveserver2.properties.j2 | 2 +
.../templates/hadoop-metrics2-llapdaemon.j2 | 4 +-
.../hadoop-metrics2-llaptaskscheduler.j2 | 4 +-
.../2.1.0.3.0/package/scripts/params_linux.py | 16 +++-
.../hadoop-metrics2-hivemetastore.properties.j2 | 2 +
.../hadoop-metrics2-hiveserver2.properties.j2 | 2 +
.../templates/hadoop-metrics2-llapdaemon.j2 | 4 +-
.../hadoop-metrics2-llaptaskscheduler.j2 | 4 +-
.../KAFKA/0.8.1/configuration/kafka-broker.xml | 10 ++
.../KAFKA/0.8.1/package/scripts/params.py | 15 ++-
.../0.5.0.2.2/configuration/gateway-site.xml | 2 +-
.../STORM/0.9.1/package/scripts/params_linux.py | 12 ++-
.../0.9.1/package/templates/config.yaml.j2 | 3 +
.../templates/storm-metrics2.properties.j2 | 2 +
.../2.0.6/hooks/before-START/scripts/params.py | 13 ++-
.../templates/hadoop-metrics2.properties.j2 | 2 +
.../hadoop-metrics2.properties.xml | 2 +
.../3.0/hooks/before-START/scripts/params.py | 14 ++-
.../templates/hadoop-metrics2.properties.j2 | 2 +
.../stacks/2.0.6/HDFS/test_hdfs_client.py | 10 +-
.../python/stacks/2.0.6/configs/default.json | 4 +-
.../stacks/2.4/AMBARI_INFRA/test_infra_solr.py | 3 +
.../common/host_progress_popup_body_view.js | 20 ++--
ambari-web/yarn.lock | 65 +++++--------
.../resources/ui/app/components/udf-item.js | 1 +
.../src/main/resources/ui/app/styles/app.scss | 23 ++++-
.../app/templates/components/jobs-browser.hbs | 6 +-
.../components/notification-message.hbs | 2 +-
.../templates/components/table-rename-form.hbs | 2 +-
.../templates/components/table-statistics.hbs | 12 +--
.../ui/app/templates/components/udf-edit.hbs | 66 ++++++++-----
.../ui/app/templates/components/udf-item.hbs | 10 +-
.../ui/app/templates/components/udf-new.hbs | 97 ++++++++++++--------
.../resources/ui/app/templates/databases.hbs | 2 +-
.../ui/app/templates/queries/query.hbs | 16 ++--
.../resources/ui/app/templates/savedqueries.hbs | 64 +++++++------
.../main/resources/ui/app/templates/udfs.hbs | 37 +++++---
.../ui/app/utils/hive-explainer/renderer.js | 3 +-
.../view/utils/hdfs/ConfigurationBuilder.java | 3 +-
.../ui/app/templates/components/job-row.hbs | 4 +-
.../app/templates/components/search-table.hbs | 2 +-
85 files changed, 691 insertions(+), 317 deletions(-)
----------------------------------------------------------------------
[03/14] ambari git commit: AMBARI-20836. Background operation filter:
User selected filter should be persisted. (Ishan Bhatt via Jaimin)
Posted by jo...@apache.org.
AMBARI-20836. Background operation filter: User selected filter should be persisted. (Ishan Bhatt via Jaimin)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1069844b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1069844b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1069844b
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 1069844bc9858155f2732cb14e2a38e3342dea01
Parents: 362d6ec
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Wed Apr 26 16:34:28 2017 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Wed Apr 26 16:34:28 2017 -0700
----------------------------------------------------------------------
.../common/host_progress_popup_body_view.js | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/1069844b/ambari-web/app/views/common/host_progress_popup_body_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/host_progress_popup_body_view.js b/ambari-web/app/views/common/host_progress_popup_body_view.js
index 5cce8e7..057f8bc 100644
--- a/ambari-web/app/views/common/host_progress_popup_body_view.js
+++ b/ambari-web/app/views/common/host_progress_popup_body_view.js
@@ -532,7 +532,7 @@ App.HostProgressPopupBodyView = App.TableView.extend({
* @param {string} levelName
* @method switchLevel
*/
- switchLevel: function (levelName) {
+ switchLevel: function (levelName, isBackToLevel = false) {
var dataSourceController = this.get('controller.dataSourceController');
var args = [].slice.call(arguments);
this.get('hostComponentLogs').clear();
@@ -543,7 +543,9 @@ App.HostProgressPopupBodyView = App.TableView.extend({
levelInfo.set('name', levelName);
if (levelName === 'HOSTS_LIST') {
this.set('isLevelLoaded', dataSourceController.requestMostRecent());
- this.set('hostCategory', this.get('categories').findProperty('value', 'all'));
+ if (!isBackToLevel) {
+ this.set('hostCategory', this.get('categories').findProperty('value', 'all'));
+ }
}
else {
if (levelName === 'TASK_DETAILS') {
@@ -552,12 +554,16 @@ App.HostProgressPopupBodyView = App.TableView.extend({
}
else {
if (levelName === 'REQUESTS_LIST') {
- this.set('serviceCategory', this.get('categories').findProperty('value', 'all'));
+ if (!isBackToLevel) {
+ this.set('serviceCategory', this.get('categories').findProperty('value', 'all'));
+ }
this.get('controller.hosts').clear();
dataSourceController.requestMostRecent();
}
else {
- this.set('taskCategory', this.get('categories').findProperty('value', 'all'));
+ if (!isBackToLevel) {
+ this.set('taskCategory', this.get('categories').findProperty('value', 'all'));
+ }
}
}
}
@@ -630,7 +636,7 @@ App.HostProgressPopupBodyView = App.TableView.extend({
this.set("openedTaskId", 0);
this.set("parentView.isLogWrapHidden", true);
this.set("parentView.isTaskListHidden", false);
- this.switchLevel("TASKS_LIST");
+ this.switchLevel("TASKS_LIST", true);
},
/**
@@ -643,7 +649,7 @@ App.HostProgressPopupBodyView = App.TableView.extend({
this.set("parentView.isTaskListHidden", true);
this.get("controller").set("popupHeaderName", this.get("controller.serviceName"));
this.get("controller").set("operationInfo", this.get('controller.servicesInfo').findProperty('name', this.get('controller.serviceName')));
- this.switchLevel("HOSTS_LIST");
+ this.switchLevel("HOSTS_LIST", true);
},
/**
@@ -659,7 +665,7 @@ App.HostProgressPopupBodyView = App.TableView.extend({
this.set("parentView.isLogWrapHidden", true);
this.set("hosts", null);
this.get("controller").setBackgroundOperationHeader(false);
- this.switchLevel("REQUESTS_LIST");
+ this.switchLevel("REQUESTS_LIST", true);
},
/**
[12/14] ambari git commit: AMBARI-20876. Host precheck running too
long. Intermittent. (mpapirkovskyy)
Posted by jo...@apache.org.
AMBARI-20876. Host precheck running too long. Intermittent. (mpapirkovskyy)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8ed8f41a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8ed8f41a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8ed8f41a
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 8ed8f41a04e203a2ced17b024ae74da61f173b39
Parents: 59f9ab2
Author: Myroslav Papirkovskyi <mp...@hortonworks.com>
Authored: Thu Apr 27 20:31:51 2017 +0300
Committer: Myroslav Papirkovskyi <mp...@hortonworks.com>
Committed: Thu Apr 27 20:46:36 2017 +0300
----------------------------------------------------------------------
.../java/org/apache/ambari/server/bootstrap/BSRunner.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/8ed8f41a/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java b/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java
index cfd55bb..733a07a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java
@@ -188,8 +188,7 @@ class BSRunner extends Thread {
// Startup a scheduled executor service to look through the logs
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
BSStatusCollector statusCollector = new BSStatusCollector();
- ScheduledFuture<?> handle = scheduler.scheduleWithFixedDelay(statusCollector,
- 0, 10, TimeUnit.SECONDS);
+ ScheduledFuture<?> handle = null;
LOG.info("Kicking off the scheduler for polling on logs in " +
this.requestIdDir);
String user = sshHostInfo.getUser();
@@ -208,6 +207,8 @@ class BSRunner extends Thread {
String scriptlog = "";
try {
createRunDir();
+ handle = scheduler.scheduleWithFixedDelay(statusCollector,
+ 0, 10, TimeUnit.SECONDS);
if (LOG.isDebugEnabled()) {
// FIXME needs to be removed later
// security hole
@@ -357,7 +358,9 @@ class BSRunner extends Thread {
} catch (InterruptedException e) {
throw new IOException(e);
} finally {
- handle.cancel(true);
+ if (handle != null) {
+ handle.cancel(true);
+ }
/* schedule a last update */
scheduler.schedule(new BSStatusCollector(), 0, TimeUnit.SECONDS);
scheduler.shutdownNow();
[11/14] ambari git commit: AMBARI-20354: Files View: In non-HA
environment,
Files view executes with error when List of NameNodes property is cleared
(sangeetar)
Posted by jo...@apache.org.
AMBARI-20354: Files View: In non-HA environment, Files view executes with error when List of NameNodes property is cleared (sangeetar)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/59f9ab21
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/59f9ab21
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/59f9ab21
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 59f9ab216591983cc4dc1054e5a073cb9ccf91c9
Parents: 30eb73a
Author: Sangeeta Ravindran <sa...@apache.org>
Authored: Thu Apr 27 10:18:38 2017 -0700
Committer: Sangeeta Ravindran <sa...@apache.org>
Committed: Thu Apr 27 10:18:38 2017 -0700
----------------------------------------------------------------------
.../org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/59f9ab21/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java
----------------------------------------------------------------------
diff --git a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java
index 714e229..df0fd96 100644
--- a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java
+++ b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java
@@ -280,7 +280,8 @@ public class ConfigurationBuilder {
String nameservice = uri.getHost();
String namenodeIDs = getProperty(HDFS_SITE, String.format(HA_NAMENODES_CLUSTER_PROPERTY, nameservice),
HA_NAMENODES_INSTANCE_PROPERTY);
- return namenodeIDs != null;
+ LOG.debug("namenodeIDs " + namenodeIDs);
+ return !StringUtils.isEmpty(namenodeIDs);
}
private static boolean hasPort(String url) throws URISyntaxException {
[06/14] ambari git commit: AMBARI-20858. Reupload missing config
files for Log Search collections (oleewere)
Posted by jo...@apache.org.
AMBARI-20858. Reupload missing config files for Log Search collections (oleewere)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f4877c8b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f4877c8b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f4877c8b
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: f4877c8be7dfc456c1126123dfe3a8e064670d65
Parents: b11a1f0
Author: oleewere <ol...@gmail.com>
Authored: Thu Apr 27 13:19:36 2017 +0200
Committer: oleewere <ol...@gmail.com>
Committed: Thu Apr 27 13:20:13 2017 +0200
----------------------------------------------------------------------
.../configurer/SolrCollectionConfigurer.java | 6 +-
.../ambari/logsearch/dao/AuditSolrDao.java | 2 +-
.../logsearch/dao/ServiceLogsSolrDao.java | 2 +-
.../ambari/logsearch/dao/UserConfigSolrDao.java | 2 +-
.../handler/AbstractSolrConfigHandler.java | 6 ++
.../handler/UploadConfigurationHandler.java | 60 +++++++++++++++-----
6 files changed, 59 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/f4877c8b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/configurer/SolrCollectionConfigurer.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/configurer/SolrCollectionConfigurer.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/configurer/SolrCollectionConfigurer.java
index 2f56812..f2d022e 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/configurer/SolrCollectionConfigurer.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/configurer/SolrCollectionConfigurer.java
@@ -54,9 +54,11 @@ public class SolrCollectionConfigurer implements Configurer {
private static final int CONNECTION_TIMEOUT = 30000;
private final SolrDaoBase solrDaoBase;
+ private final boolean hasEnumConfig; // enumConfig.xml for solr collection
- public SolrCollectionConfigurer(final SolrDaoBase solrDaoBase) {
+ public SolrCollectionConfigurer(final SolrDaoBase solrDaoBase, final boolean hasEnumConfig) {
this.solrDaoBase = solrDaoBase;
+ this.hasEnumConfig = hasEnumConfig;
}
@Override
@@ -100,7 +102,7 @@ public class SolrCollectionConfigurer implements Configurer {
}
private boolean uploadConfigurationsIfNeeded(CloudSolrClient cloudSolrClient, File configSetFolder, SolrCollectionState state, SolrPropsConfig solrPropsConfig) throws Exception {
- boolean reloadCollectionNeeded = new UploadConfigurationHandler(configSetFolder).handle(cloudSolrClient, solrPropsConfig);
+ boolean reloadCollectionNeeded = new UploadConfigurationHandler(configSetFolder, hasEnumConfig).handle(cloudSolrClient, solrPropsConfig);
if (!state.isConfigurationUploaded()) {
state.setConfigurationUploaded(true);
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/f4877c8b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/AuditSolrDao.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/AuditSolrDao.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/AuditSolrDao.java
index d058383..3eea08f 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/AuditSolrDao.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/AuditSolrDao.java
@@ -69,7 +69,7 @@ public class AuditSolrDao extends SolrDaoBase {
String rangerAuditCollection = solrAuditLogPropsConfig.getRangerCollection();
try {
- new SolrCollectionConfigurer(this).start();
+ new SolrCollectionConfigurer(this, true).start();
boolean createAlias = (aliasNameIn != null && StringUtils.isNotBlank(rangerAuditCollection));
if (createAlias) {
new SolrAuditAliasConfigurer(this).start();
http://git-wip-us.apache.org/repos/asf/ambari/blob/f4877c8b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/ServiceLogsSolrDao.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/ServiceLogsSolrDao.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/ServiceLogsSolrDao.java
index 37375dc..308ef1f 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/ServiceLogsSolrDao.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/ServiceLogsSolrDao.java
@@ -65,7 +65,7 @@ public class ServiceLogsSolrDao extends SolrDaoBase {
public void postConstructor() {
LOG.info("postConstructor() called.");
try {
- new SolrCollectionConfigurer(this).start();
+ new SolrCollectionConfigurer(this, true).start();
} catch (Exception e) {
LOG.error("error while connecting to Solr for service logs : solrUrl=" + solrServiceLogPropsConfig.getSolrUrl()
+ ", zkConnectString=" + solrServiceLogPropsConfig.getZkConnectString()
http://git-wip-us.apache.org/repos/asf/ambari/blob/f4877c8b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/UserConfigSolrDao.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/UserConfigSolrDao.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/UserConfigSolrDao.java
index 256ddae..8fb27a7 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/UserConfigSolrDao.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/UserConfigSolrDao.java
@@ -98,7 +98,7 @@ public class UserConfigSolrDao extends SolrDaoBase {
String collection = solrUserConfig.getCollection();
try {
- new SolrCollectionConfigurer(this).start();
+ new SolrCollectionConfigurer(this, false).start();
new LogfeederFilterConfigurer(this).start();
} catch (Exception e) {
LOG.error("error while connecting to Solr for history logs : solrUrl=" + solrUrl + ", zkConnectString=" + zkConnectString +
http://git-wip-us.apache.org/repos/asf/ambari/blob/f4877c8b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/handler/AbstractSolrConfigHandler.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/handler/AbstractSolrConfigHandler.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/handler/AbstractSolrConfigHandler.java
index 8693157..6f3d8ca 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/handler/AbstractSolrConfigHandler.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/handler/AbstractSolrConfigHandler.java
@@ -55,9 +55,11 @@ public abstract class AbstractSolrConfigHandler implements SolrZkRequestHandler<
ZkConfigManager zkConfigManager = new ZkConfigManager(zkClient);
boolean configExists = zkConfigManager.configExists(solrPropsConfig.getConfigName());
if (configExists) {
+ uploadMissingConfigFiles(zkClient, zkConfigManager, solrPropsConfig.getConfigName());
reloadCollectionNeeded = doIfConfigExists(solrPropsConfig, zkClient, separator, downloadFolderLocation, tmpDir);
} else {
doIfConfigNotExist(solrPropsConfig, zkConfigManager);
+ uploadMissingConfigFiles(zkClient, zkConfigManager, solrPropsConfig.getConfigName());
}
} catch (Exception e) {
throw new RuntimeException(String.format("Cannot upload configurations to zk. (collection: %s, config set folder: %s)",
@@ -90,6 +92,10 @@ public abstract class AbstractSolrConfigHandler implements SolrZkRequestHandler<
// Do nothing
};
+ public void uploadMissingConfigFiles(SolrZkClient zkClient, ZkConfigManager zkConfigManager, String configName) throws IOException {
+ // do Nothing
+ }
+
public boolean doIfConfigExists(SolrPropsConfig solrPropsConfig, SolrZkClient zkClient, String separator, String downloadFolderLocation, File tmpDir) throws IOException {
boolean result = false;
LOG.info("Config set exists for '{}' collection. Refreshing it if needed...", solrPropsConfig.getCollection());
http://git-wip-us.apache.org/repos/asf/ambari/blob/f4877c8b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/handler/UploadConfigurationHandler.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/handler/UploadConfigurationHandler.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/handler/UploadConfigurationHandler.java
index 6964951..f48b7db 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/handler/UploadConfigurationHandler.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/handler/UploadConfigurationHandler.java
@@ -28,17 +28,25 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
+import java.nio.file.FileSystems;
public class UploadConfigurationHandler extends AbstractSolrConfigHandler {
private static final Logger LOG = LoggerFactory.getLogger(UploadConfigurationHandler.class);
private static final String SOLR_CONFIG_FILE = "solrconfig.xml";
+ private static final String[] configFiles = {
+ "admin-extra.html", "admin-extra.menu-bottom.html", "admin-extra.menu-top.html",
+ "elevate.xml", "enumsConfig.xml", "managed-schema", "solrconfig.xml"
+ };
+ private boolean hasEnumConfig;
- public UploadConfigurationHandler(File configSetFolder) {
+ public UploadConfigurationHandler(File configSetFolder, boolean hasEnumConfig) {
super(configSetFolder);
+ this.hasEnumConfig = hasEnumConfig;
}
@Override
@@ -51,19 +59,7 @@ public class UploadConfigurationHandler extends AbstractSolrConfigHandler {
zkConfigManager.uploadConfigDir(getConfigSetFolder().toPath(), solrPropsConfig.getConfigName());
String filePath = String.format("%s%s%s", getConfigSetFolder(), separator, getConfigFileName());
String configsPath = String.format("/%s/%s/%s", "configs", solrPropsConfig.getConfigName(), getConfigFileName());
- InputStream is = new FileInputStream(filePath);
- try {
- if (zkClient.exists(configsPath, true)) {
- zkClient.setData(configsPath, IOUtils.toByteArray(is), true);
- } else {
- zkClient.create(configsPath, IOUtils.toByteArray(is), CreateMode.PERSISTENT, true);
- }
- } catch (Exception e) {
- throw new IllegalStateException(e);
- }
- finally {
- IOUtils.closeQuietly(is);
- }
+ uploadFileToZk(zkClient, filePath, configsPath);
result = true;
}
return result;
@@ -82,4 +78,40 @@ public class UploadConfigurationHandler extends AbstractSolrConfigHandler {
public String getConfigFileName() {
return SOLR_CONFIG_FILE;
}
+
+ @Override
+ public void uploadMissingConfigFiles(SolrZkClient zkClient, ZkConfigManager zkConfigManager, String configName) throws IOException {
+ LOG.info("Check any of the configs files are missing for config ({})", configName);
+ for (String configFile : configFiles) {
+ if ("enumsConfig.xml".equals(configFile) && !hasEnumConfig) {
+ LOG.info("Config file ({}) is not needed for {}", configFile, configName);
+ continue;
+ }
+ String zkPath = String.format("%s/%s", configName, configFile);
+ if (zkConfigManager.configExists(zkPath)) {
+ LOG.info("Config file ({}) has already uploaded properly.", configFile);
+ } else {
+ LOG.info("Config file ({}) is missing. Reupload...", configFile);
+ FileSystems.getDefault().getSeparator();
+ uploadFileToZk(zkClient,
+ String.format("%s%s%s", getConfigSetFolder(), FileSystems.getDefault().getSeparator(), configFile),
+ String.format("%s%s", "/configs/", zkPath));
+ }
+ }
+ }
+
+ private void uploadFileToZk(SolrZkClient zkClient, String filePath, String configsPath) throws FileNotFoundException {
+ InputStream is = new FileInputStream(filePath);
+ try {
+ if (zkClient.exists(configsPath, true)) {
+ zkClient.setData(configsPath, IOUtils.toByteArray(is), true);
+ } else {
+ zkClient.create(configsPath, IOUtils.toByteArray(is), CreateMode.PERSISTENT, true);
+ }
+ } catch (Exception e) {
+ throw new IllegalStateException(e);
+ } finally {
+ IOUtils.closeQuietly(is);
+ }
+ }
}
[08/14] ambari git commit: AMBARI-20703.Bulk action is not functional
in workflow dashboard(Venkata Sairam)
Posted by jo...@apache.org.
AMBARI-20703.Bulk action is not functional in workflow dashboard(Venkata Sairam)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e2f7301c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e2f7301c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e2f7301c
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: e2f7301c611ac190de524a504590d3cd811b0480
Parents: 101942d
Author: Venkata Sairam <ve...@gmail.com>
Authored: Thu Apr 27 17:51:40 2017 +0530
Committer: Venkata Sairam <ve...@gmail.com>
Committed: Thu Apr 27 17:51:40 2017 +0530
----------------------------------------------------------------------
.../src/main/resources/ui/app/templates/components/job-row.hbs | 4 ++--
.../main/resources/ui/app/templates/components/search-table.hbs | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/e2f7301c/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/job-row.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/job-row.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/job-row.hbs
index 4c18d5d..8ce4886 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/job-row.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/job-row.hbs
@@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
}}
-<td class="no-sort first-col">
+<!--td class="no-sort first-col">
<input id="{{job.id}}" name="{{job.appName}}" data-status ="{{job.status}}" class="cbox" type="checkbox" value="" {{action 'rowSelected' job.status on="change"}}>
{{#if job.parentId}}
{{#link-to 'design.jobtab' (query-params id=targetParentId jobType="coords")}}
@@ -25,7 +25,7 @@
<a class="padding15pcnt" href="javascript:void(0);"></a>
{{/if}}
-</td>
+</td-->
<td {{action 'showJobDetails' job.id}} class="pointer action-link"> {{job.appName}}
</td>
<td class="{{job.status}}"> {{job.status}} </td>
http://git-wip-us.apache.org/repos/asf/ambari/blob/e2f7301c/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/search-table.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/search-table.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/search-table.hbs
index 7b5a625..86ab5a5 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/search-table.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/search-table.hbs
@@ -28,7 +28,7 @@
<table id="search-table" class="table search-table listing table-striped table-hover table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
- <th></th>
+ <!--th></th-->
<th>Name</th>
<th>Status</th>
<th>User</th>
[04/14] ambari git commit: AMBARI-20842. HIVE 2 -UX changes- Part1
(pallavkul)
Posted by jo...@apache.org.
AMBARI-20842. HIVE 2 -UX changes- Part1 (pallavkul)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4712bf54
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4712bf54
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4712bf54
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 4712bf54a03b20ca11f79884facb1e25ed50d403
Parents: 1069844
Author: pallavkul <pa...@gmail.com>
Authored: Thu Apr 27 11:54:56 2017 +0530
Committer: pallavkul <pa...@gmail.com>
Committed: Thu Apr 27 11:54:56 2017 +0530
----------------------------------------------------------------------
.../resources/ui/app/components/udf-item.js | 1 +
.../src/main/resources/ui/app/styles/app.scss | 23 ++++-
.../app/templates/components/jobs-browser.hbs | 6 +-
.../components/notification-message.hbs | 2 +-
.../templates/components/table-rename-form.hbs | 2 +-
.../templates/components/table-statistics.hbs | 12 +--
.../ui/app/templates/components/udf-edit.hbs | 66 ++++++++-----
.../ui/app/templates/components/udf-item.hbs | 10 +-
.../ui/app/templates/components/udf-new.hbs | 97 ++++++++++++--------
.../resources/ui/app/templates/databases.hbs | 2 +-
.../ui/app/templates/queries/query.hbs | 16 ++--
.../resources/ui/app/templates/savedqueries.hbs | 64 +++++++------
.../main/resources/ui/app/templates/udfs.hbs | 37 +++++---
13 files changed, 206 insertions(+), 132 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/4712bf54/contrib/views/hive20/src/main/resources/ui/app/components/udf-item.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/udf-item.js b/contrib/views/hive20/src/main/resources/ui/app/components/udf-item.js
index 6005444..51fd094 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/components/udf-item.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/components/udf-item.js
@@ -122,6 +122,7 @@ export default Ember.Component.extend(UILoggerMixin, {
cancelEditUdf(){
this.set('expandedEdit', false);
+ this.set('isAddingNewFileResource', false);
},
saveUDf(name, classname, udfid, udfFileResourceName, udfFileResourcePath){
http://git-wip-us.apache.org/repos/asf/ambari/blob/4712bf54/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
index ca3bc98..29646cc 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
+++ b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
@@ -42,6 +42,9 @@
.top-application-header{
background-color: #e1e1e0;
+ ul{
+ padding: 0 15px;
+ }
}
.fa-1-5{
@@ -737,6 +740,7 @@ pre {
}
.worksheet-nav {
+ padding: 0 9px;
li{
margin-left:5px;
a {
@@ -948,7 +952,7 @@ rect.operator__box {
overflow: auto;
}
-.explain--error {
+.explain--error, .no-results {
display: flex;
align-items: center;
justify-content: center;
@@ -984,3 +988,20 @@ rect.operator__box {
text-overflow: ellipsis;
width: 100px;
}
+
+.progress {
+ margin-top: 15px;
+}
+
+.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
+ border-bottom-right-radius: 3px;
+ border-top-right-radius: 3px;
+}
+
+.middle-align {
+ vertical-align: middle;
+}
+
+.table-title {
+ padding: 0 15px;
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/4712bf54/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
index 014691e..338828e 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
@@ -54,11 +54,11 @@
<table class="table table-striped">
<thead>
<tr>
- <th width="10%">Job Id</th>
+ <th width="10%">Job ID</th>
<th width="30%">Title</th>
- <th width="10%">status</th>
+ <th width="10%">Status</th>
<th width="25%">Start time</th>
- <th width="20%" >Duration</th>
+ <th width="20%" >Duration(in seconds)</th>
<th>Action</th>
</tr>
</thead>
http://git-wip-us.apache.org/repos/asf/ambari/blob/4712bf54/contrib/views/hive20/src/main/resources/ui/app/templates/components/notification-message.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/notification-message.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/notification-message.hbs
index c2b32a1..70354d9 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/notification-message.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/notification-message.hbs
@@ -27,7 +27,7 @@
{{#if displayBody}}
<div class="panel-body">
{{#if showStatus}}
- <p><strong>Status:</strong> {{notification.status}}</p>
+ <div><strong>Status:</strong> {{notification.status}}</div>
<hr/>
{{/if}}
{{#if notification.responseMessage}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/4712bf54/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-rename-form.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-rename-form.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-rename-form.hbs
index b692a9c..827ee53 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-rename-form.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-rename-form.hbs
@@ -17,7 +17,7 @@
}}
<div class="form-group">
- <label class="col-sm-4 control-label">New Table Name</label>
+ <label class="col-sm-4 control-label">New table name</label>
<div class="col-sm-8 {{if error 'has-error'}}">
{{input value=newTableName class="form-control" placeholder="Table Name"}}
<span class="help-block">{{errorMessage}}</span>
http://git-wip-us.apache.org/repos/asf/ambari/blob/4712bf54/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-statistics.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-statistics.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-statistics.hbs
index cdcf762..1bcae93 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-statistics.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-statistics.hbs
@@ -19,17 +19,15 @@
{{#if showStats}}
<div class="row">
<div class="alert">
- <p class="lead">
- {{fa-icon "line-chart" size=2}} STATISTICS
- <div class="pull-right">
+ <p >
+ <div class="pull-left">
<button class="btn btn-success"
{{action "analyseTable"}}>{{fa-icon "location-arrow"}} {{#if (not tableStatisticsEnabled)}}
Compute {{else}} Recompute {{/if}}</button>
<label>
{{input type="checkbox" checked=analyseWithStatistics}}
- <small>include columns</small>
- </label>
+ </label> <span>INCLUDE COLUMNS</span>
</div>
</p>
@@ -44,7 +42,7 @@
</div>
{{/if}}
<div class="stats-section">
- <p><strong>TABLE STATISTICS</strong></p>
+ <p class="table-title"><strong>TABLE STATISTICS</strong></p>
<table class="table table-bordered table-hover">
<thead>
<tr>
@@ -81,7 +79,7 @@
</div>
<div class="row stats-section">
- <p><strong>COLUMNS STATISTICS</strong></p>
+ <p class="table-title"><strong>COLUMNS STATISTICS</strong></p>
<table class="table table-bordered table-hover">
<thead>
<tr>
http://git-wip-us.apache.org/repos/asf/ambari/blob/4712bf54/contrib/views/hive20/src/main/resources/ui/app/templates/components/udf-edit.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/udf-edit.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/udf-edit.hbs
index 24cb495..9565535 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/udf-edit.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/udf-edit.hbs
@@ -18,19 +18,26 @@
<td colspan="4" style="padding: 0;">
<div class="udf-container">
- <form class="form-inline">
- <table class="table" style="background-color: transparent">
- <tr>
- <td width="20%" >
- <label>UDF Name</label><br />
- {{input type="text" class="form-control mb-2 mr-sm-2 mb-sm-0" placeholder="UDF Name" value=name }}
- </td>
- <td width="20%">
- <label >UDF Class Name</label><br />
- {{input type="text" class="form-control mb-2 mr-sm-2 mb-sm-0" placeholder="UDF Class Name" value=classname }}
- </td>
- <td width="40%">
- <label >File Resource</label><br />
+
+ <h4>Edit UDF</h4>
+
+ <form class="form-horizontal">
+ <div class="form-group">
+ <label class="col-sm-2 control-label">UDF Name</label>
+ <div class="col-sm-10">
+ {{input type="text" class="form-control" placeholder="UDF Name" value=name }}
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-2 control-label">UDF Class Name</label>
+ <div class="col-sm-10">
+ {{input type="text" class="form-control" placeholder="UDF Class Name" value=classname }}
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="col-sm-2 control-label">File Resource</label>
+ <div class="col-sm-10">
{{#unless isAddingNewFileResource}}
{{#power-select
options=fileResourceList
@@ -43,23 +50,34 @@
{{/power-select}}
{{/unless}}
{{#if isAddingNewFileResource}}
- <label class="sr-only">Resource name</label>
- {{input type="text" class="form-control mb-2 mr-sm-2 mb-sm-0" placeholder="File Resource Name" value=udfFileResourceName }}
- <label class="sr-only">Resource Path</label>
- {{input type="text" class="form-control mb-2 mr-sm-2 mb-sm-0" placeholder="File Resource path" value=udfFileResourcePath }}
+ <div class="form-group">
+ <label class="col-sm-2 control-label">Resource name</label>
+ <div class="col-sm-10">
+ {{input type="text" class="form-control" placeholder="File Resource Name" value=udfFileResourceName }}
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="col-sm-2 control-label">Resource Path</label>
+ <div class="col-sm-10">
+ {{input type="text" class="form-control" placeholder="File Resource path" value=udfFileResourcePath }}
+ </div>
+ </div>
+
{{/if}}
- </td>
+ </div>
+ </div>
- <td width="20%" align="center">
- <br />
+ <div class="form-group">
+ <div class="col-sm-offset-2 col-sm-10">
<button class="btn btn-success" type="button" {{action 'saveUDf' name classname udfid udfFileResourceName udfFileResourcePath}}>Save UDF</button>
<button class="btn btn-warning" type="button" {{action 'cancelEditUdf'}}>Cancel</button>
- </td>
+ </div>
+ </div>
+ </form>
+
- </tr>
- </table>
- </form>
</div>
</td>
http://git-wip-us.apache.org/repos/asf/ambari/blob/4712bf54/contrib/views/hive20/src/main/resources/ui/app/templates/components/udf-item.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/udf-item.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/udf-item.hbs
index 929b91a..e83ee5d 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/udf-item.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/udf-item.hbs
@@ -17,10 +17,10 @@
}}
<tr>
- <td> {{udf.name}}</td>
+ <td><a class="hand" {{action "showEditUdf" udf.id udf.fileResource }}>{{udf.name}}</a></td>
<td>{{udf.classname}} </td>
<td>{{udf.owner}}</td>
- <td class="center">
+ <td>
<a class="hand" {{action "toggleExpandUdf" udf.fileResource }}>{{fa-icon "expand"}}</a>
<a class="hand" {{action "showEditUdf" udf.id udf.fileResource }}>{{fa-icon "edit"}}</a>
<a class="hand" {{action "showRemoveUdfModal" udf.id }}>{{fa-icon "remove"}}</a>
@@ -59,9 +59,9 @@
{{#if showDeleteUdfModal}}
{{confirm-dialog
title="Confirm"
- label="Do You want to delete the UDF?"
+ label="Do you want to delete the UDF?"
titleIcon="minus"
- labelIcon="save"
+ labelIcon="remove"
rejectIcon="times"
confirmIcon="check"
closable=false
@@ -71,6 +71,4 @@
}}
{{/if}}
-
-
{{yield}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/4712bf54/contrib/views/hive20/src/main/resources/ui/app/templates/components/udf-new.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/udf-new.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/udf-new.hbs
index ddf34d7..3cb9295 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/udf-new.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/udf-new.hbs
@@ -16,46 +16,63 @@
* limitations under the License.
}}
-<form class="form-inline">
- <table class="table">
- <tr>
- <td width="20%" >
- <label>UDF Name</label><br />
- {{input type="text" class="form-control mb-2 mr-sm-2 mb-sm-0" placeholder="UDF Name" value=udfName }}
- </td>
- <td width="20%">
- <label >UDF Class Name</label><br />
- {{input type="text" class="form-control mb-2 mr-sm-2 mb-sm-0" placeholder="UDF Class Name" value=udfClassName }}
- </td>
- <td width="40%">
- <label >File Resource</label><br />
- {{#unless isAddingNewFileResource}}
- {{#power-select
- options=fileResourceList
- placeholder="File Resource"
- searchField="name"
- selected=selectedFileResource
- searchPlaceholder="Type the paramter"
- onchange=(action "handleFileResourceChange" ) as |filter| }}
- <b>{{filter.name}}</b>
- {{/power-select}}
- {{/unless}}
- {{#if isAddingNewFileResource}}
- <label class="sr-only">Resource name</label>
- {{input type="text" class="form-control mb-2 mr-sm-2 mb-sm-0" placeholder="File Resource Name" value=resourceName }}
-
- <label class="sr-only">Resource Path</label>
- {{input type="text" class="form-control mb-2 mr-sm-2 mb-sm-0" placeholder="File Resource path" value=resourcePath }}
- {{/if}}
- </td>
-
- <td width="20%" align="center">
- <br />
- <button class="btn btn-success" type="button" {{action 'saveUDf'}}>Add UDF</button>
- <button class="btn btn-warning" type="button" {{action 'cancelSaveUDf'}}>Cancel</button>
- </td>
- </tr>
- </table>
+<h4>Add new UDF</h4>
+
+<form class="form-horizontal">
+ <div class="form-group">
+ <label class="col-sm-2 control-label">UDF Name</label>
+ <div class="col-sm-10">
+ {{input type="text" class="form-control mb-2 mr-sm-2 mb-sm-0" placeholder="UDF Name" value=udfName }}
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-2 control-label">UDF Class Name</label>
+ <div class="col-sm-10">
+ {{input type="text" class="form-control mb-2 mr-sm-2 mb-sm-0" placeholder="UDF Class Name" value=udfClassName }}
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="col-sm-2 control-label">File Resource</label>
+ <div class="col-sm-10">
+ {{#unless isAddingNewFileResource}}
+ {{#power-select
+ options=fileResourceList
+ placeholder="File Resource"
+ searchField="name"
+ selected=selectedFileResource
+ searchPlaceholder="Type the paramter"
+ onchange=(action "handleFileResourceChange" ) as |filter| }}
+ <b>{{filter.name}}</b>
+ {{/power-select}}
+ {{/unless}}
+ {{#if isAddingNewFileResource}}
+
+ <div class="form-group">
+ <label class="col-sm-2 control-label">Resource name</label>
+ <div class="col-sm-10">
+ {{input type="text" class="form-control mb-2 mr-sm-2 mb-sm-0" placeholder="File Resource Name" value=resourceName }}
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="col-sm-2 control-label">Resource Path</label>
+ <div class="col-sm-10">
+ {{input type="text" class="form-control mb-2 mr-sm-2 mb-sm-0" placeholder="File Resource path" value=resourcePath }}
+ </div>
+ </div>
+
+ {{/if}}
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="col-sm-offset-2 col-sm-10">
+ <button class="btn btn-success" type="button" {{action 'saveUDf'}}>Add UDF</button>
+ <button class="btn btn-warning" type="button" {{action 'cancelSaveUDf'}}>Cancel</button>
+ </div>
+ </div>
</form>
+
{{yield}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/4712bf54/contrib/views/hive20/src/main/resources/ui/app/templates/databases.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/databases.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/databases.hbs
index ecedef5..0f365e6 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/databases.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/databases.hbs
@@ -43,7 +43,7 @@
{{#if confirmDropDatabase}}
{{confirm-dialog
title="Confirm"
- label="Do You want to delete the database?"
+ label="Do you want to delete the database?"
titleIcon="minus"
labelIcon="database"
rejectIcon="times"
http://git-wip-us.apache.org/repos/asf/ambari/blob/4712bf54/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs
index 989cfc3..7b27ba7 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/queries/query.hbs
@@ -51,7 +51,7 @@
<button class="btn btn-default" {{action "visualExplainQuery" }} disabled={{ worksheet.isQueryRunning}}>{{fa-icon "link"}} Visual Explain</button>
{{#if worksheet.isQueryRunning}}
- {{fa-icon "spinner fa-1-5" spin=true}}
+ {{fa-icon "spinner fa-1-5 middle-align" spin=true}}
{{/if}}
</div>
@@ -78,7 +78,7 @@
aria-controls={{concat 'db_body_' tableModel.dbname}}>
{{ tableModel.dbname }} {{#if (eq tableModel.dbname worksheet.selectedDb)}} {{fa-icon "check"}} {{/if}}
</a>
- <small class="pull-right">Tables({{tableModel.tables.length}})</small>
+ <span class="pull-right">Tables({{tableModel.tables.length}})</span>
</h4>
</div>
<div id={{concat 'db_body_' tableModel.dbname}} class="db-tables collapse
@@ -106,12 +106,15 @@
</div>
{{#if showWorksheetModal}}
- {{#modal-dialog translucentOverlay=true clickOutsideToClose=true container-class="modal-dialog modal-sm"}}
+ {{#modal-dialog translucentOverlay=true clickOutsideToClose=true container-class="modal-dialog"}}
<div class="modal-content">
<div class="modal-header">
- <h4 class="modal-title">Saving worksheet</h4>
+ {{fa-icon "minus fa-lg"}} Confirm
</div>
<div class="modal-body">
+
+ <p class="lead">{{fa-icon "save fa-lg"}} Do you want to save the worksheet?</p>
+
<div class="form-horizontal">
<div class="form-group">
<label for="title" class="col-sm-2 control-label">Title</label>
@@ -129,9 +132,8 @@
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-default" disabled={{not worksheetTitle}} {{action "saveWorksheetModal"}}>{{fa-icon "check"}} Save</button>
- <button type="button" class="btn btn-default" {{action "closeWorksheetModal"}}>{{fa-icon "close"}}Cancel
- </button>
+ <button type="button" class="btn btn-default" {{action "closeWorksheetModal"}}>{{fa-icon "close"}} Reject</button>
+ <button type="button" class="btn btn-success" disabled={{not worksheetTitle}} {{action "saveWorksheetModal"}}>{{fa-icon "check"}} Save</button>
</div>
</div>
{{/modal-dialog}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/4712bf54/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries.hbs
index c0b5e82..ce7315f 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries.hbs
@@ -18,43 +18,49 @@
<div class="row jobs-table">
<div class="col-md-12">
- <table class="table table-striped">
- <thead>
- <tr>
- <th width="30%">Preview</th>
- <th width="20%">Title</th>
- <th width="20%">Database</th>
- <th width="20%">Owner</th>
- <th width="10%">Action</th>
- </tr>
- </thead>
- <tbody>
- {{#each savedQuerylist as |savedQuery| }}
+
+ {{#if savedQuerylist.length}}
+
+ <table class="table table-striped">
+ <thead>
<tr>
- <td>{{savedQuery.shortQuery}}</td>
- <td class="break-word">{{savedQuery.title}}</td>
- <td>{{savedQuery.dataBase}}</td>
- <td>{{savedQuery.owner}}</td>
- <td>
- <div class="dropdown">
- <a class="dropdown-toggle" id="dropdownMenu1121" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">{{fa-icon "cog"}}</a>
- <ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu">
- <li><a href="#" {{action "openDeleteSavedQueryModal" savedQuery.id}} class="text-uppercase">{{fa-icon "remove"}} Delete</a></li>
- <li><a href="#" {{action "openAsWorksheet" savedQuery }} class="text-uppercase">{{fa-icon "folder-open-o"}} Open as worksheet</a></li>
- </ul>
- </div>
- </td>
+ <th width="30%">Preview</th>
+ <th width="20%">Title</th>
+ <th width="20%">Database</th>
+ <th width="20%">Owner</th>
+ <th width="10%">Action</th>
</tr>
- {{/each}}
- </tbody>
- </table>
+ </thead>
+ <tbody>
+ {{#each savedQuerylist as |savedQuery| }}
+ <tr>
+ <td><a href="#" {{action "openAsWorksheet" savedQuery }} >{{savedQuery.shortQuery}}</a></td>
+ <td class="break-word">{{savedQuery.title}}</td>
+ <td>{{savedQuery.dataBase}}</td>
+ <td>{{savedQuery.owner}}</td>
+ <td>
+ <a href="#" {{action "openDeleteSavedQueryModal" savedQuery.id}} class="text-uppercase">{{fa-icon "remove"}}</a>
+ </td>
+ </tr>
+ {{/each}}
+ </tbody>
+ </table>
+ {{/if}}
+
+ {{#unless savedQuerylist.length}}
+ <div class="no-results">
+ <div>There is no saved query.</div>
+ </div>
+ {{/unless}}
+
+
</div>
</div>
{{#if showDeleteSaveQueryModal}}
{{confirm-dialog
title="Confirm"
- label="Do You want to delete the saved query?"
+ label="Do you want to delete the saved query?"
titleIcon="minus"
labelIcon="save"
rejectIcon="times"
http://git-wip-us.apache.org/repos/asf/ambari/blob/4712bf54/contrib/views/hive20/src/main/resources/ui/app/templates/udfs.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/udfs.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/udfs.hbs
index ef6a01c..f2efaca 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/udfs.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/udfs.hbs
@@ -19,18 +19,23 @@
<div class="pull-right">
{{#link-to 'udfs.new' class="btn btn-sm btn-success"}}{{fa-icon "plus"}} NEW UDF{{/link-to}}
</div>
+
+
+
<div class="row jobs-table">
<div class="col-md-12">
- <table class="table table-striped">
- <thead>
- <tr>
- <th width="20%">UDF Name</th>
- <th width="20%">UDF Class Name</th>
- <th width="40%">Owner</th>
- <th width="20%" class="center">Action</th>
- </tr>
- </thead>
- <tbody>
+
+ {{#if udflist.length}}
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th width="20%">UDF Name</th>
+ <th width="20%">UDF Class Name</th>
+ <th width="40%">Owner</th>
+ <th width="20%">Action</th>
+ </tr>
+ </thead>
+ <tbody>
{{#each udflist as |udf| }}
{{udf-item
udf=udf
@@ -38,8 +43,16 @@
refreshUdfList='refreshUdfList'
}}
{{/each}}
- </tbody>
- </table>
+ </tbody>
+ </table>
+ {{/if}}
+
+ {{#unless udflist.length}}
+ <div class="no-results">
+ <div>There is No UDF.</div>
+ </div>
+ {{/unless}}
+
</div>
</div>
[13/14] ambari git commit: Make yarn.lock file up to date. (yusaku)
Posted by jo...@apache.org.
Make yarn.lock file up to date. (yusaku)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/94795d9e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/94795d9e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/94795d9e
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 94795d9e48de1a9ef0f4de7337182bdd22af7983
Parents: 8ed8f41
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Thu Apr 27 12:03:47 2017 -0700
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Thu Apr 27 12:03:47 2017 -0700
----------------------------------------------------------------------
ambari-web/yarn.lock | 65 +++++++++++++++++------------------------------
1 file changed, 24 insertions(+), 41 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/94795d9e/ambari-web/yarn.lock
----------------------------------------------------------------------
diff --git a/ambari-web/yarn.lock b/ambari-web/yarn.lock
index d562817..26a0211 100644
--- a/ambari-web/yarn.lock
+++ b/ambari-web/yarn.lock
@@ -72,19 +72,19 @@ ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
-anymatch@^1.0.0, anymatch@^1.3.0, anymatch@~1.3.0:
+anymatch@^1.0.0, anymatch@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.0.0.tgz#0aed64d30bc25973afdb3155eb87ae6881e21b1c"
+ dependencies:
+ minimatch "~1.0.0"
+
+anymatch@^1.3.0, anymatch@~1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507"
dependencies:
arrify "^1.0.0"
micromatch "^2.1.5"
-anymatch@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.0.0.tgz#0aed64d30bc25973afdb3155eb87ae6881e21b1c"
- dependencies:
- minimatch "~1.0.0"
-
anysort@~1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/anysort/-/anysort-1.0.1.tgz#341bd5d5ba1485f64e55ae865f1d45994b507fc4"
@@ -181,10 +181,6 @@ ast-types@0.8.12:
version "0.8.12"
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.8.12.tgz#a0d90e4351bb887716c83fd637ebf818af4adfcc"
-ast-types@0.8.15:
- version "0.8.15"
- resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.8.15.tgz#8eef0827f04dff0ec8857ba925abe3fea6194e52"
-
ast-types@0.9.6:
version "0.9.6"
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.6.tgz#102c9e9e9005d3e7e3829bf0c4fa24ee862ee9b9"
@@ -1306,16 +1302,22 @@ dateformat@~1.0.6:
get-stdin "^4.0.1"
meow "^3.3.0"
-debug@*, debug@2.2.0, debug@^2.1.1:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da"
+debug@*, debug@2.6.3, debug@^2.2.0:
+ version "2.6.3"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d"
dependencies:
- ms "0.7.1"
+ ms "0.7.2"
debug@0.7.4, debug@~0.7.2:
version "0.7.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39"
+debug@2.2.0, debug@^2.1.1:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da"
+ dependencies:
+ ms "0.7.1"
+
debug@2.3.3:
version "2.3.3"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c"
@@ -1328,12 +1330,6 @@ debug@2.6.1:
dependencies:
ms "0.7.2"
-debug@2.6.3, debug@^2.2.0:
- version "2.6.3"
- resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d"
- dependencies:
- ms "0.7.2"
-
decamelize@^1.0.0, decamelize@^1.1.2:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
@@ -2614,11 +2610,7 @@ loud-rejection@^1.0.0:
currently-unhandled "^0.4.1"
signal-exit "^3.0.0"
-lru-cache@2:
- version "2.7.3"
- resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952"
-
-lru-cache@2.2.x:
+lru-cache@2, lru-cache@2.2.x:
version "2.2.4"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d"
@@ -3300,7 +3292,7 @@ readdirp@~1.3.0:
minimatch "~0.2.12"
readable-stream "~1.0.26-2"
-recast@0.10.33:
+recast@0.10.33, recast@^0.10.10:
version "0.10.33"
resolved "https://registry.yarnpkg.com/recast/-/recast-0.10.33.tgz#942808f7aa016f1fa7142c461d7e5704aaa8d697"
dependencies:
@@ -3309,15 +3301,6 @@ recast@0.10.33:
private "~0.1.5"
source-map "~0.5.0"
-recast@^0.10.10:
- version "0.10.43"
- resolved "https://registry.yarnpkg.com/recast/-/recast-0.10.43.tgz#b95d50f6d60761a5f6252e15d80678168491ce7f"
- dependencies:
- ast-types "0.8.15"
- esprima-fb "~15001.1001.0-dev-harmony-fb"
- private "~0.1.5"
- source-map "~0.5.0"
-
recast@^0.11.17:
version "0.11.23"
resolved "https://registry.yarnpkg.com/recast/-/recast-0.11.23.tgz#451fd3004ab1e4df9b4e4b66376b2a21912462d3"
@@ -3569,11 +3552,7 @@ sax@^1.2.1:
version "1.2.2"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.2.tgz#fd8631a23bc7826bef5d871bdb87378c95647828"
-"semver@2 || 3 || 4 || 5", semver@~4.3.3:
- version "4.3.6"
- resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da"
-
-semver@^5.3.0:
+"semver@2 || 3 || 4 || 5", semver@^5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
@@ -3581,6 +3560,10 @@ semver@~1.1.0:
version "1.1.4"
resolved "https://registry.yarnpkg.com/semver/-/semver-1.1.4.tgz#2e5a4e72bab03472cc97f72753b4508912ef5540"
+semver@~4.3.3:
+ version "4.3.6"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da"
+
send@0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/send/-/send-0.1.4.tgz#be70d8d1be01de61821af13780b50345a4f71abd"