You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/04/12 08:01:09 UTC
[incubator-doris] branch master updated: [improvement]Disable mini load (#8955)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 51269efbb7 [improvement]Disable mini load (#8955)
51269efbb7 is described below
commit 51269efbb74c0bc9de0d287a82a75e8c2a3c350b
Author: jiafeng.zhang <zh...@gmail.com>
AuthorDate: Tue Apr 12 16:01:03 2022 +0800
[improvement]Disable mini load (#8955)
Disable miniload by default
---
docs/en/administrator-guide/config/fe_config.md | 4 ++++
docs/zh-CN/administrator-guide/config/fe_config.md | 4 ++++
.../src/main/java/org/apache/doris/common/Config.java | 5 +++++
.../main/java/org/apache/doris/httpv2/rest/LoadAction.java | 14 +++++++++++---
4 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/docs/en/administrator-guide/config/fe_config.md b/docs/en/administrator-guide/config/fe_config.md
index 02db4f03b8..281d841ff5 100644
--- a/docs/en/administrator-guide/config/fe_config.md
+++ b/docs/en/administrator-guide/config/fe_config.md
@@ -209,6 +209,10 @@ Default:100 * 1024 * 1024 (100MB)
This is the maximum number of bytes of the file uploaded by the put or post method, the default value: 100MB
+### **`disable_mini_load`**
+
+Whether to disable the mini load data import method, the default:true (Disabled)
+
### frontend_address
Status: Deprecated, not recommended use. This parameter may be deleted later Type: string Description: Explicitly set the IP address of FE instead of using *InetAddress.getByName* to get the IP address. Usually in *InetAddress.getByName* When the expected results cannot be obtained. Only IP address is supported, not hostname. Default value: 0.0.0.0
diff --git a/docs/zh-CN/administrator-guide/config/fe_config.md b/docs/zh-CN/administrator-guide/config/fe_config.md
index 89ad2a208c..e16e58c365 100644
--- a/docs/zh-CN/administrator-guide/config/fe_config.md
+++ b/docs/zh-CN/administrator-guide/config/fe_config.md
@@ -207,6 +207,10 @@ workers 线程池默认不做设置,根据自己需要进行设置
这个是 put 或 post 方法上传文件的最大字节数,默认值:100MB
+### **`disable_mini_load`**
+
+是否禁用mini load数据导入方式,默认是:true (禁用)
+
### `default_max_filter_ratio`
默认值:0
diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/Config.java b/fe/fe-core/src/main/java/org/apache/doris/common/Config.java
index 9ce74a0fd0..34945f9f99 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/common/Config.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/common/Config.java
@@ -348,6 +348,11 @@ public class Config extends ConfigBase {
*/
@ConfField public static int jetty_server_max_http_post_size = 100 * 1024 * 1024;
+ /**
+ * Mini load disabled by default
+ */
+ @ConfField public static boolean disable_mini_load = true;
+
/**
* The backlog_num for mysql nio server
* When you enlarge this backlog_num, you should enlarge the value in
diff --git a/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/LoadAction.java b/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/LoadAction.java
index d5b2b71e58..b9c85dbdfb 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/LoadAction.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/LoadAction.java
@@ -19,7 +19,9 @@ package org.apache.doris.httpv2.rest;
import org.apache.doris.catalog.Catalog;
import org.apache.doris.cluster.ClusterNamespace;
+import org.apache.doris.common.Config;
import org.apache.doris.common.DdlException;
+import org.apache.doris.httpv2.entity.ResponseEntityBuilder;
import org.apache.doris.httpv2.entity.RestBaseResult;
import org.apache.doris.mysql.privilege.PrivPredicate;
import org.apache.doris.qe.ConnectContext;
@@ -32,6 +34,7 @@ import com.google.common.base.Strings;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
+import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -59,9 +62,14 @@ public class LoadAction extends RestBaseController {
@RequestMapping(path = "/api/{" + DB_KEY + "}/{" + TABLE_KEY + "}/_load", method = RequestMethod.PUT)
public Object load(HttpServletRequest request, HttpServletResponse response,
@PathVariable(value = DB_KEY) String db, @PathVariable(value = TABLE_KEY) String table) {
- this.isStreamLoad = false;
- executeCheckPassword(request, response);
- return executeWithoutPassword(request, response, db, table);
+ if(Config.disable_mini_load) {
+ ResponseEntity entity = ResponseEntityBuilder.notFound("The mini load operation has been disabled by default, if you need to add disable_mini_load=false in fe.conf.");
+ return entity;
+ } else {
+ this.isStreamLoad = false;
+ executeCheckPassword(request, response);
+ return executeWithoutPassword(request, response, db, table);
+ }
}
@RequestMapping(path = "/api/{" + DB_KEY + "}/{" + TABLE_KEY + "}/_stream_load", method = RequestMethod.PUT)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org