ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnettle...@apache.org
Subject ambari git commit: AMBARI-13712. Support for Blueprint export of a running Kerberized Cluster. (Sandor Magyari via rnettleton)
Date Thu, 05 Nov 2015 22:57:16 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 c950aaf07 -> 44966bffc


AMBARI-13712. Support for Blueprint export of a running Kerberized Cluster. (Sandor Magyari
via rnettleton)


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

Branch: refs/heads/branch-2.1
Commit: 44966bffc41f914b0cd1c6021506c2421db2be65
Parents: c950aaf
Author: Bob Nettleton <rnettleton@hortonworks.com>
Authored: Thu Nov 5 17:56:25 2015 -0500
Committer: Bob Nettleton <rnettleton@hortonworks.com>
Committed: Thu Nov 5 17:56:25 2015 -0500

----------------------------------------------------------------------
 .../query/render/ClusterBlueprintRenderer.java  |  74 +++++++++++++
 .../BlueprintConfigurationProcessor.java        |   8 +-
 .../render/ClusterBlueprintRendererTest.java    | 104 ++++++++++++++++++-
 .../BlueprintConfigurationProcessorTest.java    | 100 +++++++++++++-----
 4 files changed, 258 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/44966bff/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
b/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
index 29c3040..3705ceb 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
@@ -18,6 +18,7 @@
 
 package org.apache.ambari.server.api.query.render;
 
+import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.api.query.QueryInfo;
 import org.apache.ambari.server.api.services.Request;
 import org.apache.ambari.server.api.services.Result;
@@ -28,11 +29,23 @@ import org.apache.ambari.server.api.util.TreeNode;
 import org.apache.ambari.server.api.util.TreeNodeImpl;
 import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.AmbariServer;
+import org.apache.ambari.server.controller.internal.ArtifactResourceProvider;
 import org.apache.ambari.server.controller.internal.BlueprintConfigurationProcessor;
+import org.apache.ambari.server.controller.internal.BlueprintResourceProvider;
 import org.apache.ambari.server.controller.internal.ExportBlueprintRequest;
+import org.apache.ambari.server.controller.internal.RequestImpl;
 import org.apache.ambari.server.controller.internal.ResourceImpl;
 import org.apache.ambari.server.controller.internal.Stack;
+import org.apache.ambari.server.controller.spi.ClusterController;
+import org.apache.ambari.server.controller.spi.NoSuchParentResourceException;
+import org.apache.ambari.server.controller.spi.NoSuchResourceException;
+import org.apache.ambari.server.controller.spi.Predicate;
 import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.ambari.server.controller.spi.ResourceProvider;
+import org.apache.ambari.server.controller.spi.SystemException;
+import org.apache.ambari.server.controller.spi.UnsupportedPropertyException;
+import org.apache.ambari.server.controller.utilities.PredicateBuilder;
+import org.apache.ambari.server.state.SecurityType;
 import org.apache.ambari.server.topology.AmbariContext;
 import org.apache.ambari.server.topology.ClusterTopology;
 import org.apache.ambari.server.topology.ClusterTopologyImpl;
@@ -41,6 +54,7 @@ import org.apache.ambari.server.topology.HostGroup;
 import org.apache.ambari.server.topology.HostGroupInfo;
 import org.apache.ambari.server.topology.InvalidTopologyException;
 import org.apache.ambari.server.topology.InvalidTopologyTemplateException;
+import org.apache.ambari.server.topology.SecurityConfigurationFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -49,6 +63,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -173,6 +188,23 @@ public class ClusterBlueprintRenderer extends BaseRenderer implements
Renderer {
     blueprintResource.setProperty("Blueprints/stack_name", stack.getName());
     blueprintResource.setProperty("Blueprints/stack_version", stack.getVersion());
 
+    if (topology.isClusterKerberosEnabled()) {
+      Map<String, Object> securityConfigMap = new LinkedHashMap<>();
+      securityConfigMap.put(SecurityConfigurationFactory.TYPE_PROPERTY_ID, SecurityType.KERBEROS.name());
+
+      try {
+        String clusterName = topology.getAmbariContext().getClusterName(topology.getClusterId());
+        Map<String, Object> kerberosDescriptor = getKerberosDescriptor(topology.getAmbariContext()
+          .getClusterController(), clusterName);
+        if (kerberosDescriptor != null) {
+          securityConfigMap.put(SecurityConfigurationFactory.KERBEROS_DESCRIPTOR_PROPERTY_ID,
kerberosDescriptor);
+        }
+      } catch (AmbariException e) {
+        LOG.info("Unable to retrieve kerberos_descriptor: ", e.getMessage());
+      }
+      blueprintResource.setProperty(BlueprintResourceProvider.BLUEPRINT_SECURITY_PROPERTY_ID,
securityConfigMap);
+    }
+
     List<Map<String, Object>> groupList = formatGroupsAsList(topology);
     blueprintResource.setProperty("host_groups", groupList);
 
@@ -184,6 +216,48 @@ public class ClusterBlueprintRenderer extends BaseRenderer implements
Renderer {
     return blueprintResource;
   }
 
+  private Map<String, Object> getKerberosDescriptor(ClusterController clusterController,
String clusterName) throws AmbariException {
+    PredicateBuilder pb = new PredicateBuilder();
+    Predicate predicate = pb.begin().property("Artifacts/cluster_name").equals(clusterName).and().
+      property(ArtifactResourceProvider.ARTIFACT_NAME_PROPERTY).equals("kerberos_descriptor").
+      end().toPredicate();
+
+    ResourceProvider artifactProvider =
+       clusterController.ensureResourceProvider(Resource.Type.Artifact);
+
+    org.apache.ambari.server.controller.spi.Request request = new RequestImpl(Collections.<String>emptySet(),
+      Collections.<Map<String, Object>>emptySet(), Collections.<String, String>emptyMap(),
null);
+
+    Set<Resource> response = null;
+    try {
+      response = artifactProvider.getResources(request, predicate);
+    } catch (SystemException | UnsupportedPropertyException | NoSuchResourceException | NoSuchParentResourceException
+      e) {
+      throw new AmbariException("An unknown error occurred while trying to obtain the cluster
kerberos descriptor", e);
+    }
+
+    if (response != null && !response.isEmpty()) {
+      Resource descriptorResource = response.iterator().next();
+      Map<String, Map<String, Object>> propertyMap = descriptorResource.getPropertiesMap();
+
+      if (propertyMap != null) {
+        Map<String, Object> artifactData = propertyMap.get(ArtifactResourceProvider.ARTIFACT_DATA_PROPERTY);
+        Map<String, Object> artifactDataProperties = propertyMap.get(ArtifactResourceProvider.ARTIFACT_DATA_PROPERTY
+ "/properties");
+        HashMap<String, Object> data = new HashMap<String, Object>();
+
+        if (artifactData != null) {
+          data.putAll(artifactData);
+        }
+
+        if (artifactDataProperties != null) {
+          data.put("properties", artifactDataProperties);
+        }
+        return data;
+      }
+    }
+    return null;
+  }
+
   /**
    * Process cluster scoped configurations.
    *

http://git-wip-us.apache.org/repos/asf/ambari/blob/44966bff/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
index ac714e1..7097e78 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
@@ -139,7 +139,13 @@ public class BlueprintConfigurationProcessor {
     { new PasswordPropertyFilter(),
       new SimplePropertyNameExportFilter("tez.tez-ui.history-url.base", "tez-site"),
       new SimplePropertyNameExportFilter("admin_server_host", "kerberos-env"),
-      new SimplePropertyNameExportFilter("kdc_host", "kerberos-env")};
+      new SimplePropertyNameExportFilter("kdc_host", "kerberos-env"),
+      new SimplePropertyNameExportFilter("realm", "kerberos-env"),
+      new SimplePropertyNameExportFilter("kdc_type", "kerberos-env"),
+      new SimplePropertyNameExportFilter("ldap-url", "kerberos-env"),
+      new SimplePropertyNameExportFilter("container_dn", "kerberos-env"),
+      new SimplePropertyNameExportFilter("domains", "krb5-conf")
+    };
 
   /**
    * Statically-defined list of filters to apply on cluster config

http://git-wip-us.apache.org/repos/asf/ambari/blob/44966bff/ambari-server/src/test/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRendererTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRendererTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRendererTest.java
index c0fe07e..522d902 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRendererTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRendererTest.java
@@ -26,11 +26,18 @@ import org.apache.ambari.server.api.services.Result;
 import org.apache.ambari.server.api.services.ResultImpl;
 import org.apache.ambari.server.api.util.TreeNode;
 import org.apache.ambari.server.api.util.TreeNodeImpl;
+import org.apache.ambari.server.controller.internal.ArtifactResourceProvider;
+import org.apache.ambari.server.controller.internal.ClusterControllerImpl;
 import org.apache.ambari.server.controller.internal.ResourceImpl;
 import org.apache.ambari.server.controller.internal.Stack;
+import org.apache.ambari.server.controller.spi.ClusterController;
+import org.apache.ambari.server.controller.spi.Predicate;
+import org.apache.ambari.server.controller.spi.Request;
 import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.ambari.server.controller.spi.ResourceProvider;
 import org.apache.ambari.server.state.DesiredConfig;
 import org.apache.ambari.server.state.ServiceInfo;
+import org.apache.ambari.server.topology.AmbariContext;
 import org.apache.ambari.server.topology.Blueprint;
 import org.apache.ambari.server.topology.ClusterTopology;
 import org.apache.ambari.server.topology.Configuration;
@@ -41,6 +48,10 @@ import org.apache.ambari.server.topology.InvalidTopologyTemplateException;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.powermock.api.easymock.PowerMock;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
 
 import java.net.InetAddress;
 import java.net.UnknownHostException;
@@ -53,20 +64,31 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import static org.easymock.EasyMock.*;
+import static org.easymock.EasyMock.anyLong;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.createNiceMock;
+import static org.easymock.EasyMock.createStrictMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.reset;
+import static org.easymock.EasyMock.verify;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
 
 /**
  * ClusterBlueprintRenderer unit tests.
  */
 @SuppressWarnings("unchecked")
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(AmbariContext.class)
 public class ClusterBlueprintRendererTest {
 
   private static final ClusterTopology topology = createNiceMock(ClusterTopology.class);
+  private static final ClusterController clusterController = createNiceMock(ClusterControllerImpl.class);
+
   private static final Blueprint blueprint = createNiceMock(Blueprint.class);
   private static final Stack stack = createNiceMock(Stack.class);
   private static final HostGroup group1 = createNiceMock(HostGroup.class);
@@ -134,6 +156,56 @@ public class ClusterBlueprintRendererTest {
     replay(topology, blueprint, stack, group1, group2);
   }
 
+  private void setupMocksForKerberosEnabledCluster() throws Exception {
+
+    AmbariContext ambariContext = createNiceMock(AmbariContext.class);
+    expect(ambariContext.getClusterName(anyLong())).andReturn("clusterName").anyTimes();
+
+    PowerMock.mockStatic(AmbariContext.class);
+    expect(AmbariContext.getClusterController()).andReturn(clusterController).anyTimes();
+
+    reset(topology);
+
+    HostGroupInfo group1Info = new HostGroupInfo("host_group_1");
+    group1Info.addHost("host1");
+    group1Info.setConfiguration(emptyConfiguration);
+    HostGroupInfo group2Info = new HostGroupInfo("host_group_2");
+    Map<String, HostGroupInfo> groupInfoMap = new HashMap<String, HostGroupInfo>();
+    group2Info.addHosts(Arrays.asList("host2", "host3"));
+    group2Info.setConfiguration(emptyConfiguration);
+    groupInfoMap.put("host_group_1", group1Info);
+    groupInfoMap.put("host_group_2", group2Info);
+
+    expect(topology.isNameNodeHAEnabled()).andReturn(false).anyTimes();
+    expect(topology.getConfiguration()).andReturn(clusterConfig).anyTimes();
+    expect(topology.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(topology.getHostGroupInfo()).andReturn(groupInfoMap).anyTimes();
+    expect(topology.getClusterId()).andReturn(new Long(1)).anyTimes();
+    expect(topology.getAmbariContext()).andReturn(ambariContext).anyTimes();
+    expect(topology.isClusterKerberosEnabled()).andReturn(true).anyTimes();
+
+    ResourceProvider resourceProvider = createStrictMock(ResourceProvider.class);
+    expect(clusterController.ensureResourceProvider(Resource.Type.Artifact)).andReturn(resourceProvider).once();
+
+    Resource resource = createStrictMock(Resource.class);
+    Set<Resource> result = Collections.singleton(resource);
+
+    expect(resourceProvider.getResources((Request) anyObject(Request.class),
+      (Predicate) anyObject(Predicate.class))).andReturn(result).once();
+
+    Map<String, Map<String, Object>> resourcePropertiesMap = new HashMap<>();
+    resourcePropertiesMap.put(ArtifactResourceProvider.ARTIFACT_DATA_PROPERTY, Collections.<String,
Object>emptyMap());
+    Map<String, Object> propertiesMap = new HashMap<>();
+    propertiesMap.put("testProperty", "testValue");
+    resourcePropertiesMap.put(ArtifactResourceProvider.ARTIFACT_DATA_PROPERTY + "/properties",
propertiesMap);
+
+    expect(resource.getPropertiesMap()).andReturn(resourcePropertiesMap).once();
+
+    PowerMock.replay(AmbariContext.class);
+    replay(ambariContext, topology, clusterController, resource, resourceProvider);
+  }
+
+
   @After
   public void tearDown() {
     verify(topology, blueprint, stack, group1, group2);
@@ -185,6 +257,34 @@ public class ClusterBlueprintRendererTest {
   }
 
   @Test
+  public void testFinalizeResult_kerberos() throws Exception{
+
+    setupMocksForKerberosEnabledCluster();
+
+    Result result = new ResultImpl(true);
+    createClusterResultTree(result.getResultTree());
+
+    ClusterBlueprintRenderer renderer = new TestBlueprintRenderer(topology);
+    Result blueprintResult = renderer.finalizeResult(result);
+
+    TreeNode<Resource> blueprintTree = blueprintResult.getResultTree();
+    assertNull(blueprintTree.getStringProperty("isCollection"));
+    assertEquals(1, blueprintTree.getChildren().size());
+
+    TreeNode<Resource> blueprintNode = blueprintTree.getChildren().iterator().next();
+    assertEquals(0, blueprintNode.getChildren().size());
+    Resource blueprintResource = blueprintNode.getObject();
+    Map<String, Map<String, Object>> properties = blueprintResource.getPropertiesMap();
+
+    assertEquals("HDP", properties.get("Blueprints").get("stack_name"));
+    assertEquals("1.3.3", properties.get("Blueprints").get("stack_version"));
+
+    Map<String, Object> securityProperties = (Map<String, Object>) properties.get("Blueprints").get("security");
+    assertEquals("KERBEROS", securityProperties.get("type"));
+    assertNotNull(((Map<String, Object>) securityProperties.get("kerberos_descriptor")).get("properties"));
+  }
+
+  @Test
   public void testFinalizeResult() throws Exception{
 
     Result result = new ResultImpl(true);

http://git-wip-us.apache.org/repos/asf/ambari/blob/44966bff/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
index 4d3898a..0301467 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
@@ -18,38 +18,16 @@
 
 package org.apache.ambari.server.controller.internal;
 
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertFalse;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertNull;
-import static junit.framework.Assert.assertTrue;
-import static junit.framework.Assert.fail;
-import org.apache.ambari.server.state.ValueAttributesInfo;
-import org.apache.ambari.server.topology.AdvisedConfiguration;
-import org.apache.ambari.server.topology.ConfigRecommendationStrategy;
-import static org.easymock.EasyMock.anyObject;
-import static org.easymock.EasyMock.createNiceMock;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.reset;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 import org.apache.ambari.server.state.PropertyDependencyInfo;
 import org.apache.ambari.server.state.ServiceInfo;
+import org.apache.ambari.server.state.ValueAttributesInfo;
+import org.apache.ambari.server.topology.AdvisedConfiguration;
 import org.apache.ambari.server.topology.AmbariContext;
 import org.apache.ambari.server.topology.Blueprint;
 import org.apache.ambari.server.topology.Cardinality;
 import org.apache.ambari.server.topology.ClusterTopology;
 import org.apache.ambari.server.topology.ClusterTopologyImpl;
+import org.apache.ambari.server.topology.ConfigRecommendationStrategy;
 import org.apache.ambari.server.topology.Configuration;
 import org.apache.ambari.server.topology.HostGroup;
 import org.apache.ambari.server.topology.HostGroupImpl;
@@ -59,6 +37,28 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertNull;
+import static junit.framework.Assert.assertTrue;
+import static junit.framework.Assert.fail;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.createNiceMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.reset;
+
 /**
  * BlueprintConfigurationProcessor unit tests.
  */
@@ -196,6 +196,56 @@ public class BlueprintConfigurationProcessorTest {
   }
 
   @Test
+  public void testDoUpdateForBlueprintExport_FilterProperties() throws Exception {
+    Map<String, Map<String, String>> properties = new HashMap<String, Map<String,
String>>();
+
+    Map<String, String> kerberosEnvProps = new HashMap<String, String>();
+    kerberosEnvProps.put("admin_server_host", "test");
+    kerberosEnvProps.put("kdc_host", "test");
+    kerberosEnvProps.put("realm", "test");
+    kerberosEnvProps.put("kdc_type", "test");
+    kerberosEnvProps.put("ldap-url", "test");
+    kerberosEnvProps.put("container_dn", "test");
+    properties.put("kerberos-env", kerberosEnvProps);
+
+    Map<String, String> krb5ConfProps = new HashMap<String, String>();
+    krb5ConfProps.put("domains", "test");
+    properties.put("krb5-conf", krb5ConfProps);
+
+    Map<String, String> tezSiteConfProps = new HashMap<String, String>();
+    tezSiteConfProps.put("tez.tez-ui.history-url.base", "test");
+    properties.put("tez-site", tezSiteConfProps);
+
+
+    Configuration clusterConfig = new Configuration(properties,
+      Collections.<String, Map<String, Map<String, String>>>emptyMap());
+
+    Collection<String> hgComponents = new HashSet<String>();
+    hgComponents.add("NAMENODE");
+    hgComponents.add("SECONDARY_NAMENODE");
+    hgComponents.add("RESOURCEMANAGER");
+    TestHostGroup group1 = new TestHostGroup("group1", hgComponents, Collections.singleton("testhost"));
+
+    Collection<String> hgComponents2 = new HashSet<String>();
+    hgComponents2.add("DATANODE");
+    hgComponents2.add("HDFS_CLIENT");
+    TestHostGroup group2 = new TestHostGroup("group2", hgComponents2, Collections.singleton("testhost2"));
+
+    Collection<TestHostGroup> hostGroups = new HashSet<TestHostGroup>();
+    hostGroups.add(group1);
+    hostGroups.add(group2);
+
+    ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    configProcessor.doUpdateForBlueprintExport();
+
+    assertEquals(properties.size(), 3);
+    assertEquals(((Map) properties.get("kerberos-env")).size(), 0);
+    assertEquals(((Map) properties.get("krb5-conf")).size(), 0);
+    assertEquals(((Map) properties.get("tez-site")).size(), 0);
+  }
+
+  @Test
   public void testDoUpdateForBlueprintExport_SingleHostProperty_specifiedInParentConfig()
throws Exception {
     Map<String, Map<String, String>> properties = new HashMap<String, Map<String,
String>>();
     Map<String, String> yarnSiteProps = new HashMap<String, String>();


Mime
View raw message