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/02/21 22:35:47 UTC

[1/6] ambari git commit: AMBARI-20067. Finalize Operations stage fails when Enabling Kerberos using the manual option (rlevas)

Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-20053 0c464b742 -> 6553ffaee


AMBARI-20067. Finalize Operations stage fails when Enabling Kerberos using the manual option (rlevas)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bfaf6139
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bfaf6139
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bfaf6139

Branch: refs/heads/branch-feature-AMBARI-20053
Commit: bfaf6139c24c63fbec01c64078c8392c5fec6b27
Parents: 600d0a1
Author: Robert Levas <rl...@hortonworks.com>
Authored: Tue Feb 21 12:08:41 2017 -0500
Committer: Robert Levas <rl...@hortonworks.com>
Committed: Tue Feb 21 12:09:38 2017 -0500

----------------------------------------------------------------------
 .../kerberos/FinalizeKerberosServerAction.java  |  14 +-
 .../kerberos/KerberosServerAction.java          |   2 +-
 .../FinalizeKerberosServerActionTest.java       | 207 +++++++++++++++++++
 3 files changed, 216 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/bfaf6139/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/FinalizeKerberosServerAction.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/FinalizeKerberosServerAction.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/FinalizeKerberosServerAction.java
index 9f443b9..2742390 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/FinalizeKerberosServerAction.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/FinalizeKerberosServerAction.java
@@ -200,12 +200,14 @@ public class FinalizeKerberosServerAction extends KerberosServerAction {
       }
     }
 
-    // Ensure the keytab files for the Ambari identities have the correct permissions
-    // This is important in the event a secure cluster was created via Blueprints since some
-    // user accounts and group may not have been created when the keytab files were created.
-    requestSharedDataContext.put(this.getClass().getName() + "_visited", new HashSet<String>());
-    processIdentities(requestSharedDataContext);
-    requestSharedDataContext.remove(this.getClass().getName() + "_visited");
+    if(getKDCType(getCommandParameters()) != KDCType.NONE) {
+      // Ensure the keytab files for the Ambari identities have the correct permissions
+      // This is important in the event a secure cluster was created via Blueprints since some
+      // user accounts and group may not have been created when the keytab files were created.
+      requestSharedDataContext.put(this.getClass().getName() + "_visited", new HashSet<String>());
+      processIdentities(requestSharedDataContext);
+      requestSharedDataContext.remove(this.getClass().getName() + "_visited");
+    }
 
     // Make sure this is a relevant directory. We don't want to accidentally allow _ANY_ directory
     // to be deleted.

http://git-wip-us.apache.org/repos/asf/ambari/blob/bfaf6139/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KerberosServerAction.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KerberosServerAction.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KerberosServerAction.java
index cab3d8d..d404133 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KerberosServerAction.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KerberosServerAction.java
@@ -195,7 +195,7 @@ public abstract class KerberosServerAction extends AbstractServerAction {
     String kdcType = getCommandParameterValue(commandParameters, KDC_TYPE);
 
     return ((kdcType == null) || kdcType.isEmpty())
-        ? KDCType.MIT_KDC
+        ? KDCType.NONE
         : KDCType.translate(kdcType);
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bfaf6139/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/FinalizeKerberosServerActionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/FinalizeKerberosServerActionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/FinalizeKerberosServerActionTest.java
new file mode 100644
index 0000000..cec482e
--- /dev/null
+++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/FinalizeKerberosServerActionTest.java
@@ -0,0 +1,207 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.serveraction.kerberos;
+
+import junit.framework.Assert;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.Role;
+import org.apache.ambari.server.RoleCommand;
+import org.apache.ambari.server.actionmanager.HostRoleCommand;
+import org.apache.ambari.server.actionmanager.HostRoleStatus;
+import org.apache.ambari.server.agent.CommandReport;
+import org.apache.ambari.server.agent.ExecutionCommand;
+import org.apache.ambari.server.audit.AuditLogger;
+import org.apache.ambari.server.controller.KerberosHelper;
+import org.apache.ambari.server.security.credential.PrincipalKeyCredential;
+import org.apache.ambari.server.state.Cluster;
+import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.Host;
+import org.apache.ambari.server.state.SecurityState;
+import org.apache.ambari.server.state.ServiceComponentHost;
+import org.easymock.EasyMockSupport;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+import static org.apache.ambari.server.serveraction.kerberos.KerberosServerAction.DATA_DIRECTORY_PREFIX;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+
+public class FinalizeKerberosServerActionTest extends EasyMockSupport {
+  @Rule
+  public TemporaryFolder folder = new TemporaryFolder();
+
+  @Test
+  public void executeMITKDCOption() throws Exception {
+    String clusterName = "c1";
+    Injector injector = setup(clusterName);
+
+    File dataDirectory = createDataDirectory();
+
+    Map<String, String> commandParams = new HashMap<>();
+    commandParams.put(KerberosServerAction.KDC_TYPE, KDCType.MIT_KDC.name());
+    commandParams.put(KerberosServerAction.DATA_DIRECTORY, dataDirectory.getAbsolutePath());
+
+    ExecutionCommand executionCommand = createMockExecutionCommand(clusterName, commandParams);
+    HostRoleCommand hostRoleCommand = createMockHostRoleCommand();
+
+    PrincipalKeyCredential principleKeyCredential = createMock(PrincipalKeyCredential.class);
+
+    KerberosHelper kerberosHelper = injector.getInstance(KerberosHelper.class);
+    expect(kerberosHelper.getKDCAdministratorCredentials(clusterName)).andReturn(principleKeyCredential).anyTimes();
+
+    replayAll();
+
+    ConcurrentMap<String, Object> requestSharedDataContext = new ConcurrentHashMap<String, Object>();
+
+    FinalizeKerberosServerAction action = injector.getInstance(FinalizeKerberosServerAction.class);
+    action.setExecutionCommand(executionCommand);
+    action.setHostRoleCommand(hostRoleCommand);
+
+    Assert.assertTrue(dataDirectory.exists());
+
+    CommandReport commandReport = action.execute(requestSharedDataContext);
+
+    assertSuccess(commandReport);
+    Assert.assertTrue(!dataDirectory.exists());
+
+    verifyAll();
+  }
+
+  @Test
+  public void executeManualOption() throws Exception {
+    String clusterName = "c1";
+    Injector injector = setup(clusterName);
+
+    File dataDirectory = createDataDirectory();
+
+    Map<String, String> commandParams = new HashMap<>();
+    commandParams.put(KerberosServerAction.DATA_DIRECTORY, dataDirectory.getAbsolutePath());
+
+    ExecutionCommand executionCommand = createMockExecutionCommand(clusterName, commandParams);
+    HostRoleCommand hostRoleCommand = createMockHostRoleCommand();
+
+    replayAll();
+
+    ConcurrentMap<String, Object> requestSharedDataContext = new ConcurrentHashMap<String, Object>();
+
+    FinalizeKerberosServerAction action = injector.getInstance(FinalizeKerberosServerAction.class);
+    action.setExecutionCommand(executionCommand);
+    action.setHostRoleCommand(hostRoleCommand);
+
+    Assert.assertTrue(dataDirectory.exists());
+
+    CommandReport commandReport = action.execute(requestSharedDataContext);
+
+    assertSuccess(commandReport);
+
+    Assert.assertTrue(!dataDirectory.exists());
+
+    verifyAll();
+  }
+
+  private File createDataDirectory() throws IOException {
+    File directory = folder.newFolder();
+    File dataDirectory = new File(directory, DATA_DIRECTORY_PREFIX + "_test");
+
+    Assert.assertTrue(dataDirectory.mkdir());
+
+    return dataDirectory;
+  }
+
+  private void assertSuccess(CommandReport commandReport) {
+    Assert.assertEquals(0, commandReport.getExitCode());
+    Assert.assertEquals(HostRoleStatus.COMPLETED.name(), commandReport.getStatus());
+    Assert.assertEquals("{}", commandReport.getStructuredOut());
+  }
+
+  private ExecutionCommand createMockExecutionCommand(String clusterName, Map<String, String> commandParams) {
+    ExecutionCommand executionCommand = createMock(ExecutionCommand.class);
+    expect(executionCommand.getClusterName()).andReturn(clusterName).anyTimes();
+    expect(executionCommand.getCommandParams()).andReturn(commandParams).anyTimes();
+    expect(executionCommand.getRoleCommand()).andReturn(RoleCommand.EXECUTE).anyTimes();
+    expect(executionCommand.getRole()).andReturn(Role.AMBARI_SERVER_ACTION.name()).anyTimes();
+    expect(executionCommand.getConfigurationTags()).andReturn(Collections.<String, Map<String, String>>emptyMap()).anyTimes();
+    expect(executionCommand.getServiceName()).andReturn("AMBARI_SERVER").anyTimes();
+    expect(executionCommand.getTaskId()).andReturn(3L).anyTimes();
+
+    return executionCommand;
+  }
+
+  private HostRoleCommand createMockHostRoleCommand() {
+    HostRoleCommand hostRoleCommand = createMock(HostRoleCommand.class);
+
+    expect(hostRoleCommand.getRequestId()).andReturn(1L).anyTimes();
+    expect(hostRoleCommand.getStageId()).andReturn(2L).anyTimes();
+    expect(hostRoleCommand.getTaskId()).andReturn(3L).anyTimes();
+
+    return hostRoleCommand;
+  }
+
+  private Injector setup(String clusterName) throws AmbariException {
+    final Map<String, Host> clusterHostMap = new HashMap<>();
+    clusterHostMap.put("host1", createMock(Host.class));
+
+    final ServiceComponentHost serviceComponentHost = createMock(ServiceComponentHost.class);
+    expect(serviceComponentHost.getSecurityState()).andReturn(SecurityState.SECURING).anyTimes();
+    expect(serviceComponentHost.getServiceName()).andReturn("SERVICE1").anyTimes();
+    expect(serviceComponentHost.getServiceComponentName()).andReturn("COMPONENT1A").anyTimes();
+    expect(serviceComponentHost.getHostName()).andReturn("host1").anyTimes();
+    expect(serviceComponentHost.getDesiredSecurityState()).andReturn(SecurityState.SECURED_KERBEROS).anyTimes();
+    serviceComponentHost.setSecurityState(SecurityState.SECURED_KERBEROS);
+    expectLastCall().once();
+
+    final List<ServiceComponentHost> serviceComponentHosts = new ArrayList<>();
+    serviceComponentHosts.add(serviceComponentHost);
+
+    final Cluster cluster = createMock(Cluster.class);
+    expect(cluster.getClusterName()).andReturn(clusterName).anyTimes();
+    expect(cluster.getServiceComponentHosts("host1")).andReturn(serviceComponentHosts).anyTimes();
+
+    final Clusters clusters = createMock(Clusters.class);
+    expect(clusters.getHostsForCluster(clusterName)).andReturn(clusterHostMap).anyTimes();
+    expect(clusters.getCluster(clusterName)).andReturn(cluster).anyTimes();
+
+    return Guice.createInjector(new AbstractModule() {
+
+      @Override
+      protected void configure() {
+        bind(KerberosHelper.class).toInstance(createMock(KerberosHelper.class));
+        bind(Clusters.class).toInstance(clusters);
+        bind(AuditLogger.class).toInstance(createNiceMock(AuditLogger.class));
+      }
+    });
+  }
+
+}
\ No newline at end of file


[2/6] ambari git commit: AMBARI-20071 : Hadoop metrics sink prints lots of logs if collector is unavailable. (avijayan)

Posted by jo...@apache.org.
AMBARI-20071 : Hadoop metrics sink prints lots of logs if collector is unavailable. (avijayan)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/64389cca
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/64389cca
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/64389cca

Branch: refs/heads/branch-feature-AMBARI-20053
Commit: 64389cca8c6ebb15a46874aab4efba7e6352f25c
Parents: bfaf613
Author: Aravindan Vijayan <av...@hortonworks.com>
Authored: Tue Feb 21 10:28:39 2017 -0800
Committer: Aravindan Vijayan <av...@hortonworks.com>
Committed: Tue Feb 21 10:28:39 2017 -0800

----------------------------------------------------------------------
 .../timeline/AbstractTimelineMetricsSink.java   | 22 +++++++++++++-------
 .../timeline/HadoopTimelineMetricsSink.java     | 11 +++++++---
 2 files changed, 23 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/64389cca/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 f5a02e4..a1fd008 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
@@ -82,6 +82,8 @@ public abstract class AbstractTimelineMetricsSink {
 
   protected static final AtomicInteger failedCollectorConnectionsCounter = new AtomicInteger(0);
   public static int NUMBER_OF_SKIPPED_COLLECTOR_EXCEPTIONS = 100;
+  protected static final AtomicInteger nullCollectorCounter = new AtomicInteger(0);
+  public static int NUMBER_OF_NULL_COLLECTOR_EXCEPTIONS = 20;
   public int ZK_CONNECT_TRY_COUNT = 10;
   public int ZK_SLEEP_BETWEEN_RETRY_TIME = 2000;
   public boolean shardExpired = true;
@@ -214,7 +216,7 @@ public abstract class AbstractTimelineMetricsSink {
       collectorHost = targetCollectorHostSupplier.get();
       // Last X attempts have failed - force refresh
       if (failedCollectorConnectionsCounter.get() > RETRY_COUNT_BEFORE_COLLECTOR_FAILOVER) {
-        LOG.info("Removing collector " + collectorHost + " from allKnownLiveCollectors.");
+        LOG.debug("Removing collector " + collectorHost + " from allKnownLiveCollectors.");
         allKnownLiveCollectors.remove(collectorHost);
         targetCollectorHostSupplier = null;
         collectorHost = findPreferredCollectHost();
@@ -224,8 +226,15 @@ public abstract class AbstractTimelineMetricsSink {
     }
 
     if (collectorHost == null) {
-      LOG.warn("No live collector to send metrics to. Metrics to be sent will be discarded.");
+      if (nullCollectorCounter.getAndIncrement() == 0) {
+        LOG.info("No live collector to send metrics to. Metrics to be sent will be discarded. " +
+          "This message will be skipped for the next " + NUMBER_OF_NULL_COLLECTOR_EXCEPTIONS + " times.");
+      } else {
+        nullCollectorCounter.compareAndSet(NUMBER_OF_NULL_COLLECTOR_EXCEPTIONS, 0);
+      }
       return false;
+    } else {
+      nullCollectorCounter.set(0);
     }
 
     String connectUrl = getCollectorUri(collectorHost);
@@ -356,7 +365,7 @@ public abstract class AbstractTimelineMetricsSink {
     if (allKnownLiveCollectors.size() == 0 && getZookeeperQuorum() != null
       && (currentTime - lastFailedZkRequestTime) > zookeeperBackoffTimeMillis) {
 
-      LOG.info("No live collectors from configuration. Requesting zookeeper...");
+      LOG.debug("No live collectors from configuration. Requesting zookeeper...");
       allKnownLiveCollectors.addAll(collectorHAHelper.findLiveCollectorHostsFromZNode());
       boolean noNewCollectorFromZk = true;
       for (String collectorHostFromZk : allKnownLiveCollectors) {
@@ -366,7 +375,7 @@ public abstract class AbstractTimelineMetricsSink {
         }
       }
       if (noNewCollectorFromZk) {
-        LOG.info("No new collector was found from Zookeeper. Will not request zookeeper for " + zookeeperBackoffTimeMillis + " millis");
+        LOG.debug("No new collector was found from Zookeeper. Will not request zookeeper for " + zookeeperBackoffTimeMillis + " millis");
         lastFailedZkRequestTime = System.currentTimeMillis();
       }
     }
@@ -396,7 +405,7 @@ public abstract class AbstractTimelineMetricsSink {
       shardExpired = true;
       return collectorHost;
     }
-    LOG.warn("Couldn't find any live collectors. Returning null");
+    LOG.debug("Couldn't find any live collectors. Returning null");
     shardExpired = true;
     return null;
   }
@@ -416,7 +425,7 @@ public abstract class AbstractTimelineMetricsSink {
             }
             break; // Found at least 1 live collector
           } catch (MetricCollectorUnavailableException e) {
-            LOG.info("Collector " + hostStr + " is not longer live. Removing " +
+            LOG.debug("Collector " + hostStr + " is not longer live. Removing " +
               "it from list of know live collector hosts : " + allKnownLiveCollectors);
             allKnownLiveCollectors.remove(hostStr);
           }
@@ -473,7 +482,6 @@ public abstract class AbstractTimelineMetricsSink {
       LOG.debug(errorMessage);
       LOG.debug(ioe);
       String warnMsg = "Unable to connect to collector to find live nodes.";
-      LOG.warn(warnMsg);
       throw new MetricCollectorUnavailableException(warnMsg);
     }
     return collectors;

http://git-wip-us.apache.org/repos/asf/ambari/blob/64389cca/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 14df30c..6e0eba5 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
@@ -116,10 +116,15 @@ public class HadoopTimelineMetricsSink extends AbstractTimelineMetricsSink imple
       String preferredCollectorHost = findPreferredCollectHost();
       collectorUri = constructTimelineMetricUri(protocol, preferredCollectorHost, port);
       containerMetricsUri = constructContainerMetricUri(protocol, preferredCollectorHost, port);
+
+      if (StringUtils.isNotEmpty(preferredCollectorHost)) {
+        LOG.info("Collector Uri: " + collectorUri);
+        LOG.info("Container Metrics Uri: " + containerMetricsUri);
+      } else {
+        LOG.info("No suitable collector found.");
+      }
     }
 
-    LOG.info("Collector Uri: " + collectorUri);
-    LOG.info("Container Metrics Uri: " + containerMetricsUri);
 
     timeoutSeconds = conf.getInt(METRICS_POST_TIMEOUT_SECONDS, DEFAULT_POST_TIMEOUT_SECONDS);
 
@@ -462,7 +467,7 @@ public class HadoopTimelineMetricsSink extends AbstractTimelineMetricsSink imple
     executorService.submit(new Runnable() {
       @Override
       public void run() {
-        LOG.info("Closing HadoopTimelineMetricSink. Flushing metrics to collector...");
+        LOG.debug("Closing HadoopTimelineMetricSink. Flushing metrics to collector...");
         TimelineMetrics metrics = metricsCache.getAllMetrics();
         if (metrics != null) {
           emitMetrics(metrics);


[3/6] ambari git commit: AMBARI-19911: When yarn-site.xml is changed, MapReduce related components should be required to restart(Yuanbo Liu via dili)

Posted by jo...@apache.org.
AMBARI-19911: When yarn-site.xml is changed, MapReduce related components should be required to restart(Yuanbo Liu via dili)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9e5c57e3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9e5c57e3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9e5c57e3

Branch: refs/heads/branch-feature-AMBARI-20053
Commit: 9e5c57e3e7ae4a8b3df51efcbddcdb97a1f7b398
Parents: 64389cc
Author: Di Li <di...@apache.org>
Authored: Tue Feb 21 13:40:26 2017 -0500
Committer: Di Li <di...@apache.org>
Committed: Tue Feb 21 13:40:26 2017 -0500

----------------------------------------------------------------------
 .../src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml  | 1 +
 .../src/main/resources/common-services/YARN/3.0.0.3.0/metainfo.xml  | 1 +
 2 files changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9e5c57e3/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml
index 25e242b..22cc38d 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml
@@ -301,6 +301,7 @@
         <config-type>ssl-client</config-type>
         <config-type>ssl-server</config-type>
         <config-type>ams-ssl-client</config-type>
+        <config-type>yarn-site</config-type>
       </configuration-dependencies>
       <restartRequiredAfterRackChange>true</restartRequiredAfterRackChange>
       <widgetsFileName>MAPREDUCE2_widgets.json</widgetsFileName>

http://git-wip-us.apache.org/repos/asf/ambari/blob/9e5c57e3/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/metainfo.xml b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/metainfo.xml
index b5b6d48..18186bd 100644
--- a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/metainfo.xml
+++ b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/metainfo.xml
@@ -386,6 +386,7 @@
         <config-type>ssl-client</config-type>
         <config-type>ssl-server</config-type>
         <config-type>ams-ssl-client</config-type>
+        <config-type>yarn-site</config-type>
       </configuration-dependencies>
       <restartRequiredAfterRackChange>true</restartRequiredAfterRackChange>
       <widgetsFileName>MAPREDUCE2_widgets.json</widgetsFileName>


[5/6] ambari git commit: AMBARI-20037. Druid-superset install fails with ambari running on python 2.6.6. (Nishant Bangarwa via Swapan Shridhar).

Posted by jo...@apache.org.
AMBARI-20037. Druid-superset install fails with ambari running on python 2.6.6. (Nishant Bangarwa via Swapan Shridhar).


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/59daf8b0
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/59daf8b0
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/59daf8b0

Branch: refs/heads/branch-feature-AMBARI-20053
Commit: 59daf8b0ea0465b83dad45102105f498a9784912
Parents: ce7c727
Author: Swapan Shridhar <ss...@hortonworks.com>
Authored: Tue Feb 21 12:29:14 2017 -0800
Committer: Swapan Shridhar <ss...@hortonworks.com>
Committed: Tue Feb 21 12:29:14 2017 -0800

----------------------------------------------------------------------
 .../common-services/DRUID/0.9.2/package/scripts/superset.py        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/59daf8b0/ambari-server/src/main/resources/common-services/DRUID/0.9.2/package/scripts/superset.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/package/scripts/superset.py b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/package/scripts/superset.py
index 6a56e25..f0077fa 100644
--- a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/package/scripts/superset.py
+++ b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/package/scripts/superset.py
@@ -145,7 +145,7 @@ def quote_string_value(value):
   if value.lower() == "true" or value.lower() == "false" or value.isdigit():
     return value
   else:
-    return "'{}'".format(value)
+    return "'{0}'".format(value)
 
 
 


[6/6] ambari git commit: Merge branch 'trunk' into branch-feature-AMBARI-20053

Posted by jo...@apache.org.
Merge branch 'trunk' into branch-feature-AMBARI-20053


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6553ffae
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6553ffae
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6553ffae

Branch: refs/heads/branch-feature-AMBARI-20053
Commit: 6553ffaee57a0c2a3ccc2389cfe4ecffef791338
Parents: 0c464b7 59daf8b
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Tue Feb 21 17:35:37 2017 -0500
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Tue Feb 21 17:35:37 2017 -0500

----------------------------------------------------------------------
 .../timeline/AbstractTimelineMetricsSink.java   |  22 +-
 .../timeline/HadoopTimelineMetricsSink.java     |  11 +-
 .../kerberos/FinalizeKerberosServerAction.java  |  14 +-
 .../kerberos/KerberosServerAction.java          |   2 +-
 .../DRUID/0.9.2/package/scripts/params.py       |   2 +-
 .../DRUID/0.9.2/package/scripts/superset.py     |   2 +-
 .../common-services/YARN/2.1.0.2.0/metainfo.xml |   1 +
 .../common-services/YARN/3.0.0.3.0/metainfo.xml |   1 +
 .../FinalizeKerberosServerActionTest.java       | 207 +++++++++++++++++++
 9 files changed, 243 insertions(+), 19 deletions(-)
----------------------------------------------------------------------



[4/6] ambari git commit: AMBARI-20046. Fix druid metric_emitter_type when ambari-metrics-server is installed. (Nishant Bangarwa via Swapan Shridhar).

Posted by jo...@apache.org.
AMBARI-20046. Fix druid metric_emitter_type when ambari-metrics-server is installed. (Nishant Bangarwa via Swapan Shridhar).


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ce7c7270
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ce7c7270
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ce7c7270

Branch: refs/heads/branch-feature-AMBARI-20053
Commit: ce7c72709c5bc8588ddaf65e8e6b246ee5bb0380
Parents: 9e5c57e
Author: Swapan Shridhar <ss...@hortonworks.com>
Authored: Tue Feb 21 12:25:09 2017 -0800
Committer: Swapan Shridhar <ss...@hortonworks.com>
Committed: Tue Feb 21 12:25:09 2017 -0800

----------------------------------------------------------------------
 .../common-services/DRUID/0.9.2/package/scripts/params.py          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ce7c7270/ambari-server/src/main/resources/common-services/DRUID/0.9.2/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/package/scripts/params.py b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/package/scripts/params.py
index c615fac..08ff3ab 100644
--- a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/package/scripts/params.py
@@ -162,7 +162,7 @@ ams_collector_hosts = default("/clusterHostInfo/metrics_collector_hosts", [])
 has_metric_collector = not len(ams_collector_hosts) == 0
 
 if has_metric_collector:
-    metric_emitter_type = "ambari-metrics-emitter"
+    metric_emitter_type = "ambari-metrics"
     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']