mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 12:07:42 +00:00
[improvement][headless]Set default query limits of DataSet.
This commit is contained in:
@@ -9,6 +9,7 @@ import com.alibaba.excel.write.metadata.WriteSheet;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.tencent.supersonic.auth.api.authentication.pojo.User;
|
||||
import com.tencent.supersonic.common.pojo.Aggregator;
|
||||
import com.tencent.supersonic.common.pojo.Constants;
|
||||
import com.tencent.supersonic.common.pojo.DateConf;
|
||||
import com.tencent.supersonic.common.pojo.QueryColumn;
|
||||
import com.tencent.supersonic.common.pojo.enums.DatePeriodEnum;
|
||||
@@ -58,7 +59,7 @@ public class DownloadServiceImpl implements DownloadService {
|
||||
|
||||
private static final String internMetricCol = "指标名称";
|
||||
|
||||
private static final long downloadSize = 10000;
|
||||
private static final long downloadLimit = Constants.DEFAULT_DOWNLOAD_LIMIT;
|
||||
|
||||
private static final String dateFormat = "yyyyMMddHHmmss";
|
||||
|
||||
@@ -293,7 +294,7 @@ public class DownloadServiceImpl implements DownloadService {
|
||||
queryStructReq.setAggregators(Lists.newArrayList(aggregator));
|
||||
queryStructReq.setDateInfo(dateConf);
|
||||
queryStructReq.setModelIds(modelIds);
|
||||
queryStructReq.setLimit(downloadSize);
|
||||
queryStructReq.setLimit(downloadLimit);
|
||||
return queryStructReq;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ public class DictUtils {
|
||||
private String dimMultiValueSplit;
|
||||
|
||||
@Value("${s2.item.value.max.count:100000}")
|
||||
private Long itemValueMaxCount;
|
||||
private int itemValueMaxCount;
|
||||
|
||||
@Value("${s2.item.value.white.frequency:999999}")
|
||||
private Long itemValueWhiteFrequency;
|
||||
@@ -285,7 +285,7 @@ public class DictUtils {
|
||||
String whereStr = generateWhereStr(dictItemResp);
|
||||
String where = StringUtils.isEmpty(whereStr) ? "" : "WHERE" + whereStr;
|
||||
ItemValueConfig config = dictItemResp.getConfig();
|
||||
Long limit =
|
||||
int limit =
|
||||
(Objects.isNull(config) || Objects.isNull(config.getLimit()))
|
||||
? itemValueMaxCount
|
||||
: dictItemResp.getConfig().getLimit();
|
||||
@@ -331,7 +331,7 @@ public class DictUtils {
|
||||
String whereStr = generateWhereStr(dictItemResp);
|
||||
String where = StringUtils.isEmpty(whereStr) ? "" : "WHERE" + whereStr;
|
||||
ItemValueConfig config = dictItemResp.getConfig();
|
||||
Long limit =
|
||||
long limit =
|
||||
(Objects.isNull(config) || Objects.isNull(config.getLimit()))
|
||||
? itemValueMaxCount
|
||||
: dictItemResp.getConfig().getLimit();
|
||||
@@ -371,7 +371,7 @@ public class DictUtils {
|
||||
|
||||
fillStructDateInfo(queryStructReq, dictItemResp);
|
||||
|
||||
Long limit =
|
||||
int limit =
|
||||
Objects.isNull(dictItemResp.getConfig().getLimit())
|
||||
? itemValueMaxCount
|
||||
: dictItemResp.getConfig().getLimit();
|
||||
|
||||
Reference in New Issue
Block a user