Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -127,7 +127,7 @@ public void test() throws Exception {
for (CompactionOverlapType compactionOverlapType : compactionOverlapTypes) {
List<TsFileResource> toMergeResources = new ArrayList<>();
for (int i = 0; i < toMergeFileNum; i++) {
Set<String> fullPath = new HashSet<>();
Set<String> fullPath = new LinkedHashSet<>();
if (compactionTimeseriesType == CompactionTimeseriesType.ALL_SAME) {
fullPath.add(fullPaths[0]);
fullPath.add(fullPaths[1]);
Expand Down Expand Up @@ -309,7 +309,7 @@ public void test() throws Exception {
toMergeResources.add(tsFileResource);
// has mods files before compaction
if (compactionBeforeHasMod) {
Map<String, Pair<Long, Long>> toDeleteTimeseriesAndTime = new HashMap<>();
Map<String, Pair<Long, Long>> toDeleteTimeseriesAndTime = new LinkedHashMap<>();
if (compactionTimeseriesType == CompactionTimeseriesType.ALL_SAME) {
toDeleteTimeseriesAndTime.put(
fullPaths[i], new Pair<>(i * 600L + 250L, i * 600L + 300L));
Expand Down Expand Up @@ -352,7 +352,7 @@ public void test() throws Exception {
Map<String, List<TimeValuePair>> sourceData =
CompactionCheckerUtils.readFiles(toMergeResources);
if (compactionHasMod) {
Map<String, Pair<Long, Long>> toDeleteTimeseriesAndTime = new HashMap<>();
Map<String, Pair<Long, Long>> toDeleteTimeseriesAndTime = new LinkedHashMap<>();
toDeleteTimeseriesAndTime.put(fullPaths[1], new Pair<>(250L, 300L));
CompactionFileGeneratorUtils.generateMods(
toDeleteTimeseriesAndTime, toMergeResources.get(0), true);
Expand All @@ -379,7 +379,7 @@ public void test() throws Exception {
List<TsFileResource> targetTsFileResources = new ArrayList<>();
targetTsFileResources.add(targetTsFileResource);
CompactionCheckerUtils.checkDataAndResource(sourceData, targetTsFileResources);
Map<String, List<List<Long>>> chunkPagePointsNumMerged = new HashMap<>();
Map<String, List<List<Long>>> chunkPagePointsNumMerged = new LinkedHashMap<>();
if (compactionTimeseriesType == CompactionTimeseriesType.ALL_SAME) {
if (toMergeFileNum == 2) {
if (compactionBeforeHasMod) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
Expand Down Expand Up @@ -166,7 +166,7 @@ public static void writeTsFile(
newTsFileResource.getTsFile().getParentFile().mkdirs();
}
RestorableTsFileIOWriter writer = new RestorableTsFileIOWriter(newTsFileResource.getTsFile());
Map<IDeviceID, List<String>> deviceMeasurementMap = new HashMap<>();
Map<IDeviceID, List<String>> deviceMeasurementMap = new LinkedHashMap<>();
for (String fullPath : fullPaths) {
PartialPath partialPath = new MeasurementPath(fullPath);
List<String> sensors =
Expand Down Expand Up @@ -224,7 +224,7 @@ public static void writeChunkToTsFileWithTimeRange(
TSFileDescriptor.getInstance().getConfig().setMaxNumberOfPointsInPage(Integer.MAX_VALUE);

RestorableTsFileIOWriter writer = new RestorableTsFileIOWriter(newTsFileResource.getTsFile());
Map<IDeviceID, List<String>> deviceMeasurementMap = new HashMap<>();
Map<IDeviceID, List<String>> deviceMeasurementMap = new LinkedHashMap<>();
for (String fullPath : fullPaths) {
PartialPath partialPath = new MeasurementPath(fullPath);
List<String> sensors =
Expand Down Expand Up @@ -313,7 +313,7 @@ public static void writeTsFile(
newTsFileResource.getTsFile().getParentFile().mkdirs();
}
RestorableTsFileIOWriter writer = new RestorableTsFileIOWriter(newTsFileResource.getTsFile());
Map<IDeviceID, List<String>> deviceMeasurementMap = new HashMap<>();
Map<IDeviceID, List<String>> deviceMeasurementMap = new LinkedHashMap<>();
for (String fullPath : fullPaths) {
PartialPath partialPath = new PartialPath(fullPath);
List<String> sensors =
Expand Down