@@ -67,11 +67,6 @@ public BlockletIndexStore(CarbonLRUCache lruCache) {
67
67
68
68
@ Override
69
69
public BlockletIndexWrapper get (TableBlockIndexUniqueIdentifierWrapper identifierWrapper ) {
70
- return get (identifierWrapper , null );
71
- }
72
-
73
- public BlockletIndexWrapper get (TableBlockIndexUniqueIdentifierWrapper identifierWrapper ,
74
- Map <String , Map <String , BlockMetaInfo >> segInfoCache ) {
75
70
TableBlockIndexUniqueIdentifier identifier =
76
71
identifierWrapper .getTableBlockIndexUniqueIdentifier ();
77
72
String lruCacheKey = identifier .getUniqueTableSegmentIdentifier ();
@@ -83,24 +78,11 @@ public BlockletIndexWrapper get(TableBlockIndexUniqueIdentifierWrapper identifie
83
78
SegmentIndexFileStore indexFileStore =
84
79
new SegmentIndexFileStore (identifierWrapper .getConfiguration ());
85
80
Set <String > filesRead = new HashSet <>();
86
- String segmentFilePath = identifier .getIndexFilePath ();
87
- if (segInfoCache == null ) {
88
- segInfoCache = new HashMap <>();
89
- }
90
- Map <String , BlockMetaInfo > carbonDataFileBlockMetaInfoMapping =
91
- segInfoCache .get (segmentFilePath );
92
- if (carbonDataFileBlockMetaInfoMapping == null ) {
93
- carbonDataFileBlockMetaInfoMapping =
94
- BlockletIndexUtil .createCarbonDataFileBlockMetaInfoMapping (segmentFilePath ,
95
- identifierWrapper .getConfiguration ());
96
- segInfoCache .put (segmentFilePath , carbonDataFileBlockMetaInfoMapping );
97
- }
98
81
// if the identifier is not a merge file we can directly load the indexes
99
82
if (identifier .getMergeIndexFileName () == null ) {
100
83
List <DataFileFooter > indexInfos = new ArrayList <>();
101
84
Map <String , BlockMetaInfo > blockMetaInfoMap = BlockletIndexUtil
102
- .getBlockMetaInfoMap (identifierWrapper , indexFileStore , filesRead ,
103
- carbonDataFileBlockMetaInfoMapping , indexInfos );
85
+ .getBlockMetaInfoMap (identifierWrapper , indexFileStore , filesRead , indexInfos );
104
86
BlockIndex blockIndex =
105
87
loadAndGetIndex (identifier , indexFileStore , blockMetaInfoMap ,
106
88
identifierWrapper .getCarbonTable (),
@@ -120,8 +102,7 @@ public BlockletIndexWrapper get(TableBlockIndexUniqueIdentifierWrapper identifie
120
102
List <DataFileFooter > indexInfos = new ArrayList <>();
121
103
Map <String , BlockMetaInfo > blockMetaInfoMap = BlockletIndexUtil .getBlockMetaInfoMap (
122
104
new TableBlockIndexUniqueIdentifierWrapper (blockIndexUniqueIdentifier ,
123
- identifierWrapper .getCarbonTable ()), indexFileStore , filesRead ,
124
- carbonDataFileBlockMetaInfoMapping , indexInfos );
105
+ identifierWrapper .getCarbonTable ()), indexFileStore , filesRead , indexInfos );
125
106
if (!blockMetaInfoMap .isEmpty ()) {
126
107
BlockIndex blockIndex =
127
108
loadAndGetIndex (blockIndexUniqueIdentifier , indexFileStore , blockMetaInfoMap ,
@@ -157,8 +138,6 @@ public BlockletIndexWrapper get(TableBlockIndexUniqueIdentifierWrapper identifie
157
138
public List <BlockletIndexWrapper > getAll (
158
139
List <TableBlockIndexUniqueIdentifierWrapper > tableSegmentUniqueIdentifiers )
159
140
throws IOException {
160
- Map <String , Map <String , BlockMetaInfo >> segInfoCache =
161
- new HashMap <String , Map <String , BlockMetaInfo >>();
162
141
163
142
List <BlockletIndexWrapper > blockletIndexWrappers =
164
143
new ArrayList <>(tableSegmentUniqueIdentifiers .size ());
@@ -177,7 +156,7 @@ public List<BlockletIndexWrapper> getAll(
177
156
}
178
157
if (missedIdentifiersWrapper .size () > 0 ) {
179
158
for (TableBlockIndexUniqueIdentifierWrapper identifierWrapper : missedIdentifiersWrapper ) {
180
- blockletIndexWrapper = get (identifierWrapper , segInfoCache );
159
+ blockletIndexWrapper = get (identifierWrapper );
181
160
blockletIndexWrappers .add (blockletIndexWrapper );
182
161
}
183
162
}
0 commit comments