Skip to content

Commit 6dff07a

Browse files
committed
reduce copy_queue_size to 1000
1 parent fbdaaf4 commit 6dff07a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

gpdbwriter/doc/gpdbwriter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ GpdbWriter通过 DataX 框架获取 Reader 生成的协议数据,根据你配
7474
"username": "xx",
7575
"password": "xx",
7676
"segment_reject_limit": 0,
77-
"copy_queue_size": 100000,
77+
"copy_queue_size": 1000,
7878
"num_copy_processor": 4,
7979
"num_copy_writer": 1,
8080
"column": [
@@ -143,7 +143,7 @@ GpdbWriter通过 DataX 框架获取 Reader 生成的协议数据,根据你配
143143
* **copy\_queue\_size**
144144
* 描述: 线程异步队列大小,增大此参数增加内存消耗,提升性能
145145
* 必选: 否
146-
* 默认值:100000
146+
* 默认值:1000
147147

148148
* **num\_copy\_processor**
149149
* 描述: 用于进行格式化数据的线程数

gpdbwriter/src/main/java/cn/hashdata/datax/plugin/writer/gpdbwriter/CopyWriterTask.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ public void startWrite(RecordReceiver recordReceiver, Configuration writerSliceC
9191
TaskPluginCollector taskPluginCollector) {
9292
this.writerSliceConfig = writerSliceConfig;
9393
int segment_reject_limit = writerSliceConfig.getInt("segment_reject_limit", 0);
94-
this.queueSize = writerSliceConfig.getInt("copy_queue_size", 100000);
95-
this.queueSize = this.queueSize < 1000 ? 1000 : this.queueSize;
94+
this.queueSize = writerSliceConfig.getInt("copy_queue_size", 1000);
95+
this.queueSize = this.queueSize < 10 ? 10 : this.queueSize;
9696
this.numProcessor = writerSliceConfig.getInt("num_copy_processor", 4);
9797
this.numProcessor = this.numProcessor < 1 ? 1 : this.numProcessor;
9898
this.numWriter = writerSliceConfig.getInt("num_copy_writer", 1);

0 commit comments

Comments
 (0)