ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alejan...@apache.org
Subject ambari git commit: AMBARI-17386. Misc fixes for Atlas, write correct conf files for server and client, use PLAINTEXTSASL, and remove atlas from HADOOP_CLASSPATH in Hive (alejandro)
Date Thu, 23 Jun 2016 18:25:27 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 16d63dabf -> bf2d60551


AMBARI-17386. Misc fixes for Atlas, write correct conf files for server and client, use PLAINTEXTSASL,
and remove atlas from HADOOP_CLASSPATH in Hive (alejandro)


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

Branch: refs/heads/branch-2.4
Commit: bf2d60551379693ffb92d982cf6a5abc15461aff
Parents: 16d63da
Author: Alejandro Fernandez <afernandez@hortonworks.com>
Authored: Thu Jun 23 11:27:16 2016 -0700
Committer: Alejandro Fernandez <afernandez@hortonworks.com>
Committed: Thu Jun 23 11:27:16 2016 -0700

----------------------------------------------------------------------
 .../ATLAS/0.1.0.2.3/package/scripts/metadata.py | 127 +++++++++----------
 .../HIVE/0.12.0.2.0/configuration/hive-env.xml  |   3 -
 .../stacks/HDP/2.5/services/ATLAS/kerberos.json |   2 +-
 .../services/HIVE/configuration/hive-env.xml    |  10 +-
 .../HIVE/configuration/hive-interactive-env.xml |   2 -
 .../stacks/HDP/2.5/services/stack_advisor.py    |   2 +-
 .../stacks/2.3/ATLAS/test_metadata_server.py    |  52 ++++----
 .../stacks/2.5/ATLAS/test_atlas_server.py       |  70 +++++-----
 8 files changed, 134 insertions(+), 134 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/bf2d6055/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
index ad92491..e45560e 100644
--- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
+++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
@@ -27,15 +27,8 @@ from resource_management.libraries.functions import solr_cloud_util
 
 def metadata(type='server'):
     import params
-
-    Directory([params.pid_dir],
-              mode=0755,
-              cd_access='a',
-              owner=params.metadata_user,
-              group=params.user_group,
-              create_parents = True
-    )
-
+    
+    # Needed by both Server and Client
     Directory(params.conf_dir,
               mode=0755,
               cd_access='a',
@@ -44,42 +37,65 @@ def metadata(type='server'):
               create_parents = True
     )
 
-    Directory(format('{conf_dir}/solr'),
-              mode=0755,
-              cd_access='a',
-              owner=params.metadata_user,
-              group=params.user_group,
-              create_parents = True
-              )
-
-    Directory(params.log_dir,
-              mode=0755,
-              cd_access='a',
-              owner=params.metadata_user,
-              group=params.user_group,
-              create_parents = True
-    )
-
-    Directory(params.data_dir,
-              mode=0644,
-              cd_access='a',
-              owner=params.metadata_user,
-              group=params.user_group,
-              create_parents = True
-    )
-
-    Directory(params.expanded_war_dir,
-              mode=0644,
-              cd_access='a',
-              owner=params.metadata_user,
-              group=params.user_group,
-              create_parents = True
-    )
-
-    File(format("{expanded_war_dir}/atlas.war"),
-         content = StaticFile(format('{metadata_home}/server/webapp/atlas.war'))
-    )
-
+    if type == "server":
+      Directory([params.pid_dir],
+                mode=0755,
+                cd_access='a',
+                owner=params.metadata_user,
+                group=params.user_group,
+                create_parents = True
+      )
+      Directory(format('{conf_dir}/solr'),
+                mode=0755,
+                cd_access='a',
+                owner=params.metadata_user,
+                group=params.user_group,
+                create_parents = True
+      )
+      Directory(params.log_dir,
+                mode=0755,
+                cd_access='a',
+                owner=params.metadata_user,
+                group=params.user_group,
+                create_parents = True
+      )
+      Directory(params.data_dir,
+                mode=0644,
+                cd_access='a',
+                owner=params.metadata_user,
+                group=params.user_group,
+                create_parents = True
+      )
+      Directory(params.expanded_war_dir,
+                mode=0644,
+                cd_access='a',
+                owner=params.metadata_user,
+                group=params.user_group,
+                create_parents = True
+      )
+      File(format("{expanded_war_dir}/atlas.war"),
+           content = StaticFile(format('{metadata_home}/server/webapp/atlas.war'))
+      )
+      File(format("{conf_dir}/atlas-log4j.xml"),
+           mode=0644,
+           owner=params.metadata_user,
+           group=params.user_group,
+           content=InlineTemplate(params.metadata_log4j_content)
+      )
+      File(format("{conf_dir}/atlas-env.sh"),
+           owner=params.metadata_user,
+           group=params.user_group,
+           mode=0755,
+           content=InlineTemplate(params.metadata_env_content)
+      )
+      File(format("{conf_dir}/solr/solrconfig.xml"),
+           mode=0644,
+           owner=params.metadata_user,
+           group=params.user_group,
+           content=InlineTemplate(params.metadata_solrconfig_content)
+      )
+
+    # Needed by both Server and Client
     PropertiesFile(format('{conf_dir}/{conf_file}'),
          properties = params.application_properties,
          mode=0644,
@@ -87,27 +103,6 @@ def metadata(type='server'):
          group=params.user_group
     )
 
-    File(format("{conf_dir}/atlas-env.sh"),
-         owner=params.metadata_user,
-         group=params.user_group,
-         mode=0755,
-         content=InlineTemplate(params.metadata_env_content)
-    )
-
-    File(format("{conf_dir}/atlas-log4j.xml"),
-         mode=0644,
-         owner=params.metadata_user,
-         group=params.user_group,
-         content=InlineTemplate(params.metadata_log4j_content)
-    )
-
-    File(format("{conf_dir}/solr/solrconfig.xml"),
-         mode=0644,
-         owner=params.metadata_user,
-         group=params.user_group,
-         content=InlineTemplate(params.metadata_solrconfig_content)
-         )
-
     if type == 'server' and params.search_backend_solr and params.has_logsearch_solr:
       solr_cloud_util.setup_solr_client(params.config)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf2d6055/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml
index 69de51d..150f629 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml
@@ -234,9 +234,6 @@ else
   export HIVE_AUX_JARS_PATH=/usr/lib/hcatalog/share/hcatalog/hcatalog-core.jar
 fi
 export METASTORE_PORT={{hive_metastore_port}}
-
-export HADOOP_CLASSPATH={{atlas_home_dir}}/hook/hive:${HADOOP_CLASSPATH}
-
     </value>
     <value-attributes>
       <type>content</type>

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf2d6055/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json
index 35addc4..fd05edf 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json
@@ -7,7 +7,7 @@
           "application-properties": {
             "atlas.authentication.method.kerberos": "true",
             "atlas.kafka.sasl.kerberos.service.name": "${kafka-env/kafka_user}",
-            "atlas.kafka.security.protocol": "SASL_PLAINTEXT",
+            "atlas.kafka.security.protocol": "PLAINTEXTSASL",
             "atlas.jaas.KafkaClient.loginModuleName": "com.sun.security.auth.module.Krb5LoginModule",
             "atlas.jaas.KafkaClient.loginModuleControlFlag": "required",
             "atlas.jaas.KafkaClient.option.useKeyTab": "true",

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf2d6055/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-env.xml
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-env.xml
index 7122c3d..b6fb60d 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-env.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-env.xml
@@ -69,16 +69,14 @@
 
       export METASTORE_PORT={{hive_metastore_port}}
 
-      export HADOOP_CLASSPATH={{atlas_home_dir}}/hook/hive:${HADOOP_CLASSPATH}
-
       {% if sqla_db_used or lib_dir_available %}
       export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:{{jdbc_libs_dir}}"
       export JAVA_LIBRARY_PATH="$JAVA_LIBRARY_PATH:{{jdbc_libs_dir}}"
       {% endif %}
-    </value>
-    <value-attributes>
+        </value>
+        <value-attributes>
       <type>content</type>
-    </value-attributes>
+        </value-attributes>
     <on-ambari-upgrade add="true"/>
-  </property>
+    </property>
 </configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf2d6055/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml
index 7ef2e50..c2e1c0a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml
@@ -291,8 +291,6 @@
       # fi
       export METASTORE_PORT={{hive_metastore_port}}
 
-      export HADOOP_CLASSPATH={{atlas_conf_dir}}:{{atlas_home_dir}}/hook/hive:${HADOOP_CLASSPATH}
-
       # Spark assembly contains a conflicting copy of HiveConf from hive-1.2
       export HIVE_SKIP_SPARK_ASSEMBLY=true
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf2d6055/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
index 4c2f889..6b5b18b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
@@ -91,7 +91,7 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
       elif application_properties['atlas.graph.storage.hostname'] == hbase_zookeeper_quorum:
         validationItems.append({"config-name": "atlas.graph.storage.hostname",
                                 "item": self.getWarnItem(
-                                    "Note that Atlas is configured to use the HBASE instance
being installed for this cluster.")})
+                                    "Atlas is configured to use the HBase installed in this
cluster. If you would like Atlas to use another HBase instance, please configure this property
and HBASE_CONF_DIR variable in atlas-env appropriately.")})
 
       if not application_properties['atlas.audit.hbase.zookeeper.quorum']:
         validationItems.append({"config-name": "atlas.audit.hbase.zookeeper.quorum",

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf2d6055/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
index c76dfd1..d8b24ea 100644
--- a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
+++ b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
@@ -31,14 +31,17 @@ class TestMetadataServer(RMFTestCase):
   STACK_VERSION = "2.3"
 
   def configureResourcesCalled(self):
-      self.assertResourceCalled('Directory', '/var/run/atlas',
+      # Both server and client
+      self.assertResourceCalled('Directory', '/etc/atlas/conf',
                                 owner='atlas',
                                 group='hadoop',
                                 create_parents = True,
                                 cd_access='a',
                                 mode=0755
       )
-      self.assertResourceCalled('Directory', '/etc/atlas/conf',
+
+      # Pid dir
+      self.assertResourceCalled('Directory', '/var/run/atlas',
                                 owner='atlas',
                                 group='hadoop',
                                 create_parents = True,
@@ -51,7 +54,8 @@ class TestMetadataServer(RMFTestCase):
                                 create_parents = True,
                                 cd_access='a',
                                 mode=0755
-                                )
+      )
+      # Log dir
       self.assertResourceCalled('Directory', '/var/log/atlas',
                                 owner='atlas',
                                 group='hadoop',
@@ -59,6 +63,7 @@ class TestMetadataServer(RMFTestCase):
                                 cd_access='a',
                                 mode=0755
       )
+      # Data dir
       self.assertResourceCalled('Directory', '/usr/hdp/current/atlas-server/data',
                                 owner='atlas',
                                 group='hadoop',
@@ -66,6 +71,7 @@ class TestMetadataServer(RMFTestCase):
                                 cd_access='a',
                                 mode=0644
       )
+      # Expanded war dir
       self.assertResourceCalled('Directory', '/usr/hdp/current/atlas-server/server/webapp',
                                 owner='atlas',
                                 group='hadoop',
@@ -76,16 +82,16 @@ class TestMetadataServer(RMFTestCase):
       self.assertResourceCalled('File', '/usr/hdp/current/atlas-server/server/webapp/atlas.war',
           content = StaticFile('/usr/hdp/current/atlas-server/server/webapp/atlas.war'),
       )
-      appprops =  dict(self.getConfig()['configurations'][
-          'application-properties'])
-      appprops['atlas.server.bind.address'] = 'c6401.ambari.apache.org'
+      app_props =  dict(self.getConfig()['configurations']['application-properties'])
+      app_props['atlas.server.bind.address'] = 'c6401.ambari.apache.org'
 
-      self.assertResourceCalled('PropertiesFile',
-                                '/etc/atlas/conf/application.properties',
-                                properties=appprops,
-                                owner='atlas',
-                                group='hadoop',
-                                mode=0644,
+      self.assertResourceCalled('File', '/etc/atlas/conf/atlas-log4j.xml',
+                          content=InlineTemplate(
+                            self.getConfig()['configurations'][
+                              'atlas-log4j']['content']),
+                          owner='atlas',
+                          group='hadoop',
+                          mode=0644,
       )
       self.assertResourceCalled('File', '/etc/atlas/conf/atlas-env.sh',
                                 content=InlineTemplate(
@@ -95,29 +101,29 @@ class TestMetadataServer(RMFTestCase):
                                 group='hadoop',
                                 mode=0755,
       )
-      self.assertResourceCalled('File', '/etc/atlas/conf/atlas-log4j.xml',
+      self.assertResourceCalled('File', '/etc/atlas/conf/solr/solrconfig.xml',
                                 content=InlineTemplate(
                                     self.getConfig()['configurations'][
-                                      'atlas-log4j']['content']),
+                                      'atlas-solrconfig']['content']),
                                 owner='atlas',
                                 group='hadoop',
                                 mode=0644,
       )
-      self.assertResourceCalled('File', '/etc/atlas/conf/solr/solrconfig.xml',
-                                content=InlineTemplate(
-                                    self.getConfig()['configurations'][
-                                      'atlas-solrconfig']['content']),
+      # application.properties file
+      self.assertResourceCalled('PropertiesFile',
+                                '/etc/atlas/conf/application.properties',
+                                properties=app_props,
                                 owner='atlas',
                                 group='hadoop',
                                 mode=0644,
-                                )
+      )
       self.assertResourceCalled('Directory', '/var/log/ambari-logsearch-solr-client',
                                 owner='solr',
                                 group='hadoop',
                                 create_parents = True,
                                 cd_access='a',
                                 mode=0755
-                                )
+      )
       self.assertResourceCalled('Directory', '/usr/lib/ambari-logsearch-solr-client',
                                 owner='solr',
                                 group='hadoop',
@@ -125,7 +131,7 @@ class TestMetadataServer(RMFTestCase):
                                 recursive_ownership = True,
                                 cd_access='a',
                                 mode=0755
-                                )
+      )
       self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-solr-client/solrCloudCli.sh',
                                 content=StaticFile('/usr/lib/ambari-logsearch-solr-client/solrCloudCli.sh'),
                                 owner='solr',
@@ -138,13 +144,13 @@ class TestMetadataServer(RMFTestCase):
                                 owner='solr',
                                 group='hadoop',
                                 mode=0644,
-                                )
+      )
       self.assertResourceCalled('File', '/var/log/ambari-logsearch-solr-client/solr-client.log',
                                 owner='solr',
                                 group='hadoop',
                                 mode=0644,
                                 content = ''
-                                )
+      )
       self.assertResourceCalledRegexp('^Execute$', '^export JAVA_HOME=/usr/jdk64/jdk1.7.0_45
; /usr/lib/ambari-logsearch-solr-client/solrCloudCli.sh -z c6401.ambari.apache.org:2181/logsearch
--download-config -d /tmp/solr_config_basic_configs_0.[0-9]* -cs basic_configs -rt 30 -i 5')
       self.assertResourceCalledRegexp('^Execute$', '^export JAVA_HOME=/usr/jdk64/jdk1.7.0_45
; /usr/lib/ambari-logsearch-solr-client/solrCloudCli.sh -z c6401.ambari.apache.org:2181/logsearch
--upload-config -d /etc/atlas/conf/solr -cs basic_configs -rt 30 -i 5')
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf2d6055/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py b/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
index 8bea7ec..2d4b7cd 100644
--- a/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
+++ b/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
@@ -28,63 +28,69 @@ class TestAtlasServer(RMFTestCase):
   STACK_VERSION = "2.5"
 
   def configureResourcesCalled(self):
-    self.assertResourceCalled('Directory', '/var/run/atlas',
+    # Both server and client
+    self.assertResourceCalled('Directory', '/etc/atlas/conf',
                               owner='atlas',
                               group='hadoop',
                               create_parents = True,
                               cd_access='a',
                               mode=0755
-                              )
-    self.assertResourceCalled('Directory', '/etc/atlas/conf',
+    )
+    # Pid dir
+    self.assertResourceCalled('Directory', '/var/run/atlas',
                               owner='atlas',
                               group='hadoop',
                               create_parents = True,
                               cd_access='a',
                               mode=0755
-                              )
+    )
     self.assertResourceCalled('Directory', '/etc/atlas/conf/solr',
                               owner='atlas',
                               group='hadoop',
                               create_parents = True,
                               cd_access='a',
                               mode=0755
-                              )
+    )
+    # Log dir
     self.assertResourceCalled('Directory', '/var/log/atlas',
                               owner='atlas',
                               group='hadoop',
                               create_parents = True,
                               cd_access='a',
                               mode=0755
-                              )
+    )
+    # Data dir
     self.assertResourceCalled('Directory', '/usr/hdp/current/atlas-server/data',
                               owner='atlas',
                               group='hadoop',
                               create_parents = True,
                               cd_access='a',
                               mode=0644
-                              )
+    )
+    # Expanded war dir
     self.assertResourceCalled('Directory', '/usr/hdp/current/atlas-server/server/webapp',
                               owner='atlas',
                               group='hadoop',
                               create_parents = True,
                               cd_access='a',
                               mode=0644
-                              )
+    )
     self.assertResourceCalled('File', '/usr/hdp/current/atlas-server/server/webapp/atlas.war',
                               content = StaticFile('/usr/hdp/current/atlas-server/server/webapp/atlas.war'),
-                              )
-    appprops =  dict(self.getConfig()['configurations'][
+    )
+    app_props =  dict(self.getConfig()['configurations'][
                        'application-properties'])
-    appprops['atlas.http.authentication.kerberos.name.rules'] = ' \\ \n'.join(appprops['atlas.http.authentication.kerberos.name.rules'].splitlines())
-    appprops['atlas.server.bind.address'] = 'c6401.ambari.apache.org'
+    app_props['atlas.http.authentication.kerberos.name.rules'] = ' \\ \n'.join(app_props['atlas.http.authentication.kerberos.name.rules'].splitlines())
+    app_props['atlas.server.bind.address'] = 'c6401.ambari.apache.org'
 
-    self.assertResourceCalled('PropertiesFile',
-                              '/etc/atlas/conf/atlas-application.properties',
-                              properties=appprops,
-                              owner='atlas',
-                              group='hadoop',
-                              mode=0644,
-                              )
+    self.assertResourceCalled('File', '/etc/atlas/conf/atlas-log4j.xml',
+                          content=InlineTemplate(
+                            self.getConfig()['configurations'][
+                              'atlas-log4j']['content']),
+                          owner='atlas',
+                          group='hadoop',
+                          mode=0644,
+    )
     self.assertResourceCalled('File', '/etc/atlas/conf/atlas-env.sh',
                               content=InlineTemplate(
                                   self.getConfig()['configurations'][
@@ -92,19 +98,19 @@ class TestAtlasServer(RMFTestCase):
                               owner='atlas',
                               group='hadoop',
                               mode=0755,
-                              )
-    self.assertResourceCalled('File', '/etc/atlas/conf/atlas-log4j.xml',
+    )
+    self.assertResourceCalled('File', '/etc/atlas/conf/solr/solrconfig.xml',
                               content=InlineTemplate(
                                   self.getConfig()['configurations'][
-                                    'atlas-log4j']['content']),
+                                    'atlas-solrconfig']['content']),
                               owner='atlas',
                               group='hadoop',
                               mode=0644,
-                              )
-    self.assertResourceCalled('File', '/etc/atlas/conf/solr/solrconfig.xml',
-                              content=InlineTemplate(
-                                  self.getConfig()['configurations'][
-                                    'atlas-solrconfig']['content']),
+    )
+    # application.properties file
+    self.assertResourceCalled('PropertiesFile',
+                              '/etc/atlas/conf/atlas-application.properties',
+                              properties=app_props,
                               owner='atlas',
                               group='hadoop',
                               mode=0644,
@@ -115,7 +121,7 @@ class TestAtlasServer(RMFTestCase):
                               create_parents=True,
                               cd_access='a',
                               mode=0755
-                              )
+    )
     self.assertResourceCalled('Directory', '/usr/lib/ambari-logsearch-solr-client',
                               owner='solr',
                               group='hadoop',
@@ -123,26 +129,26 @@ class TestAtlasServer(RMFTestCase):
                               recursive_ownership = True,
                               cd_access='a',
                               mode=0755
-                              )
+    )
     self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-solr-client/solrCloudCli.sh',
                               content=StaticFile('/usr/lib/ambari-logsearch-solr-client/solrCloudCli.sh'),
                               owner='solr',
                               group='hadoop',
                               mode=0755,
-                              )
+    )
     self.assertResourceCalled('File', '/usr/lib/ambari-logsearch-solr-client/log4j.properties',
                               content=InlineTemplate(self.getConfig()['configurations'][
                                                        'logsearch-solr-client-log4j']['content']),
                               owner='solr',
                               group='hadoop',
                               mode=0644,
-                              )
+    )
     self.assertResourceCalled('File', '/var/log/ambari-logsearch-solr-client/solr-client.log',
                               owner='solr',
                               group='hadoop',
                               mode=0644,
                               content = ''
-                              )
+    )
 
     self.assertResourceCalledRegexp('^Execute$', '^export JAVA_HOME=/usr/jdk64/jdk1.7.0_45
; /usr/lib/ambari-logsearch-solr-client/solrCloudCli.sh -z c6401.ambari.apache.org:2181/logsearch
--download-config -d /tmp/solr_config_basic_configs_0.[0-9]* -cs basic_configs -rt 30 -i 5')
     self.assertResourceCalledRegexp('^Execute$', '^export JAVA_HOME=/usr/jdk64/jdk1.7.0_45
; /usr/lib/ambari-logsearch-solr-client/solrCloudCli.sh -z c6401.ambari.apache.org:2181/logsearch
--upload-config -d /etc/atlas/conf/solr -cs basic_configs -rt 30 -i 5')


Mime
View raw message