diff --git a/scio-smb/src/main/java/org/apache/beam/sdk/extensions/smb/BucketMetadataUtil.java b/scio-smb/src/main/java/org/apache/beam/sdk/extensions/smb/BucketMetadataUtil.java index 9b09c53139..7a22bf22b6 100644 --- a/scio-smb/src/main/java/org/apache/beam/sdk/extensions/smb/BucketMetadataUtil.java +++ b/scio-smb/src/main/java/org/apache/beam/sdk/extensions/smb/BucketMetadataUtil.java @@ -69,7 +69,7 @@ int leastNumBuckets() { this.batchSize = batchSize; } - private Map> fetchMetadata(Set directories) { + private Map> fetchMetadata(List directories) { final int total = directories.size(); final Map> metadata = new ConcurrentHashMap<>(); int start = 0; @@ -89,7 +89,7 @@ private SourceMetadata getSourceMetadata( BiFunction, BucketMetadata, Boolean> compatibilityCompareFn) { final Map> bucketMetadatas = - fetchMetadata(directories.keySet()); + fetchMetadata(new ArrayList<>(directories.keySet())); Preconditions.checkState(!bucketMetadatas.isEmpty(), "Failed to find metadata"); Map> mapping = new HashMap<>();