Browse Source

HUE-6335 [core] Add cluster_id property to the config

Romain Rigaux 8 years ago
parent
commit
81dce5ceec

+ 3 - 0
desktop/conf.dist/hue.ini

@@ -163,6 +163,9 @@
   # e.g.: pig,zookeeper
   ## app_blacklist=
 
+  # Id of the cluster where Hue is located.
+  ## cluster_id='default'
+
   # Choose whether to show the new SQL editor.
   ## use_new_editor=true
 

+ 3 - 0
desktop/conf/pseudo-distributed.ini.tmpl

@@ -167,6 +167,9 @@
   # e.g.: pig,zookeeper
   ## app_blacklist=
 
+  # Id of the cluster where Hue is located.
+  ## cluster_id='default'
+
   # Choose whether to show the new SQL editor.
   ## use_new_editor=true
 

+ 7 - 1
desktop/core/src/desktop/conf.py

@@ -55,7 +55,7 @@ def coerce_port(port):
     port = int(port)
     if port == 0:
       port = ''
-  except ValueError, e:
+  except ValueError:
     port = ''
   return port
 
@@ -419,6 +419,12 @@ APP_BLACKLIST = Config(
   help=_('Comma separated list of apps to not load at server startup.')
 )
 
+CLUSTER_ID = Config(
+  key="cluster_id",
+  help=_("Id of the cluster here Hue is located."),
+  private=False,
+  default='default')
+
 DEMO_ENABLED = Config( # Internal and Temporary
   key="demo_enabled",
   help=_("To set to true in combination when using Hue demo backend."),