Repository: ambari
Updated Branches:
  refs/heads/trunk edf85a383 -> b71109eed


AMBARI-17098 - Atlas Integration : Ambari overwrites 
users-credentials.properties and policy-store.txt (fix test)


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

Branch: refs/heads/trunk
Commit: b71109eeda4a892e8d41dad16cc6134f647d0ba7
Parents: edf85a3
Author: tbeerbower <tbeerbo...@hortonworks.com>
Authored: Tue Jun 7 17:58:18 2016 -0400
Committer: tbeerbower <tbeerbo...@hortonworks.com>
Committed: Tue Jun 7 17:58:33 2016 -0400

----------------------------------------------------------------------
 .../BlueprintConfigurationProcessorTest.java    | 326 -------------------
 1 file changed, 326 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b71109ee/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 b678a84..9ec0a09 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
@@ -4904,332 +4904,6 @@ public class BlueprintConfigurationProcessorTest {
   }
 
   @Test
-  public void testAtlas() throws Exception {
-    final String expectedHostGroupName = "host_group_1";
-    final String host1 = "c6401.ambari.apache.org";
-    final String host2 = "c6402.ambari.apache.org";
-    final String host3 = "c6403.ambari.apache.org";
-
-    Map<String, Map<String, String>> properties = new HashMap<String, 
Map<String, String>>();
-    Map<String, String> atlasProperties = new HashMap<String, String>();
-    properties.put("application-properties", atlasProperties);
-
-    // setup properties that include host information
-    atlasProperties.put("atlas.kafka.bootstrap.servers", "localhost:6667");
-    atlasProperties.put("atlas.kafka.zookeeper.connect", "localhost:2181");
-    atlasProperties.put("atlas.graph.index.search.solr.zookeeper-url", 
"localhost:2181/ambari-solr");
-    atlasProperties.put("atlas.graph.storage.hostname", "localhost");
-    atlasProperties.put("atlas.audit.hbase.zookeeper.quorum", "localhost");
-
-
-    Configuration clusterConfig = new Configuration(properties, 
Collections.<String, Map<String, Map<String, String>>>emptyMap());
-
-    Collection<String> hgComponents = new HashSet<String>();
-    hgComponents.add("KAFKA_BROKER");
-    hgComponents.add("ZOOKEEPER_SERVER");
-    hgComponents.add("HBASE_MASTER");
-    List<String> hosts = new ArrayList<String>();
-    hosts.add(host1);
-    hosts.add(host2);
-    hosts.add(host3);
-    TestHostGroup group1 = new TestHostGroup(expectedHostGroupName, 
hgComponents, hosts);
-
-    Collection<TestHostGroup> hostGroups = new HashSet<TestHostGroup>();
-    hostGroups.add(group1);
-
-    ClusterTopology topology = createClusterTopology(bp, clusterConfig, 
hostGroups);
-    BlueprintConfigurationProcessor updater = new 
BlueprintConfigurationProcessor(topology);
-
-    // call top-level cluster config update method
-    updater.doUpdateForClusterCreate();
-
-    List<String> hostArray =
-        
Arrays.asList(atlasProperties.get("atlas.kafka.bootstrap.servers").split(","));
-    List<String> expected =
-        
Arrays.asList("c6401.ambari.apache.org:6667","c6402.ambari.apache.org:6667", 
"c6403.ambari.apache.org:6667");
-
-    Assert.assertTrue(hostArray.containsAll(expected) && 
expected.containsAll(hostArray));
-
-    hostArray = 
Arrays.asList(atlasProperties.get("atlas.kafka.zookeeper.connect").split(","));
-    expected =
-        
Arrays.asList("c6401.ambari.apache.org:2181","c6402.ambari.apache.org:2181", 
"c6403.ambari.apache.org:2181");
-    Assert.assertTrue(hostArray.containsAll(expected) && 
expected.containsAll(hostArray));
-
-
-    hostArray = 
Arrays.asList(atlasProperties.get("atlas.graph.index.search.solr.zookeeper-url").split(","));
-    expected =
-        
Arrays.asList("c6401.ambari.apache.org:2181/ambari-solr","c6402.ambari.apache.org:2181/ambari-solr",
 "c6403.ambari.apache.org:2181/ambari-solr");
-    Assert.assertTrue(hostArray.containsAll(expected) && 
expected.containsAll(hostArray));
-
-    hostArray = 
Arrays.asList(atlasProperties.get("atlas.graph.storage.hostname").split(","));
-    expected =
-        Arrays.asList("c6401.ambari.apache.org","c6402.ambari.apache.org", 
"c6403.ambari.apache.org");
-    Assert.assertTrue(hostArray.containsAll(expected) && 
expected.containsAll(hostArray));
-
-    hostArray = 
Arrays.asList(atlasProperties.get("atlas.audit.hbase.zookeeper.quorum").split(","));
-    expected =
-        Arrays.asList("c6401.ambari.apache.org","c6402.ambari.apache.org", 
"c6403.ambari.apache.org");
-    Assert.assertTrue(hostArray.containsAll(expected) && 
expected.containsAll(hostArray));
-  }
-
-  @Test
-  public void testAtlasHA() throws Exception {
-    final String expectedHostGroupName = "host_group_1";
-    final String host1 = "c6401.ambari.apache.org";
-    final String host2 = "c6402.ambari.apache.org";
-    final String host3 = "c6403.ambari.apache.org";
-
-    Map<String, Map<String, String>> properties = new HashMap<String, 
Map<String, String>>();
-    Map<String, String> atlasProperties = new HashMap<String, String>();
-    properties.put("application-properties", atlasProperties);
-
-    // setup properties that include host information
-    atlasProperties.put("atlas.server.ids", "");
-    atlasProperties.put("atlas.server.address.id1", "");
-    atlasProperties.put("atlas.server.http.port", "21000");
-    atlasProperties.put("atlas.server.https.port", "21443");
-    atlasProperties.put("atlas.enableTLS", "false");
-
-    Configuration clusterConfig = new Configuration(properties, 
Collections.<String, Map<String, Map<String, String>>>emptyMap());
-
-    Collection<String> hgComponents = new HashSet<String>();
-    hgComponents.add("ATLAS_SERVER");
-    List<String> hosts = new ArrayList<String>();
-    hosts.add(host1);
-    hosts.add(host2);
-    hosts.add(host3);
-    TestHostGroup group1 = new TestHostGroup(expectedHostGroupName, 
hgComponents, hosts);
-
-    Collection<TestHostGroup> hostGroups = new HashSet<TestHostGroup>();
-    hostGroups.add(group1);
-
-    ClusterTopology topology = createClusterTopology(bp, clusterConfig, 
hostGroups);
-    BlueprintConfigurationProcessor updater = new 
BlueprintConfigurationProcessor(topology);
-
-    // call top-level cluster config update method
-    updater.doUpdateForClusterCreate();
-
-    assertEquals("id1,id2,id3", atlasProperties.get("atlas.server.ids"));
-
-    List<String> hostArray =
-        
Arrays.asList(atlasProperties.get("atlas.server.address.id1").split("\natlas.server.address.id.="));
-    List<String> expected =
-        
Arrays.asList("c6401.ambari.apache.org:21000","c6402.ambari.apache.org:21000", 
"c6403.ambari.apache.org:21000");
-
-    Assert.assertTrue(hostArray.containsAll(expected) && 
expected.containsAll(hostArray));
-  }
-
-  @Test
-  public void testAtlasHAEnableTLS() throws Exception {
-    final String expectedHostGroupName = "host_group_1";
-    final String host1 = "c6401.ambari.apache.org";
-    final String host2 = "c6402.ambari.apache.org";
-    final String host3 = "c6403.ambari.apache.org";
-
-    Map<String, Map<String, String>> properties = new HashMap<String, 
Map<String, String>>();
-    Map<String, String> atlasProperties = new HashMap<String, String>();
-    properties.put("application-properties", atlasProperties);
-
-    // setup properties that include host information
-    atlasProperties.put("atlas.server.ids", "");
-    atlasProperties.put("atlas.server.address.id1", "");
-    atlasProperties.put("atlas.server.http.port", "21000");
-    atlasProperties.put("atlas.server.https.port", "21443");
-    atlasProperties.put("atlas.enableTLS", "true");
-
-    Configuration clusterConfig = new Configuration(properties, 
Collections.<String, Map<String, Map<String, String>>>emptyMap());
-
-    Collection<String> hgComponents = new HashSet<String>();
-    hgComponents.add("ATLAS_SERVER");
-    List<String> hosts = new ArrayList<String>();
-    hosts.add(host1);
-    hosts.add(host2);
-    hosts.add(host3);
-    TestHostGroup group1 = new TestHostGroup(expectedHostGroupName, 
hgComponents, hosts);
-
-    Collection<TestHostGroup> hostGroups = new HashSet<TestHostGroup>();
-    hostGroups.add(group1);
-
-    ClusterTopology topology = createClusterTopology(bp, clusterConfig, 
hostGroups);
-    BlueprintConfigurationProcessor updater = new 
BlueprintConfigurationProcessor(topology);
-
-    // call top-level cluster config update method
-    updater.doUpdateForClusterCreate();
-
-    assertEquals("id1,id2,id3", atlasProperties.get("atlas.server.ids"));
-
-    List<String> hostArray =
-        
Arrays.asList(atlasProperties.get("atlas.server.address.id1").split("\natlas.server.address.id.="));
-    List<String> expected =
-        
Arrays.asList("c6401.ambari.apache.org:21443","c6402.ambari.apache.org:21443", 
"c6403.ambari.apache.org:21443");
-
-    Assert.assertTrue(hostArray.containsAll(expected) && 
expected.containsAll(hostArray));
-  }
-
-  @Test
-  public void testAtlas() throws Exception {
-    final String expectedHostGroupName = "host_group_1";
-    final String host1 = "c6401.ambari.apache.org";
-    final String host2 = "c6402.ambari.apache.org";
-    final String host3 = "c6403.ambari.apache.org";
-
-    Map<String, Map<String, String>> properties = new HashMap<String, 
Map<String, String>>();
-    Map<String, String> atlasProperties = new HashMap<String, String>();
-    properties.put("application-properties", atlasProperties);
-
-    // setup properties that include host information
-    atlasProperties.put("atlas.kafka.bootstrap.servers", "localhost:6667");
-    atlasProperties.put("atlas.kafka.zookeeper.connect", "localhost:2181");
-    atlasProperties.put("atlas.graph.index.search.solr.zookeeper-url", 
"localhost:2181/ambari-solr");
-    atlasProperties.put("atlas.graph.storage.hostname", "localhost");
-    atlasProperties.put("atlas.audit.hbase.zookeeper.quorum", "localhost");
-
-
-    Configuration clusterConfig = new Configuration(properties, 
Collections.<String, Map<String, Map<String, String>>>emptyMap());
-
-    Collection<String> hgComponents = new HashSet<String>();
-    hgComponents.add("KAFKA_BROKER");
-    hgComponents.add("ZOOKEEPER_SERVER");
-    hgComponents.add("HBASE_MASTER");
-    List<String> hosts = new ArrayList<String>();
-    hosts.add(host1);
-    hosts.add(host2);
-    hosts.add(host3);
-    TestHostGroup group1 = new TestHostGroup(expectedHostGroupName, 
hgComponents, hosts);
-
-    Collection<TestHostGroup> hostGroups = new HashSet<TestHostGroup>();
-    hostGroups.add(group1);
-
-    ClusterTopology topology = createClusterTopology(bp, clusterConfig, 
hostGroups);
-    BlueprintConfigurationProcessor updater = new 
BlueprintConfigurationProcessor(topology);
-
-    // call top-level cluster config update method
-    updater.doUpdateForClusterCreate();
-
-    List<String> hostArray =
-        
Arrays.asList(atlasProperties.get("atlas.kafka.bootstrap.servers").split(","));
-    List<String> expected =
-        
Arrays.asList("c6401.ambari.apache.org:6667","c6402.ambari.apache.org:6667", 
"c6403.ambari.apache.org:6667");
-
-    Assert.assertTrue(hostArray.containsAll(expected) && 
expected.containsAll(hostArray));
-
-    hostArray = 
Arrays.asList(atlasProperties.get("atlas.kafka.zookeeper.connect").split(","));
-    expected =
-        
Arrays.asList("c6401.ambari.apache.org:2181","c6402.ambari.apache.org:2181", 
"c6403.ambari.apache.org:2181");
-    Assert.assertTrue(hostArray.containsAll(expected) && 
expected.containsAll(hostArray));
-
-
-    hostArray = 
Arrays.asList(atlasProperties.get("atlas.graph.index.search.solr.zookeeper-url").split(","));
-    expected =
-        
Arrays.asList("c6401.ambari.apache.org:2181/ambari-solr","c6402.ambari.apache.org:2181/ambari-solr",
 "c6403.ambari.apache.org:2181/ambari-solr");
-    Assert.assertTrue(hostArray.containsAll(expected) && 
expected.containsAll(hostArray));
-
-    hostArray = 
Arrays.asList(atlasProperties.get("atlas.graph.storage.hostname").split(","));
-    expected =
-        Arrays.asList("c6401.ambari.apache.org","c6402.ambari.apache.org", 
"c6403.ambari.apache.org");
-    Assert.assertTrue(hostArray.containsAll(expected) && 
expected.containsAll(hostArray));
-
-    hostArray = 
Arrays.asList(atlasProperties.get("atlas.audit.hbase.zookeeper.quorum").split(","));
-    expected =
-        Arrays.asList("c6401.ambari.apache.org","c6402.ambari.apache.org", 
"c6403.ambari.apache.org");
-    Assert.assertTrue(hostArray.containsAll(expected) && 
expected.containsAll(hostArray));
-  }
-
-  @Test
-  public void testAtlasHA() throws Exception {
-    final String expectedHostGroupName = "host_group_1";
-    final String host1 = "c6401.ambari.apache.org";
-    final String host2 = "c6402.ambari.apache.org";
-    final String host3 = "c6403.ambari.apache.org";
-
-    Map<String, Map<String, String>> properties = new HashMap<String, 
Map<String, String>>();
-    Map<String, String> atlasProperties = new HashMap<String, String>();
-    properties.put("application-properties", atlasProperties);
-
-    // setup properties that include host information
-    atlasProperties.put("atlas.server.ids", "");
-    atlasProperties.put("atlas.server.address.id1", "");
-    atlasProperties.put("atlas.server.http.port", "21000");
-    atlasProperties.put("atlas.server.https.port", "21443");
-    atlasProperties.put("atlas.enableTLS", "false");
-
-    Configuration clusterConfig = new Configuration(properties, 
Collections.<String, Map<String, Map<String, String>>>emptyMap());
-
-    Collection<String> hgComponents = new HashSet<String>();
-    hgComponents.add("ATLAS_SERVER");
-    List<String> hosts = new ArrayList<String>();
-    hosts.add(host1);
-    hosts.add(host2);
-    hosts.add(host3);
-    TestHostGroup group1 = new TestHostGroup(expectedHostGroupName, 
hgComponents, hosts);
-
-    Collection<TestHostGroup> hostGroups = new HashSet<TestHostGroup>();
-    hostGroups.add(group1);
-
-    ClusterTopology topology = createClusterTopology(bp, clusterConfig, 
hostGroups);
-    BlueprintConfigurationProcessor updater = new 
BlueprintConfigurationProcessor(topology);
-
-    // call top-level cluster config update method
-    updater.doUpdateForClusterCreate();
-
-    assertEquals("id1,id2,id3", atlasProperties.get("atlas.server.ids"));
-
-    List<String> hostArray =
-        
Arrays.asList(atlasProperties.get("atlas.server.address.id1").split("\natlas.server.address.id.="));
-    List<String> expected =
-        
Arrays.asList("c6401.ambari.apache.org:21000","c6402.ambari.apache.org:21000", 
"c6403.ambari.apache.org:21000");
-
-    Assert.assertTrue(hostArray.containsAll(expected) && 
expected.containsAll(hostArray));
-  }
-
-  @Test
-  public void testAtlasHAEnableTLS() throws Exception {
-    final String expectedHostGroupName = "host_group_1";
-    final String host1 = "c6401.ambari.apache.org";
-    final String host2 = "c6402.ambari.apache.org";
-    final String host3 = "c6403.ambari.apache.org";
-
-    Map<String, Map<String, String>> properties = new HashMap<String, 
Map<String, String>>();
-    Map<String, String> atlasProperties = new HashMap<String, String>();
-    properties.put("application-properties", atlasProperties);
-
-    // setup properties that include host information
-    atlasProperties.put("atlas.server.ids", "");
-    atlasProperties.put("atlas.server.address.id1", "");
-    atlasProperties.put("atlas.server.http.port", "21000");
-    atlasProperties.put("atlas.server.https.port", "21443");
-    atlasProperties.put("atlas.enableTLS", "true");
-
-    Configuration clusterConfig = new Configuration(properties, 
Collections.<String, Map<String, Map<String, String>>>emptyMap());
-
-    Collection<String> hgComponents = new HashSet<String>();
-    hgComponents.add("ATLAS_SERVER");
-    List<String> hosts = new ArrayList<String>();
-    hosts.add(host1);
-    hosts.add(host2);
-    hosts.add(host3);
-    TestHostGroup group1 = new TestHostGroup(expectedHostGroupName, 
hgComponents, hosts);
-
-    Collection<TestHostGroup> hostGroups = new HashSet<TestHostGroup>();
-    hostGroups.add(group1);
-
-    ClusterTopology topology = createClusterTopology(bp, clusterConfig, 
hostGroups);
-    BlueprintConfigurationProcessor updater = new 
BlueprintConfigurationProcessor(topology);
-
-    // call top-level cluster config update method
-    updater.doUpdateForClusterCreate();
-
-    assertEquals("id1,id2,id3", atlasProperties.get("atlas.server.ids"));
-
-    List<String> hostArray =
-        
Arrays.asList(atlasProperties.get("atlas.server.address.id1").split("\natlas.server.address.id.="));
-    List<String> expected =
-        
Arrays.asList("c6401.ambari.apache.org:21443","c6402.ambari.apache.org:21443", 
"c6403.ambari.apache.org:21443");
-
-    Assert.assertTrue(hostArray.containsAll(expected) && 
expected.containsAll(hostArray));
-  }
-
-  @Test
   public void testHiveConfigClusterUpdateExportedHostGroupValue() throws 
Exception {
     final String expectedHostGroupName = "host_group_1";
     final String expectedHostName = "c6401.ambari.apache.org";

Reply via email to