@@ -59,8 +59,10 @@ public class PartitionAwarePrimaryKeyMap implements PrimaryKeyMap
5959 @ ThreadSafe
6060 public static class PartitionAwarePrimaryKeyMapFactory implements Factory
6161 {
62+ private final IndexComponents .ForRead perSSTableComponents ;
6263 private final LongArray .Factory tokenReaderFactory ;
6364 private final LongArray .Factory offsetReaderFactory ;
65+ private final MetadataSource metadata ;
6466 private final KeyFetcher keyFetcher ;
6567 private final IPartitioner partitioner ;
6668 private final PrimaryKey .Factory primaryKeyFactory ;
@@ -74,13 +76,15 @@ public PartitionAwarePrimaryKeyMapFactory(IndexComponents.ForRead perSSTableComp
7476 {
7577 try
7678 {
77- MetadataSource metadata = MetadataSource .loadMetadata (perSSTableComponents );
79+ this .perSSTableComponents = perSSTableComponents ;
80+ this .metadata = MetadataSource .loadMetadata (perSSTableComponents );
81+ MetadataSource metadata = MetadataSource .loadMetadata (this .perSSTableComponents );
7882
7983 IndexComponent .ForRead offsetsComponent = perSSTableComponents .get (IndexComponentType .OFFSETS_VALUES );
8084 IndexComponent .ForRead tokensComponent = perSSTableComponents .get (IndexComponentType .TOKEN_VALUES );
8185
82- NumericValuesMeta offsetsMeta = new NumericValuesMeta (metadata .get (offsetsComponent ));
83- NumericValuesMeta tokensMeta = new NumericValuesMeta (metadata .get (tokensComponent ));
86+ NumericValuesMeta offsetsMeta = new NumericValuesMeta (this . metadata .get (offsetsComponent ));
87+ NumericValuesMeta tokensMeta = new NumericValuesMeta (this . metadata .get (tokensComponent ));
8488
8589 count = tokensMeta .valueCount ;
8690 token = tokensComponent .createFileHandle ();
0 commit comments