Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
ce32d83
HFile V4 Writer changes
Apr 15, 2025
f7bed0f
HFile v4 - fix the file info not to have longest key
Apr 15, 2025
128a77b
HFile v4 - made tenant identification optimized
Apr 15, 2025
b501c4d
HFile v4 - add case of default tenant
Apr 15, 2025
85f2c6c
HFile v4 - optimized default tenant extractor
Apr 15, 2025
d452e7f
HFile v4 - reverted table descriptor changes
Apr 15, 2025
ce46666
HFile v4 - optimized writer factory changes
Apr 15, 2025
fd76a17
HFile v4 - remove unnesscary changes
Apr 15, 2025
77b01c0
HFile v4 - remove not needed tenant method
Apr 16, 2025
05088ee
HFile v4 - reader implemented and tests passing for read and write
Apr 16, 2025
4f8eafa
HFile v4 - reader implemented and tests passing for read and write
Apr 17, 2025
e123a21
HFile v4 - added relative offsets to tenant sections
Apr 18, 2025
be459fe
HFile v4 - tests passing with absolute offsets
Apr 21, 2025
efc62d1
HFile v4 - test changes to verify v4 writer
Apr 21, 2025
a32b86b
HFile v4 - v4 writer not to have minimum size of the section
Apr 21, 2025
e92e909
HFile v4 - added asserts to test for confirming readers and scanners …
Apr 21, 2025
9fb9f72
HFile v4 - added relative offset code, test failing for non-first ten…
Apr 21, 2025
b0763d1
HFile v4 - added relative offset code, test cases passing
Apr 21, 2025
33af15e
HFile v4 - refactor writer flow with passing test
Apr 21, 2025
201c3b9
HFile v4 - refactor reader flow with passing test
Apr 21, 2025
748e4fa
HFile v4 - fix resouce leak in reader flow with passing test
Apr 21, 2025
565ed51
HFile v4 - remove unused imports
Apr 21, 2025
f4cd928
HFile v4 - added tenantSectionId terminology
May 15, 2025
cc96ebc
HFile v4 - added test with offset
May 15, 2025
a35bcef
HFile v4 - renamed virtualSectionWriter to SectionWriter
May 15, 2025
5025c6d
HFile v4 - working partial key scan logic across sections
May 16, 2025
c05ae3b
HFile v4 - remove support for tenant offset
May 22, 2025
9957390
HFile v4 - flushes working
May 23, 2025
9423d80
HFile v4 - Optimizations
May 28, 2025
0bc9407
HFile v4 - Optimizations, broken test as tenant extractor failing
Jun 2, 2025
602ab15
HFile v4 - Moved info to trailer - failing test
Jun 5, 2025
f160b72
HFile v4 - Initial section data is readable after disabling sort
sairampola Jun 5, 2025
e48f090
Hfile v4 - GET passing now
sairampola Jun 5, 2025
9247228
Hfile v4 - tests passing now
sairampola Jun 5, 2025
4a29887
HFile v4 - Removed binary search and sorting
sairampola Jun 5, 2025
d52bf4f
HFile v4 - Removed partial key scanner as not needed
sairampola Jun 5, 2025
a47a9c5
HFile v4 - removed bloom filter change
Jun 6, 2025
a0168cf
HFile v4 - Added formatting
Jun 11, 2025
0f8fe37
HFile v4 - Improved formatting
Jun 12, 2025
36da6d5
HFile v4 - Improved testcase
Jun 12, 2025
d28f944
HFile v4 - Added missing methods for AbstractMultitenantreader and re…
Jun 12, 2025
00f31f6
HFile v4 - Bloom filter handled
Jun 12, 2025
c2afbc6
HFile v4 - Improved test cases
Jun 12, 2025
ed121a1
HFile v4 - Improved test case organization
Jun 15, 2025
3f636d9
HFile v4 - Fixed scan behaviour
Jun 16, 2025
a0c799b
HFile v4 - Formatted hfileinfo
Jun 16, 2025
a80fddd
HFile v4 - Removed section reader cache
Jun 16, 2025
138612d
HFile v4 - Removed empty test
Jun 17, 2025
e71babb
HFile v4 - Added split functionaility with passing test
Jun 24, 2025
f5819ea
HFile v4 - Added split functionaility with one failing test
Jun 26, 2025
b6a3081
HFile v4 - Added split functionaility with spliting on tenant boundar…
Jul 18, 2025
204bf2b
HFile v4 - Split tests are working now in single suite
Jul 21, 2025
9eee1a2
HFile v4 - Hfile Pretty Printer is working now with tests
Jul 25, 2025
96e01f4
Handled all sections to have consistent fileInfo fields
Sep 1, 2025
9be0352
Merge branch 'master' of github.com:apache/hbase into hfilev4logical
Sep 1, 2025
d9e15de
Consitent section index reader and writer for multi-level blocks
Sep 3, 2025
be40620
Merge branch 'master' of github.com:apache/hbase into hfilev4logical
Sep 12, 2025
d9ac028
Made fixes to incorporate master branch updates
Sep 12, 2025
19e3134
Spotless fixes
Sep 12, 2025
48d8336
Fixed testCacheOnWriteInSchema
Sep 19, 2025
860887f
Updated hfile default version to 4
Sep 19, 2025
05420a4
Spotless fixes
Sep 19, 2025
1a0af74
Refactor HFilePrettyPrinter
Sep 19, 2025
12f953c
Fixed seek related tests
Sep 25, 2025
0648220
Spotless fixes
Sep 25, 2025
a694a5a
Test fixes
Sep 25, 2025
c4e772d
Test fixes
Sep 25, 2025
c49f6b5
Test fixes
Oct 2, 2025
e32ec21
Merge branch 'master' of github.com:apache/hbase into hfilev4logical
Oct 2, 2025
70a5546
Test fixes
Oct 2, 2025
b898c01
Test fixes
Oct 2, 2025
6dea638
Test fixes
Oct 2, 2025
7196434
Added reader cache
Oct 2, 2025
204be94
Spotless fixes
Oct 2, 2025
403f2d6
Fixed Meta access
Oct 3, 2025
93c0f64
Spotless fixes
Oct 3, 2025
d0ef67d
fixed datablock index reader
Oct 3, 2025
2bb9f64
Fixed BloomFilter precedence between CF and Table
Oct 6, 2025
d7ca88d
Fixed BloomFilter support
Oct 6, 2025
5c736d8
Fixed test cases
Oct 7, 2025
b8ed27b
Applies spotless fixes
Oct 7, 2025
de8713a
Fixed test case
Oct 7, 2025
50e841c
Fixed test failure
Oct 13, 2025
2e95668
Applied spotless fixes
Oct 13, 2025
8049e8e
Fixed test failures
Oct 13, 2025
2b23097
Fixed test failures
Oct 13, 2025
a3ffdfb
Fixed test failures
Oct 13, 2025
9f9bdc9
Fixed test failures
Oct 14, 2025
19e0c6e
Fixed test failures
Oct 14, 2025
aa853be
Fixed compile failure
Oct 15, 2025
f710725
Fixed spotbug issues
Oct 15, 2025
6df11ea
Fixed spotbug issues
Oct 17, 2025
988656a
Fixed style issues
Oct 17, 2025
8dbe826
Test fixes
Jan 1, 2026
b93762d
Spotless fixes
Jan 1, 2026
bac276a
Test and spot bugs fixes
Jan 2, 2026
641ad5b
Added tests for replacing admin api calls with conf object
Jan 19, 2026
95142af
Optimized section seeking, better caching key flexibility and added e…
Jan 19, 2026
5e90d4b
Revert "Optimized section seeking, better caching key flexibility and…
Jan 20, 2026
9ffb972
Added flags for encoding
Jan 23, 2026
7bf2962
TestMobStoreCompaction fixed
Feb 23, 2026
8e586bf
Fixed encryption context
Feb 23, 2026
bb547bf
Fixed couple of more tests
Feb 23, 2026
9641274
Merge branch 'HBASE-29588-feature' of github.com:apache/hbase into hf…
Feb 23, 2026
5041abf
Fixed couple of more tests
Feb 24, 2026
2c3dfd1
Fixed bulk loading timestamp
Feb 24, 2026
d86dbe6
Fixed couple of tests
Feb 24, 2026
b43a354
Fixed couple of tests
Feb 25, 2026
c90cdf0
Fixed cache test
Feb 25, 2026
0834011
Fixed bloomfilter test
Feb 25, 2026
d0f2b15
Fixed stripes related test
Feb 25, 2026
b4f5196
Fixed spotless
Feb 25, 2026
c8969ed
Fixed the double bloom filter block creation issue
Mar 5, 2026
bc93a99
Fixed flushing of outputstream
Mar 5, 2026
c116d05
Changed timeouts for AcidGuaranteesTestBase
Mar 10, 2026
dae6d76
Changed RPC timout for AcidGuaranteesTestBase
Mar 12, 2026
b03e2c6
trigger build
Mar 13, 2026
aa51702
Fixed TestQuotaStatusRPCs
Mar 13, 2026
5bf26fe
Fixed TestTags flapper
Mar 13, 2026
8e2ab19
Fixed Cache issue
Mar 15, 2026
128aaa7
Fixed Cache issue
Mar 16, 2026
06e3250
Merge branch 'HBASE-29588-feature' of github.com:apache/hbase into hf…
Mar 16, 2026
48ad4fa
Spotless fixes
Mar 17, 2026
2c39b8d
Fixed bunch of potential issues
Mar 25, 2026
a7eb9f7
Spotless fixes
Mar 25, 2026
893a9db
MultiTenantHFileWriter. Added validation in SectionIndexManager for s…
Mar 26, 2026
8a20c06
Enhance AbstractMultiTenantReader with current section index for effi…
Mar 26, 2026
3549719
Enhance AbstractMultiTenantReader with row length validation to preve…
Mar 26, 2026
ac0ece7
Enhance MultiTenantFSDataInputStreamWrapper with validation for non-n…
Mar 26, 2026
3efc8c7
Spotless fixes
Mar 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions hbase-common/src/main/resources/hbase-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1098,10 +1098,11 @@ possible configurations would overwhelm and obscure the important.
</property>
<property>
<name>hfile.format.version</name>
<value>3</value>
<value>4</value>
<description>The HFile format version to use for new files.
Version 3 adds support for tags in hfiles (See http://hbase.apache.org/book.html#hbase.tags).
Also see the configuration 'hbase.replication.rpc.codec'.
Version 4 is the default for HBase 4.x and introduces the multi-tenant HFile layout while
remaining backward compatible with older readers. Also see the configuration
'hbase.replication.rpc.codec'.
</description>
</property>
<property>
Expand Down
9 changes: 6 additions & 3 deletions hbase-protocol-shaded/src/main/protobuf/server/io/HFile.proto
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ message FileTrailerProto {
optional string comparator_class_name = 11;
optional uint32 compression_codec = 12;
optional bytes encryption_key = 13;
optional string key_namespace = 14;
optional string kek_metadata = 15;
optional uint64 kek_checksum = 16;
optional bool multiTenant = 14;
optional int32 tenantPrefixLength = 15;
optional uint64 section_index_offset = 16;
optional string key_namespace = 17;
optional string kek_metadata = 18;
optional uint64 kek_checksum = 19;
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.PrivateCellUtil;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.io.hfile.BlockWithScanInfo;
import org.apache.hadoop.hbase.io.hfile.CacheConfig;
import org.apache.hadoop.hbase.io.hfile.HFileBlock;
import org.apache.hadoop.hbase.io.hfile.HFileBlockIndex;
import org.apache.hadoop.hbase.io.hfile.HFileInfo;
import org.apache.hadoop.hbase.io.hfile.HFileReaderImpl;
import org.apache.hadoop.hbase.io.hfile.HFileScanner;
Expand Down Expand Up @@ -356,31 +359,59 @@ public long getFilterEntries() {
public void close(boolean evictOnClose) throws IOException {
if (closed.compareAndSet(false, true)) {
if (evictOnClose) {
final HFileReaderImpl.HFileScannerImpl s =
(HFileReaderImpl.HFileScannerImpl) super.getScanner(false, true, false);
long splitBlockOffset = findSplitBlockOffset();
final String reference = this.reader.getHFileInfo().getHFileContext().getHFileName();
final String referred = StoreFileInfo.getReferredToRegionAndFile(reference).getSecond();
s.seekTo(splitCell);
if (s.getCurBlock() != null) {
long offset = s.getCurBlock().getOffset();
if (splitBlockOffset >= 0) {
LOG.trace("Seeking to split cell in reader: {} for file: {} top: {}, split offset: {}",
this, reference, top, offset);
this, reference, top, splitBlockOffset);
((HFileReaderImpl) reader).getCacheConf().getBlockCache().ifPresent(cache -> {
int numEvictedReferred = top
? cache.evictBlocksRangeByHfileName(referred, offset, Long.MAX_VALUE)
: cache.evictBlocksRangeByHfileName(referred, 0, offset);
? cache.evictBlocksRangeByHfileName(referred, splitBlockOffset, Long.MAX_VALUE)
: cache.evictBlocksRangeByHfileName(referred, 0, splitBlockOffset);
int numEvictedReference = cache.evictBlocksByHfileName(reference);
LOG.trace(
"Closing reference: {}; referred file: {}; was top? {}; evicted for referred: {};"
+ "evicted for reference: {}",
reference, referred, top, numEvictedReferred, numEvictedReference);
});
} else {
LOG.debug("Unable to determine split block offset for reference {} (top? {})", reference,
top);
}
s.close();
reader.close(false);
} else {
reader.close(evictOnClose);
}
}
}

private long findSplitBlockOffset() throws IOException {
HFileBlockIndex.BlockIndexReader indexReader = reader.getDataBlockIndexReader();
if (indexReader != null) {
BlockWithScanInfo blockWithScanInfo = indexReader.loadDataBlockWithScanInfo(splitCell, null,
false, true, false, reader.getEffectiveEncodingInCache(false), reader);
if (blockWithScanInfo != null) {
HFileBlock block = blockWithScanInfo.getHFileBlock();
if (block != null) {
try {
return block.getOffset();
} finally {
block.release();
}
}
}
}

try (HFileScanner scanner = super.getScanner(false, true, false)) {
if (scanner instanceof HFileReaderImpl.HFileScannerImpl) {
HFileReaderImpl.HFileScannerImpl delegate = (HFileReaderImpl.HFileScannerImpl) scanner;
delegate.seekTo(splitCell);
if (delegate.getCurBlock() != null) {
return delegate.getCurBlock().getOffset();
}
}
}
return -1L;
}
}
Loading
Loading