config_mapping.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. var configs = [
  19. /**********************************************HDFS***************************************/
  20. {
  21. "name": "hadoop.proxyuser.<foreignKey[0]>.groups",
  22. "templateName": ["proxyuser_group"],
  23. "foreignKey": ["hive_user"],
  24. "value": "<templateName[0]>",
  25. "filename": "core-site.xml",
  26. "isOverridable" : true
  27. },
  28. {
  29. "name": "hadoop.proxyuser.<foreignKey[0]>.hosts",
  30. "templateName": ["hivemetastore_host"],
  31. "foreignKey": ["hive_user"],
  32. "value": "<templateName[0]>",
  33. "filename": "core-site.xml",
  34. "isOverridable" : true
  35. },
  36. {
  37. "name": "hadoop.proxyuser.<foreignKey[0]>.groups",
  38. "templateName": [],
  39. "foreignKey": ["oozie_user"],
  40. "value": "*",
  41. "filename": "core-site.xml",
  42. "isOverridable" : true
  43. },
  44. {
  45. "name": "hadoop.proxyuser.<foreignKey[0]>.hosts",
  46. "templateName": ["oozieserver_host"],
  47. "foreignKey": ["oozie_user"],
  48. "value": "<templateName[0]>",
  49. "filename": "core-site.xml",
  50. "isOverridable" : true
  51. },
  52. {
  53. "name": "hadoop.proxyuser.<foreignKey[0]>.groups",
  54. "templateName": ["proxyuser_group"],
  55. "foreignKey": ["webhcat_user"],
  56. "value": "<templateName[0]>",
  57. "filename": "core-site.xml",
  58. "isOverridable" : true
  59. },
  60. {
  61. "name": "hadoop.proxyuser.<foreignKey[0]>.hosts",
  62. "templateName": ["hivemetastore_host"],
  63. "foreignKey": ["webhcat_user"],
  64. "value": "<templateName[0]>",
  65. "filename": "core-site.xml",
  66. "isOverridable" : true
  67. }
  68. ];
  69. /**
  70. * Configs consists of 2 types: Computed values, which cannot be modified by user
  71. * and overridable values, which user can modify. We provide interface how to get all of this
  72. * configs separately
  73. * @type {Object}
  74. */
  75. module.exports = {
  76. all : function(){
  77. return configs.slice(0);
  78. },
  79. overridable: function(){
  80. return configs.filterProperty('foreignKey');
  81. },
  82. computed: function(){
  83. return configs.filterProperty('foreignKey', null);
  84. }
  85. };