config_mapping.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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": ["proxyuser_group"],
  39. "foreignKey": ["oozie_user"],
  40. "value": "<templateName[0]>",
  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. /**********************************************hbase-site***************************************/
  69. {
  70. "name": "hbase.zookeeper.quorum",
  71. "templateName": ["zookeeperserver_hosts"],
  72. "foreignKey": null,
  73. "value": "<templateName[0]>",
  74. "filename": "hbase-site.xml"
  75. },
  76. /**********************************************webhcat-site***************************************/
  77. {
  78. "name": "templeton.zookeeper.hosts",
  79. "templateName": ["zookeeperserver_hosts"],
  80. "foreignKey": null,
  81. "value": "<templateName[0]>",
  82. "filename": "webhcat-site.xml"
  83. },
  84. /**********************************************core-site for glusterfs***************************************/
  85. {
  86. "name": "fs.glusterfs.impl",
  87. "templateName": ["fs_glusterfs_impl"],
  88. "foreignKey": null,
  89. "value": "<templateName[0]>",
  90. "filename": "core-site.xml"
  91. },
  92. {
  93. "name": "fs.glusterfs.volname",
  94. "templateName": ["fs_glusterfs_volname"],
  95. "foreignKey": null,
  96. "value": "<templateName[0]>",
  97. "filename": "core-site.xml"
  98. },
  99. {
  100. "name": "fs.glusterfs.mount",
  101. "templateName": ["fs_glusterfs_mount"],
  102. "foreignKey": null,
  103. "value": "<templateName[0]>",
  104. "filename": "core-site.xml"
  105. },
  106. {
  107. "name": "fs.glusterfs.server",
  108. "templateName": ["fs_glusterfs_server"],
  109. "foreignKey": null,
  110. "value": "<templateName[0]>",
  111. "filename": "core-site.xml"
  112. },
  113. {
  114. "name": "fs.glusterfs.automount",
  115. "templateName": ["fs_glusterfs_automount"],
  116. "foreignKey": null,
  117. "value": "<templateName[0]>",
  118. "filename": "core-site.xml"
  119. },
  120. {
  121. "name": "fs.glusterfs.getfattrcmd",
  122. "templateName": ["fs_glusterfs_getfattrcmd"],
  123. "foreignKey": null,
  124. "value": "<templateName[0]>",
  125. "filename": "core-site.xml"
  126. }
  127. ];
  128. /**
  129. * Configs consists of 2 types: Computed values, which cannot be modified by user
  130. * and overridable values, which user can modify. We provide interface how to get all of this
  131. * configs separately
  132. * @type {Object}
  133. */
  134. module.exports = {
  135. all : function(){
  136. return configs.slice(0);
  137. },
  138. overridable: function(){
  139. return configs.filterProperty('foreignKey');
  140. },
  141. computed: function(){
  142. return configs.filterProperty('foreignKey', null);
  143. }
  144. };