Parcourir la source

AMBARI-5845 pig-properties not posted on server by UI. (ababiichuk)

aBabiichuk il y a 11 ans
Parent
commit
d600e5434d

+ 1 - 0
ambari-web/app/controllers/main/service/info/configs.js

@@ -1589,6 +1589,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
       switch(siteName) {
         case 'falcon-startup.properties':
         case 'falcon-runtime.properties':
+        case 'pig-properties':
           siteProperties[_siteObj.name] = _siteObj.value;
           break;
         default:

+ 3 - 1
ambari-web/app/controllers/wizard/step8_controller.js

@@ -1358,7 +1358,9 @@ App.WizardStep8Controller = Em.Controller.extend({
       HUE: {site: [
         {filename: 'hue-site', isXmlFile: true}
       ], log4j: []},
-      PIG: {site: [], log4j: ['pig']},
+      PIG: {site: [
+        {filename: 'pig-properties', isXmlFile: false}
+      ], log4j: ['pig']},
       FALCON: {site: [
         {filename: 'falcon-startup.properties', isXmlFile: false},
         {filename: 'falcon-runtime.properties', isXmlFile: false}

+ 1 - 1
ambari-web/app/data/service_configs.js

@@ -228,7 +228,7 @@ module.exports = [
       App.ServiceConfigCategory.create({ name: 'Advanced', displayName : 'Advanced'}),
       App.ServiceConfigCategory.create({ name: 'AdvancedPigLog4j', displayName : 'Custom log4j.properties', siteFileName: 'pig-log4j.xml', canAddProperty: false})
     ],
-    sites: ['pig-log4j'],
+    sites: ['pig-properties','pig-log4j'],
     configs: []
   },
   {

+ 7 - 5
ambari-web/test/controllers/wizard/step8_test.js

@@ -44,6 +44,7 @@ describe('App.WizardStep8Controller', function () {
     Em.Object.create({filename: 'oozie-site.xml', name: 'p2', value: 'v2'}),
     Em.Object.create({filename: 'hive-site.xml', name: 'p1', value: 'v1'}),
     Em.Object.create({filename: 'hive-site.xml', name: 'p2', value: 'v2'}),
+    Em.Object.create({filename: 'pig-properties.xml', name: 'p1', value: 'v1'}),
     Em.Object.create({filename: 'webhcat-site.xml', name: 'p1', value: 'v1'}),
     Em.Object.create({filename: 'webhcat-site.xml', name: 'p2', value: 'v2'}),
     Em.Object.create({filename: 'tez-site.xml', name: 'p1', value: 'v1'}),
@@ -72,6 +73,7 @@ describe('App.WizardStep8Controller', function () {
     {name: 'createHiveSiteObj', e: {type: 'hive-site', tag: 'version1', l: 2}},
     {name: 'createWebHCatSiteObj', e: {type: 'webhcat-site', tag: 'version1', l: 2}},
     {name: 'createTezSiteObj', e: {type: 'tez-site', tag: 'version1', l: 2}},
+    {name: 'createPigPropertiesSiteObj', e: {type: 'pig-properties', tag: 'version1', l: 1}},
     {name: 'createFalconStartupSiteObj', e: {type: 'falcon-startup.properties', tag: 'version1', l: 2}},
     {name: 'createFalconRuntimeSiteObj', e: {type: 'falcon-runtime.properties', tag: 'version1', l: 2}}
   ]);
@@ -141,11 +143,11 @@ describe('App.WizardStep8Controller', function () {
       {selectedServices: Em.A(['MAPREDUCE2', 'YARN', 'HBASE', 'OOZIE', 'HIVE']), e: 12},
       {selectedServices: Em.A(['MAPREDUCE2', 'YARN', 'HBASE', 'OOZIE', 'HIVE', 'WEBHCAT']), e: 13},
       {selectedServices: Em.A(['MAPREDUCE2', 'YARN', 'HBASE', 'OOZIE', 'HIVE', 'WEBHCAT', 'HUE']), e: 14},
-      {selectedServices: Em.A(['MAPREDUCE2', 'YARN', 'HBASE', 'OOZIE', 'HIVE', 'WEBHCAT', 'HUE', 'PIG']), e: 15},
-      {selectedServices: Em.A(['MAPREDUCE2', 'YARN', 'HBASE', 'OOZIE', 'HIVE', 'WEBHCAT', 'HUE', 'PIG', 'FALCON']), e: 17},
-      {selectedServices: Em.A(['MAPREDUCE2', 'YARN', 'HBASE', 'OOZIE', 'HIVE', 'WEBHCAT', 'HUE', 'PIG', 'FALCON', 'STORM']), e: 18},
-      {selectedServices: Em.A(['MAPREDUCE2', 'YARN', 'HBASE', 'OOZIE', 'HIVE', 'WEBHCAT', 'HUE', 'PIG', 'FALCON', 'STORM', 'TEZ']), e: 19},
-      {selectedServices: Em.A(['MAPREDUCE2', 'YARN', 'HBASE', 'OOZIE', 'HIVE', 'WEBHCAT', 'HUE', 'PIG', 'FALCON', 'STORM', 'TEZ', 'ZOOKEEPER']), e: 21}
+      {selectedServices: Em.A(['MAPREDUCE2', 'YARN', 'HBASE', 'OOZIE', 'HIVE', 'WEBHCAT', 'HUE', 'PIG']), e: 16},
+      {selectedServices: Em.A(['MAPREDUCE2', 'YARN', 'HBASE', 'OOZIE', 'HIVE', 'WEBHCAT', 'HUE', 'PIG', 'FALCON']), e: 18},
+      {selectedServices: Em.A(['MAPREDUCE2', 'YARN', 'HBASE', 'OOZIE', 'HIVE', 'WEBHCAT', 'HUE', 'PIG', 'FALCON', 'STORM']), e: 19},
+      {selectedServices: Em.A(['MAPREDUCE2', 'YARN', 'HBASE', 'OOZIE', 'HIVE', 'WEBHCAT', 'HUE', 'PIG', 'FALCON', 'STORM', 'TEZ']), e: 20},
+      {selectedServices: Em.A(['MAPREDUCE2', 'YARN', 'HBASE', 'OOZIE', 'HIVE', 'WEBHCAT', 'HUE', 'PIG', 'FALCON', 'STORM', 'TEZ', 'ZOOKEEPER']), e: 22}
 
     ]);