[inner-2190] collections adjusted to be thread-safe

(cherry picked from commit 4eac4e1aaf)
This commit is contained in:
wenyh1
2023-10-27 11:12:35 +08:00
parent d70fbf6d59
commit 41683fbd3b

View File

@@ -4,14 +4,18 @@ import com.actiontech.dble.config.model.SystemConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
public final class LoadDataBatch {
private static final Logger LOGGER = LoggerFactory.getLogger(LoadDataBatch.class);
private volatile int size;
private volatile boolean enableBatchLoadData;
private Set<String> successFileNames = new HashSet<>();
private Set<String> successFileNames = ConcurrentHashMap.newKeySet();
private int currentNodeSize = 0;
private Map<String, List<String>> warnings = new HashMap<>();