conf.py 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 django.utils.translation import ugettext_lazy as _
  18. from desktop.lib.conf import Config, coerce_bool
  19. SHARE_JOBS = Config(
  20. key='share_jobs',
  21. default=True,
  22. type=coerce_bool,
  23. help=_('Share submitted jobs information with all users. If set to false, '
  24. 'submitted jobs are visible only to the owner and administrators.')
  25. )
  26. DISABLE_KILLING_JOBS = Config(
  27. key='disable_killing_jobs',
  28. default=False,
  29. type=coerce_bool,
  30. help=_('Disable the job kill button for all users in the job browser.')
  31. )
  32. LOG_OFFSET = Config(
  33. key='log_offset',
  34. default=-1000000,
  35. type=int,
  36. help=_('Offset in bytes where a negative offset will fetch the last N bytes for the given log file (default 1MB).')
  37. )
  38. # Deprecated
  39. ENABLE_V2 = Config(
  40. key="enable_v2",
  41. help=_("Show the version 2 of app which unifies all the past browsers into one."),
  42. type=coerce_bool,
  43. default=True
  44. )
  45. MAX_JOB_FETCH = Config(
  46. key='max_job_fetch',
  47. default=500,
  48. type=int,
  49. help=_('Maximum number of jobs to fetch and display when pagination is not supported for the type.')
  50. )
  51. # Deprecated
  52. ENABLE_QUERY_BROWSER = Config(
  53. key="enable_query_browser",
  54. help=_("Show the Impala query section for listing and showing more troubleshooting information."),
  55. type=coerce_bool,
  56. default=True
  57. )
  58. ENABLE_HIVE_QUERY_BROWSER = Config(
  59. key="enable_hive_query_browser",
  60. help=_("# Show the Hive query section for listing and showing more troubleshooting information."),
  61. type=coerce_bool,
  62. default=False
  63. )
  64. ENABLE_HISTORY_V2 = Config(
  65. key="enable_history_v2",
  66. help=_("Show the version 2 of job/query History which unifies the all into one."),
  67. type=coerce_bool,
  68. default=False
  69. )