瀏覽代碼

AMBARI-8747: Common Services: Refactor HDP-2.0.6 PIG, SQOOP services (Jayush Luniya)

Jayush Luniya 10 年之前
父節點
當前提交
191232e290
共有 22 個文件被更改,包括 220 次插入144 次删除
  1. 0 0
      ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/configuration/pig-env.xml
  2. 0 0
      ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/configuration/pig-log4j.xml
  3. 0 0
      ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/configuration/pig-properties.xml
  4. 85 0
      ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml
  5. 0 0
      ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/files/pigSmoke.sh
  6. 0 0
      ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/params.py
  7. 0 0
      ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/pig.py
  8. 0 0
      ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/pig_client.py
  9. 0 0
      ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/service_check.py
  10. 0 0
      ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/configuration/sqoop-env.xml
  11. 92 0
      ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/metainfo.xml
  12. 0 0
      ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/__init__.py
  13. 0 0
      ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/params.py
  14. 0 0
      ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/service_check.py
  15. 0 0
      ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/sqoop.py
  16. 0 0
      ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/sqoop_client.py
  17. 1 60
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/metainfo.xml
  18. 1 67
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/metainfo.xml
  19. 14 6
      ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_client.py
  20. 11 5
      ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_service_check.py
  21. 10 4
      ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_service_check.py
  22. 6 2
      ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_sqoop.py

+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/configuration/pig-env.xml → ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/configuration/pig-env.xml


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/configuration/pig-log4j.xml → ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/configuration/pig-log4j.xml


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/configuration/pig-properties.xml → ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/configuration/pig-properties.xml


+ 85 - 0
ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml

@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+<!--
+   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.
+-->
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>PIG</name>
+      <displayName>Pig</displayName>
+      <comment>Scripting platform for analyzing large datasets</comment>
+      <version>0.12.0.2.0</version>
+      <components>
+        <component>
+          <name>PIG</name>
+          <displayName>Pig</displayName>
+          <category>CLIENT</category>
+          <cardinality>0+</cardinality>
+          <commandScript>
+            <script>scripts/pig_client.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+          <configFiles>
+            <configFile>
+              <type>env</type>
+              <fileName>pig-env.sh</fileName>
+              <dictionaryName>pig-env</dictionaryName>
+            </configFile>
+            <configFile>
+              <type>env</type>
+              <fileName>log4j.properties</fileName>
+              <dictionaryName>pig-log4j</dictionaryName>
+            </configFile>
+            <configFile>
+              <type>env</type>
+              <fileName>pig.properties</fileName>
+              <dictionaryName>pig-properties</dictionaryName>
+            </configFile>                         
+          </configFiles>          
+        </component>
+      </components>
+      <osSpecifics>
+        <osSpecific>
+          <osFamily>any</osFamily>
+          <packages>
+            <package>
+              <name>pig</name>
+            </package>
+          </packages>
+        </osSpecific>
+      </osSpecifics>
+
+      <commandScript>
+        <script>scripts/service_check.py</script>
+        <scriptType>PYTHON</scriptType>
+        <timeout>300</timeout>
+      </commandScript>
+
+      <requiredServices>
+        <service>YARN</service>
+      </requiredServices>
+
+      <configuration-dependencies>
+        <config-type>pig-env</config-type>
+        <config-type>pig-log4j</config-type>
+        <config-type>pig-properties</config-type>
+      </configuration-dependencies>
+
+    </service>
+  </services>
+</metainfo>

+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/files/pigSmoke.sh → ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/files/pigSmoke.sh


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/params.py → ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/params.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/pig.py → ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/pig.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/pig_client.py → ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/pig_client.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/service_check.py → ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/service_check.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/configuration/sqoop-env.xml → ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/configuration/sqoop-env.xml


+ 92 - 0
ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/metainfo.xml

@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+<!--
+   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.
+-->
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>SQOOP</name>
+      <displayName>Sqoop</displayName>
+      <comment>Tool for transferring bulk data between Apache Hadoop and
+        structured data stores such as relational databases
+      </comment>
+      <version>1.4.4.2.0</version>
+
+      <components>
+        <component>
+          <name>SQOOP</name>
+          <displayName>Sqoop</displayName>
+          <category>CLIENT</category>
+          <cardinality>1+</cardinality>
+          <dependencies>
+            <dependency>
+              <name>HDFS/HDFS_CLIENT</name>
+              <scope>host</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+            <dependency>
+              <name>MAPREDUCE2/MAPREDUCE2_CLIENT</name>
+              <scope>host</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+          </dependencies>
+          <commandScript>
+            <script>scripts/sqoop_client.py</script>
+            <scriptType>PYTHON</scriptType>
+          </commandScript>
+          <configFiles>
+            <configFile>
+              <type>env</type>
+              <fileName>sqoop-env.sh</fileName>
+              <dictionaryName>sqoop-env</dictionaryName>
+            </configFile>
+          </configFiles>
+        </component>
+      </components>
+      <osSpecifics>
+        <osSpecific>
+          <osFamily>any</osFamily>
+          <packages>
+            <package>
+              <name>sqoop</name>
+            </package>
+            <package>
+              <name>mysql-connector-java</name>
+            </package>
+          </packages>
+        </osSpecific>
+      </osSpecifics>
+      <commandScript>
+        <script>scripts/service_check.py</script>
+        <scriptType>PYTHON</scriptType>
+        <timeout>300</timeout>
+      </commandScript>
+      
+      <requiredServices>
+        <service>HDFS</service>
+      </requiredServices>
+      
+      <configuration-dependencies>
+        <config-type>sqoop-env</config-type>
+      </configuration-dependencies>
+    </service>
+  </services>
+</metainfo>

+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/__init__.py → ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/__init__.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py → ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/params.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/service_check.py → ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/service_check.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/sqoop.py → ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/sqoop.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/sqoop_client.py → ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/sqoop_client.py


+ 1 - 60
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/metainfo.xml

@@ -20,66 +20,7 @@
   <services>
   <services>
     <service>
     <service>
       <name>PIG</name>
       <name>PIG</name>
-      <displayName>Pig</displayName>
-      <comment>Scripting platform for analyzing large datasets</comment>
-      <version>0.12.0.2.0</version>
-      <components>
-        <component>
-          <name>PIG</name>
-          <displayName>Pig</displayName>
-          <category>CLIENT</category>
-          <cardinality>0+</cardinality>
-          <commandScript>
-            <script>scripts/pig_client.py</script>
-            <scriptType>PYTHON</scriptType>
-            <timeout>600</timeout>
-          </commandScript>
-          <configFiles>
-            <configFile>
-              <type>env</type>
-              <fileName>pig-env.sh</fileName>
-              <dictionaryName>pig-env</dictionaryName>
-            </configFile>
-            <configFile>
-              <type>env</type>
-              <fileName>log4j.properties</fileName>
-              <dictionaryName>pig-log4j</dictionaryName>
-            </configFile>
-            <configFile>
-              <type>env</type>
-              <fileName>pig.properties</fileName>
-              <dictionaryName>pig-properties</dictionaryName>
-            </configFile>                         
-          </configFiles>          
-        </component>
-      </components>
-      <osSpecifics>
-        <osSpecific>
-          <osFamily>any</osFamily>
-          <packages>
-            <package>
-              <name>pig</name>
-            </package>
-          </packages>
-        </osSpecific>
-      </osSpecifics>
-
-      <commandScript>
-        <script>scripts/service_check.py</script>
-        <scriptType>PYTHON</scriptType>
-        <timeout>300</timeout>
-      </commandScript>
-
-      <requiredServices>
-        <service>YARN</service>
-      </requiredServices>
-
-      <configuration-dependencies>
-        <config-type>pig-env</config-type>
-        <config-type>pig-log4j</config-type>
-        <config-type>pig-properties</config-type>
-      </configuration-dependencies>
-
+      <extends>common-services/PIG/0.12.0.2.0</extends>
     </service>
     </service>
   </services>
   </services>
 </metainfo>
 </metainfo>

+ 1 - 67
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/metainfo.xml

@@ -20,73 +20,7 @@
   <services>
   <services>
     <service>
     <service>
       <name>SQOOP</name>
       <name>SQOOP</name>
-      <displayName>Sqoop</displayName>
-      <comment>Tool for transferring bulk data between Apache Hadoop and
-        structured data stores such as relational databases
-      </comment>
-      <version>1.4.4.2.0</version>
-
-      <components>
-        <component>
-          <name>SQOOP</name>
-          <displayName>Sqoop</displayName>
-          <category>CLIENT</category>
-          <cardinality>1+</cardinality>
-          <dependencies>
-            <dependency>
-              <name>HDFS/HDFS_CLIENT</name>
-              <scope>host</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-              </auto-deploy>
-            </dependency>
-            <dependency>
-              <name>MAPREDUCE2/MAPREDUCE2_CLIENT</name>
-              <scope>host</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-              </auto-deploy>
-            </dependency>
-          </dependencies>
-          <commandScript>
-            <script>scripts/sqoop_client.py</script>
-            <scriptType>PYTHON</scriptType>
-          </commandScript>
-          <configFiles>
-            <configFile>
-              <type>env</type>
-              <fileName>sqoop-env.sh</fileName>
-              <dictionaryName>sqoop-env</dictionaryName>
-            </configFile>
-          </configFiles>
-        </component>
-      </components>
-      <osSpecifics>
-        <osSpecific>
-          <osFamily>any</osFamily>
-          <packages>
-            <package>
-              <name>sqoop</name>
-            </package>
-            <package>
-              <name>mysql-connector-java</name>
-            </package>
-          </packages>
-        </osSpecific>
-      </osSpecifics>
-      <commandScript>
-        <script>scripts/service_check.py</script>
-        <scriptType>PYTHON</scriptType>
-        <timeout>300</timeout>
-      </commandScript>
-      
-      <requiredServices>
-        <service>HDFS</service>
-      </requiredServices>
-      
-      <configuration-dependencies>
-        <config-type>sqoop-env</config-type>
-      </configuration-dependencies>
+      <extends>common-services/SQOOP/1.4.4.2.0</extends>
     </service>
     </service>
   </services>
   </services>
 </metainfo>
 </metainfo>

+ 14 - 6
ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_client.py

@@ -22,12 +22,16 @@ from stacks.utils.RMFTestCase import *
 import json
 import json
 
 
 class TestPigClient(RMFTestCase):
 class TestPigClient(RMFTestCase):
+  COMMON_SERVICES_PACKAGE_DIR = "PIG/0.12.0.2.0/package"
+  STACK_VERSION = "2.0.6"
 
 
   def test_configure_default(self):
   def test_configure_default(self):
-    self.executeScript("2.0.6/services/PIG/package/scripts/pig_client.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/pig_client.py",
                        classname = "PigClient",
                        classname = "PigClient",
                        command = "configure",
                        command = "configure",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     )
 
 
     self.assertResourceCalled('Directory', '/etc/pig/conf',
     self.assertResourceCalled('Directory', '/etc/pig/conf',
@@ -57,10 +61,12 @@ class TestPigClient(RMFTestCase):
 
 
 
 
   def test_configure_secured(self):
   def test_configure_secured(self):
-    self.executeScript("2.0.6/services/PIG/package/scripts/pig_client.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/pig_client.py",
                        classname = "PigClient",
                        classname = "PigClient",
                        command = "configure",
                        command = "configure",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     )
     
     
     self.assertResourceCalled('Directory', '/etc/pig/conf',
     self.assertResourceCalled('Directory', '/etc/pig/conf',
@@ -95,10 +101,12 @@ class TestPigClient(RMFTestCase):
 
 
     default_json['hostLevelParams']['stack_version'] = '2.2'
     default_json['hostLevelParams']['stack_version'] = '2.2'
 
 
-    self.executeScript("2.0.6/services/PIG/package/scripts/pig_client.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/pig_client.py",
                        classname = "PigClient",
                        classname = "PigClient",
                        command = "configure",
                        command = "configure",
-                       config_dict=default_json
+                       config_dict=default_json,
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     )
 
 
     self.assertResourceCalled('Directory', '/etc/pig/conf',
     self.assertResourceCalled('Directory', '/etc/pig/conf',

+ 11 - 5
ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_service_check.py

@@ -21,12 +21,16 @@ limitations under the License.
 from stacks.utils.RMFTestCase import *
 from stacks.utils.RMFTestCase import *
 
 
 class TestPigServiceCheck(RMFTestCase):
 class TestPigServiceCheck(RMFTestCase):
-
+  COMMON_SERVICES_PACKAGE_DIR = "PIG/0.12.0.2.0/package"
+  STACK_VERSION = "2.0.6"
+  
   def test_configure_default(self):
   def test_configure_default(self):
-    self.executeScript("2.0.6/services/PIG/package/scripts/service_check.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/service_check.py",
                        classname = "PigServiceCheck",
                        classname = "PigServiceCheck",
                        command = "service_check",
                        command = "service_check",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     )
     self.assertResourceCalled('ExecuteHadoop', 'dfs -rmr pigsmoke.out passwd; hadoop --config /etc/hadoop/conf dfs -put /etc/passwd passwd ',
     self.assertResourceCalled('ExecuteHadoop', 'dfs -rmr pigsmoke.out passwd; hadoop --config /etc/hadoop/conf dfs -put /etc/passwd passwd ',
       try_sleep = 5,
       try_sleep = 5,
@@ -59,10 +63,12 @@ class TestPigServiceCheck(RMFTestCase):
     self.assertNoMoreResources()
     self.assertNoMoreResources()
 
 
   def test_configure_secured(self):
   def test_configure_secured(self):
-    self.executeScript("2.0.6/services/PIG/package/scripts/service_check.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/service_check.py",
                        classname = "PigServiceCheck",
                        classname = "PigServiceCheck",
                        command = "service_check",
                        command = "service_check",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     )
     
     
     self.assertResourceCalled('ExecuteHadoop', 'dfs -rmr pigsmoke.out passwd; hadoop --config /etc/hadoop/conf dfs -put /etc/passwd passwd ',
     self.assertResourceCalled('ExecuteHadoop', 'dfs -rmr pigsmoke.out passwd; hadoop --config /etc/hadoop/conf dfs -put /etc/passwd passwd ',

+ 10 - 4
ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_service_check.py

@@ -21,12 +21,16 @@ from mock.mock import MagicMock, call, patch
 from stacks.utils.RMFTestCase import *
 from stacks.utils.RMFTestCase import *
 
 
 class TestSqoopServiceCheck(RMFTestCase):
 class TestSqoopServiceCheck(RMFTestCase):
+  COMMON_SERVICES_PACKAGE_DIR = "SQOOP/1.4.4.2.0/package"
+  STACK_VERSION = "2.0.6"
 
 
   def test_service_check_secured(self):
   def test_service_check_secured(self):
-    self.executeScript("2.0.6/services/SQOOP/package/scripts/service_check.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/service_check.py",
                        classname = "SqoopServiceCheck",
                        classname = "SqoopServiceCheck",
                        command = "service_check",
                        command = "service_check",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     )
     self.assertResourceCalled('Execute', '/usr/bin/kinit  -kt /etc/security/keytabs/smokeuser.headless.keytab ambari-qa',
     self.assertResourceCalled('Execute', '/usr/bin/kinit  -kt /etc/security/keytabs/smokeuser.headless.keytab ambari-qa',
                               user = 'ambari-qa'
                               user = 'ambari-qa'
@@ -38,10 +42,12 @@ class TestSqoopServiceCheck(RMFTestCase):
     self.assertNoMoreResources()
     self.assertNoMoreResources()
 
 
   def test_service_check_default(self):
   def test_service_check_default(self):
-    self.executeScript("2.0.6/services/SQOOP/package/scripts/service_check.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/service_check.py",
                        classname = "SqoopServiceCheck",
                        classname = "SqoopServiceCheck",
                        command = "service_check",
                        command = "service_check",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     )
     self.assertResourceCalled('Execute', 'sqoop version',
     self.assertResourceCalled('Execute', 'sqoop version',
                               logoutput = True,
                               logoutput = True,

+ 6 - 2
ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_sqoop.py

@@ -21,12 +21,16 @@ from mock.mock import MagicMock, call, patch
 from stacks.utils.RMFTestCase import *
 from stacks.utils.RMFTestCase import *
 
 
 class TestSqoop(RMFTestCase):
 class TestSqoop(RMFTestCase):
+  COMMON_SERVICES_PACKAGE_DIR = "SQOOP/1.4.4.2.0/package"
+  STACK_VERSION = "2.0.6"
 
 
   def test_configure_default(self):
   def test_configure_default(self):
-    self.executeScript("2.0.6/services/SQOOP/package/scripts/sqoop_client.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/sqoop_client.py",
                        classname = "SqoopClient",
                        classname = "SqoopClient",
                        command = "configure",
                        command = "configure",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     )
     self.assertResourceCalled('Link', '/usr/lib/sqoop/lib/mysql-connector-java.jar',
     self.assertResourceCalled('Link', '/usr/lib/sqoop/lib/mysql-connector-java.jar',
                               to = '/usr/share/java/mysql-connector-java.jar',)
                               to = '/usr/share/java/mysql-connector-java.jar',)