You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docstrings generation was requested by @xuxiong1.
* #20157 (comment)
The following files were modified:
* `modules/store-subdirectory/src/main/java/org/opensearch/plugin/store/subdirectory/SubdirectoryAwareStore.java`
Copy file name to clipboardExpand all lines: modules/store-subdirectory/src/main/java/org/opensearch/plugin/store/subdirectory/SubdirectoryAwareStore.java
+71-14Lines changed: 71 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@
10
10
11
11
importorg.apache.logging.log4j.LogManager;
12
12
importorg.apache.logging.log4j.Logger;
13
+
importorg.apache.lucene.codecs.CodecUtil;
13
14
importorg.apache.lucene.index.IndexCommit;
14
15
importorg.apache.lucene.index.IndexFileNames;
15
16
importorg.apache.lucene.index.SegmentInfos;
@@ -19,6 +20,7 @@
19
20
importorg.apache.lucene.store.IOContext;
20
21
importorg.apache.lucene.store.IndexInput;
21
22
importorg.apache.lucene.store.IndexOutput;
23
+
importorg.apache.lucene.util.Version;
22
24
importorg.opensearch.common.lucene.Lucene;
23
25
importorg.opensearch.core.index.shard.ShardId;
24
26
importorg.opensearch.env.ShardLock;
@@ -111,6 +113,15 @@ public SubdirectoryAwareStore(
111
113
);
112
114
}
113
115
116
+
/**
117
+
* Build a MetadataSnapshot that includes file metadata and user data from the commit and from files located in shard subdirectories.
118
+
*
119
+
* Aggregates metadata read from the commit's SegmentInfos and augments it with metadata discovered in subdirectories; the snapshot's document count includes documents found in subdirectory segment files.
120
+
*
121
+
* @param commit the Lucene index commit to read metadata from
122
+
* @return a MetadataSnapshot containing an immutable map of file metadata, an immutable map of commit user data, and the total document count across root and subdirectory files
123
+
* @throws IOException if reading segment information or subdirectory files fails
0 commit comments