Skip to content

Commit f00c541

Browse files
llingllinggit
authored andcommitted
Removed threadThrottleFactor related methods. In the next release, we'll have autoscaling. It has similar functionality of threadThrottleFactor. We are removing this, otherwise it will confuse users.
1 parent fe7234d commit f00c541

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

marklogic-client-api/src/main/java/com/marklogic/client/datamovement/QueryBatcher.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ public interface QueryBatcher extends Batcher {
310310
* 0 explicitly uses the maximum number of threads
311311
* @return this instance for method chaining
312312
*/
313-
public QueryBatcher withBatchSize(int docBatchSize, int docToUriBatchRatio, int threadThrottleFactor);
313+
//public QueryBatcher withBatchSize(int docBatchSize, int docToUriBatchRatio, int threadThrottleFactor);
314314

315315
/**
316316
* Returns docToUriBatchRatio set to the QueryBatcher
@@ -322,7 +322,7 @@ public interface QueryBatcher extends Batcher {
322322
* Returns threadThrottleFactor set to the QueryBatcher
323323
* @return threadThrottleFactor
324324
*/
325-
public int getThreadThrottleFactor();
325+
//public int getThreadThrottleFactor();
326326

327327
/**
328328
* Returns defaultDocBatchSize, which is calculated according to server status

marklogic-client-api/src/main/java/com/marklogic/client/datamovement/impl/QueryBatcherImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ public QueryBatcher withBatchSize(int docBatchSize, int docToUriBatchRatio) {
344344
return this;
345345
}
346346

347-
@Override
347+
/* @Override
348348
public QueryBatcher withBatchSize(int docBatchSize, int docToUriBatchRatio, int threadThrottleFactor) {
349349
if (threadThrottleFactor < 0 || threadThrottleFactor > this.maxDocToUriBatchRatio) {
350350
throw new IllegalArgumentException("threadThrottleFactor is less than 0 or " +
@@ -356,14 +356,14 @@ public QueryBatcher withBatchSize(int docBatchSize, int docToUriBatchRatio, int
356356
withBatchSize(docBatchSize, docToUriBatchRatio);
357357
this.threadThrottleFactor = threadThrottleFactor;
358358
return this;
359-
}
359+
}*/
360360

361361
@Override
362362
public int getDocToUriBatchRatio() {
363363
return this.docToUriBatchRatio;
364364
}
365365

366-
@Override
366+
// @Override
367367
public int getThreadThrottleFactor() {
368368
return this.threadThrottleFactor;
369369
}

marklogic-client-api/src/test/java/com/marklogic/client/test/datamovement/ConcurrencyTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void ConcurrencyTest() {
5555
int batchSize = 20;
5656
int docToUriBatchRatio = 5;
5757
int totalCount = 1000;
58-
int threadThrottleFactor = 4;
58+
//int threadThrottleFactor = 4;
5959

6060
DocumentMetadataHandle documentMetadata = new DocumentMetadataHandle().withCollections("ConcurrencyTest");
6161
WriteBatcher batcher = moveMgr.newWriteBatcher().withDefaultMetadata(documentMetadata);
@@ -93,7 +93,7 @@ public void ConcurrencyTest() {
9393

9494
assertTrue("Output list does not contain all number of outputs", outputUris.size() == totalCount);
9595

96-
QueryBatcher queryBatcherAfter = dmManager.newQueryBatcher(new StructuredQueryBuilder().collection("ConcurrencyTest"));
96+
/* QueryBatcher queryBatcherAfter = dmManager.newQueryBatcher(new StructuredQueryBuilder().collection("ConcurrencyTest"));
9797
AtomicInteger minAfter = new AtomicInteger(Integer.MAX_VALUE);
9898
AtomicInteger maxAfter = new AtomicInteger(0);
9999
queryBatcherAfter.withBatchSize(batchSize, docToUriBatchRatio, threadThrottleFactor)
@@ -113,10 +113,10 @@ public void ConcurrencyTest() {
113113
114114
dmManager.startJob(queryBatcherAfter);
115115
queryBatcherAfter.awaitCompletion();
116-
dmManager.stopJob(queryBatcherAfter);
116+
dmManager.stopJob(queryBatcherAfter);*/
117117

118118
assertTrue(max.get() <= forest_count * docToUriBatchRatio);
119-
assertTrue(maxAfter.get() <= forest_count * (docToUriBatchRatio - threadThrottleFactor));
119+
//assertTrue(maxAfter.get() <= forest_count * (docToUriBatchRatio - threadThrottleFactor));
120120
}
121121

122122
static void changeAssignmentPolicy(String value) throws IOException {

0 commit comments

Comments
 (0)