hue解决下载的excel表格为10万行的限制

链接课程:http://edu.51cto.com/course/15824.html

hue解决下载的excel表格为10万行的限制_第1张图片hue解决下载的excel表格为10万行的限制_第2张图片

解决方案:

CDH的版本为:5.14.0

vim /opt/cloudera/parcels/CDH/lib/hue/apps/beeswax/src/beeswax/conf.py

DOWNLOAD_CELL_LIMIT = Config(
  key='download_cell_limit',
  # 表格限制的大小,行数 * 列数
  default=10000000,
  type=int,
  help=_t('A limit to the number of cells (rows * columns) that can be downloaded from a query '
          '(e.g. - 10K rows * 1K columns = 10M cells.) '
          'A value of -1 means there will be no limit.'))

def get_deprecated_download_cell_limit():
  """Get the old default"""
  # 表格的大小除100,就是行数,100是列数
  return DOWNLOAD_CELL_LIMIT.get() / 100 if DOWNLOAD_CELL_LIMIT.get() > 0 else DOWNLOAD_CELL_LIMIT.get()

DOWNLOAD_ROW_LIMIT = Config(
  key='download_row_limit',
  # 行数的限制
  dynamic_default=get_deprecated_download_cell_limit,
  type=int,
  help=_t('A limit to the number of rows that can be downloaded from a query before it is truncated. '
          'A value of -1 means there will be no limit.'))

你可能感兴趣的:(hue)