tsreaper commented on a change in pull request #14: URL: https://github.com/apache/flink-table-store/pull/14#discussion_r791536943
########## File path: flink-table-store-core/src/main/java/org/apache/flink/table/store/file/operation/FileStoreScanImpl.java ########## @@ -109,34 +176,72 @@ public Long snapshotId() { } private List<ManifestEntry> scan() { - Map<ManifestEntry.Identifier, ManifestEntry> map = new LinkedHashMap<>(); - for (ManifestFileMeta manifest : manifests) { - // TODO read each manifest file concurrently - for (ManifestEntry entry : manifestFile.read(manifest.fileName())) { - ManifestEntry.Identifier identifier = entry.identifier(); - switch (entry.kind()) { - case ADD: - Preconditions.checkState( - !map.containsKey(identifier), - "Trying to add file %s which is already added. " - + "Manifest might be corrupted.", - identifier); - map.put(identifier, entry); - break; - case DELETE: - Preconditions.checkState( - map.containsKey(identifier), - "Trying to delete file %s which is not previously added. " - + "Manifest might be corrupted.", - identifier); - map.remove(identifier); - break; - default: - throw new UnsupportedOperationException( - "Unknown value kind " + entry.kind().name()); - } + List<ManifestEntry> entries; + try { + entries = + new ForkJoinPool() Review comment: If we want to use `parallelStream` we need `ForkJoinPool`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org