Repository: ambari
Updated Branches:
  refs/heads/trunk f8dcdfcfb -> 81173e14d


AMBARI-5783. Pig fails to install through bluprint. (Arsen Babych via swagle)


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

Branch: refs/heads/trunk
Commit: 81173e14dd3ce44dea8c31e4b6d6a995dc61f7c7
Parents: f8dcdfc
Author: Siddharth Wagle <[email protected]>
Authored: Thu May 15 15:14:02 2014 -0700
Committer: Siddharth Wagle <[email protected]>
Committed: Thu May 15 15:14:02 2014 -0700

----------------------------------------------------------------------
 .../HDP/2.0.6/services/PIG/package/scripts/params.py     |  5 ++---
 .../stacks/HDP/2.0.6/services/PIG/package/scripts/pig.py | 11 ++++++-----
 .../src/test/python/stacks/2.0.6/PIG/test_pig_client.py  |  8 ++++----
 3 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/81173e14/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/params.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/params.py
index 747687d..03cd9ed 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/params.py
@@ -43,9 +43,8 @@ hadoop_home = "/usr"
 if (('pig-properties' in config['configurations']) and ('pig-content' in 
config['configurations']['pig-properties'])):
   pig_properties = config['configurations']['pig-properties']['pig-content']
 else:
-  pig_properties = {}
-  pig_properties['hcat.bin'] = '/usr/bin/hcat'
-  pig_properties['pig.location.check.strict'] = 'false'
+  pig_properties = """hcat.bin=/usr/bin/hcat
+pig.location.check.strict=false"""
 
 # log4j.properties
 if (('pig-log4j' in config['configurations']) and ('content' in 
config['configurations']['pig-log4j'])):

http://git-wip-us.apache.org/repos/asf/ambari/blob/81173e14/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/pig.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/pig.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/pig.py
index 629f7cb..1fc1b09 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/pig.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/pig.py
@@ -33,11 +33,12 @@ def pig():
   pig_TemplateConfig( ['pig-env.sh'])
 
   # pig_properties is always set to a default even if it's not in the payload
-  PropertiesFile(format("{params.pig_conf_dir}/pig.properties"),    
-    mode = 0644,
-    group=params.user_group,
-    owner=params.hdfs_user,
-    properties=params.pig_properties)    
+  File(format("{params.pig_conf_dir}/pig.properties"),
+              mode=0644,
+              group=params.user_group,
+              owner=params.hdfs_user,
+              content=params.pig_properties
+  )
 
   if (params.log4j_props != None):
     File(format("{params.pig_conf_dir}/log4j.properties"),

http://git-wip-us.apache.org/repos/asf/ambari/blob/81173e14/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_client.py 
b/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_client.py
index 87b8e0c..df78d6b 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_client.py
@@ -36,11 +36,11 @@ class TestPigClient(RMFTestCase):
     self.assertResourceCalled('TemplateConfig', '/etc/pig/conf/pig-env.sh',
       owner = 'hdfs'
     )
-    self.assertResourceCalled('PropertiesFile', '/etc/pig/conf/pig.properties',
+    self.assertResourceCalled('File', '/etc/pig/conf/pig.properties',
       owner = 'hdfs',
       group = 'hadoop',
       mode = 0644,
-      properties = 'pigproperties\nline2'      
+      content = 'pigproperties\nline2'
     )
     self.assertResourceCalled('File', '/etc/pig/conf/log4j.properties',
       owner = 'hdfs',
@@ -64,11 +64,11 @@ class TestPigClient(RMFTestCase):
     self.assertResourceCalled('TemplateConfig', '/etc/pig/conf/pig-env.sh',
       owner = 'hdfs'
     )
-    self.assertResourceCalled('PropertiesFile', '/etc/pig/conf/pig.properties',
+    self.assertResourceCalled('File', '/etc/pig/conf/pig.properties',
       owner = 'hdfs',
       group = 'hadoop',
       mode = 0644,
-      properties = 'pigproperties\nline2'
+      content = 'pigproperties\nline2'
     )
     self.assertResourceCalled('File', '/etc/pig/conf/log4j.properties',
       owner = 'hdfs',

Reply via email to