mike-tr-adamson commented on code in PR #2498:
URL: https://github.com/apache/cassandra/pull/2498#discussion_r1272293357


##########
src/java/org/apache/cassandra/index/sai/disk/v1/sortedterms/SortedTermsMeta.java:
##########
@@ -19,30 +19,87 @@
 package org.apache.cassandra.index.sai.disk.v1.sortedterms;
 
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.lucene.store.DataInput;
 import org.apache.lucene.store.IndexOutput;
+import org.apache.lucene.util.BytesRef;
 
 /**
  * Metadata produced by {@link SortedTermsWriter}, needed by {@link 
SortedTermsReader}.
  */
 public class SortedTermsMeta
 {
-    public final long trieFilePointer;
     public final long termCount;
     public final int maxTermLength;
+    public List<SortedTermsSegmentMeta> segments;
 
     public SortedTermsMeta(DataInput input) throws IOException
     {
-        this.trieFilePointer = input.readLong();
-        this.termCount = input.readLong();
-        this.maxTermLength = input.readInt();
+        termCount = input.readLong();
+        maxTermLength = input.readInt();
+        int numberOfSegments = input.readInt();
+        segments = new ArrayList<>(numberOfSegments);
+        for (int index = 0; index < numberOfSegments; index++)
+            segments.add(new SortedTermsSegmentMeta(input));
     }
 
-    public static void write(IndexOutput output, long trieFilePointer, long 
termCount, int maxTermLength) throws IOException
+    public static void write(IndexOutput output, long termCount, int 
maxTermLength, List<SortedTermsSegmentMeta> segments) throws IOException
     {
-        output.writeLong(trieFilePointer);
         output.writeLong(termCount);
         output.writeInt(maxTermLength);
+        output.writeInt(segments.size());
+        for (SortedTermsSegmentMeta segment : segments)
+            segment.write(output);
+    }
+
+    public static class SortedTermsSegmentMeta

Review Comment:
   I have gone with `SegmentMeta` 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to