Skip to content

Commit 5557ce4

Browse files
author
lucaijun
committed
Merge remote-tracking branch 'origin/release130' into release130
2 parents 8cf1ee9 + 09ccb24 commit 5557ce4

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

src/com/xxdb/data/BasicArrayVector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ public void Append(Vector value) throws Exception{
340340
int indexCount = rowIndicesSize;
341341
int prev = indexCount == 0? 0 : rowIndices[indexCount - 1];
342342
if (rowIndicesSize + 1 > capacity){
343-
rowIndices = Arrays.copyOf(rowIndices, rowIndices.length * 2);
343+
rowIndices = Arrays.copyOf(rowIndices, Math.max(2, rowIndices.length * 2));
344344
capacity = rowIndices.length;
345345
}
346346
if (value.rows() != 0){

src/com/xxdb/multithreadedtablewriter/MultithreadedTableWriter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ public MultithreadedTableWriter(String hostName, int port, String userId, String
357357
init(hostName,port,userId, password,dbName, tableName, useSSL,enableHighAvailability,highAvailabilitySites,
358358
batchSize, throttle,threadCount,partitionCol,compressTypes, Mode.M_Append, null, callbackHandler);
359359
}
360+
360361
private void init(String hostName, int port, String userId, String password,
361362
String dbName, String tableName, boolean useSSL,
362363
boolean enableHighAvailability, String[] highAvailabilitySites,

src/com/xxdb/streaming/client/PollingClient.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ public class PollingClient extends AbstractClient {
1919
TopicPoller topicPoller = null;
2020
private HashMap<List<String>, List<String>> users = new HashMap<>();
2121

22+
public PollingClient() throws SocketException {
23+
super(0);
24+
}
25+
2226
public PollingClient(int subscribePort) throws SocketException {
2327
super(subscribePort);
2428
}

src/com/xxdb/streaming/client/ThreadPooledClient.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ public ThreadPooledClient() throws SocketException {
3737
this("", DEFAULT_PORT, CORES);
3838
}
3939

40+
public ThreadPooledClient(int threadCount) throws SocketException {
41+
this("", 0, threadCount);
42+
}
43+
4044
public ThreadPooledClient(int subscribePort, int threadCount) throws SocketException {
4145
this("", subscribePort, threadCount);
4246
}

0 commit comments

Comments
 (0)