@@ -201,8 +201,6 @@ static class Header {
201
201
*/
202
202
private long offset = UNSET ;
203
203
204
- private MemoryType memType = MemoryType .EXCLUSIVE ;
205
-
206
204
/**
207
205
* The on-disk size of the next block, including the header and checksums if present.
208
206
* UNSET if unknown.
@@ -274,7 +272,7 @@ private BlockDeserializer() {
274
272
}
275
273
276
274
@ Override
277
- public HFileBlock deserialize (ByteBuff buf , ByteBuffAllocator alloc , MemoryType memType )
275
+ public HFileBlock deserialize (ByteBuff buf , ByteBuffAllocator alloc )
278
276
throws IOException {
279
277
// The buf has the file block followed by block metadata.
280
278
// Set limit to just before the BLOCK_METADATA_SPACE then rewind.
@@ -287,8 +285,7 @@ public HFileBlock deserialize(ByteBuff buf, ByteBuffAllocator alloc, MemoryType
287
285
boolean usesChecksum = buf .get () == (byte ) 1 ;
288
286
long offset = buf .getLong ();
289
287
int nextBlockOnDiskSize = buf .getInt ();
290
- return new HFileBlock (newByteBuff , usesChecksum , memType , offset , nextBlockOnDiskSize , null ,
291
- alloc );
288
+ return new HFileBlock (newByteBuff , usesChecksum , offset , nextBlockOnDiskSize , null , alloc );
292
289
}
293
290
294
291
@ Override
@@ -366,7 +363,7 @@ public HFileBlock(BlockType blockType, int onDiskSizeWithoutHeader,
366
363
* to that point.
367
364
* @param buf Has header, content, and trailing checksums if present.
368
365
*/
369
- HFileBlock (ByteBuff buf , boolean usesHBaseChecksum , MemoryType memType , final long offset ,
366
+ HFileBlock (ByteBuff buf , boolean usesHBaseChecksum , final long offset ,
370
367
final int nextBlockOnDiskSize , HFileContext fileContext , ByteBuffAllocator allocator )
371
368
throws IOException {
372
369
buf .rewind ();
@@ -398,7 +395,6 @@ public HFileBlock(BlockType blockType, int onDiskSizeWithoutHeader,
398
395
assert usesHBaseChecksum == fileContext .isUseHBaseChecksum ();
399
396
init (blockType , onDiskSizeWithoutHeader , uncompressedSizeWithoutHeader , prevBlockOffset , offset ,
400
397
onDiskDataSizeWithHeader , nextBlockOnDiskSize , fileContext , allocator );
401
- this .memType = memType ;
402
398
this .offset = offset ;
403
399
this .buf = buf ;
404
400
this .buf .rewind ();
@@ -1785,8 +1781,8 @@ protected HFileBlock readBlockDataInternal(FSDataInputStream is, long offset,
1785
1781
// The onDiskBlock will become the headerAndDataBuffer for this block.
1786
1782
// If nextBlockOnDiskSizeWithHeader is not zero, the onDiskBlock already
1787
1783
// contains the header of next block, so no need to set next block's header in it.
1788
- HFileBlock hFileBlock = new HFileBlock (curBlock , checksumSupport , MemoryType . EXCLUSIVE ,
1789
- offset , nextBlockOnDiskSize , fileContext , intoHeap ? HEAP : allocator );
1784
+ HFileBlock hFileBlock = new HFileBlock (curBlock , checksumSupport , offset ,
1785
+ nextBlockOnDiskSize , fileContext , intoHeap ? HEAP : allocator );
1790
1786
// Run check on uncompressed sizings.
1791
1787
if (!fileContext .isCompressedOrEncrypted ()) {
1792
1788
hFileBlock .sanityCheckUncompressed ();
@@ -2060,18 +2056,6 @@ HFileContext getHFileContext() {
2060
2056
return this .fileContext ;
2061
2057
}
2062
2058
2063
- @ Override
2064
- public MemoryType getMemoryType () {
2065
- return this .memType ;
2066
- }
2067
-
2068
- /**
2069
- * @return true if this block is backed by a shared memory area(such as that of a BucketCache).
2070
- */
2071
- boolean usesSharedMemory () {
2072
- return this .memType == MemoryType .SHARED ;
2073
- }
2074
-
2075
2059
/**
2076
2060
* Convert the contents of the block header into a human readable string.
2077
2061
* This is mostly helpful for debugging. This assumes that the block
0 commit comments