conf.py 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/usr/bin/env python
  2. # Licensed to Cloudera, Inc. under one
  3. # or more contributor license agreements. See the NOTICE file
  4. # distributed with this work for additional information
  5. # regarding copyright ownership. Cloudera, Inc. 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. from desktop.lib.conf import Config, UnspecifiedConfigSection, ConfigSection, coerce_string
  18. # Used only for ZooKeeper app properties, ZooKeeper specific properties should come from libzookeeper
  19. CLUSTERS = UnspecifiedConfigSection(
  20. "clusters",
  21. help="One entry for each Zookeeper cluster",
  22. each=ConfigSection(
  23. help="Information about a single Zookeeper cluster",
  24. members=dict(
  25. HOST_PORTS=Config(
  26. "host_ports",
  27. help="Zookeeper ensemble. Comma separated list of Host/Port, e.g. localhost:2181,localhost:2182,localhost:2183",
  28. default="localhost:2181",
  29. type=coerce_string,
  30. ),
  31. REST_URL=Config(
  32. "rest_url",
  33. help="The URL of the REST contrib service.",
  34. default="http://localhost:9998",
  35. type=str,
  36. ),
  37. PRINCIPAL_NAME=Config(
  38. "principal_name",
  39. help="Name of Kerberos principal when using security",
  40. default="zookeeper",
  41. type=str,
  42. ),
  43. )
  44. )
  45. )