in adb3client/src/main/java/com/alibaba/cloud/analyticdb/adb3client/impl/collector/TableShardCollector.java [48:90]
public synchronized void append(Record record) throws AdbClientException {
AdbClientException exception = null;
if (currentTableSchema == null) {
currentTableSchema = record.getSchema();
} else if (!currentTableSchema.equals(record.getSchema())) {
try {
flush(true, false, null);
} catch (AdbClientException e) {
exception = e;
}
}
boolean full = buffer.append(record);
if (full) {
try {
waitActionDone();
} catch (AdbClientWithDetailsException e) {
if (exception == null) {
exception = e;
} else if (exception instanceof AdbClientWithDetailsException) {
((AdbClientWithDetailsException) exception).merge(e);
}
} catch (AdbClientException e) {
exception = e;
}
commit(buffer.getBatchState());
} else {
try {
isActionDone();
} catch (AdbClientWithDetailsException e) {
if (exception == null) {
exception = e;
} else if (exception instanceof AdbClientWithDetailsException) {
((AdbClientWithDetailsException) exception).merge(e);
}
} catch (AdbClientException e) {
exception = e;
}
}
if (exception != null) {
throw exception;
}
}