conf.py 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. MAX_SNAPPY_DECOMPRESSION_SIZE = Config(
  20. key="max_snappy_decompression_size",
  21. help=_("Max snappy decompression size in bytes."),
  22. private=True,
  23. default=1024*1024*25,
  24. type=int)
  25. ARCHIVE_UPLOAD_TEMPDIR = Config(
  26. key="archive_upload_tempdir",
  27. help=_("Location on local filesystem where the uploaded archives are temporary stored."),
  28. default=None,
  29. type=str)
  30. SHOW_DOWNLOAD_BUTTON = Config(
  31. key="show_download_button",
  32. help=_("whether to show the download button in hdfs file browser."),
  33. type=coerce_bool,
  34. default=True)
  35. SHOW_UPLOAD_BUTTON = Config(
  36. key="show_upload_button",
  37. help=_("whether to show the upload button in hdfs file browser."),
  38. type=coerce_bool,
  39. default=True)
  40. ENABLE_EXTRACT_UPLOADED_ARCHIVE = Config(
  41. key="enable_extract_uploaded_archive",
  42. help=_("Flag to enable the extraction of a uploaded archive in HDFS."),
  43. type=bool,
  44. default=False
  45. )