|
35 | 35 | import java.util.ArrayList;
|
36 | 36 | import java.util.Collection;
|
37 | 37 | import java.util.HashMap;
|
| 38 | +import java.util.LinkedHashMap; |
38 | 39 | import java.util.List;
|
39 | 40 | import java.util.Map;
|
40 | 41 |
|
@@ -196,12 +197,12 @@ private SnapshotPendingSplitsState deserializeLegacySnapshotPendingSplitsState(
|
196 | 197 | int splitVersion, DataInputDeserializer in) throws IOException {
|
197 | 198 | List<TableId> alreadyProcessedTables = readTableIds(in);
|
198 | 199 | List<MySqlSnapshotSplit> remainingSplits = readMySqlSnapshotSplits(splitVersion, in);
|
199 |
| - Map<String, MySqlSnapshotSplit> assignedSnapshotSplits = |
| 200 | + LinkedHashMap<String, MySqlSnapshotSplit> assignedSnapshotSplits = |
200 | 201 | readAssignedSnapshotSplits(splitVersion, in);
|
201 | 202 |
|
202 | 203 | final List<MySqlSchemalessSnapshotSplit> remainingSchemalessSplits = new ArrayList<>();
|
203 |
| - final Map<String, MySqlSchemalessSnapshotSplit> assignedSchemalessSnapshotSplits = |
204 |
| - new HashMap<>(); |
| 204 | + final LinkedHashMap<String, MySqlSchemalessSnapshotSplit> assignedSchemalessSnapshotSplits = |
| 205 | + new LinkedHashMap<>(); |
205 | 206 | final Map<TableId, TableChanges.TableChange> tableSchemas = new HashMap<>();
|
206 | 207 | remainingSplits.forEach(
|
207 | 208 | split -> {
|
@@ -267,8 +268,8 @@ private SnapshotPendingSplitsState deserializeSnapshotPendingSplitsState(
|
267 | 268 | List<TableId> remainingTableIds = readTableIds(in);
|
268 | 269 | boolean isTableIdCaseSensitive = in.readBoolean();
|
269 | 270 | final List<MySqlSchemalessSnapshotSplit> remainingSchemalessSplits = new ArrayList<>();
|
270 |
| - final Map<String, MySqlSchemalessSnapshotSplit> assignedSchemalessSnapshotSplits = |
271 |
| - new HashMap<>(); |
| 271 | + final LinkedHashMap<String, MySqlSchemalessSnapshotSplit> assignedSchemalessSnapshotSplits = |
| 272 | + new LinkedHashMap<>(); |
272 | 273 | final Map<TableId, TableChanges.TableChange> tableSchemas = new HashMap<>();
|
273 | 274 | remainingSplits.forEach(
|
274 | 275 | split -> {
|
@@ -368,9 +369,9 @@ private void writeAssignedSnapshotSplits(
|
368 | 369 | }
|
369 | 370 | }
|
370 | 371 |
|
371 |
| - private Map<String, MySqlSnapshotSplit> readAssignedSnapshotSplits( |
| 372 | + private LinkedHashMap<String, MySqlSnapshotSplit> readAssignedSnapshotSplits( |
372 | 373 | int splitVersion, DataInputDeserializer in) throws IOException {
|
373 |
| - Map<String, MySqlSnapshotSplit> assignedSplits = new HashMap<>(); |
| 374 | + LinkedHashMap<String, MySqlSnapshotSplit> assignedSplits = new LinkedHashMap<>(); |
374 | 375 | final int size = in.readInt();
|
375 | 376 | for (int i = 0; i < size; i++) {
|
376 | 377 | String splitId = in.readUTF();
|
|
0 commit comments