You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by wc...@apache.org on 2025/06/24 10:02:18 UTC
(hbase) branch HBASE-28463 updated (3a701b933ed -> cdd316b636d)
This is an automated email from the ASF dual-hosted git repository.
wchevreuil pushed a change to branch HBASE-28463
in repository https://gitbox.apache.org/repos/asf/hbase.git
omit 3a701b933ed HBASE-28467: Add time-based priority caching checks for cacheOnRead code paths. (#5905)
omit d3317caa5ff HBASE-28469: Integration of time-based priority caching into compaction paths (#5866)
omit 7527a74ef18 HBASE-28535: Add a region-server wide key to enable data-tiering. (#5856)
omit 7ddd9d7c2d1 HBASE-28468: Integrate the data-tiering logic into cache evictions. (#5829)
omit b45f2b71ea4 HBASE-28466 Integration of time-based priority logic of bucket cache in prefetch functionality of HBase (#5808)
omit 6ff8b067ae2 HBASE-28505 Implement enforcement to require Date Tiered Compaction for Time Range Data Tiering (#5809)
omit 76a995d038e HBASE-28465 Implementation of framework for time-based priority bucket-cache (#5793)
add 3b18ba664a6 HBASE-28605 Add ErrorProne ban on Hadoop shaded thirdparty jars (#5918)
add 419666b8eb8 HBASE-28577 Remove deprecated methods in KeyValue (#5883)
add e5b581686dd HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286)
add 65ff7a228e7 HBASE-28615 Bump requests from 2.31.0 to 2.32.2 in /dev-support/git-jira-release-audit (#5931)
add c5e6d82bf43 HBASE-28425 Allow specify cluster key without zookeeper in replication (#5865)
add 2130e5410f6 HBASE-28473 Add 2.4.18 to download page (#5945)
add d1d8b4d6459 HBASE-28613 Use streaming when marshalling protobuf REST output (#5943)
add 826fb411c81 HBASE-28588 Remove deprecated methods in WAL (#5893)
add 771e1d92c0a HBASE-28616 Remove/Deprecated the rs.* related configuration in TableOutputFormat (#5946)
add 0d2edbc0f60 Add andor to the developer list
add c4a7606479a HBASE-28582 ModifyTableProcedure should not reset TRSP on region node when closing unused region replicas (#5903)
add cd0b29c0a8f HBASE-28626 MultiRowRangeFilter deserialization fails in org.apache.h… (#5951)
add a16f45811ec HBASE-28628 Use Base64.getUrlEncoder().withoutPadding() in REST tests (#5952)
add abea48464ad HBASE-28420 Update the procedure's field to store for ServerRemoteProcedure (#5816)
add debb1921edc HBASE-28546 Make WAL rolling exception clear (#5848)
add fefb1867f94 HBASE-28630 Doc for the config of hbase.ipc.sserver.callqueue.read.ratio is misleading (#5953)
add 77ae12b8a22 HBASE-28619 Fix the inaccurate message when snapshot doesn't exist (#5948)
add 13af64dc1cb HBASE-28635 Bump io.airlift:aircompressor from 0.24 to 0.27 (#5958)
add c0fb41fea61 HBASE-28622 FilterListWithAND can swallow SEEK_NEXT_USING_HINT (#5955)
add 8afd93e78b9 HBASE-28614 Introduce a field to display whether the snapshot is expired (#5947)
add 070bca186ee HBASE-28625 ExportSnapshot should verify checksums for the source file and the target file (#5950)
add 04816d98a20 HBASE-28562 Correct backup ancestor calculation (#5868)
add c865570d772 HBASE-28618: Fixed hadolint check in nightly build. (#5957)
add 00b1bba5065 HBASE-28539 Merge of incremental backups fails if backups are on a separate FileSystem (#5867)
add a94b78666f5 HBASE-28636 Add UTs for testing copy/sync table between clusters (#5963)
add 092ce0dca0b HBASE-28540 Cache Results in org.apache.hadoop.hbase.rest.client.RemoteHTable.Scanner (#5846)
add f136f0ace8a HBASE-28549 Make shell commands support column qualifiers with colons (#5849)
add c5d3f652f25 HBASE-28649 Wrong properties are used to set up SSL for REST Client Kerberos authenticator (#5975)
add 580361820f6 HBASE-28651 Reformat the javadoc for CellChunkMap (#5977)
add 91b351264de HBASE-28646 Use Streams to unmarshall protobuf REST data (#5974)
add 317ad3c2918 HBASE-28049 RSProcedureDispatcher to log the request details during retries (#5973)
add 9bdee6d43f1 HBASE-28565 Make map reduce jobs accept connection uri when specifying peer cluster (#5972)
add 0e8cfdb5077 HBASE-28637 asyncwal should attempt to recover lease if close fails (#5962)
add bd8ad45a259 HBASE--28666 Dropping unclosed WALTailingReaders leads to leaked sockets (#5994)
add 9ef621db90a Revert "HBASE--28666 Dropping unclosed WALTailingReaders leads to leaked sockets (#5994)"
add 60c46118e21 HBASE-28666 Dropping unclosed WALTailingReaders leads to leaked sockets (#5994)
add b4f24cf8c6b HBASE-28617 Add trademark statement in footer on our website (#5993)
add f2b7b77552e HBASE-28650 REST multiget endpoint returns 500 error if no rows are specified (#5999)
add cd4c5c30b7e HBASE-28673 Bump urllib3 in /dev-support/git-jira-release-audit (#5997)
add 85bd8eef2c4 HBASE-28662 Removing missing scanner via REST should return 404 (#5989)
add 046e9d55409 HBASE-28671 Add close method to REST client (#5998)
add ff1e52bfce2 HBASE-28617 Addendum fix broken links
add bd9053ca4a8 HBASE-28596 Optimise BucketCache usage upon regions splits/merges. (#5906)
add 67cc82029c1 HBASE-28663 Graceful shutdown of CanaryTool timeouts (#5991)
add 62e7fe8fdae HBASE-28617 Addendum update doap
add 52eef65d37e HBASE-28548 Add documentation about the URI based connection registry (#5981)
add 85a8b54213d HBASE-28644 Use ExtendedCell instead of Cell in KeyValueScanner (#5976)
add ff197587f08 HBASE-28617 Addendum fix doap category
add f8aa3e23126 HBASE-28680 BackupLogCleaner causes HMaster WALs to pile up indefinitely (#6006)
add dd694e4d742 HBASE-28656 Optimize the verifyCopyResult logic in ExportSnapshot (#5996)
add 17ce7c3b4c5 HBASE-28679 Upgrade yetus to a newer version (#6012)
add e0ada25d001 HBASE-28658 The failsafe snapshot should be deleted after rollback successfully (#5984)
add d1015a68ed9 HBASE-28688 Correct the usage for blanks ignore options in yetus (#6026)
add 7e8fd072095 HBASE-28687 BackupSystemTable#checkSystemTable should ensure system tables are enabled (#6018)
add 80516d71291 HBASE-28676 Make pre commit build for 3.x to only run jdk 17 test (#6001)
add b948b06c960 HBASE-28693 Change flaky tests to run with jdk17 (#6031)
add 2f340c774b4 HBASE-28693 Addendum add hadoop 3.0 profile for branch-2.x
add 8ff8748a38d HBASE-28678 Make nightly builds for 3.x java 17 only and add java 17 test for 2.x (#6032)
add c722dde59fc HBASE-28694 Make client integration and packaging test work with java 17 (#6035)
add e6395a0dea1 HBASE-28699 Bump jdk and maven versions in pre commit and nighly dockerfile (#6034)
add 27d32b797a4 Revert "HASE-28414 create-release should spotless:apply after making any file changes (#5824)"
add 22e774e75ca HBASE-28414 create-release should spotless:apply after making any file changes (#5824)
add 0a1f1c4be45 HBASE-28675 Change releaseTarget to 17 and also remove unused profile for older jdk versions in pom (#6037)
add 3d4bf2edbbd HBASE-28700 Change hbase site build to use jdk 17 (#6036)
add 4821521b813 HBASE-28703 Data race in RecoveredEditsOutputSink while closing writers (#6042)
add 305f2ce28e1 HBASE-28709 Bump certifi in /dev-support/git-jira-release-audit (#6048)
add 68f3a2674cb HBASE-28477 Update ref guide about the EOL for branch-2.4 (#6049)
add f1d327866dd HBASE-28710 Remove download links for 2.4.x on download page (#6050)
add 5c3c8af4ff0 HBASE-28698 Add hadoop 3.4.0 in hadoop check (#6052)
add 610af4855f4 HBASE-28685 Support non-root context in REST RemoteHTable and RemodeAdmin (#6013)
add 5082212e049 HBASE-28672 Ensure large batches are not indefinitely blocked by quotas (#6003)
add 2a4c7cd7c89 HBASE-28718 Should support different license name for 'Apache License, Version 2.0' (#6056)
add b70bd11b8bd HBASE-28714 Hadoop check for hadoop 3.4.0 is failing (#6063)
add 6f3b8c8bda3 HBASE-28712 Add JDK17 in the support matrix in our ref guide (#6051)
add 18e1cc53d31 HBASE-28668 Add documentation about specifying connection uri in replication and map reduce jobs (#6009)
add 429d6bab62a HBASE-28717 Support FuzzyRowFilter in REST interface (#6060)
add 2edd7e0f23d HBASE-28684 Remove CellWrapper and use ExtendedCell internally in client side data structure (#6044)
add f95ac7a9c40 HBASE-28722 Should wipe out all the output directories before unstash in nightly job (#6070)
add dc707937b63 HBASE-28713 Add 2.6.x in hadoop support matrix in our ref guide (#6073)
add e45e2383b86 HBASE-28723 [JDK17] TestSecureIPC fails under JDK17 (#6071)
add e9ea1b83796 HBASE-28704 The expired snapshot can be read by CopyTable or ExportSnapshot (#6047)
add 386ecea0a9c HBASE-28727 SteppingSplitPolicy may not work when table enables region replication (#6077)
add 2b673bd429a HBASE-28724 BucketCache.notifyFileCachingCompleted may throw IllegalMonitorStateException (#6074)
add 50a495f735b HBASE-28683 Only allow one TableProcedureInterface for a single table to run at the same time for some special procedure types (#6046)
add 83fb64ffabe HBASE-28683 Addendum forward port the branch-2 patch to remove the usage of JDK9+ features
add d7a9fc81217 HBASE-28708 Remove the specific logic for jdk11 in hbase-assembly and change our script to only support jdk17 (#6069)
add 4b3b5e6c251 HBASE-28731 Remove the IA.Private annotation on WALEdit's add methods as they have already been used by CP users (#6083)
add c3e40d69217 HBASE-28739 Update downloads.xml for 2.5.9
add 8f5516d219d HBASE-28428 : Zookeeper ConnectionRegistry APIs should have timeout (#5837)
add 724d98d1b89 HBASE-28736 Modify our ref guide about the slack channel change (#6086)
add 38e5983912f HBASE-28737 Add the slack channel related information in README.md (#6087)
add b4cbd5c84b2 HBASE-28686 MapReduceBackupCopyJob should support custom DistCp options (#6017)
add aeeb8556dbe HBASE-28740 Need to call parent class's serialization methods in CloseExcessRegionReplicasProcedure (#6090)
add b7d11a74451 HBASE-28716 Users of QuotaRetriever should pass an existing connection (#6065)
add 171ecf2f409 HBASE-28702 TestBackupMerge fails 100% of times on flaky dashboard (#6078)
add 54f6e9192b3 HBASE-28745 : Default Zookeeper ConnectionRegistry APIs timeout should be less (#6105)
add 2129f7f178a HBASE-28744 Add a new command-line option for table backup in our ref guide (#6103)
add b0240ce6ea0 HBASE-28734 Improve HBase shell snapshot command Doc with TTL option (#6107)
add 743e8d6a6a1 HBASE-28743 Fixes NPE for TableSnapshotScanner by disabling mslab (#6101)
add 1315871c8ca HBASE-28749 Remove the duplicate configurations named hbase.wal.batch.size (#6111)
add 73f2710e475 HBASE-28655 IllegalArgumentException: Illegal bufferSize thrown when hbase.io.compress.zstd.buffersize is not configured (#6114)
add 0506565f74b HBASE-28755 Update downloads.xml for 2.5.10
add 23d3d3d8cf9 HBASE-28756 RegionSizeCalculator ignored the size of memstore, which leads Spark miss data (#6120)
add 6d89c633ff7 HBASE-28753 FNFE may occur when accessing the region.jsp of the replica region (#6117)
add 43b1d78e204 HBASE-28742 Fixes NPE for CompactionTool when mslab enabled (#6097)
add 634b200e884 HBASE-28522 UNASSIGN proc indefinitely stuck on dead rs (#5995)
add 8c2e5f32870 HBASE-28748 Replication blocking: InvalidProtocolBufferException: Protocol message tag had invalid wire type (#6115)
add 836f2d9a5b3 HBASE-28719 Use ExtendedCell in WALEdit (#6108)
add d716705699f HBASE-28758 Remove the aarch64 profile (#6128)
add 71c4054c2e1 HBASE-28587 Remove deprecated methods in Cell (#6125)
add 939ab483f2f HBASE-28729 Change the generic type of List in InternalScanner.next (#6126)
add 9dccc679523 HBASE-28389 HBase backup yarn queue parameter ignored (#6131)
add edbb145a3f0 HBASE-28648 Change the deprecation cycle for RegionObserver.postInstantiateDeleteTracker (#6133)
add 158b6d0af59 HBASE-28346: Expose checkQuota to Coprocessor Endpoints (#6066)
add be2cf58bee7 HBASE-28760 Exclude pom file of jaxws-ri in output tarball (#6135)
add 6788ff48bae HBASE-28250 Bump jruby to 9.4.8.0 to fix snakeyaml CVE (#6127)
add 97de2912396 HBASE-27118 Add security headers to Thrift/HTTP server (#5864)
add 98e7e1b9f03 HBASE-28784 Exclude samples and release-documentation zip of jaxws-ri from output tarball (#6157)
add 41dd87cd908 HBASE-28786 Fix classname for command: copyreppeers in bin/hbase (#6162)
add 0646151cd61 HBASE-27746 Check if the file system supports storage policy before invoking setStoragePolicy() (#5189)
add d2a1f191ccb HBASE-28690 Aborting Active HMaster is not rejecting reportRegionStateTransition if procedure is initialised by next Active master (#6129)
add 27684d0bc8b HBASE-28777 mTLS client hostname verification doesn't work with OptionalSslHandler (#6149)
add 2ac657caa51 HBASE-27903 Skip submitting Split/Merge procedure when split/merge is disabled at table level (#6169)
add 2785a3e9c5b HBASE-28793 Update hbase-thirdparty to 4.1.8 (#6166)
add 9d3ceb8964f HBASE-28802 Log the IP when hbase.server.useip.enabled is set to true (#6176)
add dcffc4a7bb6 HBASE-28643 An unbounded backup failure message can cause an irrecoverable state for the given backup (#6088)
add ed6613e1afa HBASE-28697 Don't clean bulk load system entries until backup is complete (#6089)
add 84655ded27b HBASE-28805: Chunked persistence of backing map for persistent bucket cache. (#6183)
add 63b26b126dd HBASE-28792: AsyncTableImpl should call coprocessor callbacks in a defined order (#6168)
add 73651dcd857 HBASE-28669 After one RegionServer restarts, another RegionServer leaks a connection to ZooKeeper (#6147)
add 01e2d16e470 HBASE-28813 Bump cryptography in /dev-support/git-jira-release-audit (#6196)
add 3caaf2d7391 HBASE-28778 NPE may occur when opening master-status or table.jsp or procedure.jsp while Master is initializing (#6152)
add b19ee00bbc0 HBASE-28001: Add request attribute support to BufferedMutator (#6076)
add 241bbaf0718 HBASE-28775 Change the output of DatanodeInfo in the log to the hostname of the datanode (#6148)
add 35c7fc0bab4 HBASE-28580 Revert the deprecation for methods in WALObserver (#6205)
add b161ad573e6 HBASE-28807 Remove some useless code and add some logs for CanaryTool (#6187)
add 888e4ddedf2 HBASE-28811 Use region server configuration for evicting the cache while unassigning a region (#6197)
add ef41d488b64 HBASE-28696 Partition BackupSystemTable queries (#6067)
add 53ca88339df HBASE-28810 Improve BackupLogCleaner naming, debug logging (#6195)
add 0a19b087bdf HBASE-28804: Implement asynchronous retrieval of bucket-cache data from persistence (#6182)
add b01dc12dfd8 Add rmattingly to the developer list
add b6394b1f642 HBASE-28070 Replace javax.servlet.jsp dependency with tomcat-jasper (#5607)
add ae9a026f372 HBASE-28822 Change the LOG field in CodecPerformance to private (#6234)
add 766d67930c8 HBASE-28823 Change the LOG field in TableSplit to private (#6221)
add 3390195bd97 HBASE-28824 Add deprecation cycle for methods in RegionServerObserver (#6226)
add 9df08255384 HBASE-28826 Remove the deprecated annotation in RegionCoprocessorHost (#6222)
add f8182f58207 HBASE-28821: Optimise the memory-utilisation during persistence of bucketcache. (#6215)
add f4a999f6699 HBASE-28396 Quota throttling can cause a leak of scanners (#6055)
add 4446d297112 HBASE-28825 Add deprecation cycle for methods in TokenUtil (#6237)
add 7f2bb954264 HBASE-28812 Upgrade from 2.6.0 to 3.0.0 crashed (#6209)
add 3f9dbf2c44c HBASE-28841: Modify default value of hbase.bucketcache.persistence.chunksize to 10K (#6252)
add 125b50210f7 HBASE-28642 Hide old PR comments when posting new (#5967)
add 5cf9170b8e1 HBASE-28770: Support partial results in AggregateImplementation and AsyncAggregationClient (#6167)
add 21381ba4c27 HBASE-28840: Optimise memory utilization bucketcache retrieval from persistence. (#6253)
add b3f2f403f52 Fix test so that it fails when it should (#6255)
add b2e84d64103 Revert "Fix test so that it fails when it should (#6255)"
add 2531f938201 HBASE-28842 TestRequestAttributes should fail when expected (#6255)
add 52082bc5b80 HBASE-28850 Only return from ReplicationSink.replicationEntries while all background tasks are finished (#6263)
add 46da224e12f HBASE-28816 The description of "hbase.superuser" is confusing (#6206)
add bd1bee07c82 HBASE-28839: Handle all types of exceptions during retrieval of bucket-cache from persistence. (#6250)
add 449c446c3c8 HBASE-28187 NPE when flushing a non-existing column family (#5692)
add c477901dec8 HBASE-28705 BackupLogCleaner cleans required WALs when using multiple backuproots (#6040)
add fdd8fa5d083 HBASE-28887 Fix broken link to mailing lists page in reference guide (#6311)
add 1ea4bf593ae HBASE-28585 copy_tables_desc.rb script should handle scenarios where the namespace does not exist in the target cluster
add 64a49a267c2 HBASE-28645 Add build information to the REST server version endpoint (#6262)
add 50cb2804500 HBASE-28884 SFT's BrokenStoreFileCleaner may cause data loss (#6308)
add 810db3dfcb5 HBASE-21540 when set property "hbase.systemtables.compacting.memstore.type" to "basic" or "eager" will cause an exception
add 4cd39a62fca Revert "HBASE-2284 Javadoc Warnings: Fix warnings coming due to @result tag in TestCoprocessorWhitelistMasterObserver (#256)"
add 2ba008640cf HBASE-22484 Javadoc Warnings: Fix warnings coming due to @result tag in TestCoprocessorWhitelistMasterObserver (#256)
add 7e8af9e6558 Revert "[RSGroup] Forward-port HBASE-22658 to master branch and branch-2.x (#1326)"
add 88c8e2e5b9e HBASE-22740 [RSGroup] Forward-port HBASE-22658 to master branch and branch-2.x (#1326)
add 3b8e429cfcc HBASE-23601 OutputSink.WriterThread exception gets stuck and repeated indefinietly (#1028)
add bf5d1cc3d64 Revert "MetricsTable#updateFlushTime is wrong (#1539)"
add 8efd67b9aaf HBASE-24177 MetricsTable#updateFlushTime is wrong (#1539)
add 788cf74c60c HBASE-28879 Bump hbase-thirdparty to 4.1.9 (#6295)
add aa41b3e12ec HBASE-28803 HBase Master stuck due to improper handling of WALSyncTimeoutException within UncheckedIOException (#6254)
add 9b3fc009b9e HBASE-28890 RefCnt Leak error when caching index blocks at write time (#6317)
add 5e548baac2d HBASE-28733 Add "2.6 Documentation" to the website (#6316)
add 958318fe0c6 [ADDENDUM] HBASE-28884 SFT's BrokenStoreFileCleaner may cause data loss (#6326)
add 24c7a3f862d HBASE-28893 RefCnt Leak error when closing a HalfStoreFileReader (#6329)
add ef199296f92 HBASE-28895 Bump Avro dependency version to 1.11.4 (#6332)
add ddcef33aaad HBASE-28905: Skip excessive evaluations of LINK_NAME_PATTERN and REF_NAME_PATTERN regular expressions (#6348)
add 60e4d17b6b9 HBASE-28894 NPE on TestPrefetch.testPrefetchWithDelay (#6338)
add 6cdc4b63942 HBASE-28897 Force CF compatibility during incremental backup (#6340)
add 981e0719765 HBASE-28721 AsyncFSWAL is broken when running against hadoop 3.4.0 (#6269)
add 402aa92d357 HBASE-28862 Change the generic type for ObserverContext from 'RegionCoprocessorEnvironment' to '? extends RegionCoprocessorEnvironment' in RegionObserver (#6272)
add f2e52f3c1dc HBASE-28865 Implement proper string builder for MoveRegionRequest in ProtobufUtil.getShortTextFormat (#6318)
add 834421863c6 HBASE-28876 Should call ProcedureSchduler.completionCleanup for non-root procedure too (#6279)
add cac58baf12c HBASE-28900: Avoid resetting the bucket cache during recovery from persistence. (#6360)
add 84f4fb3b421 HBASE-28432 Refactor tools which are under test packaging to a new module hbase-diagnostics (#6258)
add a8fbac6e265 HBASE-28922 Bump commons-io:commons-io from 2.11.0 to 2.14.0 (#6341)
add 4be7e39e5a7 HBASE-28906 Run nightly tests with multiple Hadoop 3 versions (#6356)
add 76b1801f13a HBASE-28858 Add rel/2.6.1 to the downloads page (#6372)
add 15e09058f41 Create the start time right before creating the reader to calculate elapsedTime in testPrefetchWithDelay (#6371)
add 87079171729 HBASE-28901 checkcompatibility.py can run maven commands with parallelism (#6343)
add 836630422df HBASE-28921 Skip bundling hbase-webapps folder in jars (#6368)
add 67f01c55528 Revert "HBASE-28921 Skip bundling hbase-webapps folder in jars (#6368)"
add 899743bd97d HBASE-28929 Set hadoop-three.version in Hadoop 3 backwards compatibility tests (#6380)
add dabc60fe19b Revert "Create the start time right before creating the reader to calculate elapsedTime in testPrefetchWithDelay (#6371)"
add d6ebe482517 HBASE-28924 TestPrefetch#testPrefetchWithDelay fails intermittently (#6371)
add aea32d72f84 HBASE-28906 Run nightly tests with multiple Hadoop 3 versions (addendum: workaround for MAPREDUCE-7492) (#6386)
add f4aafaf4d50 HBASE-28927 Fix spotbugs issues introduced by refactoring to hbase-diagnostics with HBASE-28432 (#6384)
add 11c07428628 HBASE-28898. Use reflection to access recoverLease(), setSafeMode() APIs. (#6342)
add ff9865a8fa6 HBASE-28928 Handle NPE in Split/Merge table when getMasterQuotaManager returns null (#6375)
add 6b5cc5b308b HBASE-28934: Avoid waits within HFilePreadReader constructors for cache initialisation. (#6389)
add 5d8ec4d3582 HBASE-25876 Add retry if we fail to read all bytes of the protobuf magic marker (#3251)
add af72b4409fe Revert "HBASE-23303 Add default security headers if SSL is enabled (#4128)"
add 1e0884da4bd HBASE-26789 Automatically add default security headers to http/rest if SSL enabled
add 5f7952a019e HBASE-28939 Change the default Hadoop 3 version to 3.4.1 (#6400)
add 1662ad84fdc HBASE-28917 ColumnFamilyMismatchException mixes IA public and private (#6369)
add 7e3652041ef HBASE-28726 Revert REST protobuf package to org.apache.hadoop.hbase.rest (#6408)
add 5b70d51747b HBASE-28940 Do not run the backwards compatibility tests with the default Hadoop3 version (#6403)
add d2c0350034d HBASE-28923 Prioritize "orphan" blocks for eviction inside BucketCache.freespace (#6373)
add a2d508a8fb2 HBASE-28942 Purge all netty 3 dependencies by default (#6406)
add 344bf78b8fc HBASE-28948 RegionMover tool fails when table is deleted (#6423)
add 70f2fefe47b HBASE-28564 Refactor direct interactions of Reference file creations to SFT interface (#5939)
add 16c51d83ac9 HBASE-28921 Avoid bundling hbase-webapps folder in default jars (#6388)
add c39412ad8ea HBASE-28314 Enable maven-source-plugin for all modules (#5748)
add b7ce297ed94 HBASE-28954 Apply workaround for HADOOP-19164 for Hadoop 3.4.1 (#6437)
add 16870182ca1 HBASE-28621 PrefixFilter should use SEEK_NEXT_USING_HINT (#6361)
add 3c267df5677 HBASE-28953 Prefetch thread shouldn't run for master store (#6438)
add 48fd0ec5c41 HBASE-28946 Update nightlies to run with HADOOP2_VERSION = 2.10.2 (#6419)
add db3ba44a4c6 HBASE-28955 Improve lease renew for FanOutOneBlockAsyncDFSOutput (#6440)
add fab04e37ceb HBASE-28920 Add Clearwater Analytics to powered by hbase (#6446)
add 40d9e9db776 HBASE-28961 Add essential build plugins to hbase-diagnostics (#6444)
add 3fbe4fbb68e HBASE-28433 Modify the assembly to not include test jars and their transitive dependencies (#6184)
add 05bd810f4e2 HBASE-28972 Limit the number of retries in FanOutOneBlockAsyncDFSOutputHelper.completeFile (#6453)
add f3208d9bfdf HBASE-28972 Addendum remove unused code modification for triggering test in pre commit
add 31593ccb2f4 HBASE-28949 Remove the netty 3 dependency management section (#6460)
add 95318c21926 HBASE-28956 RSMobFileCleanerChore may close the StoreFileReader object which is being used by Compaction thread (#6439)
add ef0e242d7c3 HBASE-28963 Updating Quota Factors is too expensive (#6451)
add 7fdc248663a HBASE-27638 Get slow/large log response that matched the ‘CLIENT_IP' without client port (#5087)
add 5c99925c830 HBASE-28268 Provide option to skip wal while using TableOutputFormat (#6436)
add e082405d8e7 HBASE-28976 Fix UT flakeyness in TestBucketCache.testBlockAdditionWaitWhenCache and TestVerifyBucketCacheFile.testRetrieveFromFile (#6463)
add c8d4bf41f90 Revert "Purging references to ports 60010 and 60030 from the book"
add 8e477d69e5d HBASE-26949 Purging references to ports 60010 and 60030 from the book
add beb36e811cc HBASE-28608 Correct client meta operation timeout to default to client operation timeout (#6000)
add 7e3d04e1762 HBASE-28806 ExportSnapshot failed if reference file present (#6461)
add a735effa7a3 HBASE-28634 Fix FuzzyRowFilter may not return data on reverse scans (#6457)
add f9ec1dcbe5d HBASE-28627 REST ScannerModel doesn't support includeStartRow/includeStopRow (#6374)
add 76586721fa8 HBASE-29000 SLF4j logging backend incorrectly picked up from Hadoop when external Hadoop is specified (#6495)
add 240bc3fc078 HBASE-28328 Add an option to count different types of Delete Markers in RowCounter (#6435)
add c556dde1446 HBASE-28882 Backup restores are broken if the backup has moved locations (#6294)
add 1880cb3ab57 HBASE-29005 Cannot split hbase:quota table when quota enforcement is enabled (#6501)
add 1bdbb8bd977 HBASE-20663 Make sure coprocessor upgrade anchor ID is not duplicated in HBase book (#6493)
add 126f7235fd0 HBASE-28525 Extend REST Documentation: Stateless Scanner, table exists, multiget with filter (#6498)
add ab3282daa0b HBASE-29018 Use HDFS port 9000 in examples (#6521)
add fdb0c2c782d HBASE-29020 Update logging references to org.apache.hadoop.ipc in docs and examples (#6522)
add 262c5bb7676 HBASE-28836 Parallize the file archival to improve the split times (#6483)
add 8bed517e3ad HBASE-29016 Refactor assembly creation to use only DependencySets and move cached classpath creation to a new module
add 0b61e3a2371 HBASE-29010 Remove unrelocated JAX-WS from assembly (#6505)
add 260d9f2e712 HBASE-29009 Depend on jaxws-rt instead jaxws-ri (#6504)
add fb878fecefd HBASE-29009 Depend on jaxws-rt instead jaxws-ri (addendum: fix hbase-dev-generate-classpath)
add d23fadbfa5d HBASE-29016 Refactor assembly creation to use only DependencySets and move cached classpath creation to a new module (addendum: rename artifact to be consistent with module name)
add c4fed77ed88 HBASE-28600 Enable setting blockcache on-heap sizes in bytes (#6422)
add b622302f14f HBASE-28931: Poll SSL cert file for changes (#6381)
add c702fabd961 HBASE-28959 Output fsreadtime in SlowLogPayLoad to hbase:slowlog (#6502)
add 5f312dd7016 HBASE-28767 Simplify backup bulk-loading code (#6134)
add 05f84a63139 HBASE-29014 The RegionServer metrics of WALs is incorrect (#6510)
add ac22a221370 HBASE-29035: Amount of region cached in the region metrics not updated for a region immediately after it is flushed with cacheOnWrite turned on (#6549)
add 2990a0fa13f HBASE-28837 Introduce row statistics coprocessor example (#6327)
add d1a29658002 HBASE-29021 When StoreFileTracker is FILE, unable to recognize StoreFileListFile after upgrade from 2.5 to 2.6 (#6552)
add 6ebd48e477f HBASE-29013 Make PerformanceEvaluation support larger data sets (#6509)
add 744ce131b63 HBASE-28832 Upgrade from bootstrap 3.4.1 to non vulnerable version 5.3.3 (#6490)
add c7b5195330f HBASE-29042 Remove the java 16 instanceof usage in BulkLoad.java (#6561)
add 28c435378a9 HBASE-29013 Addendum forward port branch-2 changes to use ThreadLocalRandom instead of Random
add 6dc28a10feb HBASE-29043 Bump jinja2 from 3.1.4 to 3.1.5 in /dev-support/flaky-tests (#6562)
add 37482042b09 HBASE-28638 Fail-fast retry limit for specific errors to recover from remote procedure failure using server crash (#6462)
add 82806f8e903 HBASE-28023 ITBLL's RollingBatchSuspendResumeRsAction verify the success of the suspendRs action. (#6570)
add 43f728c77fa [ADDENDUM] HBASE-28832 Fixed TestInfoServersACL test (#6571)
add 5d4ce4e289f HBASE-29046 Log message is not correct when the Master bind address configured wrongly (#6565)
add 97affac85d6 Revert "HBASE-28836 Parallize the file archival to improve the split times (#6483)"
add d67d93d3dca HBASE-28968 Bump jruby to 9.4.9.0 to fix rexml CVE (#6560)
add 2613afe8465 HBASE-29049 Increase the interval for running flaky tests (#6567)
add 8d132b9b7b3 HBASE-29050 Use node under 'hbase' label to run client integration tests (#6569)
add 9036d88ab5f HBASE-28970 Get asyncfs working with custom SASL mechanisms (#6507)
add 04cd9ded655 HBASE-29008 Upgrade JAX-WS to to 2.3.7 (#6503)
add b35b53880e5 HBASE-29049 Addendum increase interval for 12 hours
add 7134f29ff1b HBASE-28627 REST ScannerModel doesn't support includeStartRow/includeStopRow (addendum) (#6499)
add 7170b27986f HBASE-29067 Stagger the nightly tests on jenkins (#6595)
add 670deaa1d60 HBASE-29040 Fix description of "sampleRate" of PerformanceEvaluation (#6558)
add 1e740bcd0bd HBASE-29067 Addendum fix syntax error
add 58b742bd74f HBASE-29070 Balancer cost function epsilon is imprecise (#6597)
add a680795f716 HBASE-28969 Move HFileLink file creations to SFT (#6459)
add 09f9bf083ca HBASE-29065 Update Docs for Hadoop 3.4.1 support and the new Hadoop version policy (#6587)
add 28f1b515ac7 HBASE-29067 Addendum fix syntax error
add 5da30f1bc01 HBASE-29056 Bump commons-io:commons-io from 2.14.0 to 2.18.0 (#6579)
add e29fc04223c HBASE-29068 Report percentFilesLocalPrimaryRegions metric (#6596)
add d477bf163bf HBASE-28952 Add coprocessor hook to authorize user based on client SSL certificate chain (#6447)
add 6f8db780191 HBASE-29004 Optimize unnecessary type castings in Scan and Get setter methods. (#6500)
add 8ce58c8ba1b HBASE-29071 StochasticLoadBalancer candidate generators should use a Map, rather than ordinal based indexing (#6598)
add 36691117625 HBASE-26801 Update ref guide about log4j2.properties (#6618)
add bca02670a5f HBASE-29092 hbase-vote.sh is stymied by the new robots.txt on dist.apache.org (#6626)
add f98621a7519 HBASE-27659 Incremental backups should re-use splits from last full backup (#6370)
add 89d5f4ef698 HBASE-28861 Use hasReferences() api of SFT in RegionSplitter and remove Reference.read(), HRegionFS.hasReferences() (#6428)
add 58c5bce1759 HBASE-29086 Bump hbase-thirdparty to 4.1.10 (#6611)
add 93b8d7bb774 HBASE-28434 Update assembly to create a tarball with hadoop and without hadoop (#5766)
add 14d201c2994 HBASE-29041 Set UncaughtException Handler for RegionServer ExecutorService (#6612)
add 2daf846c97d HBASE-29026 Replace some deprecated calls (#6585)
add b89c8259c57 HBASE-29072 StochasticLoadBalancer#areReplicasColocated ignores rack colocation (#6622)
add f14c3ac7e36 HBASE-29099 Avoid expensive BlockCacheKey.toString() calls when tracing is disabled (#6642)
add 777010361ab HBASE-29073 StochasticLoadBalancer will always run the balancer on startup because of uninitialized sumMultiplier (#6641)
add 05d3c494e65 HBASE-29047 Remove redundant methods in TestMasterObserver. (#6566)
add 8e8deb09a38 HBASE-29088 The denominator cannot be 0 when calculating percentages in SnapshotStats (#6617)
add f203352b16b HBASE-29096 Bump netty4 to 4.1.116.Final (#6636)
add 4986b0e8afe Update release script to use JDK 17 for branch-3+ (#6655)
add 50101b009ee HBASE-29089 Remove optional flag from spymemcached dependency (#6652)
add 4da757cad51 HBASE-29106 Hbase cannot be started in dev mode (#6657)
add 5edcb41a7ab HBASE-29097 Add error logging when put creation fails (#6638)
add 64587b44e85 HBASE-29111 Fix data loss in table cloned from a snapshot (#6659)
add 2fb4fc9418d HBASE-29113 Hbase script incorrectly checks for Hadoop library in relative path (#6665)
add cde8be152cc HBASE-29095 Publish Hadoop-less assembly files from the release script (#6654)
add 5b66a53cc3b HBASE-29045 Support new async-profiler > 2.9 version (#6614)
add 035be4ddf55 HBASE-29114 Restoring to original splits fails if backups are on separate FileSystem (#6667)
add 821f1b0d494 HBASE-29100 Document Hadoop-less assembly (#6675)
add e9869ae1cc7 HBASE-29125 Suppress HE_EQUALS_USE_HASHCODE in org.apache.hadoop.hbase.rest.model.ScannerModel$IncludeStartRowFilter (#6685)
add 49fd3b4343f HBASE-29124 Restoring to original splits fails if bulkloads are on separate FileSystem (#6681)
add 78b06cefdeb HBASE-29123: A faster CodecPool for HBase (#6679)
add f37e8ac89c8 HBASE-29127 Bump cryptography in /dev-support/git-jira-release-audit (#6682)
add d59814c8233 HBASE-29117 Kerby version conflict with Hadoop 3.4 (#6674)
add c9f7dad0c94 HBASE-29038 Fix NPE in processRS.jsp due to missing MBean value (#6556)
add e00f492a216 HBASE-29078 Make 'checkout scm' faster in hbase site build jenkins file (#6695)
add 094e4e8704b HBASE-28410 Upgrade curator to 5.7.1 (#6584)
add 08de8ed0e62 HBASE-28836 Parallize the file archival to improve the split times (#6616)
add 4e40bd5e6b8 HBASE-28983 Static resources are not loaded on REST web UI pages in dev mode (#6491)
add a5666c08584 HBASE-29053 Add 2.6.2 to download page (#6712)
add d24a0ed0835 HBASE-28513 The StochasticLoadBalancer should support discrete evaluations (#6651)
add 3685b64ccf4 HBASE-29148: BufferedMutator should be able to flush after buffering a certain number of mutations (#6718)
add 13f174b1d09 HBASE-29135: ZStandard decompression can operate directly on ByteBuffs (#6708)
add 189c513eac1 HBASE-29074 Balancer conditionals should support meta table isolation (#6722)
add bd8441a85b2 HBASE-29153 Added Privacy Policy link to website (#6724)
add fa22ba4cfe1 HBASE-29093 Load userSnapshots.jsp only on master status page (#6627)
add 8785122141e HBASE-29107 shell: Improve 'count' performance (#6656)
add fd50561a099 HBASE-29066 Fix NPE in rits.jsp when regions are not open (#6594)
add 984f1274d35 HBASE-29115 Fix website cannot load some resources because of CSP (#6668)
add d10c2b5eaf9 HBASE-29159 The condition for testing whether we have hadoop jars in assembly is incorrect (#6741)
add 4c831287279 HBASE-29163 Fix Github PR builds are broken (#6751)
add 7737ae18482 HBASE-29160: Cache region name string in RegionInfo (#6742)
add 8ac07b20dc7 HBASE-29157 Sorting not working in the Table Regions section (#6739)
add 9c44aa2def9 HBASE-29075 Balancer conditionals should support system table isolation (#6746)
add ad301fbd5dd HBASE-29170 Update downloads.xml for 2.5.11
add 98312d31c1d HBASE-29167 Upgrade vega and its related js libraries (#6759)
add 54328d64f2f HBASE-29179: Fall back to hbase.rpc.rows.warning.threshold if hbase.client.write.buffer.maxmutations is not set (#6769)
add 756e22e8eae HBASE-29115 Fix website cannot load some resources because of CSP (addendum) (#6764)
add 8a374dc854b HBASE-29080 Validate Negotiated SASL QoP Against Requested (#6601)
add 9b960f90dde HBASE-29174 NPE on MemstoreFlusher when flush is triggered by too many wals after a wal rolling (#6771)
add 9e720b31d67 HBASE-29182 Bump jinja2 from 3.1.5 to 3.1.6 in /dev-support/flaky-tests (#6778)
add 6c5786f77eb HBASE-28388 Avoid index based field sorting in tablesorter (#6779)
add 7c21e713432 HBASE-25839 Bulk Import fails with java.io.IOException: Type mismatch in value from map (#6602)
add 46fcd3c1ec8 HBASE-29169 Removing the legacy 'region_replica_replication' peer will crash region servers while rolling upgrading (#6772)
add cb2f11faab4 HBASE-29178 Some ZKUtil optimizations (#6776)
add c2af2b3c0de HBASE-29172 Fix bug in ZstdByteBuffDecompressor (#6767)
add e26fd95b6ff HBASE-29183 Fix flakeyness on TestVerifyBucketCacheFile (#6787)
add d8f71d019d7 HBASE-29189 NPE in RawAsyncTableAdmin.isTableDisabled (#6798)
add ef44bccb33f HBASE-29189 Addendum remove the usage of JDK9+ APIs
add 53e3aa902d2 HBASE-28984 Refactor cache update logic to use new PermissionCache instances (#6485)
add 47d2aa53cb3 HBASE-29131 Introduce the option for post-compaction validation of HFiles (#6700)
add aa89337fc73 HBASE-29186 RegionPlanConditionals can produce a null pointer (#6796)
add b0070b486f9 HBASE-29162 Fix Maven build warnings (#6744)
add 55ec57eb77c HBASE-29180 Apply fail-fast retry limit for UnknownHostException (#6813)
add 653e5fe3b3b HBASE-29187 Use double quote instead of single quote in Jenkinsfile scripts when there are env vars (#6817)
add 27139c409ad HBASE-29103 Avoid excessive allocations during reverse scanning when seeking to next row (#6643)
add 3823d6ef09c HBASE-29188 Region replica replication can not handle table drop correctly (#6800)
add f8c1a671758 HBASE-29198 Change the profile for building with jdk11 in hbase-it to jdk17 (#6824)
add c582d91afcc HBASE-29201 Add OWASP Dependency Check to check 3rd party dependencies for known vulnerabilities (#6822)
add cd562154cc2 HBASE-29192 Provide installation method that supports running hbase-it (#6816)
add 3e951120a47 HBASE-29158 Unknown checksum type code exception occurred while reading HFileBlock (#6740)
add f1dc2c1607b HBASE-29202 Balancer conditionals make balancer actions more likely to be approved (#6821)
add 089ff4889cd HBASE-29203 There should be a StorefileSize equivalent to the TableSkewCost (#6825)
add aa140379ab7 HBASE-29200 Bump netty4 to 4.1.119.Final in main repo (#6820)
add df17a3e9439 HBASE-29146 Incremental backups can fail due to not cleaning up the MR bulkload output directory (#6747)
add ff4db9099d0 HBASE-29214 Typo in AsyncMasterRequestRpcRetryingCaller which makes us fail to clear the master stub cache (#6850)
add f4bcb76a76c HBASE-29215 View block cache as JSON failing for BucketCache implementation (#6851)
add b625bda1b2a HBASE-28754 verify the first argument passed to compaction_switch (#6119)
add d98c63a2eef HBASE-29168 Add configurable throttling of region moves in CacheAwareLoadBalancer. (#6763)
add a86f9d7867c HBASE-29206 RollingBatchSuspendResumeRsAction can not actually 'resume' a region server (#6846)
add 1f6ad4d9218 HBASE-29234 Handle java.lang.reflect.InaccessibleObjectException in HFileSystem (#6869)
add fa2ee738f37 HBASE-28997 Table Regions Total Locality value on the UI shows 1.0 even though some of the regions locality value is zero (#6492)
add 961f4b12271 Remove the useless parameter from RootProcedureState (#6573)
add 92c2edbb6fe HBASE-29239: Subsequent runs of re-splitting HFiles can fail because we don't cleanup the MR directory (#6876)
add fd0803a96b1 HBASE-29229 Throttles should support specific restrictions for atomic workloads (#6866)
add e2e21f17e9d HBASE-28569 fix race condition during WAL splitting leading to corrupt recovered.edits (#6266)
add 78f01019ad5 HBASE-29134 Optimize bulkload backup process for incremental backups (#6706)
add 8c97c5126fe HBASE-29243 Fix BucketCache.notifyFileCachingComplete to also account for ENCODED_DATA block type (#6885)
add 0743861dafa HBASE-29246 Update commons-lang3 to 3.17.0 (#6894)
add ed7625e728a HBASE-29191 Use MetaRpcReadTimeout when accessing Meta replicas (#6803)
add 15789ec56c9 HBASE-29195 Get Column value with timestamp is giving wrong result as not found (#6814)
add 295f0781bca HBASE-29232 give up retrying earlier for some admin operations (#6871)
add 0b3c1730284 HBASE-29208 Fix internal link issues in documentation (#6843)
add 42efe9f7685 HBASE-29112 Apply KeyOnlyFilter to RowCounter (#6666)
add 212f02cc104 HBASE-29137 Add basic config type validation (#6709)
add a95f7d61a55 HBASE-29156 Sort options missing in the Table Regions section on server deployments with security mods (#6738)
add 57f87e730aa Revert "Remove the useless parameter from RootProcedureState (#6573)" (#6886)
add bc9c84f9919 HBASE-29258 Change log level for 'Got brand-new ByteBuffDecompressor' in CodecPool to DEBUG instead of INFO (#6904)
add f6fdbbcb4c2 HBASE-29238 ExportSnapshot support specify storage policy (#6874)
add 26b026cc03f HBASE-29248 HBASE-28529 made an incompatible change to hbase.zookeeper.property handling (#6896)
add e28b449828b HBASE-29262 StochasticLoadBalancer should use the CostFunction epsilon when evaluating whether a move improved costs (#6907)
add 644cdbcc2c1 HBASE-29055 Remove the useless parameter from RootProcedureState (#6903)
add e56e14bcc9f HBASE-29193: Allow ZstdByteBuffDecompressor to take direct ByteBuffer as input and heap ByteBuffer as output, or vice versa (#6806)
add e742fc341ca HBASE-29230 Possible resource leak when RegionReplicationSink sends WALEdits (#6867)
add dfb0d3eb0b7 HBASE-29259 Master crash when loading procedures (#6905)
add abc8b430d56 HBASE-29253 Avoid allocating a new closure on every row processed by StoreScanner (#6901)
add 65a6d8ae39d HBASE-29003 Proper bulk load tracking (#6506)
add f0e069e5092 HBASE-29251 Procedure gets stuck if the procedure state cannot be persisted (#6910)
add d1b68abef5a HBASE-29090: Add server-side load metrics to client results (#6623)
add dcb406f2424 HBASE-29207 The backup system table should be considered a system table (#6842)
add 763093ac348 HBASE-29218: Reduce calls to Configuration#get() in decompression path (#6857)
add bd3036793b3 HBASE-25338 Use ClassLoader of current class instead of thread context ClassLoader (#6918)
add cfc712e7299 HBASE-29204: BufferedMutatorParams#clone() should copy the requestAttributes field (#6823)
add 30ce21bcadb HBASE-29252: Reduce allocations in RowIndexSeekerV1 (#6902)
add ae40069dbb5 HBASE-29249 Allow for BlockCache implementations to define dynamic properties (#6897)
add 99bd5b57c1e HBASE-29254 StoreScanner returns incorrect row after flush due to topChanged behavior (#6900)
add 9e19120c637 HBASE-29281 Atomic request throttles are missing QuotaSettingsFactory support (#6953)
add 5dafa9e3224 HBASE-29257 SnapshotTableAction should have ways to clean up snapshots (#6924)
add 3054aa64603 HBASE-29282 Regions are left in CLOSED state after merging (#6964)
add da7fd50603b HBASE-29297 Forward Port HBASE-24833 Bootstrap should not delete the META table directory if it's not partial (#6972)
add 58dfc9a6c65 HBASE-29276 Compute and display hit ratio by configurable, granular time periods (#6950)
add 2cc896854f3 HBASE-29284 Add Region name to OutOfOrderScannerNextException message (#6960)
add fbf310ea631 HBASE-29271 TestIncrementalBackupWithBulkLoad is flaky (#6966)
add 632a8c882c9 HBASE-29288 Avoid adding new blocks during prefetch if usage is greater than accept factor (#6965)
add 631b4a4a934 HBASE-29300 Upgrade Tomcat to 9.0.104 (#6976)
add 322d395bf21 HBASE-29294 Master crashed because of failing to update master region (#6979)
add a62e54c0765 Revert "HBASE-29294 Master crashed because of failing to update master region (#6979)"
add 91ecd467410 HBASE-29294 Master crashed because of failing to update master region (#6979)
add d9b1aa10896 HBASE-29313 RecoverableZooKeeper.getZooKeeper() returns null for new object (#6987)
add 902067d6c5e HBASE-29292 Revise TestRecreateCluster (#6981)
add 0b89af76ceb HBASE-29314 TableDescriptorChecker should verify CF configuration set via setConfiguration (#6989)
add 767726ce03f HBASE-29280 Fix bug in RawAsyncTableImpl#coprocessorServiceUntilComplete retry logic (#6952)
add c979be846f7 HBASE-29181 TestNettyTLSIPCFileWatcher.testReplaceServerKeystore fails for some storeFileTypes (#6980)
add 77e95dc37c5 HBASE-29168 Update doc section for CacheAwareLoadBalancer to reflect changes from HBASE-29168 (#6870)
add deac89e9487 HBASE-29307 Add status command to hbase-daemon.sh for process state checking (#6982)
add d187378517d HBASE-29323 Use Priority Handler for all RegionServerStatus rpc at Master (#6994)
add b21ba71f738 [ADDENDUM] HBASE-29288 Avoid adding new blocks during prefetch if usage is greater than accept factor (#6965) (#6990)
add 82a2ddf789d HBASE-29293 Upgrade to latest opentelemetry libraries (#6969)
add 48b4f4dc704 HBASE-29331 TestDefaultQuota fails because of pseudo-race condition (#7004)
add 9f841d0ad09 HBASE-29301: Fix AggregrateImplementation pagination logic (#6978)
add 2f9d9fcd906 HBASE-27802 Manage static javascript resources programatically (#6864)
add dfd0bab0ea5 HBASE-29344 Update spotless to 2.44.4 (#7006)
add 27939825445 HBASE-29327 Dependency manage byte-buddy and bump it to 1.15.11 (#7003)
add 823563abdbe HBASE-27802 Manage static javascript resources programatically (addendum: Fix not working popovers on UI) (#7018)
add 17ebfbe69c3 HBASE-29222 Avoid expensive tracing calls if tracing is disabled (#6863)
add c4d8b00267a HBASE-29315 Fail Split/MergeTableRegionProcedure if table modification in progress (#6991)
add a2abf1b092c HBASE-29326 Do not prevent prefetch from running if the given file has already been fully cached before (#7001)
add 08621f94d4b HBASE-28962 Meta replication is inconsistent after startup when reusing hbase storage location (#6448)
add ecaa9481ba7 HBASE-29318 Bump jruby to 9.4.12.1 to fix jruby-openssl CVEs (#6997)
add 787f5459883 HBASE-29357 PerformanceEvaluation: Read tests should not drop existing table (#7037)
add 06a74f12f2c HBASE-29244 Support admin users acl setting with LDAP (Web UI only) (#6923)
add edeed9b34a6 HBASE-29319 Apply fail-fast retry limit for ConnectException (#6996)
add e60e8004aa7 HBASE-29283 Replication MetricsSource.sizeOfHFileRefsQueue metrics not updated correctly after remove_peer (#6954)
add 899e4fc664a HBASE-29317 Bump hbase-thirdparty to 4.1.11 (#6993)
add 539f7b7d478 HBASE-29362 Fix Incorrect JSON Format in RegionServer Web Console Block Cache Status (#7047)
add 97cf65db2f5 HBASE-29365 Improve option parser of PerformanceEvaluation (#7052)
add ae5400e77a9 HBASE-29363 CompactSplit should not attempt to split secondary region replicas (#7048)
add d82a5913955 HBASE-29231 Throttles should support limits based on handler thread usage time (#7000)
add 2f57499b115 HBASE-29369 Fix TestZKPermissionWatcher (#7067)
add d93102ccf63 HBASE-29361 Snapshot coprocessor hooks called inside SnapshotProcedure (#7059)
add d84824b3503 HBASE-29273 Remove deprecated boxed primitive constructors in some test classes (#6949)
add a71288f2e2f HBASE-29370 TestHFileOutputFormat2 fails 100% on flaky dashboard (#7073)
add e1d82797fd9 HBASE-29377 ChaosService support for custom ports in zookeeper quorum (#7072)
add 6a97c2cb931 HBASE-29392 Bump requests from 2.32.0 to 2.32.4 in /dev-support/flaky-tests (#7085)
add 7cc2f54a5d9 HBASE-29380 Two concurrent remove peer requests may hang (#7077)
add c9df6077706 HBASE-29394 Possible race in BufferedMutatorOverAsyncBufferedMutator (#7089)
add c44e3c2c915 HBASE-29393 Bump requests in /dev-support/git-jira-release-audit (#7088)
add 54442b12e7c Add junegunn to the developer list (#7092)
add 61a426d2bcf Add lupeng to the developer list (#7094)
add 842b4a789c0 add cconnell to developer list (#7095)
add 24fce13a5ac add chandra kambham to developer list (#7096)
add 48c8592803f HBASE-29384 Ensure profiler output directory exists before writing output (#7082)
add 221b5a3a19f HBASE-29245 Region reopening batch size should be increased when backoff is 0 (#6892)
add 145972f2d61 HBASE-29279 Allow throttling alter operation via table configuration (#6951)
add 64c582fe9a8 HBASE-29029 Refactor BackupHFileCleaner + fix test (#6533)
add 28c757d45aa HBASE-29388 mvn spotless:apply changes line endings (CRLF to LF) on Windows (#7087)
add a8a57ad4db4 HBASE-29397 Deadlock in BufferedMuratorOverAsyncBufferedMutator (#7107)
add ed5af561b4c Add paksyd to developer list (#7110)
add a2a90676836 HBASE-29385: Improve performance of AggregrateImplementation quota checks (#7083)
add a47d3ea156e HBASE-29403 Remove default TLS cipher overrides (#7112)
add 387e21383e8 HBASE-29390 Too many logs in AsyncBatchRpcRetryingCaller when hitting RegionTooBusyException (#7105)
add bd5df767938 HBASE-29346 Use rootDir, tableDir instance vars of RestoreSnapshotHelper while removeHDFSRegions of restore (#7063)
add 56fe0b31c0e HBASE-29404 Bump urllib3 in /dev-support/git-jira-release-audit (#7113)
new a2a89b1753c HBASE-28465 Implementation of framework for time-based priority bucket-cache (#5793)
new db2e23f79b1 HBASE-28505 Implement enforcement to require Date Tiered Compaction for Time Range Data Tiering (#5809)
new 643c5566bb8 HBASE-28466 Integration of time-based priority logic of bucket cache in prefetch functionality of HBase (#5808)
new 42d3d36951d HBASE-28468: Integrate the data-tiering logic into cache evictions. (#5829)
new 58931cd49e1 HBASE-28535: Add a region-server wide key to enable data-tiering. (#5856)
new 4ce77d73d51 HBASE-28469: Integration of time-based priority caching into compaction paths (#5866)
new cdd316b636d HBASE-28467: Add time-based priority caching checks for cacheOnRead code paths. (#5905)
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (3a701b933ed)
\
N -- N -- N refs/heads/HBASE-28463 (cdd316b636d)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
LICENSE.txt | 4 +-
NOTICE.txt | 14 +-
README.md | 2 +
bin/hbase | 127 +--
bin/hbase-config.sh | 14 +-
bin/hbase-daemon.sh | 15 +-
bin/replication/copy_tables_desc.rb | 17 +-
dev-support/Jenkinsfile | 458 +++++++--
dev-support/Jenkinsfile_GitHub | 328 +-----
...thon-requirements.txt => blanks-eol-ignore.txt} | 14 +-
...hon-requirements.txt => blanks-tabs-ignore.txt} | 18 +-
dev-support/checkcompatibility.py | 2 +-
dev-support/create-release/hbase-rm/Dockerfile | 3 +-
dev-support/create-release/release-build.sh | 1 +
dev-support/create-release/release-util.sh | 59 +-
dev-support/docker/Dockerfile | 36 +-
dev-support/flaky-tests/python-requirements.txt | 4 +-
.../flaky-tests/run-flaky-tests.Jenkinsfile | 25 +-
dev-support/gh_hide_old_comments.sh | 149 +++
.../git-jira-release-audit/requirements.txt | 8 +-
dev-support/hbase-personality.sh | 56 +-
dev-support/hbase-vote.sh | 9 +-
dev-support/hbase_docker/README.md | 3 +
dev-support/hbase_docker/m1/Dockerfile | 92 ++
.../hbase_nightly_pseudo-distributed-test.sh | 9 +-
dev-support/hbase_nightly_source-artifact.sh | 30 +-
dev-support/hbase_nightly_yetus.sh | 24 +-
.../cache-apache-project-artifact.sh | 2 +-
.../generate-hbase-website.Jenkinsfile | 19 +-
.../jenkins-scripts/generate-hbase-website.sh | 12 +-
dev-support/jenkins_precommit_github_yetus.sh | 14 +-
.../pom.xml | 303 ++++--
.../src/main/assembly/components.xml | 70 --
.../src/main/assembly/hadoop-three-compat.xml | 116 +--
.../src/main/resources/META-INF/LEGAL | 0
hbase-assembly/pom.xml | 194 ++--
.../src/main/assembly/client-components.xml | 55 -
hbase-assembly/src/main/assembly/client.xml | 110 +-
hbase-assembly/src/main/assembly/components.xml | 70 --
.../src/main/assembly/hadoop-three-compat.xml | 202 +---
hbase-asyncfs/pom.xml | 20 +-
.../io/asyncfs/FanOutOneBlockAsyncDFSOutput.java | 39 +-
.../FanOutOneBlockAsyncDFSOutputHelper.java | 126 ++-
.../FanOutOneBlockAsyncDFSOutputSaslHelper.java | 28 +-
.../hadoop/hbase/io/asyncfs/ProtobufDecoder.java | 12 +-
.../hadoop/hbase/util/RecoverLeaseFSUtils.java | 73 +-
.../apache/hadoop/hdfs/DummyDFSOutputStream.java | 32 +-
.../hadoop/hbase/io/asyncfs/TestLeaseRenewal.java | 177 ++++
.../hadoop/hbase/security/HBaseKerberosUtils.java | 19 -
.../hadoop/hbase/util/TestRecoverLeaseFSUtils.java | 79 +-
hbase-backup/pom.xml | 9 +-
.../apache/hadoop/hbase/backup/BackupDriver.java | 3 +
.../hadoop/hbase/backup/BackupHFileCleaner.java | 122 +--
.../org/apache/hadoop/hbase/backup/BackupInfo.java | 17 +
.../hadoop/hbase/backup/BackupMasterObserver.java | 116 +++
.../apache/hadoop/hbase/backup/BackupObserver.java | 52 +-
.../apache/hadoop/hbase/backup/BackupRequest.java | 15 +
.../hbase/backup/BackupRestoreConstants.java | 34 +-
.../hadoop/hbase/backup/BackupRestoreFactory.java | 8 +-
.../hadoop/hbase/backup/HBackupFileSystem.java | 22 +-
.../apache/hadoop/hbase/backup/RestoreDriver.java | 4 +-
.../org/apache/hadoop/hbase/backup/RestoreJob.java | 5 +
.../apache/hadoop/hbase/backup/RestoreRequest.java | 16 +
.../hadoop/hbase/backup/impl/BackupAdminImpl.java | 2 +-
.../hadoop/hbase/backup/impl/BackupCommands.java | 18 +-
.../hadoop/hbase/backup/impl/BackupManager.java | 118 +--
.../hadoop/hbase/backup/impl/BackupManifest.java | 122 +--
.../hbase/backup/impl/BackupSystemTable.java | 378 ++-----
.../apache/hadoop/hbase/backup/impl/BulkLoad.java | 93 ++
.../backup/impl/ColumnFamilyMismatchException.java | 67 ++
.../hbase/backup/impl/FullTableBackupClient.java | 14 +-
.../backup/impl/IncrementalTableBackupClient.java | 377 ++++---
.../hbase/backup/impl/MergeSplitBulkloadInfo.java | 37 +-
.../hbase/backup/impl/RestoreTablesClient.java | 15 +-
.../hbase/backup/impl/TableBackupClient.java | 71 +-
.../backup/mapreduce/MapReduceBackupCopyJob.java | 37 +-
.../backup/mapreduce/MapReduceBackupMergeJob.java | 19 +-
.../mapreduce/MapReduceHFileSplitterJob.java | 15 +-
.../MapReduceRestoreToOriginalSplitsJob.java | 106 ++
.../hbase/backup/master/BackupLogCleaner.java | 146 ++-
.../hadoop/hbase/backup/util/BackupUtils.java | 13 +-
.../hadoop/hbase/backup/util/RestoreTool.java | 32 +-
.../apache/hadoop/hbase/backup/TestBackupBase.java | 54 +-
.../hbase/backup/TestBackupHFileCleaner.java | 114 +-
.../hadoop/hbase/backup/TestBackupMerge.java | 44 +
.../hadoop/hbase/backup/TestHBackupFileSystem.java | 31 +-
.../hadoop/hbase/backup/TestIncrementalBackup.java | 357 ++++++-
.../backup/TestIncrementalBackupWithBulkLoad.java | 200 ++--
.../backup/TestIncrementalBackupWithDataLoss.java | 85 ++
.../mapreduce/TestMapReduceBackupCopyJob.java | 55 +
.../hbase/backup/master/TestBackupLogCleaner.java | 214 ++--
hbase-balancer/pom.xml | 5 -
.../apache/hadoop/hbase/master/LoadBalancer.java | 17 +
.../hbase/master/balancer/AssignRegionAction.java | 10 +
.../hbase/master/balancer/BalanceAction.java | 36 +-
.../master/balancer/BalancerClusterState.java | 110 +-
.../master/balancer/BalancerConditionals.java | 241 +++++
.../hbase/master/balancer/BaseLoadBalancer.java | 11 +-
.../master/balancer/CacheAwareLoadBalancer.java | 91 +-
.../hbase/master/balancer/CandidateGenerator.java | 2 +
.../balancer/CostFromRegionLoadFunction.java | 2 +-
.../hadoop/hbase/master/balancer/CostFunction.java | 23 +-
.../DistributeReplicasCandidateGenerator.java | 111 ++
.../balancer/DistributeReplicasConditional.java | 93 ++
.../master/balancer/FavoredStochasticBalancer.java | 15 +-
.../master/balancer/LocalityBasedCostFunction.java | 5 +-
.../MetaTableIsolationCandidateGenerator.java | 21 +-
...ion.java => MetaTableIsolationConditional.java} | 40 +-
.../hbase/master/balancer/MoveBatchAction.java | 77 ++
.../hbase/master/balancer/MoveRegionAction.java | 10 +
.../balancer/RegionCountSkewCostFunction.java | 5 +-
.../master/balancer/RegionPlanConditional.java | 141 +++
.../RegionPlanConditionalCandidateGenerator.java | 116 +++
.../RegionReplicaGroupingCostFunction.java | 5 +-
.../balancer/SlopFixingCandidateGenerator.java | 112 ++
.../master/balancer/StochasticLoadBalancer.java | 284 ++++-
.../balancer/StoreFileTableSkewCostFunction.java | 127 +++
.../hbase/master/balancer/SwapRegionsAction.java | 13 +
...=> SystemTableIsolationCandidateGenerator.java} | 41 +-
...n.java => SystemTableIsolationConditional.java} | 43 +-
.../balancer/TableIsolationCandidateGenerator.java | 130 +++
.../master/balancer/TableIsolationConditional.java | 78 ++
.../hbase/master/balancer/replicas/ReplicaKey.java | 43 +-
.../master/balancer/replicas/ReplicaKeyCache.java | 93 ++
.../hbase/master/balancer/BalancerTestBase.java | 3 +
.../balancer/CandidateGeneratorTestUtil.java | 306 ++++++
.../DistributeReplicasTestConditional.java} | 41 +-
.../balancer/StochasticBalancerTestBase.java | 66 +-
.../master/balancer/TestBalancerConditionals.java | 95 ++
...terBalancingConditionalReplicaDistribution.java | 112 ++
...estLargeClusterBalancingMetaTableIsolation.java | 101 ++
...tLargeClusterBalancingSystemTableIsolation.java | 102 ++
...ancingTableIsolationAndReplicaDistribution.java | 128 +++
.../balancer/TestStochasticLoadBalancer.java | 3 +-
.../TestStochasticLoadBalancerBalanceCluster.java | 2 +
...estStochasticLoadBalancerHeterogeneousCost.java | 74 +-
.../TestStochasticLoadBalancerLargeCluster.java | 3 +-
.../TestStochasticLoadBalancerMidCluster.java | 10 +-
.../TestStochasticLoadBalancerRegionReplica.java | 53 +-
...icLoadBalancerRegionReplicaHighReplication.java | 6 +-
...asticLoadBalancerRegionReplicaLargeCluster.java | 6 +-
...chasticLoadBalancerRegionReplicaMidCluster.java | 4 +-
...egionReplicaReplicationGreaterThanNumNodes.java | 6 +-
...ochasticLoadBalancerRegionReplicaSameHosts.java | 3 +-
...ochasticLoadBalancerRegionReplicaWithRacks.java | 5 +-
.../TestStochasticLoadBalancerSmallCluster.java | 10 +-
.../TestStoreFileTableSkewCostFunction.java | 239 +++++
.../balancer/TestUnattainableBalancerCostGoal.java | 108 ++
hbase-build-configuration/pom.xml | 13 +
hbase-checkstyle/pom.xml | 8 +-
hbase-client/pom.xml | 5 -
.../hbase/client/AllowPartialScanResultCache.java | 6 +-
.../org/apache/hadoop/hbase/client/AsyncAdmin.java | 1 +
.../client/AsyncAdminRequestRetryingCaller.java | 16 +
.../hbase/client/AsyncBatchRpcRetryingCaller.java | 71 +-
.../hadoop/hbase/client/AsyncBufferedMutator.java | 13 +
.../hbase/client/AsyncBufferedMutatorBuilder.java | 18 +
.../client/AsyncBufferedMutatorBuilderImpl.java | 27 +-
.../hbase/client/AsyncBufferedMutatorImpl.java | 26 +-
.../hbase/client/AsyncConnectionConfiguration.java | 19 +-
.../AsyncMasterRequestRpcRetryingCaller.java | 2 +-
.../hbase/client/AsyncNonMetaRegionLocator.java | 2 +-
.../org/apache/hadoop/hbase/client/AsyncTable.java | 56 +-
.../hadoop/hbase/client/AsyncTableBuilderBase.java | 6 +-
.../apache/hadoop/hbase/client/AsyncTableImpl.java | 78 +-
.../hadoop/hbase/client/BatchScanResultCache.java | 12 +-
.../hadoop/hbase/client/BufferedMutator.java | 17 +
.../BufferedMutatorOverAsyncBufferedMutator.java | 17 +-
.../hadoop/hbase/client/BufferedMutatorParams.java | 38 +
.../apache/hadoop/hbase/client/CheckAndMutate.java | 54 +-
.../hadoop/hbase/client/CheckAndMutateResult.java | 11 +
...ieldAccessor.java => ClientInternalHelper.java} | 22 +-
.../hbase/client/ConnectionConfiguration.java | 15 +-
.../client/ConnectionOverAsyncConnection.java | 7 +
.../hbase/client/ConnectionRegistryFactory.java | 46 +-
.../hbase/client/ConnectionRegistryURIFactory.java | 6 +
.../hadoop/hbase/client/ConnectionUtils.java | 5 +-
.../org/apache/hadoop/hbase/client/Delete.java | 25 +-
.../java/org/apache/hadoop/hbase/client/Get.java | 35 +-
.../org/apache/hadoop/hbase/client/Increment.java | 11 +-
.../hadoop/hbase/client/MutableRegionInfo.java | 16 +-
.../org/apache/hadoop/hbase/client/Mutation.java | 222 +---
...a => NoopPartialResultCoprocessorCallback.java} | 51 +-
.../java/org/apache/hadoop/hbase/client/Put.java | 21 +-
.../java/org/apache/hadoop/hbase/client/Query.java | 24 +
.../apache/hadoop/hbase/client/QueryMetrics.java | 23 +-
.../hadoop/hbase/client/RawAsyncHBaseAdmin.java | 56 +-
.../hadoop/hbase/client/RawAsyncTableImpl.java | 108 +-
.../org/apache/hadoop/hbase/client/Result.java | 84 +-
.../client/RpcConnectionRegistryURIFactory.java | 9 +
.../java/org/apache/hadoop/hbase/client/Scan.java | 36 +-
.../java/org/apache/hadoop/hbase/client/Table.java | 2 +-
.../hadoop/hbase/client/ZKConnectionRegistry.java | 17 +-
.../client/ZKConnectionRegistryURIFactory.java | 12 +
.../replication/ReplicationPeerConfigUtil.java | 15 +-
.../hbase/filter/ColumnPaginationFilter.java | 4 +
.../hadoop/hbase/filter/ColumnPrefixFilter.java | 2 +-
.../hadoop/hbase/filter/ColumnRangeFilter.java | 2 +-
.../org/apache/hadoop/hbase/filter/Filter.java | 13 +-
.../hadoop/hbase/filter/FilterListWithAND.java | 64 +-
.../apache/hadoop/hbase/filter/FuzzyRowFilter.java | 70 +-
.../apache/hadoop/hbase/filter/HintingFilter.java | 20 +-
.../apache/hadoop/hbase/filter/KeyOnlyFilter.java | 34 +-
.../hadoop/hbase/filter/MultiRowRangeFilter.java | 2 +-
.../hbase/filter/MultipleColumnPrefixFilter.java | 2 +-
.../apache/hadoop/hbase/filter/PrefixFilter.java | 57 +-
.../hadoop/hbase/filter/TimestampsFilter.java | 2 +-
.../java/org/apache/hadoop/hbase/ipc/Call.java | 13 +-
.../apache/hadoop/hbase/ipc/CellBlockBuilder.java | 20 +-
.../hbase/ipc/DelegatingHBaseRpcController.java | 8 +-
.../hadoop/hbase/ipc/HBaseRpcController.java | 12 +-
.../hadoop/hbase/ipc/HBaseRpcControllerImpl.java | 25 +-
.../java/org/apache/hadoop/hbase/ipc/IPCUtil.java | 2 +-
.../org/apache/hadoop/hbase/ipc/RpcConnection.java | 4 +-
.../hadoop/hbase/ipc/RpcControllerFactory.java | 12 +-
.../apache/hadoop/hbase/quotas/QuotaRetriever.java | 31 +-
.../hadoop/hbase/quotas/QuotaSettingsFactory.java | 16 +
.../hbase/quotas/RpcThrottlingException.java | 37 +-
.../hadoop/hbase/quotas/ThrottleSettings.java | 6 +
.../apache/hadoop/hbase/quotas/ThrottleType.java | 12 +
.../hbase/security/AbstractHBaseSaslRpcClient.java | 10 +
.../hadoop/hbase/security/HBaseSaslRpcClient.java | 3 +
.../hbase/security/NettyHBaseSaslRpcClient.java | 3 +-
.../security/NettyHBaseSaslRpcClientHandler.java | 2 +-
.../org/apache/hadoop/hbase/security/SaslUtil.java | 22 +
.../SaslClientAuthenticationProviders.java | 3 +-
.../hadoop/hbase/shaded/protobuf/ProtobufUtil.java | 96 +-
.../hbase/shaded/protobuf/RequestConverter.java | 57 +-
.../hbase/shaded/protobuf/ResponseConverter.java | 23 +-
.../hadoop/hbase/slowlog/SlowLogTableAccessor.java | 2 +
.../snapshot/ClientSnapshotDescriptionUtils.java | 2 +-
.../hadoop/hbase/zookeeper/ReadOnlyZKClient.java | 39 +-
.../client/TestAsyncBatchRpcRetryingCaller.java | 123 +++
.../client/TestAsyncConnectionConfiguration.java | 14 +-
...estBufferedMutatorOverAsyncBufferedMutator.java | 112 ++
.../hbase/client/TestBufferedMutatorParams.java | 7 +-
.../hbase/client/TestConnectionConfiguration.java | 34 +-
.../org/apache/hadoop/hbase/client/TestGet.java | 2 +
.../apache/hadoop/hbase/client/TestMutation.java | 12 +-
.../hadoop/hbase/client/TestOnlineLogRecord.java | 30 +-
.../apache/hadoop/hbase/client/TestOperation.java | 13 +-
.../org/apache/hadoop/hbase/client/TestScan.java | 7 +-
.../hbase/client/TestTableEnableDisableError.java | 91 ++
.../client/trace/hamcrest/SpanDataMatchers.java | 6 +-
.../hadoop/hbase/ipc/TestCellBlockBuilder.java | 28 +-
.../hbase/ipc/TestHBaseRpcControllerImpl.java | 30 +-
.../apache/hadoop/hbase/security/TestSaslUtil.java | 58 ++
.../hbase/shaded/protobuf/TestProtobufUtil.java | 166 ++-
hbase-common/pom.xml | 17 +-
.../hadoop/hbase/ByteBufferKeyOnlyKeyValue.java | 11 +
.../apache/hadoop/hbase/ByteBufferKeyValue.java | 4 +-
.../main/java/org/apache/hadoop/hbase/Cell.java | 75 +-
.../apache/hadoop/hbase/CellComparatorImpl.java | 16 +-
.../java/org/apache/hadoop/hbase/CellUtil.java | 58 +-
.../java/org/apache/hadoop/hbase/ExtendedCell.java | 28 +-
...CellScanner.java => ExtendedCellScannable.java} | 20 +-
...edCellScanner.java => ExtendedCellScanner.java} | 20 +-
.../apache/hadoop/hbase/HBaseConfiguration.java | 5 +-
.../java/org/apache/hadoop/hbase/HConstants.java | 28 +-
.../java/org/apache/hadoop/hbase/KeyValue.java | 664 +-----------
.../org/apache/hadoop/hbase/KeyValueTestUtil.java | 8 +-
.../java/org/apache/hadoop/hbase/KeyValueUtil.java | 84 +-
.../apache/hadoop/hbase/MetaCellComparator.java | 7 +-
.../apache/hadoop/hbase/NamespaceDescriptor.java | 3 +
.../org/apache/hadoop/hbase/PrivateCellUtil.java | 412 +++++---
.../main/java/org/apache/hadoop/hbase/RawCell.java | 29 +-
.../java/org/apache/hadoop/hbase/TableName.java | 14 +
.../main/java/org/apache/hadoop/hbase/TagUtil.java | 6 +-
.../org/apache/hadoop/hbase/codec/BaseDecoder.java | 10 +-
.../org/apache/hadoop/hbase/codec/BaseEncoder.java | 4 +-
.../org/apache/hadoop/hbase/codec/CellCodec.java | 6 +-
.../hadoop/hbase/codec/CellCodecWithTags.java | 6 +-
.../java/org/apache/hadoop/hbase/codec/Codec.java | 4 +-
.../apache/hadoop/hbase/codec/KeyValueCodec.java | 18 +-
.../hadoop/hbase/codec/KeyValueCodecWithTags.java | 14 +-
.../org/apache/hadoop/hbase/conf/ConfigKey.java | 162 +++
.../apache/hadoop/hbase/io/CellOutputStream.java | 4 +-
.../apache/hadoop/hbase/io/FileChangeWatcher.java | 112 +-
...lScanner.java => SizedExtendedCellScanner.java} | 6 +-
.../hbase/io/compress/BlockDecompressorHelper.java | 77 ++
.../ByteBuffDecompressionCodec.java} | 20 +-
.../hbase/io/compress/ByteBuffDecompressor.java | 56 +
.../apache/hadoop/hbase/io/compress/CodecPool.java | 259 +++++
.../hadoop/hbase/io/compress/Compression.java | 71 +-
.../hadoop/hbase/io/compress/DictionaryCache.java | 6 +-
.../hbase/io/crypto/MockAesKeyProvider.java} | 4 +-
.../hbase/io/crypto/tls/HBaseTrustManager.java | 7 +-
.../hadoop/hbase/io/crypto/tls/X509Util.java | 165 +--
.../io/encoding/AbstractDataBlockEncoder.java | 4 +-
.../io/encoding/BufferedDataBlockEncoder.java | 24 +-
.../hbase/io/encoding/CopyKeyDataBlockEncoder.java | 6 +-
.../hadoop/hbase/io/encoding/DataBlockEncoder.java | 14 +-
.../hbase/io/encoding/DiffKeyDeltaEncoder.java | 8 +-
.../hadoop/hbase/io/encoding/EncodedDataBlock.java | 8 +-
.../hadoop/hbase/io/encoding/EncodingState.java | 4 +-
.../hbase/io/encoding/FastDiffDeltaEncoder.java | 8 +-
.../encoding/HFileBlockDefaultDecodingContext.java | 49 +
.../hadoop/hbase/io/encoding/NoneEncoder.java | 7 +-
.../hbase/io/encoding/PrefixKeyDeltaEncoder.java | 8 +-
.../hadoop/hbase/io/encoding/RowIndexCodecV1.java | 10 +-
.../hbase/io/encoding/RowIndexEncoderV1.java | 8 +-
.../hadoop/hbase/io/encoding/RowIndexSeekerV1.java | 53 +-
.../apache/hadoop/hbase/io/hfile/HFileContext.java | 37 +-
.../hadoop/hbase/io/hfile/HFileContextBuilder.java | 16 +-
.../apache/hadoop/hbase/io/util/BlockIOUtils.java | 70 +-
.../java/org/apache/hadoop/hbase/nio/RefCnt.java | 2 +-
.../hbase/trace/HBaseSemanticAttributes.java | 6 +-
.../apache/hadoop/hbase/util/CommonFSUtils.java | 7 +
.../hadoop/hbase/util/RandomDistribution.java | 2 +
.../java/org/apache/hadoop/hbase/util/Strings.java | 12 +
.../apache/hadoop/hbase/zookeeper/ZKConfig.java | 40 +-
hbase-common/src/main/resources/hbase-default.xml | 13 +-
.../org/apache/hadoop/hbase/TestCellBuilder.java | 4 +-
.../apache/hadoop/hbase/TestCellComparator.java | 2 +-
.../java/org/apache/hadoop/hbase/TestCellUtil.java | 165 +--
.../hadoop/hbase/TestIndividualBytesFieldCell.java | 4 +-
.../java/org/apache/hadoop/hbase/TestKeyValue.java | 4 +-
.../apache/hadoop/hbase/codec/TestCellCodec.java | 12 +-
.../hadoop/hbase/codec/TestCellCodecWithTags.java | 16 +-
.../hbase/codec/TestKeyValueCodecWithTags.java | 4 +-
.../apache/hadoop/hbase/conf/TestConfigKey.java | 127 +++
.../hadoop/hbase/io/TestFileChangeWatcher.java | 172 +---
.../hadoop/hbase/io/compress/TestCodecPool.java | 253 +++++
.../hadoop/hbase/io/crypto/TestKeyProvider.java | 4 +-
.../hbase/io/crypto/tls/TestHBaseTrustManager.java | 47 +-
.../hadoop/hbase/io/crypto/tls/TestX509Util.java | 43 -
.../hbase/io/crypto/tls/X509TestContext.java | 9 +-
.../hbase/io/encoding/TestEncodedDataBlock.java | 42 +-
.../hadoop/hbase/util/RedundantKVGenerator.java | 6 +-
.../hadoop/hbase/util/SimpleKdcServerUtil.java | 10 +-
.../hadoop/hbase/zookeeper/TestZKConfig.java | 24 +-
.../hbase/io/compress/aircompressor/ZstdCodec.java | 6 +-
.../io/compress/zstd/ZstdByteBuffDecompressor.java | 125 +++
.../hadoop/hbase/io/compress/zstd/ZstdCodec.java | 62 +-
.../zstd/ZstdHFileDecompressionContext.java | 97 ++
.../io/compress/zstd/TestHFileCompressionZstd.java | 18 +-
.../zstd/TestZstdByteBuffDecompressor.java | 122 +++
.../pom.xml | 108 +-
{hbase-replication => hbase-diagnostics}/pom.xml | 193 ++--
.../hadoop/hbase/HFilePerformanceEvaluation.java | 21 +-
.../apache/hadoop/hbase/PerformanceEvaluation.java | 705 +++++--------
.../hadoop/hbase/PerformanceEvaluationCommons.java | 2 +
.../hadoop/hbase/ScanPerformanceEvaluation.java | 46 +-
.../LoadBalancerPerformanceEvaluation.java | 6 +-
.../apache/hadoop/hbase/util/KerberosUtils.java | 58 ++
.../hbase/util/LoadTestDataGeneratorWithMOB.java | 2 +
.../hbase/util/LoadTestDataGeneratorWithTags.java | 7 +-
.../org/apache/hadoop/hbase/util/LoadTestTool.java | 21 +-
.../org/apache/hadoop/hbase/util/LoadTestUtil.java | 194 ++++
.../hadoop/hbase/util/MultiThreadedAction.java | 23 +-
.../hadoop/hbase/util/MultiThreadedReader.java | 10 +-
.../hbase/util/MultiThreadedReaderWithACL.java | 7 +-
.../hadoop/hbase/util/MultiThreadedUpdater.java | 4 +-
.../hbase/util/MultiThreadedUpdaterWithACL.java | 7 +-
.../hadoop/hbase/util/MultiThreadedWriter.java | 2 +
.../hadoop/hbase/util/MultiThreadedWriterBase.java | 2 +
.../hbase/util/MultiThreadedWriterWithACL.java | 2 +
.../hbase/util/WALPerformanceEvaluationUtil.java | 272 +++++
.../hbase/util/test/LoadTestDataGenerator.java | 0
.../util/test/LoadTestDataGeneratorWithACL.java | 0
.../hadoop/hbase/wal/WALPerformanceEvaluation.java | 24 +-
.../hadoop/hbase/TestClientClusterMetrics.java | 0
.../hadoop/hbase/TestPerformanceEvaluation.java | 40 +-
.../hbase/io/encoding/TestEncodedSeekers.java | 0
.../io/encoding/TestLoadAndSwitchEncodeOnDisk.java | 0
.../hadoop/hbase/security/TestEncryptionUtil.java | 10 +-
.../hbase/util/ProcessBasedLocalHBaseCluster.java | 0
.../apache/hadoop/hbase/util/RestartMetaTest.java | 14 +-
.../hadoop/hbase/util/TestLoadTestKVGenerator.java | 0
.../hbase/util/TestMiniClusterLoadEncoded.java | 0
.../hbase/util/TestMiniClusterLoadParallel.java | 0
.../hbase/util/TestMiniClusterLoadSequential.java | 2 +-
...tBoundedRegionGroupingStrategyUsingWPETool.java | 107 ++
.../TestFSHLogProviderWithConcurrentWrites.java | 107 ++
.../PerformanceEvaluation_Counter.properties | 0
hbase-endpoint/pom.xml | 10 +-
.../client/coprocessor/AggregationClient.java | 14 +-
.../client/coprocessor/AggregationHelper.java | 5 +-
.../client/coprocessor/AsyncAggregationClient.java | 290 ++++--
.../hbase/coprocessor/AggregateImplementation.java | 288 +++++-
.../MockPartialResultAggregateImplemention.java | 136 +++
.../TestAsyncAggregationClientPartialResult.java | 92 ++
...yncAggregationClientWithCallbackThreadPool.java | 156 +++
.../hbase/client/TestRpcControllerFactory.java | 9 +-
.../coprocessor/TestAggregateImplementation.java | 969 +++++++++++++++++
hbase-examples/pom.xml | 37 +-
.../client/example/BufferedMutatorExample.java | 16 +-
.../example/DelegatingInternalScanner.java | 5 +-
.../example/ExampleRegionObserverWithMetrics.java | 12 +-
.../coprocessor/example/ScanModifyingObserver.java | 2 +-
.../example/ValueRewritingObserver.java | 16 +-
.../example/WriteHeavyIncrementObserver.java | 52 +-
.../example/ZooKeeperScanPolicyObserver.java | 8 +-
.../example/row/stats/RowStatistics.java | 76 +-
.../row/stats/RowStatisticsCompactionObserver.java | 319 ++++++
.../example/row/stats/RowStatisticsImpl.java | 300 ++++++
.../coprocessor/example/row/stats/SizeBucket.java | 57 +
.../example/row/stats/SizeBucketTracker.java | 83 ++
.../recorder/RowStatisticsCombinedRecorder.java | 42 +-
.../row/stats/recorder/RowStatisticsRecorder.java | 18 +-
.../stats/recorder/RowStatisticsTableRecorder.java | 182 ++++
.../RowStatisticsDisruptorExceptionHandler.java | 38 +-
.../ringbuffer/RowStatisticsEventHandler.java | 62 ++
.../RowStatisticsRingBufferEnvelope.java | 26 +-
.../ringbuffer/RowStatisticsRingBufferPayload.java | 27 +-
.../utils/RowStatisticsConfigurationUtil.java | 31 +-
.../row/stats/utils/RowStatisticsTableUtil.java | 50 +
.../example/row/stats/utils/RowStatisticsUtil.java | 26 +-
.../stats/TestRowStatisticsCompactionObserver.java | 205 ++++
.../row/stats/TestRowStatisticsEventHandler.java | 87 ++
.../row/stats/TestRowStatisticsTableRecorder.java | 103 ++
.../stats/sizebucket/TestSizeBucketTracker.java | 93 ++
.../hbase/mapreduce/TestMapReduceExamples.java | 2 -
hbase-extensions/hbase-openssl/pom.xml | 11 +
hbase-external-blockcache/pom.xml | 17 +-
.../hadoop/hbase/io/hfile/MemcachedBlockCache.java | 12 +-
.../hbase/io/hfile/TestMemcachedBlockCache.java | 157 +--
hbase-hadoop-compat/pom.xml | 5 -
.../regionserver/MetricsRegionServerSource.java | 10 +-
.../MetricsRegionServerSourceImpl.java | 3 +
.../regionserver/MetricsRegionServerWrapper.java | 5 +
.../regionserver/MetricsTableWrapperStub.java | 1 +
hbase-hbtop/pom.xml | 9 -
hbase-http/pom.xml | 16 -
.../org/apache/hadoop/hbase/http/HttpServer.java | 5 +
.../apache/hadoop/hbase/http/HttpServerUtil.java | 25 +
.../org/apache/hadoop/hbase/http/InfoServer.java | 29 +-
.../apache/hadoop/hbase/http/ProfileServlet.java | 16 +-
.../hadoop/hbase/http/SecurityHeadersFilter.java | 1 +
.../org/apache/hadoop/hbase/http/log/LogLevel.java | 41 +-
.../hadoop/hbase/http/LdapServerTestBase.java | 124 +++
...stLdapHttpServer.java => TestLdapAdminACL.java} | 106 +-
.../hadoop/hbase/http/TestLdapHttpServer.java | 79 +-
.../hbase/http/TestProxyUserSpnegoHttpServer.java | 17 +-
hbase-it/pom.xml | 22 +-
.../apache/hadoop/hbase/chaos/ChaosService.java | 9 +-
.../org/apache/hadoop/hbase/chaos/ChaosUtils.java | 45 -
.../org/apache/hadoop/hbase/ClusterManager.java | 12 +
.../hadoop/hbase/DistributedHBaseCluster.java | 38 +
.../apache/hadoop/hbase/HBaseClusterManager.java | 18 +
.../hadoop/hbase/IntegrationTestBackupRestore.java | 4 +-
.../IntegrationTestIngestStripeCompactions.java | 7 +-
.../hbase/IntegrationTestIngestWithEncryption.java | 4 +-
.../hadoop/hbase/IntegrationTestingUtility.java | 66 ++
.../hadoop/hbase/IntegrationTestsDriver.java | 2 +-
.../apache/hadoop/hbase/RESTApiClusterManager.java | 10 +
.../apache/hadoop/hbase/ZNodeClusterManager.java | 12 +
.../apache/hadoop/hbase/chaos/actions/Action.java | 4 +-
.../actions/RollingBatchSuspendResumeRsAction.java | 33 +-
.../hbase/chaos/actions/SnapshotTableAction.java | 22 +-
.../chaos/factories/MobNoKillMonkeyFactory.java | 3 +-
.../MobSlowDeterministicMonkeyFactory.java | 13 +-
.../hbase/chaos/factories/MonkeyConstants.java | 8 +-
.../hbase/chaos/factories/NoKillMonkeyFactory.java | 3 +-
.../factories/SlowDeterministicMonkeyFactory.java | 14 +-
.../chaos/monkies/PolicyBasedChaosMonkey.java | 1 +
.../hbase/mapreduce/IntegrationTestBulkLoad.java | 6 +-
.../LoadTestDataGeneratorWithVisibilityLabels.java | 0
.../hbase/test/IntegrationTestBigLinkedList.java | 18 +-
...IntegrationTestBigLinkedListWithVisibility.java | 2 +-
.../hbase/test/IntegrationTestLoadCommonCrawl.java | 14 +-
hbase-logging/pom.xml | 5 -
hbase-mapreduce/pom.xml | 5 -
.../hadoop/hbase/mapreduce/CellSerialization.java | 8 +-
.../hadoop/hbase/mapreduce/CellSortReducer.java | 18 +-
.../apache/hadoop/hbase/mapreduce/CopyTable.java | 261 ++---
.../hbase/mapreduce/ExtendedCellSerialization.java | 2 +-
.../hadoop/hbase/mapreduce/HFileOutputFormat2.java | 13 +-
.../org/apache/hadoop/hbase/mapreduce/Import.java | 40 +-
.../apache/hadoop/hbase/mapreduce/PutCombiner.java | 53 +-
.../hadoop/hbase/mapreduce/PutSortReducer.java | 15 +-
.../hbase/mapreduce/RegionSizeCalculator.java | 4 +-
.../apache/hadoop/hbase/mapreduce/RowCounter.java | 124 ++-
.../apache/hadoop/hbase/mapreduce/SyncTable.java | 114 +-
.../hbase/mapreduce/TableInputFormatBase.java | 3 +-
.../hadoop/hbase/mapreduce/TableMapReduceUtil.java | 242 ++++-
.../hadoop/hbase/mapreduce/TableOutputFormat.java | 89 +-
.../apache/hadoop/hbase/mapreduce/TableSplit.java | 5 +-
.../hadoop/hbase/mapreduce/TextSortReducer.java | 14 +-
.../apache/hadoop/hbase/mapreduce/WALPlayer.java | 21 +-
.../mapreduce/replication/VerifyReplication.java | 59 +-
.../hadoop/hbase/regionserver/CompactionTool.java | 4 +
.../hadoop/hbase/snapshot/ExportSnapshot.java | 259 +++--
.../hadoop/hbase/util/MapReduceExtendedCell.java | 21 +-
.../hadoop/hbase/mapreduce/CopyTableTestBase.java | 279 +++++
.../mapreduce/CopyTableToPeerClusterTestBase.java | 138 +++
.../hadoop/hbase/mapreduce/TestCopyTable.java | 327 ++----
.../TestCopyTableToPeerClusterWithClusterKey.java | 23 +-
.../TestCopyTableToPeerClusterWithRpcUri.java | 23 +-
.../TestCopyTableToPeerClusterWithZkUri.java | 23 +-
.../hbase/mapreduce/TestHFileOutputFormat2.java | 139 ++-
.../hadoop/hbase/mapreduce/TestImportExport.java | 64 +-
.../TestImportTSVWithOperationAttributes.java | 4 +-
.../hbase/mapreduce/TestImportTSVWithTTLs.java | 4 +-
.../hbase/mapreduce/TestRegionSizeCalculator.java | 31 +-
.../hadoop/hbase/mapreduce/TestRowCounter.java | 134 +++
.../hadoop/hbase/mapreduce/TestSyncTable.java | 694 ++++++-------
.../hbase/mapreduce/TestTableMapReduceUtil.java | 48 +-
.../hbase/mapreduce/TestTableOutputFormat.java | 130 +++
.../hbase/mapreduce/TestWALRecordReader.java | 29 +-
.../regionserver/TestCompactionToolNpeFix.java | 141 +++
.../replication/TestVerifyReplicationAdjunct.java | 30 +-
.../TestVerifyReplicationRpcConnectionUri.java | 23 +-
.../TestVerifyReplicationZkClusterKey.java | 23 +-
.../TestVerifyReplicationZkConnectionUri.java | 23 +-
...ication.java => VerifyReplicationTestBase.java} | 33 +-
.../hadoop/hbase/snapshot/TestExportSnapshot.java | 164 ++-
.../hbase/snapshot/TestExportSnapshotAdjunct.java | 4 +-
.../snapshot/TestExportSnapshotV1NoCluster.java | 2 +-
hbase-metrics-api/pom.xml | 5 -
hbase-metrics/pom.xml | 5 -
hbase-procedure/pom.xml | 5 -
.../apache/hadoop/hbase/procedure2/Procedure.java | 21 +-
.../hadoop/hbase/procedure2/ProcedureExecutor.java | 50 +-
.../procedure2/RemoteProcedureDispatcher.java | 10 +-
.../hbase/procedure2/RootProcedureState.java | 4 +-
.../wal/ProcedureWALPerformanceEvaluation.java | 1 +
hbase-protocol-shaded/pom.xml | 42 -
.../src/main/protobuf/Backup.proto | 3 +-
.../src/main/protobuf/client/Client.proto | 18 +
.../src/main/protobuf/server/Quota.proto | 10 +
.../protobuf/server/coprocessor/Aggregate.proto | 3 +
.../protobuf/server/master/MasterProcedure.proto | 41 +
.../server/master/RegionServerStatus.proto | 5 +
.../src/main/protobuf/server/region/Admin.proto | 6 +
hbase-replication/pom.xml | 5 -
.../hadoop/hbase/replication/ReplicationPeers.java | 17 +-
.../hadoop/hbase/replication/ReplicationUtils.java | 21 -
.../ZKReplicationQueueStorageForMigration.java | 46 +-
.../replication/TestReplicationStateBasic.java | 5 +-
.../replication/TestZKReplicationQueueStorage.java | 23 +-
.../src/main/resources/META-INF/LICENSE.vm | 18 +-
.../src/main/resources/META-INF/NOTICE.vm | 14 +-
.../src/main/resources/supplemental-models.xml | 507 +--------
hbase-rest/pom.xml | 76 +-
.../org/apache/hadoop/hbase/rest/Constants.java | 3 +
.../apache/hadoop/hbase/rest/MultiRowResource.java | 20 +-
.../hadoop/hbase/rest/ProtobufMessageHandler.java | 62 +-
.../org/apache/hadoop/hbase/rest/RESTServer.java | 28 +-
.../org/apache/hadoop/hbase/rest/RestUtil.java | 17 +
.../hadoop/hbase/rest/RowResultGenerator.java | 7 +-
.../java/org/apache/hadoop/hbase/rest/RowSpec.java | 7 +
.../hadoop/hbase/rest/ScannerInstanceResource.java | 10 +
.../apache/hadoop/hbase/rest/ScannerResource.java | 3 +-
.../hadoop/hbase/rest/ScannerResultGenerator.java | 18 +-
.../apache/hadoop/hbase/rest/TableResource.java | 12 +-
.../apache/hadoop/hbase/rest/client/Client.java | 44 +-
.../apache/hadoop/hbase/rest/model/CellModel.java | 15 +-
.../hadoop/hbase/rest/model/CellSetModel.java | 17 +-
.../hbase/rest/model/NamespacesInstanceModel.java | 13 +-
.../hadoop/hbase/rest/model/NamespacesModel.java | 13 +-
.../apache/hadoop/hbase/rest/model/RowModel.java | 7 +-
.../hadoop/hbase/rest/model/ScannerModel.java | 224 +++-
.../rest/model/StorageClusterStatusModel.java | 15 +-
.../hadoop/hbase/rest/model/TableInfoModel.java | 15 +-
.../hadoop/hbase/rest/model/TableListModel.java | 14 +-
.../hadoop/hbase/rest/model/TableSchemaModel.java | 16 +-
.../hadoop/hbase/rest/model/VersionModel.java | 59 +-
.../consumer/ProtobufMessageBodyConsumer.java | 16 +-
.../producer/ProtobufMessageBodyProducer.java | 2 +-
.../src/main/protobuf}/CellMessage.proto | 2 +-
.../src/main/protobuf}/CellSetMessage.proto | 4 +-
.../src/main/protobuf}/ColumnSchemaMessage.proto | 2 +-
.../protobuf}/NamespacePropertiesMessage.proto | 2 +-
.../src/main/protobuf}/NamespacesMessage.proto | 2 +-
.../src/main/protobuf}/ScannerMessage.proto | 4 +-
.../protobuf}/StorageClusterStatusMessage.proto | 2 +-
.../src/main/protobuf}/TableInfoMessage.proto | 2 +-
.../src/main/protobuf}/TableListMessage.proto | 2 +-
.../src/main/protobuf}/TableSchemaMessage.proto | 4 +-
.../src/main/protobuf}/VersionMessage.proto | 4 +-
.../main/resources/hbase-webapps/rest/footer.jsp | 6 +-
.../main/resources/hbase-webapps/rest/header.jsp | 52 +-
.../resources/hbase-webapps/rest/processRest.jsp | 18 +-
.../src/main/resources/hbase-webapps/rest/rest.jsp | 2 +-
.../org/apache/hadoop/hbase/rest/XMLSchema.xsd | 9 +-
.../apache/hadoop/hbase/rest/RowResourceBase.java | 4 +-
.../hadoop/hbase/rest/TestGetAndPutResource.java | 4 +-
.../hadoop/hbase/rest/TestMultiRowResource.java | 15 +-
.../hadoop/hbase/rest/TestScannerResource.java | 157 +++
.../hadoop/hbase/rest/TestScannersWithFilters.java | 40 +-
.../apache/hadoop/hbase/rest/TestTableScan.java | 2 +-
.../hadoop/hbase/rest/TestVersionResource.java | 13 +-
.../hadoop/hbase/rest/client/RemoteAdmin.java | 23 +-
.../hadoop/hbase/rest/client/RemoteHTable.java | 58 +-
.../hadoop/hbase/rest/client/TestRemoteTable.java | 78 ++
.../hadoop/hbase/rest/model/TestScannerModel.java | 57 +
.../hadoop/hbase/rest/model/TestVersionModel.java | 18 +-
hbase-server/pom.xml | 242 ++++-
.../hadoop/hbase/tmpl/common/TaskMonitorTmpl.jamon | 36 +-
.../hbase/tmpl/master/MasterStatusTmpl.jamon | 336 +++---
.../hadoop/hbase/tmpl/master/RSGroupListTmpl.jamon | 24 +-
.../hbase/tmpl/master/RegionServerListTmpl.jamon | 80 +-
.../hbase/tmpl/master/RegionVisualizerTmpl.jamon | 6 +-
.../hbase/tmpl/regionserver/BlockCacheTmpl.jamon | 194 +++-
.../tmpl/regionserver/BlockCacheViewTmpl.jamon | 12 +-
.../hbase/tmpl/regionserver/RSStatusTmpl.jamon | 98 +-
.../hbase/tmpl/regionserver/RegionListTmpl.jamon | 52 +-
.../tmpl/regionserver/ReplicationStatusTmpl.jamon | 12 +-
.../tmpl/regionserver/ServerMetricsTmpl.jamon | 32 +-
.../hadoop/hbase/tmpl/tool/CanaryStatusTmpl.jamon | 22 +-
.../org/apache/hadoop/hbase/HBaseServerBase.java | 4 +-
.../org/apache/hadoop/hbase/MetaTableAccessor.java | 12 +-
.../hadoop/hbase/MockRegionServerServices.java | 2 +
.../apache/hadoop/hbase/backup/HFileArchiver.java | 163 ++-
.../hbase/client/AsyncClusterConnectionImpl.java | 2 +-
.../AsyncRegionReplicationRetryingCaller.java | 4 +-
.../hbase/client/AsyncRegionServerAdmin.java | 11 +-
.../hbase/client/ClusterConnectionFactory.java | 15 +
.../hadoop/hbase/client/TableSnapshotScanner.java | 2 +
.../apache/hadoop/hbase/codec/MessageCodec.java | 6 +-
.../hbase/constraint/ConstraintProcessor.java | 4 +-
.../hadoop/hbase/coprocessor/CoprocessorHost.java | 1 +
.../hadoop/hbase/coprocessor/EndpointObserver.java | 4 +-
.../hadoop/hbase/coprocessor/MetaTableMetrics.java | 13 +-
.../coprocessor/RegionCoprocessorEnvironment.java | 52 +
.../hadoop/hbase/coprocessor/RegionObserver.java | 277 ++---
.../hbase/coprocessor/RegionServerObserver.java | 10 +-
.../hadoop/hbase/coprocessor/RpcCoprocessor.java | 19 +-
.../coprocessor/RpcCoprocessorEnvironment.java | 15 +-
.../hadoop/hbase/coprocessor/RpcObserver.java | 74 ++
.../hadoop/hbase/coprocessor/WALObserver.java | 30 +-
.../hadoop/hbase/executor/ExecutorService.java | 2 +
.../hadoop/hbase/filter/FilterAllFilter.java | 2 +
.../org/apache/hadoop/hbase/fs/HFileSystem.java | 6 +-
.../java/org/apache/hadoop/hbase/io/HFileLink.java | 179 +---
.../hadoop/hbase/io/HalfStoreFileReader.java | 84 +-
.../java/org/apache/hadoop/hbase/io/Reference.java | 36 +-
.../apache/hadoop/hbase/io/hfile/BlockCache.java | 43 +-
.../hadoop/hbase/io/hfile/BlockCacheFactory.java | 39 +-
.../hadoop/hbase/io/hfile/BlockCacheUtil.java | 57 +
.../hadoop/hbase/io/hfile/BlockWithScanInfo.java | 8 +-
.../apache/hadoop/hbase/io/hfile/CacheConfig.java | 18 +-
.../apache/hadoop/hbase/io/hfile/CacheStats.java | 69 +-
.../hadoop/hbase/io/hfile/CombinedBlockCache.java | 24 +-
.../hbase/io/hfile/CompoundBloomFilterWriter.java | 5 +-
.../hadoop/hbase/io/hfile/FixedFileTrailer.java | 24 +-
.../org/apache/hadoop/hbase/io/hfile/HFile.java | 8 +-
.../apache/hadoop/hbase/io/hfile/HFileBlock.java | 92 +-
.../hadoop/hbase/io/hfile/HFileBlockIndex.java | 49 +-
.../hbase/io/hfile/HFileDataBlockEncoder.java | 4 +-
.../hbase/io/hfile/HFileDataBlockEncoderImpl.java | 4 +-
.../hbase/io/hfile/HFileIndexBlockEncoder.java | 7 +-
.../apache/hadoop/hbase/io/hfile/HFileInfo.java | 7 +-
.../hadoop/hbase/io/hfile/HFilePreadReader.java | 29 +-
.../hadoop/hbase/io/hfile/HFilePrettyPrinter.java | 3 +-
.../hadoop/hbase/io/hfile/HFileReaderImpl.java | 106 +-
.../apache/hadoop/hbase/io/hfile/HFileScanner.java | 31 +-
.../hadoop/hbase/io/hfile/HFileWriterImpl.java | 19 +-
.../hbase/io/hfile/NoOpDataBlockEncoder.java | 4 +-
.../hbase/io/hfile/NoOpIndexBlockEncoder.java | 21 +-
.../hadoop/hbase/io/hfile/PrefetchExecutor.java | 26 +-
.../hbase/io/hfile/bucket/BucketAllocator.java | 19 +-
.../hadoop/hbase/io/hfile/bucket/BucketCache.java | 762 +++++++++-----
.../io/hfile/bucket/BucketCachePersister.java | 2 +
.../hbase/io/hfile/bucket/BucketCacheStats.java | 5 +-
.../hbase/io/hfile/bucket/BucketProtoUtils.java | 47 +-
.../hadoop/hbase/io/util/MemorySizeUtil.java | 64 +-
.../org/apache/hadoop/hbase/ipc/CallRunner.java | 6 +-
.../apache/hadoop/hbase/ipc/NettyRpcServer.java | 36 +-
.../apache/hadoop/hbase/ipc/NettyServerCall.java | 4 +-
.../hadoop/hbase/ipc/NettyServerRpcConnection.java | 4 +-
.../hbase/ipc/OptionalSslHandlerWithHostPort.java} | 32 +-
.../java/org/apache/hadoop/hbase/ipc/RpcCall.java | 7 +-
.../hadoop/hbase/ipc/RpcCoprocessorHost.java | 122 +++
.../org/apache/hadoop/hbase/ipc/RpcServer.java | 36 +-
.../hadoop/hbase/ipc/RpcServerInterface.java | 7 +-
.../org/apache/hadoop/hbase/ipc/ServerCall.java | 12 +-
.../hadoop/hbase/ipc/ServerRpcConnection.java | 15 +-
.../apache/hadoop/hbase/ipc/SimpleServerCall.java | 4 +-
.../hbase/ipc/SimpleServerRpcConnection.java | 12 +-
.../org/apache/hadoop/hbase/master/HMaster.java | 93 +-
.../MasterAnnotationReadingPriorityFunction.java | 4 +-
.../hadoop/hbase/master/MasterRpcServices.java | 40 +-
.../apache/hadoop/hbase/master/MasterServices.java | 3 +
.../hbase/master/assignment/AssignmentManager.java | 91 +-
.../master/assignment/CloseRegionProcedure.java | 15 +-
.../assignment/MergeTableRegionsProcedure.java | 54 +-
.../master/assignment/OpenRegionProcedure.java | 5 +-
.../assignment/RegionRemoteProcedureBase.java | 40 +-
.../hbase/master/assignment/RegionStateNode.java | 8 +
.../hbase/master/assignment/RegionStateStore.java | 2 +-
.../assignment/SplitTableRegionProcedure.java | 72 +-
.../assignment/TransitRegionStateProcedure.java | 52 +-
.../hbase/master/http/MasterStatusServlet.java | 5 +-
.../hbase/master/janitor/CatalogJanitor.java | 15 +-
.../AbstractCloseTableRegionsProcedure.java | 147 +++
.../AbstractStateMachineTableProcedure.java | 11 +
.../master/procedure/CloneSnapshotProcedure.java | 8 +-
.../CloseExcessRegionReplicasProcedure.java | 99 ++
.../procedure/CloseTableRegionsProcedure.java | 91 ++
.../master/procedure/DeleteTableProcedure.java | 7 +-
.../master/procedure/DisableTableProcedure.java | 11 +-
.../master/procedure/FlushRegionProcedure.java | 5 +-
.../master/procedure/FlushTableProcedure.java | 26 +
.../hbase/master/procedure/InitMetaProcedure.java | 39 +-
.../hbase/master/procedure/MasterProcedureEnv.java | 4 -
.../master/procedure/MasterProcedureScheduler.java | 206 ++--
.../master/procedure/ModifyTableProcedure.java | 27 +-
.../master/procedure/RSProcedureDispatcher.java | 117 ++-
.../procedure/ReopenTableRegionsProcedure.java | 40 +-
.../master/procedure/ServerCrashProcedure.java | 14 -
.../master/procedure/ServerRemoteProcedure.java | 44 +-
.../hbase/master/procedure/SnapshotProcedure.java | 11 -
.../master/procedure/SnapshotRegionProcedure.java | 8 +-
.../master/procedure/SnapshotVerifyProcedure.java | 52 +-
.../master/procedure/SplitWALRemoteProcedure.java | 28 +-
.../SwitchRpcThrottleRemoteProcedure.java | 28 +-
.../procedure/TableProcedureWaitingQueue.java | 117 +++
.../hadoop/hbase/master/procedure/TableQueue.java | 2 +-
.../hadoop/hbase/master/region/MasterRegion.java | 102 +-
.../ClaimReplicationQueueRemoteProcedure.java | 22 +-
...rateReplicationQueueFromZkToTableProcedure.java | 62 +-
.../master/replication/RefreshPeerProcedure.java | 27 +-
.../master/replication/ReplicationPeerManager.java | 144 ++-
.../SyncReplicationReplayWALRemoteProcedure.java | 24 +-
.../hbase/master/snapshot/SnapshotManager.java | 15 +
.../org/apache/hadoop/hbase/mob/CachedMobFile.java | 5 +-
.../hadoop/hbase/mob/DefaultMobStoreCompactor.java | 11 +-
.../hadoop/hbase/mob/DefaultMobStoreFlusher.java | 10 +-
.../hadoop/hbase/mob/ExpiredMobFileCleaner.java | 8 +-
.../java/org/apache/hadoop/hbase/mob/MobCell.java | 9 +-
.../java/org/apache/hadoop/hbase/mob/MobFile.java | 14 +-
.../org/apache/hadoop/hbase/mob/MobFileCache.java | 11 +-
.../hadoop/hbase/mob/MobFileCleanerChore.java | 2 +-
.../hadoop/hbase/mob/MobFileCleanupUtil.java | 24 +-
.../java/org/apache/hadoop/hbase/mob/MobUtils.java | 30 +-
.../hadoop/hbase/mob/RSMobFileCleanerChore.java | 29 +-
.../hadoop/hbase/namequeues/LogHandlerUtils.java | 14 +-
.../hbase/namespace/NamespaceStateManager.java | 33 +-
.../flush/MasterFlushTableProcedureManager.java | 21 +-
.../store/region/RegionProcedureStore.java | 75 +-
.../store/region/WALProcedurePrettyPrinter.java | 3 +-
.../hbase/protobuf/ReplicationProtobufUtil.java | 35 +-
.../hadoop/hbase/quotas/DefaultOperationQuota.java | 91 +-
.../hadoop/hbase/quotas/ExceedOperationQuota.java | 29 +-
.../hbase/quotas/GlobalQuotaSettingsImpl.java | 51 +
.../hadoop/hbase/quotas/NoopOperationQuota.java | 9 +-
.../hadoop/hbase/quotas/NoopQuotaLimiter.java | 36 +-
.../apache/hadoop/hbase/quotas/OperationQuota.java | 9 +-
.../org/apache/hadoop/hbase/quotas/QuotaCache.java | 138 ++-
.../apache/hadoop/hbase/quotas/QuotaLimiter.java | 75 +-
.../hadoop/hbase/quotas/QuotaObserverChore.java | 3 +-
.../org/apache/hadoop/hbase/quotas/QuotaUtil.java | 24 +
.../hbase/quotas/RegionServerRpcQuotaManager.java | 76 +-
.../hadoop/hbase/quotas/RpcQuotaManager.java | 92 ++
.../hbase/quotas/SnapshotQuotaObserverChore.java | 4 +-
.../hadoop/hbase/quotas/TimeBasedLimiter.java | 129 ++-
.../apache/hadoop/hbase/quotas/UserQuotaState.java | 4 +
.../hbase/regionserver/AbstractMemStore.java | 71 +-
.../hbase/regionserver/BrokenStoreFileCleaner.java | 14 +
.../regionserver/CellArrayImmutableSegment.java | 22 +-
.../hadoop/hbase/regionserver/CellArrayMap.java | 12 +-
.../regionserver/CellChunkImmutableSegment.java | 32 +-
.../hadoop/hbase/regionserver/CellChunkMap.java | 47 +-
.../hadoop/hbase/regionserver/CellFlatMap.java | 137 ++-
.../apache/hadoop/hbase/regionserver/CellSet.java | 56 +-
.../apache/hadoop/hbase/regionserver/CellSink.java | 8 +-
.../hadoop/hbase/regionserver/CompactSplit.java | 15 +-
.../hbase/regionserver/CompactingMemStore.java | 7 +-
.../regionserver/CompositeImmutableSegment.java | 17 +-
.../ConstantSizeRegionSplitPolicy.java | 6 +-
.../regionserver/DateTieredMultiFileWriter.java | 4 +-
.../hadoop/hbase/regionserver/DefaultMemStore.java | 5 +-
.../hbase/regionserver/DefaultStoreEngine.java | 9 +-
.../hadoop/hbase/regionserver/HMobStore.java | 21 +-
.../apache/hadoop/hbase/regionserver/HRegion.java | 327 ++++--
.../hbase/regionserver/HRegionFileSystem.java | 116 +--
.../hadoop/hbase/regionserver/HRegionServer.java | 17 +-
.../apache/hadoop/hbase/regionserver/HStore.java | 76 +-
.../hadoop/hbase/regionserver/HStoreFile.java | 15 +-
.../hbase/regionserver/HeapMemoryManager.java | 20 +-
.../hbase/regionserver/ImmutableMemStoreLAB.java | 8 +-
.../IncreasingToUpperBoundRegionSplitPolicy.java | 6 +-
.../hadoop/hbase/regionserver/InternalScanner.java | 30 +-
.../hadoop/hbase/regionserver/KeyValueHeap.java | 32 +-
.../hadoop/hbase/regionserver/KeyValueScanner.java | 20 +-
.../apache/hadoop/hbase/regionserver/MemStore.java | 7 +-
.../MemStoreCompactorSegmentsIterator.java | 13 +-
.../hadoop/hbase/regionserver/MemStoreLAB.java | 10 +-
.../hadoop/hbase/regionserver/MemStoreLABImpl.java | 27 +-
.../MemStoreMergerSegmentsIterator.java | 4 +-
.../regionserver/MemStoreSegmentsIterator.java | 4 +-
.../MetricsRegionServerWrapperImpl.java | 23 +-
.../hbase/regionserver/MobReferenceOnlyFilter.java | 5 +-
.../hadoop/hbase/regionserver/MobStoreScanner.java | 7 +-
.../hadoop/hbase/regionserver/MutableSegment.java | 21 +-
.../hbase/regionserver/NonLazyKeyValueScanner.java | 9 +-
.../NonReversedNonLazyKeyValueScanner.java | 6 +-
.../hadoop/hbase/regionserver/RSRpcServices.java | 165 ++-
.../hbase/regionserver/RegionCoprocessorHost.java | 51 +-
.../hadoop/hbase/regionserver/RegionScanner.java | 7 +-
.../hbase/regionserver/RegionScannerImpl.java | 52 +-
.../hbase/regionserver/RegionServerServices.java | 20 +-
.../RemoteProcedureResultReporter.java | 5 +-
.../hbase/regionserver/ReplicationSinkService.java | 7 +-
.../hbase/regionserver/ReversedKeyValueHeap.java | 18 +-
.../regionserver/ReversedMobStoreScanner.java | 6 +-
.../hbase/regionserver/ReversedStoreScanner.java | 15 +-
.../apache/hadoop/hbase/regionserver/Segment.java | 30 +-
.../hadoop/hbase/regionserver/SegmentFactory.java | 3 +-
.../hadoop/hbase/regionserver/SegmentScanner.java | 43 +-
.../hbase/regionserver/ServerNonceManager.java | 10 +-
.../hbase/regionserver/SnapshotSegmentScanner.java | 20 +-
.../hadoop/hbase/regionserver/SplitRequest.java | 2 +-
.../hadoop/hbase/regionserver/StoreEngine.java | 75 +-
.../hadoop/hbase/regionserver/StoreFile.java | 6 +-
.../hadoop/hbase/regionserver/StoreFileInfo.java | 74 +-
.../hadoop/hbase/regionserver/StoreFileReader.java | 20 +-
.../hbase/regionserver/StoreFileScanner.java | 90 +-
.../hadoop/hbase/regionserver/StoreFileWriter.java | 41 +-
.../hadoop/hbase/regionserver/StoreFlusher.java | 9 +-
.../hadoop/hbase/regionserver/StoreScanner.java | 100 +-
.../hadoop/hbase/regionserver/StoreUtils.java | 3 +-
.../hbase/regionserver/StripeMultiFileWriter.java | 5 +-
.../hbase/regionserver/TimeRangeTracker.java | 4 +-
.../compactions/CompactionConfiguration.java | 48 +-
.../hbase/regionserver/compactions/Compactor.java | 10 +-
.../regionserver/handler/AssignRegionHandler.java | 17 +-
.../regionserver/handler/CloseRegionHandler.java | 2 +-
.../hbase/regionserver/handler/HandlerUtil.java | 3 +-
.../regionserver/handler/OpenRegionHandler.java | 7 +-
.../regionserver/handler/ParallelSeekHandler.java | 6 +-
.../regionserver/handler/RSProcedureHandler.java | 9 +-
.../handler/RegionReplicaFlushHandler.java | 26 +-
.../handler/UnassignRegionHandler.java | 38 +-
.../hbase/regionserver/http/RSStatusServlet.java | 9 +-
.../regionserver/querymatcher/ColumnTracker.java | 23 +-
.../querymatcher/CompactionScanQueryMatcher.java | 8 +-
.../regionserver/querymatcher/DeleteTracker.java | 6 +-
.../DropDeletesCompactionScanQueryMatcher.java | 4 +-
.../querymatcher/ExplicitColumnTracker.java | 10 +-
.../IncludeAllCompactionQueryMatcher.java | 4 +-
.../MajorCompactionScanQueryMatcher.java | 4 +-
.../MinorCompactionScanQueryMatcher.java | 4 +-
.../querymatcher/NewVersionBehaviorTracker.java | 18 +-
.../querymatcher/NormalUserScanQueryMatcher.java | 4 +-
.../querymatcher/RawScanQueryMatcher.java | 4 +-
.../querymatcher/ScanDeleteTracker.java | 8 +-
.../querymatcher/ScanQueryMatcher.java | 35 +-
.../querymatcher/ScanWildcardColumnTracker.java | 12 +-
.../StripeCompactionScanQueryMatcher.java | 4 +-
.../querymatcher/UserScanQueryMatcher.java | 24 +-
.../regionreplication/RegionReplicationSink.java | 12 +-
.../storefiletracker/DefaultStoreFileTracker.java | 50 +-
.../FileBasedStoreFileTracker.java | 19 +-
.../storefiletracker/StoreFileListFile.java | 6 +-
.../storefiletracker/StoreFileTracker.java | 52 +
.../storefiletracker/StoreFileTrackerBase.java | 182 ++++
.../storefiletracker/StoreFileTrackerFactory.java | 8 +-
.../throttle/StoreHotnessProtector.java | 9 +-
.../hbase/regionserver/wal/AbstractFSWAL.java | 30 +-
.../hadoop/hbase/regionserver/wal/AsyncFSWAL.java | 3 -
.../regionserver/wal/AsyncProtobufLogWriter.java | 8 +-
.../hbase/regionserver/wal/CompressionContext.java | 3 +
.../hadoop/hbase/regionserver/wal/FSWALEntry.java | 7 +-
.../hadoop/hbase/regionserver/wal/MetricsWAL.java | 4 +-
.../hbase/regionserver/wal/ProtobufLogWriter.java | 3 +-
.../regionserver/wal/ProtobufWALTailingReader.java | 5 +-
.../hbase/regionserver/wal/SecureWALCellCodec.java | 6 +-
.../regionserver/wal/SequenceIdAccounting.java | 12 +-
.../hbase/regionserver/wal/WALCellCodec.java | 11 +-
.../hbase/replication/BulkLoadCellFilter.java | 4 +-
.../replication/HBaseReplicationEndpoint.java | 16 +-
.../NamespaceTableCfWALEntryFilter.java | 6 +-
.../replication/ReplicationSinkServiceImpl.java | 4 +-
.../hbase/replication/ScopeWALEntryFilter.java | 5 +-
.../replication/regionserver/MetricsSource.java | 2 +-
.../regionserver/RecoveredReplicationSource.java | 3 +
.../ReplaySyncReplicationWALCallable.java | 7 +-
.../regionserver/ReplicationObserver.java | 2 +-
.../replication/regionserver/ReplicationSink.java | 32 +-
.../regionserver/ReplicationSourceWALReader.java | 6 +-
.../replication/regionserver/WALEntryStream.java | 19 +-
.../hadoop/hbase/security/HBaseSaslRpcServer.java | 6 +
.../hbase/security/access/AccessControlFilter.java | 3 +-
.../hbase/security/access/AccessController.java | 108 +-
.../hadoop/hbase/security/access/AuthManager.java | 26 +-
.../hbase/security/access/PermissionStorage.java | 3 +-
.../hadoop/hbase/security/token/TokenUtil.java | 22 +-
.../DefaultVisibilityLabelServiceImpl.java | 4 +-
.../security/visibility/VisibilityController.java | 69 +-
.../VisibilityNewVersionBehaivorTracker.java | 12 +-
.../visibility/VisibilityReplicationEndpoint.java | 17 +-
.../visibility/VisibilityScanDeleteTracker.java | 10 +-
.../hbase/security/visibility/VisibilityUtils.java | 9 +-
.../hbase/snapshot/RestoreSnapshotHelper.java | 79 +-
.../apache/hadoop/hbase/snapshot/SnapshotInfo.java | 12 +-
.../hadoop/hbase/snapshot/SnapshotManifest.java | 20 +-
.../hadoop/hbase/snapshot/SnapshotManifestV1.java | 43 +-
.../hbase/snapshot/SnapshotRegionLocator.java | 204 ++++
.../hadoop/hbase/tool/BulkLoadHFilesTool.java | 3 +-
.../org/apache/hadoop/hbase/tool/CanaryTool.java | 75 +-
.../hadoop/hbase/tool/WriteSinkCoprocessor.java | 5 +-
.../org/apache/hadoop/hbase/util/BloomContext.java | 7 +-
.../hadoop/hbase/util/CollectionBackedScanner.java | 32 +-
.../apache/hadoop/hbase/util/CompressionTest.java | 3 +-
.../java/org/apache/hadoop/hbase/util/FSUtils.java | 58 +-
.../org/apache/hadoop/hbase/util/HBaseFsck.java | 5 +-
.../hadoop/hbase/util/LoadTestKVGenerator.java | 1 +
.../org/apache/hadoop/hbase/util/MoveWithAck.java | 2 +-
.../apache/hadoop/hbase/util/RegionSplitter.java | 6 +-
.../apache/hadoop/hbase/util/RowBloomContext.java | 4 +-
.../hadoop/hbase/util/RowColBloomContext.java | 6 +-
.../util/RowPrefixFixedLengthBloomContext.java | 6 +-
.../hadoop/hbase/util/ServerRegionReplicaUtil.java | 9 +-
.../hadoop/hbase/util/TableDescriptorChecker.java | 10 +
.../util/compaction/MajorCompactionRequest.java | 15 +-
.../hbase/util/compaction/MajorCompactor.java | 2 +-
.../wal/AbstractRecoveredEditsOutputSink.java | 68 +-
.../hbase/wal/BoundedRecoveredEditsOutputSink.java | 2 +-
.../wal/BoundedRecoveredHFilesOutputSink.java | 12 +-
.../hadoop/hbase/wal/DisabledWALProvider.java | 5 -
.../org/apache/hadoop/hbase/wal/OutputSink.java | 28 +-
.../hadoop/hbase/wal/RecoveredEditsOutputSink.java | 28 +-
.../main/java/org/apache/hadoop/hbase/wal/WAL.java | 10 -
.../java/org/apache/hadoop/hbase/wal/WALEdit.java | 68 +-
.../hadoop/hbase/wal/WALEditInternalHelper.java | 56 +
.../org/apache/hadoop/hbase/wal/WALFactory.java | 2 +-
.../apache/hadoop/hbase/wal/WALPrettyPrinter.java | 10 +-
.../org/apache/hadoop/hbase/wal/WALSplitUtil.java | 13 +-
.../org/apache/hadoop/hbase/wal/WALSplitter.java | 1 +
.../main/resources/hbase-webapps/master/footer.jsp | 10 +-
.../main/resources/hbase-webapps/master/header.jsp | 91 +-
.../hbase-webapps/master/operationDetails.jsp | 17 +-
.../resources/hbase-webapps/master/procedures.jsp | 37 +-
.../hbase-webapps/master/processMaster.jsp | 16 +-
.../main/resources/hbase-webapps/master/quotas.jsp | 14 +-
.../main/resources/hbase-webapps/master/rits.jsp | 4 +-
.../resources/hbase-webapps/master/rsgroup.jsp | 38 +-
.../resources/hbase-webapps/master/scripts.jsp | 8 +-
.../resources/hbase-webapps/master/snapshot.jsp | 13 +-
.../hbase-webapps/master/snapshotsStats.jsp | 25 +-
.../hbase-webapps/master/startupProgress.jsp | 1 +
.../main/resources/hbase-webapps/master/table.jsp | 1087 ++++++++++----------
.../hbase-webapps/master/tablesDetailed.jsp | 2 -
.../hbase-webapps/master/userSnapshots.jsp | 5 +
.../hbase-webapps/regionserver/footer.jsp | 6 +-
.../hbase-webapps/regionserver/header.jsp | 77 +-
.../hbase-webapps/regionserver/processRS.jsp | 24 +-
.../hbase-webapps/regionserver/region.jsp | 56 +-
.../regionserver/rsOperationDetails.jsp | 24 +-
.../hbase-webapps/regionserver/storeFile.jsp | 2 +-
.../static/css/bootstrap-theme.min.css | 6 -
.../hbase-webapps/static/css/bootstrap.min.css | 6 -
.../resources/hbase-webapps/static/css/hbase.css | 81 +-
.../resources/hbase-webapps/static}/favicon.ico | Bin
.../static/fonts/glyphicons-halflings-regular.eot | Bin 20127 -> 0 bytes
.../static/fonts/glyphicons-halflings-regular.svg | 288 ------
.../static/fonts/glyphicons-halflings-regular.ttf | Bin 45404 -> 0 bytes
.../static/fonts/glyphicons-halflings-regular.woff | Bin 23424 -> 0 bytes
.../fonts/glyphicons-halflings-regular.woff2 | Bin 18028 -> 0 bytes
.../hbase-webapps/static/js/bootstrap.min.js | 6 -
.../resources/hbase-webapps/static/js/jqSpager.js | 20 +-
.../hbase-webapps/static/js/jquery.min.js | 2 -
.../static/js/jquery.tablesorter.min.js | 4 -
.../static/js/parser-date-iso8601.min.js | 4 -
.../main/resources/hbase-webapps/static/js/tab.js | 18 +-
.../static/js/vega-embed@6.21.3.min.js | 7 -
.../hbase-webapps/static/js/vega-lite@5.6.1.min.js | 2 -
.../hbase-webapps/static/js/vega@5.24.0.min.js | 2 -
.../apache/hadoop/hbase/HBaseClusterInterface.java | 14 +
.../org/apache/hadoop/hbase/HBaseTestingUtil.java | 160 +--
.../hadoop/hbase/SingleProcessHBaseCluster.java | 10 +
.../org/apache/hadoop/hbase/TestCacheEviction.java | 216 ++++
.../TestCustomPriorityRpcControllerFactory.java | 4 +-
.../org/apache/hadoop/hbase/TestSerialization.java | 7 +-
.../hadoop/hbase/TestSplitMergeQuotaTable.java | 142 +++
.../apache/hadoop/hbase/TestTagRewriteCell.java | 6 +-
.../hadoop/hbase/backup/TestHFileArchiving.java | 12 +-
.../AbstractTestAsyncTableRegionReplicasRead.java | 6 +-
.../hbase/client/AbstractTestAsyncTableScan.java | 8 +-
.../hadoop/hbase/client/AbstractTestCITimeout.java | 26 +-
...shotFromClientAfterSplittingRegionTestBase.java | 35 +-
.../client/CloneSnapshotFromClientTestBase.java | 1 +
.../hadoop/hbase/client/DummyAsyncTable.java | 7 +
.../hadoop/hbase/client/SleepAtFirstRpcCall.java | 6 +-
.../hbase/client/SnapshotWithAclTestBase.java | 50 +-
.../org/apache/hadoop/hbase/client/TestAdmin4.java | 2 +-
.../client/TestAllowPartialScanResultCache.java | 6 +-
.../client/TestAsyncAdminClearMasterStubCache.java | 88 ++
.../hbase/client/TestAsyncBufferMutator.java | 24 +-
...stAsyncNonMetaRegionLocatorConcurrenyLimit.java | 4 +-
.../hbase/client/TestAsyncRegionLocator.java | 2 +-
.../hbase/client/TestAsyncReplicationAdminApi.java | 4 +-
.../TestAsyncReplicationAdminApiWithClusters.java | 2 +-
.../hadoop/hbase/client/TestAsyncTableBatch.java | 2 +-
.../hbase/client/TestAsyncTableNoncedRetry.java | 2 +-
.../hbase/client/TestAsyncTableQueryMetrics.java | 239 +++++
.../hbase/client/TestAsyncTableScanException.java | 2 +-
.../client/TestAsyncTableUseMetaReplicas.java | 2 +-
.../TestAvoidCellReferencesIntoShippedBlocks.java | 11 +-
.../hbase/client/TestBatchScanResultCache.java | 14 +-
.../hbase/client/TestBlockEvictionFromClient.java | 21 +-
.../hadoop/hbase/client/TestBufferedMutator.java | 71 +-
...estCatalogReplicaLoadBalanceSimpleSelector.java | 4 +-
.../hbase/client/TestClientOperationInterrupt.java | 4 +-
.../hbase/client/TestConnectionAttributes.java | 123 +++
.../hbase/client/TestDropTimeoutRequest.java | 4 +-
.../hadoop/hbase/client/TestFlushFromClient.java | 36 +-
...tFlushFromClientWithDisabledFlushProcedure.java | 121 +++
.../hadoop/hbase/client/TestFromClientSide.java | 5 +-
.../hadoop/hbase/client/TestFromClientSide3.java | 9 +-
.../client/TestFromClientSideScanExcpetion.java | 4 +-
.../hbase/client/TestIncrementsFromClientSide.java | 5 +-
.../hbase/client/TestMalformedCellFromClient.java | 9 +-
.../hbase/client/TestMetaReplicaAssignment.java | 100 ++
...oneSnapshotFromClientCloneLinksAfterDelete.java | 2 +-
.../hadoop/hbase/client/TestMultiParallel.java | 4 +-
.../hbase/client/TestReplicaWithCluster.java | 18 +-
.../hadoop/hbase/client/TestReplicasClient.java | 10 +-
.../client/TestRequestAndConnectionAttributes.java | 323 ------
.../hadoop/hbase/client/TestRequestAttributes.java | 367 +++++++
.../org/apache/hadoop/hbase/client/TestResult.java | 27 +-
.../hbase/client/TestResultFromCoprocessor.java | 4 +-
.../hbase/client/TestServerBusyException.java | 16 +-
.../hadoop/hbase/client/TestSnapshotWithAcl.java | 5 +-
.../client/TestSnapshotWithAclAsyncAdmin.java | 5 +-
.../hbase/client/TestSplitOrMergeAtTableLevel.java | 10 +-
.../hbase/client/TestTableOperationException.java | 28 +-
.../hbase/client/TestTableSnapshotScanner.java | 18 +-
.../hadoop/hbase/client/TestTimestampsFilter.java | 2 +-
.../TestReplicationAdminForSyncReplication.java | 2 +-
.../hadoop/hbase/codec/CodecPerformance.java | 28 +-
.../hadoop/hbase/codec/TestCellMessageCodec.java | 12 +-
.../hbase/coprocessor/SimpleRegionObserver.java | 219 ++--
.../hbase/coprocessor/TestAppendTimeRange.java | 2 +-
.../coprocessor/TestCoprocessorInterface.java | 40 +-
.../hbase/coprocessor/TestCoprocessorMetrics.java | 2 +-
.../TestIncrementAndAppendWithNullResult.java | 13 +-
.../hbase/coprocessor/TestIncrementTimeRange.java | 2 +-
.../hbase/coprocessor/TestMasterObserver.java | 189 ----
...estNegativeMemStoreSizeWithSlowCoprocessor.java | 4 +-
.../coprocessor/TestOpenTableInCoprocessor.java | 8 +-
.../TestPassCustomCellViaRegionObserver.java | 406 --------
.../TestPostIncrementAndAppendBeforeWAL.java | 25 +-
.../TestRegionCoprocessorQuotaUsage.java | 122 +++
.../coprocessor/TestRegionObserverBypass.java | 4 +-
...ObserverForAddingMutationsFromCoprocessors.java | 10 +-
.../coprocessor/TestRegionObserverInterface.java | 15 +-
.../TestRegionObserverPreFlushAndPreCompact.java | 8 +-
.../TestRegionObserverScannerOpenHook.java | 16 +-
.../coprocessor/TestRegionObserverStacking.java | 12 +-
...tRegionServerCoprocessorExceptionWithAbort.java | 4 +-
...RegionServerCoprocessorExceptionWithRemove.java | 4 +-
.../hbase/coprocessor/TestRpcCoprocessor.java | 109 ++
.../hadoop/hbase/coprocessor/TestWALObserver.java | 4 +-
.../apache/hadoop/hbase/filter/TestFilterList.java | 25 +-
.../hadoop/hbase/filter/TestFuzzyRowFilter.java | 182 ++--
.../hbase/filter/TestFuzzyRowFilterEndToEnd.java | 64 ++
.../hadoop/hbase/filter/TestPrefixFilter.java | 184 +++-
.../hadoop/hbase/http/TestInfoServersACL.java | 2 +-
.../hadoop/hbase/io/TestHalfStoreFileReader.java | 102 +-
.../hadoop/hbase/io/compress/HFileTestBase.java | 4 +-
.../io/encoding/TestBufferedDataBlockEncoder.java | 8 +-
.../hbase/io/encoding/TestDataBlockEncoders.java | 17 +-
.../io/encoding/TestSeekToBlockWithEncoders.java | 8 +-
.../hadoop/hbase/io/hfile/CacheTestUtils.java | 57 +-
.../hfile/TestBlockEvictionOnRegionMovement.java | 10 +-
.../hadoop/hbase/io/hfile/TestCacheConfig.java | 8 +
.../hadoop/hbase/io/hfile/TestCacheStats.java | 78 ++
.../hbase/io/hfile/TestFixedFileTrailer.java | 12 +-
.../apache/hadoop/hbase/io/hfile/TestHFile.java | 27 +-
.../io/hfile/TestHFileBlockHeaderCorruption.java | 150 ++-
.../hadoop/hbase/io/hfile/TestHFileBlockIndex.java | 102 +-
.../hbase/io/hfile/TestHFileDataBlockEncoder.java | 10 +-
.../hadoop/hbase/io/hfile/TestHFileEncryption.java | 8 +-
.../hfile/TestHFileScannerImplReferenceCount.java | 6 +-
.../hbase/io/hfile/TestLruAdaptiveBlockCache.java | 2 +
.../hadoop/hbase/io/hfile/TestLruBlockCache.java | 2 +
.../apache/hadoop/hbase/io/hfile/TestPrefetch.java | 80 +-
.../hadoop/hbase/io/hfile/TestPrefetchRSClose.java | 15 +-
.../hbase/io/hfile/TestRowIndexV1RoundTrip.java | 144 +++
.../hbase/io/hfile/TestScannerFromBucketCache.java | 22 +-
.../io/hfile/TestSeekBeforeWithInlineBlocks.java | 15 +-
.../apache/hadoop/hbase/io/hfile/TestSeekTo.java | 3 +-
.../hbase/io/hfile/TestTinyLfuBlockCache.java | 2 +
.../hbase/io/hfile/bucket/TestBucketCache.java | 313 +++++-
.../io/hfile/bucket/TestBucketCachePersister.java | 6 +
.../io/hfile/bucket/TestBucketWriterThread.java | 5 +-
.../io/hfile/bucket/TestPrefetchPersistence.java | 2 +
.../{ => bucket}/TestPrefetchWithBucketCache.java | 211 +++-
.../hadoop/hbase/io/hfile/bucket/TestRAMCache.java | 2 +-
.../bucket/TestRecoveryPersistentBucketCache.java | 131 ++-
.../io/hfile/bucket/TestVerifyBucketCacheFile.java | 479 +++++----
.../apache/hadoop/hbase/ipc/AbstractTestIPC.java | 14 +-
.../hbase/ipc/TestNettyChannelWritability.java | 11 +-
.../hbase/ipc/TestProtobufRpcServiceImpl.java | 12 +-
.../hadoop/hbase/master/AbstractTestDLS.java | 3 +-
.../hbase/master/MockNoopMasterServices.java | 8 +
.../hadoop/hbase/master/MockRegionServer.java | 9 +-
.../apache/hadoop/hbase/master/TestDeadServer.java | 4 +-
.../master/TestMasterAbortAndRSGotKilled.java | 4 +-
.../TestMasterHandlerFullWhenTransitRegion.java | 3 +-
.../hadoop/hbase/master/TestMasterQosFunction.java | 32 +-
.../hbase/master/TestMasterRegionMutation1.java | 224 ++++
.../hbase/master/TestMasterRegionMutation2.java | 110 ++
.../hadoop/hbase/master/TestRecreateCluster.java | 228 ++++
...ionServerHostingReplicaSlowOpenCoprocessor.java | 59 ++
.../assignment/TestAssignmentManagerBase.java | 1 +
.../assignment/TestExceptionInAssignRegion.java | 2 +-
.../TestExceptionInUnassignedRegion.java | 3 +-
.../assignment/TestMergeTableRegionsProcedure.java | 29 +
...TestReduceExcessRegionReplicasBlockedByRIT.java | 107 ++
.../assignment/TestSplitTableRegionProcedure.java | 83 +-
.../TestTRSPPersistUninitializedSubProc.java | 125 +++
.../balancer/BalancerConditionalsTestUtil.java | 221 ++++
.../LoadOnlyFavoredStochasticBalancer.java | 12 +-
.../balancer/TestCacheAwareLoadBalancer.java | 154 +++
.../TestMetaTableIsolationBalancerConditional.java | 181 ++++
...TestReplicaDistributionBalancerConditional.java | 120 +++
.../hbase/master/cleaner/TestHFileLinkCleaner.java | 20 +-
.../cleaner/TestReplicationHFileCleaner.java | 4 +-
.../hbase/master/janitor/TestCatalogJanitor.java | 47 +-
.../normalizer/TestSimpleRegionNormalizer.java | 4 +-
...terProcedureSchedulerPerformanceEvaluation.java | 1 +
.../procedure/TestMasterProcedureScheduler.java | 42 +-
.../TestMasterProcedureSchedulerConcurrency.java | 5 +-
.../master/procedure/TestProcedurePriority.java | 6 +-
.../master/procedure/TestProcedureWaitAndWake.java | 169 +++
.../TestRaceBetweenSCPAndDTP.java | 114 +-
...estReopenTableRegionsProcedureBatchBackoff.java | 19 +-
.../TestReopenTableRegionsProcedureBatching.java | 36 +
.../procedure/TestServerRemoteProcedure.java | 9 +-
.../TestTableProcedureWaitingQueueCleanup.java | 184 ++++
.../procedure/TestTruncateRegionProcedure.java | 3 -
.../hbase/master/region/MasterRegionTestBase.java | 4 +-
.../master/region/TestMasterRegionRpcTimeout.java | 57 +-
.../TestMasterRegionWALSyncTimeoutIOException.java | 121 +++
.../replication/TestDisablePeerModification.java | 2 +-
.../replication/TestMigrateReplicationQueue.java | 43 +-
.../TestSyncReplicationReplayWALManager.java | 2 +-
.../hbase/master/snapshot/TestSnapshotManager.java | 16 +-
.../hbase/master/snapshot/TestSnapshotStats.java | 126 +++
.../hadoop/hbase/mob/FaultyMobStoreCompactor.java | 9 +-
.../apache/hadoop/hbase/mob/TestCachedMobFile.java | 23 +-
.../hbase/mob/TestExpiredMobFileCleaner.java | 7 +
.../hbase/mob/TestMobCompactionWithException.java | 5 +-
.../org/apache/hadoop/hbase/mob/TestMobFile.java | 11 +-
.../apache/hadoop/hbase/mob/TestMobFileCache.java | 45 +-
.../hadoop/hbase/mob/TestMobStoreCompaction.java | 23 +-
.../hbase/mob/TestRSMobFileCleanerChore.java | 73 +-
.../hbase/namequeues/TestNamedQueueRecorder.java | 60 +-
.../hadoop/hbase/namequeues/TestRpcLogDetails.java | 6 +-
.../hbase/namespace/TestNamespaceAuditor.java | 2 +-
.../store/region/TestRegionProcedureStore.java | 6 +-
.../hbase/protobuf/TestReplicationProtobuf.java | 10 +-
.../hbase/quotas/SpaceQuotaHelperForTests.java | 18 +-
.../hadoop/hbase/quotas/TestAtomicReadQuota.java | 152 ++-
...faultQuota.java => TestDefaultAtomicQuota.java} | 68 +-
...uota.java => TestDefaultHandlerUsageQuota.java} | 51 +-
.../hbase/quotas/TestDefaultOperationQuota.java | 173 ++++
.../hadoop/hbase/quotas/TestDefaultQuota.java | 1 -
.../quotas/TestFileSystemUtilizationChore.java | 2 +-
.../hbase/quotas/TestMasterQuotasObserver.java | 26 +-
.../hbase/quotas/TestNoopOperationQuota.java} | 49 +-
.../apache/hadoop/hbase/quotas/TestQuotaAdmin.java | 51 +-
.../apache/hadoop/hbase/quotas/TestQuotaCache.java | 4 +-
.../apache/hadoop/hbase/quotas/TestQuotaState.java | 8 +-
.../hadoop/hbase/quotas/TestQuotaThrottle.java | 38 +
.../hadoop/hbase/quotas/TestQuotaUserOverride.java | 15 +-
.../hbase/quotas/TestSpaceQuotasWithSnapshots.java | 4 +-
...Quota.java => TestThreadHandlerUsageQuota.java} | 89 +-
.../hadoop/hbase/quotas/ThrottleQuotaTestUtil.java | 20 +-
.../AbstractTestDateTieredCompactionPolicy.java | 7 +-
.../hbase/regionserver/DataBlockEncodingTool.java | 13 +-
.../regionserver/DelegatingInternalScanner.java | 5 +-
.../regionserver/DelegatingKeyValueScanner.java | 19 +-
.../regionserver/EncodedSeekPerformanceTest.java | 32 +-
.../hbase/regionserver/KeyValueScanFixture.java | 4 +-
.../MetricsRegionServerWrapperStub.java | 5 +
.../hadoop/hbase/regionserver/MockHStoreFile.java | 34 +-
.../hbase/regionserver/NoOpScanPolicyObserver.java | 8 +-
.../hbase/regionserver/TestBlocksScanned.java | 4 +-
.../regionserver/TestBrokenStoreFileCleaner.java | 48 +-
.../hadoop/hbase/regionserver/TestBulkLoad.java | 22 +-
.../regionserver/TestBulkLoadReplication.java | 16 +-
.../TestBulkLoadReplicationHFileRefs.java | 12 +-
.../regionserver/TestCacheOnWriteInSchema.java | 3 +-
.../hadoop/hbase/regionserver/TestCellFlatSet.java | 100 +-
.../hbase/regionserver/TestCellSkipListSet.java | 11 +-
.../hbase/regionserver/TestCompactSplitThread.java | 32 +-
.../hbase/regionserver/TestCompactingMemStore.java | 5 +-
.../hadoop/hbase/regionserver/TestCompaction.java | 75 +-
.../TestCompactionArchiveIOException.java | 6 +-
.../TestCompactionLifeCycleTracker.java | 15 +-
.../hbase/regionserver/TestCompactionPolicy.java | 7 +-
.../TestCompactionWithShippingCoprocessor.java | 9 +-
.../regionserver/TestCompoundBloomFilter.java | 3 +-
.../hbase/regionserver/TestDataTieringManager.java | 29 +-
.../hbase/regionserver/TestDefaultMemStore.java | 5 +-
.../regionserver/TestDirectStoreSplitsMerges.java | 45 +-
.../hbase/regionserver/TestEncryptionDisabled.java | 4 +-
.../regionserver/TestEncryptionKeyRotation.java | 4 +-
.../regionserver/TestEncryptionRandomKeying.java | 4 +-
.../hbase/regionserver/TestFSErrorsExposed.java | 10 +-
.../regionserver/TestFlushLifeCycleTracker.java | 10 +-
.../hadoop/hbase/regionserver/TestHMobStore.java | 21 +-
.../hadoop/hbase/regionserver/TestHRegion.java | 47 +-
.../hbase/regionserver/TestHRegionFileSystem.java | 16 +-
.../regionserver/TestHRegionReplayEvents.java | 6 +-
.../regionserver/TestHRegionServerBulkLoad.java | 9 +-
.../hadoop/hbase/regionserver/TestHStore.java | 255 +++--
.../hadoop/hbase/regionserver/TestHStoreFile.java | 193 ++--
.../hadoop/hbase/regionserver/TestKeepDeletes.java | 3 +-
.../hbase/regionserver/TestKeyValueHeap.java | 33 +-
.../hadoop/hbase/regionserver/TestMemStoreLAB.java | 3 +-
.../regionserver/TestMemStoreSegmentsIterator.java | 6 +-
.../regionserver/TestMemstoreLABWithoutPool.java | 4 +-
.../regionserver/TestMergesSplitsAddToTracker.java | 35 +-
.../TestMetricsRegionServerAggregate.java | 38 +
.../hbase/regionserver/TestMultiColumnScanner.java | 7 +-
.../regionserver/TestPerColumnFamilyFlush.java | 18 +-
.../TestRecoveredEditsReplayAndAbort.java | 4 +-
.../hbase/regionserver/TestRegionInterrupt.java | 14 +-
.../TestRegionMergeTransactionOnCluster.java | 14 +-
.../TestRegionReplicasWithModifyTable.java | 2 +-
.../hbase/regionserver/TestRegionServerAbort.java | 4 +-
.../regionserver/TestRegionServerAbortTimeout.java | 4 +-
.../TestRegionServerReadRequestMetrics.java | 2 +-
.../TestRegionServerRejectDuringAbort.java | 4 +-
.../hbase/regionserver/TestRegionSplitPolicy.java | 40 +
.../hbase/regionserver/TestReplicateToReplica.java | 4 +-
.../hbase/regionserver/TestReversibleScanners.java | 25 +-
.../regionserver/TestRowPrefixBloomFilter.java | 6 +-
.../regionserver/TestScannerHeartbeatMessages.java | 13 +-
.../hbase/regionserver/TestScannerLeaseCount.java | 216 ++++
.../regionserver/TestScannerRetriableFailure.java | 2 +-
.../regionserver/TestScannerWithBulkload.java | 2 +-
.../regionserver/TestScannerWithCorruptHFile.java | 2 +-
.../regionserver/TestSecureBulkLoadManager.java | 3 +-
.../TestSettingTimeoutOnBlockingPoint.java | 5 +-
.../TestSplitTransactionOnCluster.java | 13 +-
.../hbase/regionserver/TestStoreFileInfo.java | 35 +-
.../regionserver/TestStoreFileRefresherChore.java | 32 +-
.../TestStoreFileScannerWithTagCompression.java | 6 +-
.../hbase/regionserver/TestStoreScanner.java | 21 +-
.../regionserver/TestStoreScannerClosure.java | 10 +-
.../hbase/regionserver/TestStripeStoreEngine.java | 2 +-
.../regionserver/TestStripeStoreFileManager.java | 5 +-
.../apache/hadoop/hbase/regionserver/TestTags.java | 42 +-
.../TestWalAndCompactingMemStoreFlush.java | 45 +-
.../compactions/MockStoreFileGenerator.java | 4 +-
.../regionserver/compactions/TestCompactor.java | 9 +-
.../compactions/TestStripeCompactionPolicy.java | 5 +-
.../querymatcher/TestUserScanQueryMatcher.java | 7 +-
.../TestRegionReplicationForWriteException.java | 2 +-
.../TestRegionReplicationSink.java | 68 ++
...StartupWithLegacyRegionReplicationEndpoint.java | 6 +-
.../FailingStoreFileTrackerForTest.java} | 42 +-
.../storefiletracker/StoreFileTrackerForTest.java | 7 +
.../storefiletracker/TestStoreFileListFile.java | 17 +
.../hbase/regionserver/wal/AbstractTestFSWAL.java | 23 +-
.../regionserver/wal/AbstractTestWALReplay.java | 13 +-
.../regionserver/wal/ProtobufLogTestHelper.java | 4 +-
.../hbase/regionserver/wal/TestAsyncFSWAL.java | 4 +-
.../regionserver/wal/TestAsyncFSWALRollStuck.java | 12 +-
.../hadoop/hbase/regionserver/wal/TestFSHLog.java | 2 +-
.../hbase/regionserver/wal/TestFSWALEntry.java | 4 +-
.../hbase/regionserver/wal/TestLogRollAbort.java | 4 +-
.../hbase/regionserver/wal/TestLogRolling.java | 2 +-
.../regionserver/wal/TestLogRollingNoCluster.java | 4 +-
.../regionserver/wal/TestSecureAsyncWALReplay.java | 4 +-
.../regionserver/wal/TestSecureWALReplay.java | 4 +-
.../regionserver/wal/TestSequenceIdAccounting.java | 9 +-
.../regionserver/wal/TestWALActionsListener.java | 3 +-
.../hbase/replication/SyncReplicationTestBase.java | 4 +-
.../replication/TestHBaseReplicationEndpoint.java | 26 +-
.../hbase/replication/TestMasterReplication.java | 14 +-
.../TestMigrateRepliationPeerStorageOnline.java | 2 +-
.../replication/TestMultiSlaveReplication.java | 4 +-
...TestNamespaceReplicationWithBulkLoadedData.java | 4 +-
.../replication/TestPerTableCFReplication.java | 4 +-
.../hbase/replication/TestReplicationBase.java | 7 +-
.../TestReplicationDisableInactivePeer.java | 8 +
...ReplicationEditsDroppedWithDeletedTableCFs.java | 2 +-
...estReplicationEditsDroppedWithDroppedTable.java | 2 +-
.../TestReplicationEmptyWALRecovery.java | 3 +-
.../hbase/replication/TestReplicationEndpoint.java | 3 +-
.../replication/TestReplicationSmallTests.java | 6 +-
.../TestReplicationStatusAfterLagging.java | 8 +
.../TestReplicationStuckWithDeletedTableCFs.java | 2 +-
.../TestReplicationStuckWithDroppedTable.java | 2 +-
.../replication/TestReplicationSyncUpToolBase.java | 6 +-
.../TestReplicationWALEntryFilters.java | 3 +-
.../hbase/replication/TestReplicationWithTags.java | 13 +-
.../TestReplicationWithWALExtendedAttributes.java | 12 +-
.../TestSyncReplicationStandbyKillRS.java | 3 +-
.../master/TestRecoverStandbyProcedure.java | 4 +-
.../regionserver/TestBasicWALEntryStream.java | 57 +-
.../TestGlobalReplicationThrottler.java | 61 +-
...InterClusterReplicationEndpointFilterEdits.java | 19 +-
.../regionserver/TestReplicationMarker.java | 2 +-
.../regionserver/TestReplicationSink.java | 68 +-
.../regionserver/TestReplicationSource.java | 16 +-
.../regionserver/TestReplicationSourceManager.java | 13 +-
.../replication/regionserver/TestReplicator.java | 4 +-
.../regionserver/TestWALEntrySinkFilter.java | 18 +-
.../TestWALEntryStreamCompressionReset.java | 24 +-
.../regionserver/WALEntryStreamTestBase.java | 6 +-
.../TestMutualTlsClientSideNonLocalhost.java | 178 ++++
.../hbase/security/TestNettyTLSIPCFileWatcher.java | 50 +-
.../security/access/TestZKPermissionWatcher.java | 91 +-
.../security/token/TestFsDelegationToken.java | 2 +-
.../ExpAsStringVisibilityLabelServiceImpl.java | 5 +-
...tVisibilityLabelReplicationWithExpAsString.java | 2 +-
.../TestVisibilityLabelsReplication.java | 20 +-
.../hbase/snapshot/TestRestoreSnapshotHelper.java | 152 +++
.../hbase/snapshot/TestSnapshotStoreFileSize.java | 9 +-
.../hadoop/hbase/tool/TestBulkLoadHFiles.java | 8 -
.../apache/hadoop/hbase/tool/TestCanaryTool.java | 48 +
.../apache/hadoop/hbase/util/HFileTestUtil.java | 11 +-
.../apache/hadoop/hbase/util/RSProcDispatcher.java | 116 +++
.../hbase/util/TestCoprocessorScanPolicy.java | 24 +-
.../hadoop/hbase/util/TestEncryptionTest.java | 14 +-
.../org/apache/hadoop/hbase/util/TestFSUtils.java | 16 +-
.../TestHBaseFsckCleanReplicationBarriers.java | 2 +-
.../hadoop/hbase/util/TestHBaseFsckEncryption.java | 4 +-
.../hadoop/hbase/util/TestProcDispatcher.java | 177 ++++
.../apache/hadoop/hbase/util/TestRegionMover2.java | 82 +-
.../hbase/util/TestTableDescriptorChecker.java | 89 ++
.../compaction/TestMajorCompactionRequest.java | 21 +-
.../compaction/TestMajorCompactionTTLRequest.java | 4 +
.../hadoop/hbase/wal/CompressedWALTestBase.java | 6 +-
.../wal/TestBoundedRegionGroupingStrategy.java | 79 +-
.../hadoop/hbase/wal/TestFSHLogProvider.java | 13 -
.../hadoop/hbase/wal/TestOutputSinkWriter.java | 131 +++
.../hadoop/hbase/wal/TestParsePartialWALFile.java | 6 +-
.../hbase/wal/TestRecoveredEditsOutputSink.java | 111 ++
.../org/apache/hadoop/hbase/wal/TestSecureWAL.java | 4 +-
.../hadoop/hbase/wal/TestWALSplitToHFile.java | 15 +-
.../TestCompaction_HFileWithCorruptBlock.gz | Bin 0 -> 952 bytes
.../resources/ensure-jars-have-correct-contents.sh | 7 +-
hbase-shaded/hbase-shaded-client/pom.xml | 1 +
hbase-shaded/hbase-shaded-mapreduce/pom.xml | 4 +-
hbase-shaded/hbase-shaded-testing-util/pom.xml | 1 +
.../resources/ensure-jars-have-correct-contents.sh | 7 +-
hbase-shaded/pom.xml | 10 +-
hbase-shell/pom.xml | 7 +-
hbase-shell/src/main/ruby/hbase/admin.rb | 3 +
hbase-shell/src/main/ruby/hbase/table.rb | 79 +-
hbase-shell/src/main/ruby/irb/hirb.rb | 98 +-
hbase-shell/src/main/ruby/jar-bootstrap.rb | 12 +
hbase-shell/src/main/ruby/shell/commands/count.rb | 11 +-
.../ruby/shell/commands/get_largelog_responses.rb | 6 +
.../ruby/shell/commands/get_slowlog_responses.rb | 6 +
.../src/main/ruby/shell/commands/list_snapshots.rb | 19 +-
.../src/main/ruby/shell/commands/snapshot.rb | 1 +
hbase-shell/src/test/ruby/hbase/admin_test.rb | 8 +
hbase-shell/src/test/ruby/hbase/table_test.rb | 36 +
hbase-shell/src/test/ruby/shell/commands_test.rb | 6 +
hbase-testing-util/pom.xml | 16 -
.../apache/hadoop/hbase/HBaseTestingUtility.java | 21 +-
hbase-thrift/pom.xml | 59 +-
.../src/main/appended-resources/META-INF/NOTICE | 14 +-
.../apache/hadoop/hbase/thrift/ThriftServer.java | 8 +-
.../hadoop/hbase/thrift2/ThriftUtilities.java | 18 +-
.../static/css/bootstrap-theme.min.css | 6 -
.../hbase-webapps/static/css/bootstrap.min.css | 6 -
.../resources/hbase-webapps/static/css/hbase.css | 42 -
.../static/fonts/glyphicons-halflings-regular.eot | Bin 20127 -> 0 bytes
.../static/fonts/glyphicons-halflings-regular.svg | 288 ------
.../static/fonts/glyphicons-halflings-regular.ttf | Bin 45404 -> 0 bytes
.../static/fonts/glyphicons-halflings-regular.woff | Bin 23424 -> 0 bytes
.../fonts/glyphicons-halflings-regular.woff2 | Bin 18028 -> 0 bytes
.../resources/hbase-webapps/static/hbase_logo.png | Bin 2997 -> 0 bytes
.../hbase-webapps/static/hbase_logo_med.gif | Bin 3592 -> 0 bytes
.../hbase-webapps/static/hbase_logo_small.png | Bin 1926 -> 0 bytes
.../hbase-webapps/static/js/bootstrap.min.js | 6 -
.../hbase-webapps/static/js/jquery.min.js | 2 -
.../main/resources/hbase-webapps/static/js/tab.js | 38 -
.../main/resources/hbase-webapps/thrift/footer.jsp | 6 +-
.../main/resources/hbase-webapps/thrift/header.jsp | 53 +-
.../hbase/thrift/ErrorThrowingGetObserver.java | 4 +-
.../hbase/thrift/TestThriftHttpServerSSL.java | 212 ++++
.../thrift2/TestThriftHBaseServiceHandler.java | 2 +-
.../hbase/zookeeper/RecoverableZooKeeper.java | 14 +-
.../org/apache/hadoop/hbase/zookeeper/ZKUtil.java | 39 +-
.../hbase/zookeeper/TestReadOnlyZKClient.java | 26 +-
pom.xml | 583 ++++++++---
src/main/asciidoc/_chapters/architecture.adoc | 83 +-
src/main/asciidoc/_chapters/backup_restore.adoc | 15 +-
src/main/asciidoc/_chapters/community.adoc | 4 +-
src/main/asciidoc/_chapters/configuration.adoc | 205 +++-
src/main/asciidoc/_chapters/developer.adoc | 9 +-
src/main/asciidoc/_chapters/external_apis.adoc | 253 ++++-
src/main/asciidoc/_chapters/getting_started.adoc | 2 +-
src/main/asciidoc/_chapters/hbase-default.adoc | 1 +
src/main/asciidoc/_chapters/ops_mgt.adoc | 34 +-
src/main/asciidoc/_chapters/performance.adoc | 2 +-
src/main/asciidoc/_chapters/protobuf.adoc | 6 +-
src/main/asciidoc/_chapters/schema_design.adoc | 4 +-
src/main/asciidoc/_chapters/security.adoc | 31 +-
src/main/asciidoc/_chapters/troubleshooting.adoc | 6 +-
src/main/asciidoc/_chapters/upgrading.adoc | 6 +-
src/main/asciidoc/book.adoc | 2 +-
src/site/resources/css/site.css | 24 +-
src/site/resources/doap_Hbase.rdf | 18 +-
src/site/site.xml | 48 +-
src/site/xdoc/downloads.xml | 63 +-
src/site/xdoc/index.xml | 22 +-
src/site/xdoc/poweredbyhbase.xml | 6 +
1402 files changed, 42648 insertions(+), 18052 deletions(-)
copy dev-support/{flaky-tests/python-requirements.txt => blanks-eol-ignore.txt} (83%)
copy dev-support/{flaky-tests/python-requirements.txt => blanks-tabs-ignore.txt} (70%)
create mode 100755 dev-support/gh_hide_old_comments.sh
create mode 100644 dev-support/hbase_docker/m1/Dockerfile
copy {hbase-assembly => hbase-assembly-byo-hadoop}/pom.xml (58%)
copy {hbase-assembly => hbase-assembly-byo-hadoop}/src/main/assembly/components.xml (61%)
copy hbase-assembly/src/main/assembly/client.xml => hbase-assembly-byo-hadoop/src/main/assembly/hadoop-three-compat.xml (60%)
copy {hbase-assembly => hbase-assembly-byo-hadoop}/src/main/resources/META-INF/LEGAL (100%)
copy hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/DelegatingInternalScanner.java => hbase-asyncfs/src/main/java/org/apache/hadoop/hdfs/DummyDFSOutputStream.java (53%)
create mode 100644 hbase-asyncfs/src/test/java/org/apache/hadoop/hbase/io/asyncfs/TestLeaseRenewal.java
create mode 100644 hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/BackupMasterObserver.java
create mode 100644 hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BulkLoad.java
create mode 100644 hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/ColumnFamilyMismatchException.java
copy hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/DelegatingInternalScanner.java => hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/MergeSplitBulkloadInfo.java (55%)
create mode 100644 hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceRestoreToOriginalSplitsJob.java
copy hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancerRegionReplicaMidCluster.java => hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestHBackupFileSystem.java (55%)
create mode 100644 hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestIncrementalBackupWithDataLoss.java
create mode 100644 hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/mapreduce/TestMapReduceBackupCopyJob.java
create mode 100644 hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/BalancerConditionals.java
create mode 100644 hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/DistributeReplicasCandidateGenerator.java
create mode 100644 hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/DistributeReplicasConditional.java
copy hbase-common/src/main/java/org/apache/hadoop/hbase/io/SizedCellScanner.java => hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/MetaTableIsolationCandidateGenerator.java (67%)
copy hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/{BalanceAction.java => MetaTableIsolationConditional.java} (58%)
create mode 100644 hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/MoveBatchAction.java
create mode 100644 hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/RegionPlanConditional.java
create mode 100644 hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/RegionPlanConditionalCandidateGenerator.java
create mode 100644 hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/SlopFixingCandidateGenerator.java
create mode 100644 hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/StoreFileTableSkewCostFunction.java
copy hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/{BalanceAction.java => SystemTableIsolationCandidateGenerator.java} (59%)
copy hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/{BalanceAction.java => SystemTableIsolationConditional.java} (55%)
create mode 100644 hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/TableIsolationCandidateGenerator.java
create mode 100644 hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/TableIsolationConditional.java
copy hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MobReferenceOnlyFilter.java => hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/replicas/ReplicaKey.java (51%)
create mode 100644 hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/replicas/ReplicaKeyCache.java
create mode 100644 hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/CandidateGeneratorTestUtil.java
copy hbase-balancer/src/{main/java/org/apache/hadoop/hbase/master/balancer/BalanceAction.java => test/java/org/apache/hadoop/hbase/master/balancer/DistributeReplicasTestConditional.java} (57%)
create mode 100644 hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/TestBalancerConditionals.java
create mode 100644 hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/TestLargeClusterBalancingConditionalReplicaDistribution.java
create mode 100644 hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/TestLargeClusterBalancingMetaTableIsolation.java
create mode 100644 hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/TestLargeClusterBalancingSystemTableIsolation.java
create mode 100644 hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/TestLargeClusterBalancingTableIsolationAndReplicaDistribution.java
create mode 100644 hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStoreFileTableSkewCostFunction.java
create mode 100644 hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/TestUnattainableBalancerCostGoal.java
rename hbase-client/src/main/java/org/apache/hadoop/hbase/client/{PackagePrivateFieldAccessor.java => ClientInternalHelper.java} (69%)
copy hbase-client/src/main/java/org/apache/hadoop/hbase/client/{RpcConnectionRegistryURIFactory.java => NoopPartialResultCoprocessorCallback.java} (50%)
copy hbase-common/src/main/java/org/apache/hadoop/hbase/io/SizedCellScanner.java => hbase-client/src/main/java/org/apache/hadoop/hbase/client/QueryMetrics.java (69%)
copy hbase-protocol-shaded/src/main/protobuf/rest/CellSetMessage.proto => hbase-client/src/main/java/org/apache/hadoop/hbase/filter/HintingFilter.java (67%)
create mode 100644 hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncBatchRpcRetryingCaller.java
create mode 100644 hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestBufferedMutatorOverAsyncBufferedMutator.java
copy hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyProvider.java => hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestConnectionConfiguration.java (55%)
create mode 100644 hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestTableEnableDisableError.java
copy hbase-common/src/main/java/org/apache/hadoop/hbase/{io/SizedCellScanner.java => ExtendedCellScannable.java} (65%)
copy hbase-common/src/main/java/org/apache/hadoop/hbase/{io/SizedCellScanner.java => ExtendedCellScanner.java} (66%)
create mode 100644 hbase-common/src/main/java/org/apache/hadoop/hbase/conf/ConfigKey.java
copy hbase-common/src/main/java/org/apache/hadoop/hbase/io/{SizedCellScanner.java => SizedExtendedCellScanner.java} (85%)
create mode 100644 hbase-common/src/main/java/org/apache/hadoop/hbase/io/compress/BlockDecompressorHelper.java
copy hbase-common/src/main/java/org/apache/hadoop/hbase/io/{SizedCellScanner.java => compress/ByteBuffDecompressionCodec.java} (67%)
create mode 100644 hbase-common/src/main/java/org/apache/hadoop/hbase/io/compress/ByteBuffDecompressor.java
create mode 100644 hbase-common/src/main/java/org/apache/hadoop/hbase/io/compress/CodecPool.java
rename hbase-common/src/{test/java/org/apache/hadoop/hbase/io/crypto/KeyProviderForTesting.java => main/java/org/apache/hadoop/hbase/io/crypto/MockAesKeyProvider.java} (91%)
rename hbase-common/src/{test => main}/java/org/apache/hadoop/hbase/util/RandomDistribution.java (98%)
create mode 100644 hbase-common/src/test/java/org/apache/hadoop/hbase/conf/TestConfigKey.java
create mode 100644 hbase-common/src/test/java/org/apache/hadoop/hbase/io/compress/TestCodecPool.java
create mode 100644 hbase-compression/hbase-compression-zstd/src/main/java/org/apache/hadoop/hbase/io/compress/zstd/ZstdByteBuffDecompressor.java
create mode 100644 hbase-compression/hbase-compression-zstd/src/main/java/org/apache/hadoop/hbase/io/compress/zstd/ZstdHFileDecompressionContext.java
create mode 100644 hbase-compression/hbase-compression-zstd/src/test/java/org/apache/hadoop/hbase/io/compress/zstd/TestZstdByteBuffDecompressor.java
copy {hbase-assembly => hbase-dev-generate-classpath}/pom.xml (69%)
copy {hbase-replication => hbase-diagnostics}/pom.xml (67%)
rename {hbase-server/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/HFilePerformanceEvaluation.java (96%)
rename {hbase-mapreduce/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/PerformanceEvaluation.java (85%)
rename {hbase-server/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/PerformanceEvaluationCommons.java (97%)
rename {hbase-mapreduce/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/ScanPerformanceEvaluation.java (87%)
rename {hbase-balancer/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/master/balancer/LoadBalancerPerformanceEvaluation.java (97%)
create mode 100644 hbase-diagnostics/src/main/java/org/apache/hadoop/hbase/util/KerberosUtils.java
rename {hbase-server/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/util/LoadTestDataGeneratorWithMOB.java (96%)
rename {hbase-server/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/util/LoadTestDataGeneratorWithTags.java (94%)
rename {hbase-mapreduce/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/util/LoadTestTool.java (97%)
create mode 100644 hbase-diagnostics/src/main/java/org/apache/hadoop/hbase/util/LoadTestUtil.java
rename {hbase-server/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java (95%)
rename {hbase-server/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/util/MultiThreadedReader.java (97%)
rename {hbase-server/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/util/MultiThreadedReaderWithACL.java (96%)
rename {hbase-server/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/util/MultiThreadedUpdater.java (98%)
rename {hbase-server/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/util/MultiThreadedUpdaterWithACL.java (98%)
rename {hbase-server/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/util/MultiThreadedWriter.java (98%)
rename {hbase-server/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/util/MultiThreadedWriterBase.java (98%)
rename {hbase-server/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/util/MultiThreadedWriterWithACL.java (98%)
create mode 100644 hbase-diagnostics/src/main/java/org/apache/hadoop/hbase/util/WALPerformanceEvaluationUtil.java
rename {hbase-server/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/util/test/LoadTestDataGenerator.java (100%)
rename {hbase-server/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/util/test/LoadTestDataGeneratorWithACL.java (100%)
rename {hbase-server/src/test => hbase-diagnostics/src/main}/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java (96%)
rename {hbase-server => hbase-diagnostics}/src/test/java/org/apache/hadoop/hbase/TestClientClusterMetrics.java (100%)
rename {hbase-mapreduce => hbase-diagnostics}/src/test/java/org/apache/hadoop/hbase/TestPerformanceEvaluation.java (91%)
rename {hbase-server => hbase-diagnostics}/src/test/java/org/apache/hadoop/hbase/io/encoding/TestEncodedSeekers.java (100%)
rename {hbase-server => hbase-diagnostics}/src/test/java/org/apache/hadoop/hbase/io/encoding/TestLoadAndSwitchEncodeOnDisk.java (100%)
rename {hbase-client => hbase-diagnostics}/src/test/java/org/apache/hadoop/hbase/security/TestEncryptionUtil.java (95%)
rename {hbase-server => hbase-diagnostics}/src/test/java/org/apache/hadoop/hbase/util/ProcessBasedLocalHBaseCluster.java (100%)
rename {hbase-server => hbase-diagnostics}/src/test/java/org/apache/hadoop/hbase/util/RestartMetaTest.java (90%)
rename {hbase-common => hbase-diagnostics}/src/test/java/org/apache/hadoop/hbase/util/TestLoadTestKVGenerator.java (100%)
rename {hbase-server => hbase-diagnostics}/src/test/java/org/apache/hadoop/hbase/util/TestMiniClusterLoadEncoded.java (100%)
rename {hbase-server => hbase-diagnostics}/src/test/java/org/apache/hadoop/hbase/util/TestMiniClusterLoadParallel.java (100%)
rename {hbase-server => hbase-diagnostics}/src/test/java/org/apache/hadoop/hbase/util/TestMiniClusterLoadSequential.java (98%)
create mode 100644 hbase-diagnostics/src/test/java/org/apache/hadoop/hbase/wal/TestBoundedRegionGroupingStrategyUsingWPETool.java
create mode 100644 hbase-diagnostics/src/test/java/org/apache/hadoop/hbase/wal/TestFSHLogProviderWithConcurrentWrites.java
rename {hbase-mapreduce/src/test/resources/org/apache/hadoop/hbase => hbase-diagnostics/src/test/resources/org/apache/hadoop/hbase/mapreduce}/PerformanceEvaluation_Counter.properties (100%)
create mode 100644 hbase-endpoint/src/test/java/org/apache/hadoop/hbase/client/MockPartialResultAggregateImplemention.java
create mode 100644 hbase-endpoint/src/test/java/org/apache/hadoop/hbase/client/TestAsyncAggregationClientPartialResult.java
create mode 100644 hbase-endpoint/src/test/java/org/apache/hadoop/hbase/client/TestAsyncAggregationClientWithCallbackThreadPool.java
create mode 100644 hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/TestAggregateImplementation.java
copy hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/BalanceAction.java => hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/RowStatistics.java (54%)
create mode 100644 hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/RowStatisticsCompactionObserver.java
create mode 100644 hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/RowStatisticsImpl.java
create mode 100644 hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/SizeBucket.java
create mode 100644 hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/SizeBucketTracker.java
copy hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/MoveRegionAction.java => hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/recorder/RowStatisticsCombinedRecorder.java (55%)
copy hbase-protocol-shaded/src/main/protobuf/rest/CellSetMessage.proto => hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/recorder/RowStatisticsRecorder.java (68%)
create mode 100644 hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/recorder/RowStatisticsTableRecorder.java
copy hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcConnectionRegistryURIFactory.java => hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/ringbuffer/RowStatisticsDisruptorExceptionHandler.java (51%)
create mode 100644 hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/ringbuffer/RowStatisticsEventHandler.java
copy hbase-common/src/main/java/org/apache/hadoop/hbase/io/SizedCellScanner.java => hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/ringbuffer/RowStatisticsRingBufferEnvelope.java (64%)
copy hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/DelegatingInternalScanner.java => hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/ringbuffer/RowStatisticsRingBufferPayload.java (60%)
copy hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionRegistryURIFactory.java => hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/utils/RowStatisticsConfigurationUtil.java (61%)
create mode 100644 hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/utils/RowStatisticsTableUtil.java
copy hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/DelegatingInternalScanner.java => hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/utils/RowStatisticsUtil.java (59%)
create mode 100644 hbase-examples/src/test/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/TestRowStatisticsCompactionObserver.java
create mode 100644 hbase-examples/src/test/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/TestRowStatisticsEventHandler.java
create mode 100644 hbase-examples/src/test/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/TestRowStatisticsTableRecorder.java
create mode 100644 hbase-examples/src/test/java/org/apache/hadoop/hbase/coprocessor/example/row/stats/sizebucket/TestSizeBucketTracker.java
create mode 100644 hbase-http/src/test/java/org/apache/hadoop/hbase/http/LdapServerTestBase.java
copy hbase-http/src/test/java/org/apache/hadoop/hbase/http/{TestLdapHttpServer.java => TestLdapAdminACL.java} (53%)
delete mode 100644 hbase-it/src/main/java/org/apache/hadoop/hbase/chaos/ChaosUtils.java
rename {hbase-server => hbase-it}/src/test/java/org/apache/hadoop/hbase/security/visibility/LoadTestDataGeneratorWithVisibilityLabels.java (100%)
create mode 100644 hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/CopyTableTestBase.java
create mode 100644 hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/CopyTableToPeerClusterTestBase.java
copy hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancerRegionReplicaMidCluster.java => hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCopyTableToPeerClusterWithClusterKey.java (59%)
copy hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancerRegionReplicaMidCluster.java => hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCopyTableToPeerClusterWithRpcUri.java (59%)
copy hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancerRegionReplicaMidCluster.java => hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCopyTableToPeerClusterWithZkUri.java (59%)
create mode 100644 hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableOutputFormat.java
create mode 100644 hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionToolNpeFix.java
copy hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancerRegionReplicaMidCluster.java => hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/replication/TestVerifyReplicationRpcConnectionUri.java (59%)
copy hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancerRegionReplicaMidCluster.java => hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/replication/TestVerifyReplicationZkClusterKey.java (59%)
copy hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancerRegionReplicaMidCluster.java => hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/replication/TestVerifyReplicationZkConnectionUri.java (59%)
rename hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/replication/{TestVerifyReplication.java => VerifyReplicationTestBase.java} (95%)
rename {hbase-protocol-shaded/src/main/protobuf/rest => hbase-rest/src/main/protobuf}/CellMessage.proto (93%)
rename {hbase-protocol-shaded/src/main/protobuf/rest => hbase-rest/src/main/protobuf}/CellSetMessage.proto (90%)
rename {hbase-protocol-shaded/src/main/protobuf/rest => hbase-rest/src/main/protobuf}/ColumnSchemaMessage.proto (94%)
rename {hbase-protocol-shaded/src/main/protobuf/rest => hbase-rest/src/main/protobuf}/NamespacePropertiesMessage.proto (93%)
rename {hbase-protocol-shaded/src/main/protobuf/rest => hbase-rest/src/main/protobuf}/NamespacesMessage.proto (93%)
rename {hbase-protocol-shaded/src/main/protobuf/rest => hbase-rest/src/main/protobuf}/ScannerMessage.proto (90%)
rename {hbase-protocol-shaded/src/main/protobuf/rest => hbase-rest/src/main/protobuf}/StorageClusterStatusMessage.proto (96%)
rename {hbase-protocol-shaded/src/main/protobuf/rest => hbase-rest/src/main/protobuf}/TableInfoMessage.proto (94%)
rename {hbase-protocol-shaded/src/main/protobuf/rest => hbase-rest/src/main/protobuf}/TableListMessage.proto (93%)
rename {hbase-protocol-shaded/src/main/protobuf/rest => hbase-rest/src/main/protobuf}/TableSchemaMessage.proto (91%)
rename {hbase-protocol-shaded/src/main/protobuf/rest => hbase-rest/src/main/protobuf}/VersionMessage.proto (89%)
rename hbase-server/src/{test => main}/java/org/apache/hadoop/hbase/MockRegionServerServices.java (99%)
copy hbase-common/src/main/java/org/apache/hadoop/hbase/io/SizedCellScanner.java => hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RpcCoprocessor.java (69%)
rename hbase-common/src/main/java/org/apache/hadoop/hbase/io/SizedCellScanner.java => hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RpcCoprocessorEnvironment.java (69%)
create mode 100644 hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RpcObserver.java
rename hbase-server/src/{test => main}/java/org/apache/hadoop/hbase/filter/FilterAllFilter.java (95%)
copy hbase-server/src/{test/java/org/apache/hadoop/hbase/regionserver/DelegatingInternalScanner.java => main/java/org/apache/hadoop/hbase/ipc/OptionalSslHandlerWithHostPort.java} (52%)
create mode 100644 hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCoprocessorHost.java
create mode 100644 hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/AbstractCloseTableRegionsProcedure.java
create mode 100644 hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CloseExcessRegionReplicasProcedure.java
create mode 100644 hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CloseTableRegionsProcedure.java
create mode 100644 hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/TableProcedureWaitingQueue.java
create mode 100644 hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RpcQuotaManager.java
create mode 100644 hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotRegionLocator.java
rename {hbase-common/src/test => hbase-server/src/main}/java/org/apache/hadoop/hbase/util/LoadTestKVGenerator.java (98%)
create mode 100644 hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALEditInternalHelper.java
copy hbase-thrift/src/main/resources/hbase-webapps/thrift/footer.jsp => hbase-server/src/main/resources/hbase-webapps/master/scripts.jsp (82%)
delete mode 100644 hbase-server/src/main/resources/hbase-webapps/static/css/bootstrap-theme.min.css
delete mode 100644 hbase-server/src/main/resources/hbase-webapps/static/css/bootstrap.min.css
copy {src/site/resources/images => hbase-server/src/main/resources/hbase-webapps/static}/favicon.ico (100%)
delete mode 100644 hbase-server/src/main/resources/hbase-webapps/static/fonts/glyphicons-halflings-regular.eot
delete mode 100644 hbase-server/src/main/resources/hbase-webapps/static/fonts/glyphicons-halflings-regular.svg
delete mode 100644 hbase-server/src/main/resources/hbase-webapps/static/fonts/glyphicons-halflings-regular.ttf
delete mode 100644 hbase-server/src/main/resources/hbase-webapps/static/fonts/glyphicons-halflings-regular.woff
delete mode 100644 hbase-server/src/main/resources/hbase-webapps/static/fonts/glyphicons-halflings-regular.woff2
delete mode 100644 hbase-server/src/main/resources/hbase-webapps/static/js/bootstrap.min.js
delete mode 100644 hbase-server/src/main/resources/hbase-webapps/static/js/jquery.min.js
delete mode 100644 hbase-server/src/main/resources/hbase-webapps/static/js/jquery.tablesorter.min.js
delete mode 100644 hbase-server/src/main/resources/hbase-webapps/static/js/parser-date-iso8601.min.js
delete mode 100644 hbase-server/src/main/resources/hbase-webapps/static/js/vega-embed@6.21.3.min.js
delete mode 100644 hbase-server/src/main/resources/hbase-webapps/static/js/vega-lite@5.6.1.min.js
delete mode 100644 hbase-server/src/main/resources/hbase-webapps/static/js/vega@5.24.0.min.js
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/TestCacheEviction.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/TestSplitMergeQuotaTable.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncAdminClearMasterStubCache.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableQueryMetrics.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestConnectionAttributes.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFlushFromClientWithDisabledFlushProcedure.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaReplicaAssignment.java
delete mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRequestAndConnectionAttributes.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRequestAttributes.java
delete mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestPassCustomCellViaRegionObserver.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionCoprocessorQuotaUsage.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRpcCoprocessor.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCacheStats.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestRowIndexV1RoundTrip.java
rename hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/{ => bucket}/TestPrefetchWithBucketCache.java (55%)
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterRegionMutation1.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterRegionMutation2.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestRecreateCluster.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/RegionServerHostingReplicaSlowOpenCoprocessor.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/TestReduceExcessRegionReplicasBlockedByRIT.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/TestTRSPPersistUninitializedSubProc.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/BalancerConditionalsTestUtil.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestMetaTableIsolationBalancerConditional.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestReplicaDistributionBalancerConditional.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestProcedureWaitAndWake.java
rename hbase-server/src/test/java/org/apache/hadoop/hbase/master/{assignment => procedure}/TestRaceBetweenSCPAndDTP.java (57%)
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestTableProcedureWaitingQueueCleanup.java
copy hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancerSmallCluster.java => hbase-server/src/test/java/org/apache/hadoop/hbase/master/region/TestMasterRegionRpcTimeout.java (52%)
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/master/region/TestMasterRegionWALSyncTimeoutIOException.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/master/snapshot/TestSnapshotStats.java
copy hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/{TestDefaultQuota.java => TestDefaultAtomicQuota.java} (67%)
copy hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/{TestDefaultQuota.java => TestDefaultHandlerUsageQuota.java} (74%)
copy hbase-server/src/{main/java/org/apache/hadoop/hbase/quotas/NoopOperationQuota.java => test/java/org/apache/hadoop/hbase/quotas/TestNoopOperationQuota.java} (63%)
copy hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/{TestDefaultQuota.java => TestThreadHandlerUsageQuota.java} (65%)
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScannerLeaseCount.java
copy hbase-server/src/{main/java/org/apache/hadoop/hbase/regionserver/storefiletracker/DefaultStoreFileTracker.java => test/java/org/apache/hadoop/hbase/regionserver/storefiletracker/FailingStoreFileTrackerForTest.java} (54%)
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/security/TestMutualTlsClientSideNonLocalhost.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/util/RSProcDispatcher.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestProcDispatcher.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestTableDescriptorChecker.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestOutputSinkWriter.java
create mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestRecoveredEditsOutputSink.java
create mode 100644 hbase-server/src/test/resources/org/apache/hadoop/hbase/regionserver/TestCompaction_HFileWithCorruptBlock.gz
delete mode 100644 hbase-thrift/src/main/resources/hbase-webapps/static/css/bootstrap-theme.min.css
delete mode 100644 hbase-thrift/src/main/resources/hbase-webapps/static/css/bootstrap.min.css
delete mode 100644 hbase-thrift/src/main/resources/hbase-webapps/static/css/hbase.css
delete mode 100644 hbase-thrift/src/main/resources/hbase-webapps/static/fonts/glyphicons-halflings-regular.eot
delete mode 100644 hbase-thrift/src/main/resources/hbase-webapps/static/fonts/glyphicons-halflings-regular.svg
delete mode 100644 hbase-thrift/src/main/resources/hbase-webapps/static/fonts/glyphicons-halflings-regular.ttf
delete mode 100644 hbase-thrift/src/main/resources/hbase-webapps/static/fonts/glyphicons-halflings-regular.woff
delete mode 100644 hbase-thrift/src/main/resources/hbase-webapps/static/fonts/glyphicons-halflings-regular.woff2
delete mode 100644 hbase-thrift/src/main/resources/hbase-webapps/static/hbase_logo.png
delete mode 100644 hbase-thrift/src/main/resources/hbase-webapps/static/hbase_logo_med.gif
delete mode 100644 hbase-thrift/src/main/resources/hbase-webapps/static/hbase_logo_small.png
delete mode 100644 hbase-thrift/src/main/resources/hbase-webapps/static/js/bootstrap.min.js
delete mode 100644 hbase-thrift/src/main/resources/hbase-webapps/static/js/jquery.min.js
delete mode 100644 hbase-thrift/src/main/resources/hbase-webapps/static/js/tab.js
create mode 100644 hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftHttpServerSSL.java
(hbase) 02/07: HBASE-28505 Implement enforcement to require Date Tiered Compaction for Time Range Data Tiering (#5809)
Posted by wc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wchevreuil pushed a commit to branch HBASE-28463
in repository https://gitbox.apache.org/repos/asf/hbase.git
commit db2e23f79b16175f6a31e447aa8babd19283a5b2
Author: vinayak hegde <vi...@gmail.com>
AuthorDate: Fri Apr 12 14:54:37 2024 +0530
HBASE-28505 Implement enforcement to require Date Tiered Compaction for Time Range Data Tiering (#5809)
Signed-off-by: Wellington Chevreuil <wc...@apache.org>
---
.../hbase/regionserver/DateTieredStoreEngine.java | 3 ++
.../hadoop/hbase/util/TableDescriptorChecker.java | 36 +++++++++++++++++
.../hbase/client/TestIllegalTableDescriptor.java | 45 ++++++++++++++++++++++
3 files changed, 84 insertions(+)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DateTieredStoreEngine.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DateTieredStoreEngine.java
index ded6564bce5..26437ab1124 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DateTieredStoreEngine.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DateTieredStoreEngine.java
@@ -41,6 +41,9 @@ import org.apache.yetus.audience.InterfaceAudience;
@InterfaceAudience.Private
public class DateTieredStoreEngine extends StoreEngine<DefaultStoreFlusher,
DateTieredCompactionPolicy, DateTieredCompactor, DefaultStoreFileManager> {
+
+ public static final String DATE_TIERED_STORE_ENGINE = DateTieredStoreEngine.class.getName();
+
@Override
public boolean needsCompaction(List<HStoreFile> filesCompacting) {
return compactionPolicy.needsCompaction(storeFileManager.getStoreFiles(), filesCompacting);
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/TableDescriptorChecker.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/TableDescriptorChecker.java
index a826860aae4..409cc284dee 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/TableDescriptorChecker.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/TableDescriptorChecker.java
@@ -17,6 +17,8 @@
*/
package org.apache.hadoop.hbase.util;
+import static org.apache.hadoop.hbase.regionserver.DateTieredStoreEngine.DATE_TIERED_STORE_ENGINE;
+
import java.io.IOException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.CompoundConfiguration;
@@ -29,10 +31,13 @@ import org.apache.hadoop.hbase.client.TableDescriptor;
import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
import org.apache.hadoop.hbase.conf.ConfigKey;
import org.apache.hadoop.hbase.fs.ErasureCodingUtils;
+import org.apache.hadoop.hbase.regionserver.DataTieringManager;
+import org.apache.hadoop.hbase.regionserver.DataTieringType;
import org.apache.hadoop.hbase.regionserver.DefaultStoreEngine;
import org.apache.hadoop.hbase.regionserver.HStore;
import org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost;
import org.apache.hadoop.hbase.regionserver.RegionSplitPolicy;
+import org.apache.hadoop.hbase.regionserver.StoreEngine;
import org.apache.hadoop.hbase.regionserver.compactions.ExploringCompactionPolicy;
import org.apache.hadoop.hbase.regionserver.compactions.FIFOCompactionPolicy;
import org.apache.yetus.audience.InterfaceAudience;
@@ -201,6 +206,8 @@ public final class TableDescriptorChecker {
// check in-memory compaction
warnOrThrowExceptionForFailure(logWarn, hcd::getInMemoryCompaction);
+
+ checkDateTieredCompactionForTimeRangeDataTiering(conf, td);
}
}
@@ -220,6 +227,35 @@ public final class TableDescriptorChecker {
});
}
+ private static void checkDateTieredCompactionForTimeRangeDataTiering(final Configuration conf,
+ final TableDescriptor td) throws IOException {
+ // Table level configurations
+ checkDateTieredCompactionForTimeRangeDataTiering(conf);
+ for (ColumnFamilyDescriptor cfd : td.getColumnFamilies()) {
+ // Column family level configurations
+ Configuration cfdConf =
+ new CompoundConfiguration().add(conf).addStringMap(cfd.getConfiguration());
+ checkDateTieredCompactionForTimeRangeDataTiering(cfdConf);
+ }
+ }
+
+ private static void checkDateTieredCompactionForTimeRangeDataTiering(final Configuration conf)
+ throws IOException {
+ final String errorMessage =
+ "Time Range Data Tiering should be enabled with Date Tiered Compaction.";
+
+ warnOrThrowExceptionForFailure(false, () -> {
+
+ // Determine whether Date Tiered Compaction will be enabled when Time Range Data Tiering is
+ // enabled after the configuration change.
+ if (DataTieringType.TIME_RANGE.name().equals(conf.get(DataTieringManager.DATATIERING_KEY))) {
+ if (!DATE_TIERED_STORE_ENGINE.equals(conf.get(StoreEngine.STORE_ENGINE_CLASS_KEY))) {
+ throw new IllegalArgumentException(errorMessage);
+ }
+ }
+ });
+ }
+
private static void checkCompactionPolicy(final Configuration conf, final TableDescriptor td)
throws IOException {
warnOrThrowExceptionForFailure(false, () -> {
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIllegalTableDescriptor.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIllegalTableDescriptor.java
index a67c43d31fa..666cfbdf54a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIllegalTableDescriptor.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIllegalTableDescriptor.java
@@ -31,6 +31,9 @@ import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.HBaseTestingUtil;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.regionserver.DataTieringManager;
+import org.apache.hadoop.hbase.regionserver.DataTieringType;
+import org.apache.hadoop.hbase.regionserver.StoreEngine;
import org.apache.hadoop.hbase.testclassification.ClientTests;
import org.apache.hadoop.hbase.testclassification.LargeTests;
import org.apache.hadoop.hbase.util.Bytes;
@@ -187,6 +190,48 @@ public class TestIllegalTableDescriptor {
+ "cause very frequent flushing."));
}
+ @Test
+ public void testIllegalTableDescriptorWithDataTiering() throws IOException {
+ // table level configuration changes
+ TableDescriptorBuilder builder =
+ TableDescriptorBuilder.newBuilder(TableName.valueOf(name.getMethodName()));
+ ColumnFamilyDescriptorBuilder cfBuilder = ColumnFamilyDescriptorBuilder.newBuilder(FAMILY);
+ builder.setColumnFamily(cfBuilder.build());
+
+ // First scenario: DataTieringType set to TIME_RANGE without DateTieredStoreEngine
+ builder.setValue(DataTieringManager.DATATIERING_KEY, DataTieringType.TIME_RANGE.name());
+ checkTableIsIllegal(builder.build());
+
+ // Second scenario: DataTieringType set to TIME_RANGE with DateTieredStoreEngine
+ builder.setValue(StoreEngine.STORE_ENGINE_CLASS_KEY,
+ "org.apache.hadoop.hbase.regionserver.DateTieredStoreEngine");
+ checkTableIsLegal(builder.build());
+
+ // Third scenario: Disabling DateTieredStoreEngine while Time Range DataTiering is active
+ builder.setValue(StoreEngine.STORE_ENGINE_CLASS_KEY,
+ "org.apache.hadoop.hbase.regionserver.DefaultStoreEngine");
+ checkTableIsIllegal(builder.build());
+
+ // column family level configuration changes
+ builder = TableDescriptorBuilder.newBuilder(TableName.valueOf(name.getMethodName()));
+ cfBuilder = ColumnFamilyDescriptorBuilder.newBuilder(FAMILY);
+
+ // First scenario: DataTieringType set to TIME_RANGE without DateTieredStoreEngine
+ cfBuilder.setConfiguration(DataTieringManager.DATATIERING_KEY,
+ DataTieringType.TIME_RANGE.name());
+ checkTableIsIllegal(builder.setColumnFamily(cfBuilder.build()).build());
+
+ // Second scenario: DataTieringType set to TIME_RANGE with DateTieredStoreEngine
+ cfBuilder.setConfiguration(StoreEngine.STORE_ENGINE_CLASS_KEY,
+ "org.apache.hadoop.hbase.regionserver.DateTieredStoreEngine");
+ checkTableIsLegal(builder.modifyColumnFamily(cfBuilder.build()).build());
+
+ // Third scenario: Disabling DateTieredStoreEngine while Time Range DataTiering is active
+ cfBuilder.setConfiguration(StoreEngine.STORE_ENGINE_CLASS_KEY,
+ "org.apache.hadoop.hbase.regionserver.DefaultStoreEngine");
+ checkTableIsIllegal(builder.modifyColumnFamily(cfBuilder.build()).build());
+ }
+
private void checkTableIsLegal(TableDescriptor tableDescriptor) throws IOException {
Admin admin = TEST_UTIL.getAdmin();
admin.createTable(tableDescriptor);
(hbase) 07/07: HBASE-28467: Add time-based priority caching checks for cacheOnRead code paths. (#5905)
Posted by wc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wchevreuil pushed a commit to branch HBASE-28463
in repository https://gitbox.apache.org/repos/asf/hbase.git
commit cdd316b636d80fa03dbc41239934b8d8aa04a19d
Author: jhungund <10...@users.noreply.github.com>
AuthorDate: Thu May 23 00:16:49 2024 +0530
HBASE-28467: Add time-based priority caching checks for cacheOnRead code paths. (#5905)
Signed-off-by: Wellington Chevreuil <wc...@apache.org>
---
.../apache/hadoop/hbase/io/hfile/CacheConfig.java | 12 ++++
.../hadoop/hbase/io/hfile/HFileReaderImpl.java | 6 +-
.../hbase/regionserver/TestDataTieringManager.java | 64 ++++++++++++++++++++++
3 files changed, 80 insertions(+), 2 deletions(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java
index 4fadd812ec5..3fcf75b3970 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java
@@ -279,6 +279,18 @@ public class CacheConfig implements PropagatingConfigurationObserver {
|| (prefetchOnOpen && (category != BlockCategory.META && category != BlockCategory.UNKNOWN));
}
+ public boolean shouldCacheBlockOnRead(BlockCategory category, HFileInfo hFileInfo,
+ Configuration conf) {
+ Optional<Boolean> cacheFileBlock = Optional.of(true);
+ if (getBlockCache().isPresent()) {
+ Optional<Boolean> result = getBlockCache().get().shouldCacheFile(hFileInfo, conf);
+ if (result.isPresent()) {
+ cacheFileBlock = result;
+ }
+ }
+ return shouldCacheBlockOnRead(category) && cacheFileBlock.get();
+ }
+
/** Returns true if blocks in this file should be flagged as in-memory */
public boolean isInMemory() {
return this.inMemory;
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java
index 33b761645de..4b60ef662c2 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java
@@ -1201,7 +1201,8 @@ public abstract class HFileReaderImpl implements HFile.Reader, Configurable {
BlockCacheKey cacheKey =
new BlockCacheKey(name, metaBlockOffset, this.isPrimaryReplicaReader(), BlockType.META);
- cacheBlock &= cacheConf.shouldCacheBlockOnRead(BlockType.META.getCategory());
+ cacheBlock &=
+ cacheConf.shouldCacheBlockOnRead(BlockType.META.getCategory(), getHFileInfo(), conf);
HFileBlock cachedBlock =
getCachedBlock(cacheKey, cacheBlock, false, true, BlockType.META, null);
if (cachedBlock != null) {
@@ -1356,7 +1357,8 @@ public abstract class HFileReaderImpl implements HFile.Reader, Configurable {
}
BlockType.BlockCategory category = hfileBlock.getBlockType().getCategory();
final boolean cacheCompressed = cacheConf.shouldCacheCompressed(category);
- final boolean cacheOnRead = cacheConf.shouldCacheBlockOnRead(category);
+ final boolean cacheOnRead =
+ cacheConf.shouldCacheBlockOnRead(category, getHFileInfo(), conf);
// Don't need the unpacked block back and we're storing the block in the cache compressed
if (cacheOnly && cacheCompressed && cacheOnRead) {
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java
index 6b0cef666f7..37e0fe98e7d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java
@@ -21,6 +21,7 @@ import static org.apache.hadoop.hbase.HConstants.BUCKET_CACHE_SIZE_KEY;
import static org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.DEFAULT_ERROR_TOLERATION_DURATION;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -50,12 +51,15 @@ import org.apache.hadoop.hbase.client.RegionInfoBuilder;
import org.apache.hadoop.hbase.client.TableDescriptor;
import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
import org.apache.hadoop.hbase.fs.HFileSystem;
+import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
import org.apache.hadoop.hbase.io.hfile.BlockCache;
import org.apache.hadoop.hbase.io.hfile.BlockCacheFactory;
import org.apache.hadoop.hbase.io.hfile.BlockCacheKey;
import org.apache.hadoop.hbase.io.hfile.BlockType;
+import org.apache.hadoop.hbase.io.hfile.BlockType.BlockCategory;
import org.apache.hadoop.hbase.io.hfile.CacheConfig;
import org.apache.hadoop.hbase.io.hfile.CacheTestUtils;
+import org.apache.hadoop.hbase.io.hfile.HFileBlock;
import org.apache.hadoop.hbase.io.hfile.HFileContextBuilder;
import org.apache.hadoop.hbase.io.hfile.bucket.BucketCache;
import org.apache.hadoop.hbase.regionserver.storefiletracker.StoreFileTracker;
@@ -565,6 +569,66 @@ public class TestDataTieringManager {
}
}
+ @Test
+ public void testCacheConfigShouldCacheFile() throws Exception {
+ // Evict the files from cache.
+ for (HStoreFile file : hStoreFiles) {
+ file.closeStoreFile(true);
+ }
+ // Verify that the API shouldCacheFileBlock returns the result correctly.
+ // hStoreFiles[0], hStoreFiles[1], hStoreFiles[2] are hot files.
+ // hStoreFiles[3] is a cold file.
+ try {
+ assertTrue(cacheConf.shouldCacheBlockOnRead(BlockCategory.DATA,
+ hStoreFiles.get(0).getFileInfo().getHFileInfo(),
+ hStoreFiles.get(0).getFileInfo().getConf()));
+ assertTrue(cacheConf.shouldCacheBlockOnRead(BlockCategory.DATA,
+ hStoreFiles.get(1).getFileInfo().getHFileInfo(),
+ hStoreFiles.get(1).getFileInfo().getConf()));
+ assertTrue(cacheConf.shouldCacheBlockOnRead(BlockCategory.DATA,
+ hStoreFiles.get(2).getFileInfo().getHFileInfo(),
+ hStoreFiles.get(2).getFileInfo().getConf()));
+ assertFalse(cacheConf.shouldCacheBlockOnRead(BlockCategory.DATA,
+ hStoreFiles.get(3).getFileInfo().getHFileInfo(),
+ hStoreFiles.get(3).getFileInfo().getConf()));
+ } finally {
+ for (HStoreFile file : hStoreFiles) {
+ file.initReader();
+ }
+ }
+ }
+
+ @Test
+ public void testCacheOnReadColdFile() throws Exception {
+ // hStoreFiles[3] is a cold file. the blocks should not get loaded after a readBlock call.
+ HStoreFile hStoreFile = hStoreFiles.get(3);
+ BlockCacheKey cacheKey = new BlockCacheKey(hStoreFile.getPath(), 0, true, BlockType.DATA);
+ testCacheOnRead(hStoreFile, cacheKey, 23025, false);
+ }
+
+ @Test
+ public void testCacheOnReadHotFile() throws Exception {
+ // hStoreFiles[0] is a hot file. the blocks should get loaded after a readBlock call.
+ HStoreFile hStoreFile = hStoreFiles.get(0);
+ BlockCacheKey cacheKey =
+ new BlockCacheKey(hStoreFiles.get(0).getPath(), 0, true, BlockType.DATA);
+ testCacheOnRead(hStoreFile, cacheKey, 23025, true);
+ }
+
+ private void testCacheOnRead(HStoreFile hStoreFile, BlockCacheKey key, long onDiskBlockSize,
+ boolean expectedCached) throws Exception {
+ // Execute the read block API which will try to cache the block if the block is a hot block.
+ hStoreFile.getReader().getHFileReader().readBlock(key.getOffset(), onDiskBlockSize, true, false,
+ false, false, key.getBlockType(), DataBlockEncoding.NONE);
+ // Validate that the hot block gets cached and cold block is not cached.
+ HFileBlock block = (HFileBlock) blockCache.getBlock(key, false, false, false, BlockType.DATA);
+ if (expectedCached) {
+ assertNotNull(block);
+ } else {
+ assertNull(block);
+ }
+ }
+
private void validateBlocks(Set<BlockCacheKey> keys, int expectedTotalKeys, int expectedHotBlocks,
int expectedColdBlocks) {
int numHotBlocks = 0, numColdBlocks = 0;
(hbase) 01/07: HBASE-28465 Implementation of framework for time-based priority bucket-cache (#5793)
Posted by wc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wchevreuil pushed a commit to branch HBASE-28463
in repository https://gitbox.apache.org/repos/asf/hbase.git
commit a2a89b1753cf312abfff228d1cd2f551735cee62
Author: vinayak hegde <vi...@gmail.com>
AuthorDate: Mon Apr 8 20:54:19 2024 +0530
HBASE-28465 Implementation of framework for time-based priority bucket-cache (#5793)
Signed-off-by: Wellington Chevreuil <wc...@apache.org>
---
.../hbase/regionserver/DataTieringException.java | 27 ++
.../hbase/regionserver/DataTieringManager.java | 222 ++++++++++++
.../hadoop/hbase/regionserver/DataTieringType.java | 26 ++
.../hadoop/hbase/regionserver/HRegionServer.java | 1 +
.../hbase/regionserver/TestDataTieringManager.java | 389 +++++++++++++++++++++
5 files changed, 665 insertions(+)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringException.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringException.java
new file mode 100644
index 00000000000..8d356422f6e
--- /dev/null
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringException.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.regionserver;
+
+import org.apache.yetus.audience.InterfaceAudience;
+
+@InterfaceAudience.Private
+public class DataTieringException extends Exception {
+ DataTieringException(String reason) {
+ super(reason);
+ }
+}
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java
new file mode 100644
index 00000000000..0bc04ddc428
--- /dev/null
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java
@@ -0,0 +1,222 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.regionserver;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.OptionalLong;
+import java.util.Set;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.io.hfile.BlockCacheKey;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The DataTieringManager class categorizes data into hot data and cold data based on the specified
+ * {@link DataTieringType} when DataTiering is enabled. DataTiering is disabled by default with
+ * {@link DataTieringType} set to {@link DataTieringType#NONE}. The {@link DataTieringType}
+ * determines the logic for distinguishing data into hot or cold. By default, all data is considered
+ * as hot.
+ */
+@InterfaceAudience.Private
+public class DataTieringManager {
+ private static final Logger LOG = LoggerFactory.getLogger(DataTieringManager.class);
+ public static final String DATATIERING_KEY = "hbase.hstore.datatiering.type";
+ public static final String DATATIERING_HOT_DATA_AGE_KEY =
+ "hbase.hstore.datatiering.hot.age.millis";
+ public static final DataTieringType DEFAULT_DATATIERING = DataTieringType.NONE;
+ public static final long DEFAULT_DATATIERING_HOT_DATA_AGE = 7 * 24 * 60 * 60 * 1000; // 7 Days
+ private static DataTieringManager instance;
+ private final Map<String, HRegion> onlineRegions;
+
+ private DataTieringManager(Map<String, HRegion> onlineRegions) {
+ this.onlineRegions = onlineRegions;
+ }
+
+ /**
+ * Initializes the DataTieringManager instance with the provided map of online regions.
+ * @param onlineRegions A map containing online regions.
+ */
+ public static synchronized void instantiate(Map<String, HRegion> onlineRegions) {
+ if (instance == null) {
+ instance = new DataTieringManager(onlineRegions);
+ LOG.info("DataTieringManager instantiated successfully.");
+ } else {
+ LOG.warn("DataTieringManager is already instantiated.");
+ }
+ }
+
+ /**
+ * Retrieves the instance of DataTieringManager.
+ * @return The instance of DataTieringManager.
+ * @throws IllegalStateException if DataTieringManager has not been instantiated.
+ */
+ public static synchronized DataTieringManager getInstance() {
+ if (instance == null) {
+ throw new IllegalStateException(
+ "DataTieringManager has not been instantiated. Call instantiate() first.");
+ }
+ return instance;
+ }
+
+ /**
+ * Determines whether data tiering is enabled for the given block cache key.
+ * @param key the block cache key
+ * @return {@code true} if data tiering is enabled for the HFile associated with the key,
+ * {@code false} otherwise
+ * @throws DataTieringException if there is an error retrieving the HFile path or configuration
+ */
+ public boolean isDataTieringEnabled(BlockCacheKey key) throws DataTieringException {
+ Path hFilePath = key.getFilePath();
+ if (hFilePath == null) {
+ throw new DataTieringException("BlockCacheKey Doesn't Contain HFile Path");
+ }
+ return isDataTieringEnabled(hFilePath);
+ }
+
+ /**
+ * Determines whether data tiering is enabled for the given HFile path.
+ * @param hFilePath the path to the HFile
+ * @return {@code true} if data tiering is enabled, {@code false} otherwise
+ * @throws DataTieringException if there is an error retrieving the configuration
+ */
+ public boolean isDataTieringEnabled(Path hFilePath) throws DataTieringException {
+ Configuration configuration = getConfiguration(hFilePath);
+ DataTieringType dataTieringType = getDataTieringType(configuration);
+ return !dataTieringType.equals(DataTieringType.NONE);
+ }
+
+ /**
+ * Determines whether the data associated with the given block cache key is considered hot.
+ * @param key the block cache key
+ * @return {@code true} if the data is hot, {@code false} otherwise
+ * @throws DataTieringException if there is an error retrieving data tiering information or the
+ * HFile maximum timestamp
+ */
+ public boolean isHotData(BlockCacheKey key) throws DataTieringException {
+ Path hFilePath = key.getFilePath();
+ if (hFilePath == null) {
+ throw new DataTieringException("BlockCacheKey Doesn't Contain HFile Path");
+ }
+ return isHotData(hFilePath);
+ }
+
+ /**
+ * Determines whether the data in the HFile at the given path is considered hot based on the
+ * configured data tiering type and hot data age.
+ * @param hFilePath the path to the HFile
+ * @return {@code true} if the data is hot, {@code false} otherwise
+ * @throws DataTieringException if there is an error retrieving data tiering information or the
+ * HFile maximum timestamp
+ */
+ public boolean isHotData(Path hFilePath) throws DataTieringException {
+ Configuration configuration = getConfiguration(hFilePath);
+ DataTieringType dataTieringType = getDataTieringType(configuration);
+
+ if (dataTieringType.equals(DataTieringType.TIME_RANGE)) {
+ long hotDataAge = getDataTieringHotDataAge(configuration);
+
+ HStoreFile hStoreFile = getHStoreFile(hFilePath);
+ if (hStoreFile == null) {
+ LOG.error("HStoreFile corresponding to " + hFilePath + " doesn't exist");
+ return false;
+ }
+ OptionalLong maxTimestamp = hStoreFile.getMaximumTimestamp();
+ if (!maxTimestamp.isPresent()) {
+ throw new DataTieringException("Maximum timestamp not present for " + hFilePath);
+ }
+
+ long currentTimestamp = EnvironmentEdgeManager.getDelegate().currentTime();
+ long diff = currentTimestamp - maxTimestamp.getAsLong();
+ return diff <= hotDataAge;
+ }
+ // DataTieringType.NONE or other types are considered hot by default
+ return true;
+ }
+
+ /**
+ * Returns a set of cold data filenames from the given set of cached blocks. Cold data is
+ * determined by the configured data tiering type and hot data age.
+ * @param allCachedBlocks a set of all cached block cache keys
+ * @return a set of cold data filenames
+ * @throws DataTieringException if there is an error determining whether a block is hot
+ */
+ public Set<String> getColdDataFiles(Set<BlockCacheKey> allCachedBlocks)
+ throws DataTieringException {
+ Set<String> coldHFiles = new HashSet<>();
+ for (BlockCacheKey key : allCachedBlocks) {
+ if (coldHFiles.contains(key.getHfileName())) {
+ continue;
+ }
+ if (!isHotData(key)) {
+ coldHFiles.add(key.getHfileName());
+ }
+ }
+ return coldHFiles;
+ }
+
+ private HRegion getHRegion(Path hFilePath) throws DataTieringException {
+ if (hFilePath.getParent() == null || hFilePath.getParent().getParent() == null) {
+ throw new DataTieringException("Incorrect HFile Path: " + hFilePath);
+ }
+ String regionId = hFilePath.getParent().getParent().getName();
+ HRegion hRegion = this.onlineRegions.get(regionId);
+ if (hRegion == null) {
+ throw new DataTieringException("HRegion corresponding to " + hFilePath + " doesn't exist");
+ }
+ return hRegion;
+ }
+
+ private HStore getHStore(Path hFilePath) throws DataTieringException {
+ HRegion hRegion = getHRegion(hFilePath);
+ String columnFamily = hFilePath.getParent().getName();
+ HStore hStore = hRegion.getStore(Bytes.toBytes(columnFamily));
+ if (hStore == null) {
+ throw new DataTieringException("HStore corresponding to " + hFilePath + " doesn't exist");
+ }
+ return hStore;
+ }
+
+ private HStoreFile getHStoreFile(Path hFilePath) throws DataTieringException {
+ HStore hStore = getHStore(hFilePath);
+ for (HStoreFile file : hStore.getStorefiles()) {
+ if (file.getPath().equals(hFilePath)) {
+ return file;
+ }
+ }
+ return null;
+ }
+
+ private Configuration getConfiguration(Path hFilePath) throws DataTieringException {
+ HStore hStore = getHStore(hFilePath);
+ return hStore.getReadOnlyConfiguration();
+ }
+
+ private DataTieringType getDataTieringType(Configuration conf) {
+ return DataTieringType.valueOf(conf.get(DATATIERING_KEY, DEFAULT_DATATIERING.name()));
+ }
+
+ private long getDataTieringHotDataAge(Configuration conf) {
+ return Long.parseLong(
+ conf.get(DATATIERING_HOT_DATA_AGE_KEY, String.valueOf(DEFAULT_DATATIERING_HOT_DATA_AGE)));
+ }
+}
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringType.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringType.java
new file mode 100644
index 00000000000..ee54576a648
--- /dev/null
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringType.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.regionserver;
+
+import org.apache.yetus.audience.InterfaceAudience;
+
+@InterfaceAudience.Public
+public enum DataTieringType {
+ NONE,
+ TIME_RANGE
+}
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
index a4105a31bfa..c7044e7866d 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
@@ -534,6 +534,7 @@ public class HRegionServer extends HBaseServerBase<RSRpcServices>
regionServerAccounting = new RegionServerAccounting(conf);
blockCache = BlockCacheFactory.createBlockCache(conf);
+ DataTieringManager.instantiate(onlineRegions);
mobFileCache = new MobFileCache(conf);
rsSnapshotVerifier = new RSSnapshotVerifier(conf);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java
new file mode 100644
index 00000000000..afb5862a8a4
--- /dev/null
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java
@@ -0,0 +1,389 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.regionserver;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.HBaseClassTestRule;
+import org.apache.hadoop.hbase.HBaseTestingUtil;
+import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
+import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder;
+import org.apache.hadoop.hbase.client.RegionInfo;
+import org.apache.hadoop.hbase.client.RegionInfoBuilder;
+import org.apache.hadoop.hbase.client.TableDescriptor;
+import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
+import org.apache.hadoop.hbase.fs.HFileSystem;
+import org.apache.hadoop.hbase.io.hfile.BlockCache;
+import org.apache.hadoop.hbase.io.hfile.BlockCacheFactory;
+import org.apache.hadoop.hbase.io.hfile.BlockCacheKey;
+import org.apache.hadoop.hbase.io.hfile.BlockType;
+import org.apache.hadoop.hbase.io.hfile.CacheConfig;
+import org.apache.hadoop.hbase.io.hfile.HFileContextBuilder;
+import org.apache.hadoop.hbase.testclassification.RegionServerTests;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.hadoop.hbase.util.CommonFSUtils;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+/**
+ * This class is used to test the functionality of the DataTieringManager.
+ *
+ * The mock online regions are stored in {@link TestDataTieringManager#testOnlineRegions}.
+ * For all tests, the setup of {@link TestDataTieringManager#testOnlineRegions} occurs only once.
+ * Please refer to {@link TestDataTieringManager#setupOnlineRegions()} for the structure.
+ * Additionally, a list of all store files is maintained in {@link TestDataTieringManager#hStoreFiles}.
+ * The characteristics of these store files are listed below:
+ * @formatter:off ## HStoreFile Information
+ *
+ * | HStoreFile | Region | Store | DataTiering | isHot |
+ * |------------------|--------------------|---------------------|-----------------------|-------|
+ * | hStoreFile0 | region1 | hStore11 | TIME_RANGE | true |
+ * | hStoreFile1 | region1 | hStore12 | NONE | true |
+ * | hStoreFile2 | region2 | hStore21 | TIME_RANGE | true |
+ * | hStoreFile3 | region2 | hStore22 | TIME_RANGE | false |
+ * @formatter:on
+ */
+
+@Category({ RegionServerTests.class, SmallTests.class })
+public class TestDataTieringManager {
+
+ @ClassRule
+ public static final HBaseClassTestRule CLASS_RULE =
+ HBaseClassTestRule.forClass(TestDataTieringManager.class);
+
+ private static final HBaseTestingUtil TEST_UTIL = new HBaseTestingUtil();
+ private static Configuration defaultConf;
+ private static FileSystem fs;
+ private static CacheConfig cacheConf;
+ private static Path testDir;
+ private static Map<String, HRegion> testOnlineRegions;
+
+ private static DataTieringManager dataTieringManager;
+ private static List<HStoreFile> hStoreFiles;
+
+ @BeforeClass
+ public static void setupBeforeClass() throws Exception {
+ testDir = TEST_UTIL.getDataTestDir(TestDataTieringManager.class.getSimpleName());
+ defaultConf = TEST_UTIL.getConfiguration();
+ fs = HFileSystem.get(defaultConf);
+ BlockCache blockCache = BlockCacheFactory.createBlockCache(defaultConf);
+ cacheConf = new CacheConfig(defaultConf, blockCache);
+ setupOnlineRegions();
+ DataTieringManager.instantiate(testOnlineRegions);
+ dataTieringManager = DataTieringManager.getInstance();
+ }
+
+ @FunctionalInterface
+ interface DataTieringMethodCallerWithPath {
+ boolean call(DataTieringManager manager, Path path) throws DataTieringException;
+ }
+
+ @FunctionalInterface
+ interface DataTieringMethodCallerWithKey {
+ boolean call(DataTieringManager manager, BlockCacheKey key) throws DataTieringException;
+ }
+
+ @Test
+ public void testDataTieringEnabledWithKey() {
+ DataTieringMethodCallerWithKey methodCallerWithKey = DataTieringManager::isDataTieringEnabled;
+
+ // Test with valid key
+ BlockCacheKey key = new BlockCacheKey(hStoreFiles.get(0).getPath(), 0, true, BlockType.DATA);
+ testDataTieringMethodWithKeyNoException(methodCallerWithKey, key, true);
+
+ // Test with another valid key
+ key = new BlockCacheKey(hStoreFiles.get(1).getPath(), 0, true, BlockType.DATA);
+ testDataTieringMethodWithKeyNoException(methodCallerWithKey, key, false);
+
+ // Test with valid key with no HFile Path
+ key = new BlockCacheKey(hStoreFiles.get(0).getPath().getName(), 0);
+ testDataTieringMethodWithKeyExpectingException(methodCallerWithKey, key,
+ new DataTieringException("BlockCacheKey Doesn't Contain HFile Path"));
+ }
+
+ @Test
+ public void testDataTieringEnabledWithPath() {
+ DataTieringMethodCallerWithPath methodCallerWithPath = DataTieringManager::isDataTieringEnabled;
+
+ // Test with valid path
+ Path hFilePath = hStoreFiles.get(1).getPath();
+ testDataTieringMethodWithPathNoException(methodCallerWithPath, hFilePath, false);
+
+ // Test with another valid path
+ hFilePath = hStoreFiles.get(3).getPath();
+ testDataTieringMethodWithPathNoException(methodCallerWithPath, hFilePath, true);
+
+ // Test with an incorrect path
+ hFilePath = new Path("incorrectPath");
+ testDataTieringMethodWithPathExpectingException(methodCallerWithPath, hFilePath,
+ new DataTieringException("Incorrect HFile Path: " + hFilePath));
+
+ // Test with a non-existing HRegion path
+ Path basePath = hStoreFiles.get(0).getPath().getParent().getParent().getParent();
+ hFilePath = new Path(basePath, "incorrectRegion/cf1/filename");
+ testDataTieringMethodWithPathExpectingException(methodCallerWithPath, hFilePath,
+ new DataTieringException("HRegion corresponding to " + hFilePath + " doesn't exist"));
+
+ // Test with a non-existing HStore path
+ basePath = hStoreFiles.get(0).getPath().getParent().getParent();
+ hFilePath = new Path(basePath, "incorrectCf/filename");
+ testDataTieringMethodWithPathExpectingException(methodCallerWithPath, hFilePath,
+ new DataTieringException("HStore corresponding to " + hFilePath + " doesn't exist"));
+ }
+
+ @Test
+ public void testHotDataWithKey() {
+ DataTieringMethodCallerWithKey methodCallerWithKey = DataTieringManager::isHotData;
+
+ // Test with valid key
+ BlockCacheKey key = new BlockCacheKey(hStoreFiles.get(0).getPath(), 0, true, BlockType.DATA);
+ testDataTieringMethodWithKeyNoException(methodCallerWithKey, key, true);
+
+ // Test with another valid key
+ key = new BlockCacheKey(hStoreFiles.get(3).getPath(), 0, true, BlockType.DATA);
+ testDataTieringMethodWithKeyNoException(methodCallerWithKey, key, false);
+ }
+
+ @Test
+ public void testHotDataWithPath() {
+ DataTieringMethodCallerWithPath methodCallerWithPath = DataTieringManager::isHotData;
+
+ // Test with valid path
+ Path hFilePath = hStoreFiles.get(2).getPath();
+ testDataTieringMethodWithPathNoException(methodCallerWithPath, hFilePath, true);
+
+ // Test with another valid path
+ hFilePath = hStoreFiles.get(3).getPath();
+ testDataTieringMethodWithPathNoException(methodCallerWithPath, hFilePath, false);
+
+ // Test with a filename where corresponding HStoreFile in not present
+ hFilePath = new Path(hStoreFiles.get(0).getPath().getParent(), "incorrectFileName");
+ testDataTieringMethodWithPathNoException(methodCallerWithPath, hFilePath, false);
+ }
+
+ @Test
+ public void testColdDataFiles() {
+ Set<BlockCacheKey> allCachedBlocks = new HashSet<>();
+ for (HStoreFile file : hStoreFiles) {
+ allCachedBlocks.add(new BlockCacheKey(file.getPath(), 0, true, BlockType.DATA));
+ }
+
+ // Verify hStoreFile3 is identified as cold data
+ DataTieringMethodCallerWithPath methodCallerWithPath = DataTieringManager::isHotData;
+ Path hFilePath = hStoreFiles.get(3).getPath();
+ testDataTieringMethodWithPathNoException(methodCallerWithPath, hFilePath, false);
+
+ // Verify all the other files in hStoreFiles are hot data
+ for (int i = 0; i < hStoreFiles.size() - 1; i++) {
+ hFilePath = hStoreFiles.get(i).getPath();
+ testDataTieringMethodWithPathNoException(methodCallerWithPath, hFilePath, true);
+ }
+
+ try {
+ Set<String> coldFilePaths = dataTieringManager.getColdDataFiles(allCachedBlocks);
+ assertEquals(1, coldFilePaths.size());
+ } catch (DataTieringException e) {
+ fail("Unexpected DataTieringException: " + e.getMessage());
+ }
+ }
+
+ private void testDataTieringMethodWithPath(DataTieringMethodCallerWithPath caller, Path path,
+ boolean expectedResult, DataTieringException exception) {
+ try {
+ boolean value = caller.call(dataTieringManager, path);
+ if (exception != null) {
+ fail("Expected DataTieringException to be thrown");
+ }
+ assertEquals(expectedResult, value);
+ } catch (DataTieringException e) {
+ if (exception == null) {
+ fail("Unexpected DataTieringException: " + e.getMessage());
+ }
+ assertEquals(exception.getMessage(), e.getMessage());
+ }
+ }
+
+ private void testDataTieringMethodWithKey(DataTieringMethodCallerWithKey caller,
+ BlockCacheKey key, boolean expectedResult, DataTieringException exception) {
+ try {
+ boolean value = caller.call(dataTieringManager, key);
+ if (exception != null) {
+ fail("Expected DataTieringException to be thrown");
+ }
+ assertEquals(expectedResult, value);
+ } catch (DataTieringException e) {
+ if (exception == null) {
+ fail("Unexpected DataTieringException: " + e.getMessage());
+ }
+ assertEquals(exception.getMessage(), e.getMessage());
+ }
+ }
+
+ private void testDataTieringMethodWithPathExpectingException(
+ DataTieringMethodCallerWithPath caller, Path path, DataTieringException exception) {
+ testDataTieringMethodWithPath(caller, path, false, exception);
+ }
+
+ private void testDataTieringMethodWithPathNoException(DataTieringMethodCallerWithPath caller,
+ Path path, boolean expectedResult) {
+ testDataTieringMethodWithPath(caller, path, expectedResult, null);
+ }
+
+ private void testDataTieringMethodWithKeyExpectingException(DataTieringMethodCallerWithKey caller,
+ BlockCacheKey key, DataTieringException exception) {
+ testDataTieringMethodWithKey(caller, key, false, exception);
+ }
+
+ private void testDataTieringMethodWithKeyNoException(DataTieringMethodCallerWithKey caller,
+ BlockCacheKey key, boolean expectedResult) {
+ testDataTieringMethodWithKey(caller, key, expectedResult, null);
+ }
+
+ private static void setupOnlineRegions() throws IOException {
+ testOnlineRegions = new HashMap<>();
+ hStoreFiles = new ArrayList<>();
+
+ long day = 24 * 60 * 60 * 1000;
+ long currentTime = System.currentTimeMillis();
+
+ HRegion region1 = createHRegion("table1");
+
+ HStore hStore11 = createHStore(region1, "cf1", getConfWithTimeRangeDataTieringEnabled(day));
+ hStoreFiles
+ .add(createHStoreFile(hStore11.getStoreContext().getFamilyStoreDirectoryPath(), currentTime));
+ hStore11.refreshStoreFiles();
+ HStore hStore12 = createHStore(region1, "cf2");
+ hStoreFiles.add(createHStoreFile(hStore12.getStoreContext().getFamilyStoreDirectoryPath(),
+ currentTime - day));
+ hStore12.refreshStoreFiles();
+
+ region1.stores.put(Bytes.toBytes("cf1"), hStore11);
+ region1.stores.put(Bytes.toBytes("cf2"), hStore12);
+
+ HRegion region2 =
+ createHRegion("table2", getConfWithTimeRangeDataTieringEnabled((long) (2.5 * day)));
+
+ HStore hStore21 = createHStore(region2, "cf1");
+ hStoreFiles.add(createHStoreFile(hStore21.getStoreContext().getFamilyStoreDirectoryPath(),
+ currentTime - 2 * day));
+ hStore21.refreshStoreFiles();
+ HStore hStore22 = createHStore(region2, "cf2");
+ hStoreFiles.add(createHStoreFile(hStore22.getStoreContext().getFamilyStoreDirectoryPath(),
+ currentTime - 3 * day));
+ hStore22.refreshStoreFiles();
+
+ region2.stores.put(Bytes.toBytes("cf1"), hStore21);
+ region2.stores.put(Bytes.toBytes("cf2"), hStore22);
+
+ for (HStoreFile file : hStoreFiles) {
+ file.initReader();
+ }
+
+ testOnlineRegions.put(region1.getRegionInfo().getEncodedName(), region1);
+ testOnlineRegions.put(region2.getRegionInfo().getEncodedName(), region2);
+ }
+
+ private static HRegion createHRegion(String table) throws IOException {
+ return createHRegion(table, defaultConf);
+ }
+
+ private static HRegion createHRegion(String table, Configuration conf) throws IOException {
+ TableName tableName = TableName.valueOf(table);
+
+ TableDescriptor htd = TableDescriptorBuilder.newBuilder(tableName)
+ .setValue(DataTieringManager.DATATIERING_KEY, conf.get(DataTieringManager.DATATIERING_KEY))
+ .setValue(DataTieringManager.DATATIERING_HOT_DATA_AGE_KEY,
+ conf.get(DataTieringManager.DATATIERING_HOT_DATA_AGE_KEY))
+ .build();
+ RegionInfo hri = RegionInfoBuilder.newBuilder(tableName).build();
+
+ Configuration testConf = new Configuration(conf);
+ CommonFSUtils.setRootDir(testConf, testDir);
+ HRegionFileSystem regionFs = HRegionFileSystem.createRegionOnFileSystem(testConf, fs,
+ CommonFSUtils.getTableDir(testDir, hri.getTable()), hri);
+
+ return new HRegion(regionFs, null, conf, htd, null);
+ }
+
+ private static HStore createHStore(HRegion region, String columnFamily) throws IOException {
+ return createHStore(region, columnFamily, defaultConf);
+ }
+
+ private static HStore createHStore(HRegion region, String columnFamily, Configuration conf)
+ throws IOException {
+ ColumnFamilyDescriptor columnFamilyDescriptor =
+ ColumnFamilyDescriptorBuilder.newBuilder(Bytes.toBytes(columnFamily))
+ .setValue(DataTieringManager.DATATIERING_KEY, conf.get(DataTieringManager.DATATIERING_KEY))
+ .setValue(DataTieringManager.DATATIERING_HOT_DATA_AGE_KEY,
+ conf.get(DataTieringManager.DATATIERING_HOT_DATA_AGE_KEY))
+ .build();
+
+ return new HStore(region, columnFamilyDescriptor, conf, false);
+ }
+
+ private static Configuration getConfWithTimeRangeDataTieringEnabled(long hotDataAge) {
+ Configuration conf = new Configuration(defaultConf);
+ conf.set(DataTieringManager.DATATIERING_KEY, DataTieringType.TIME_RANGE.name());
+ conf.set(DataTieringManager.DATATIERING_HOT_DATA_AGE_KEY, String.valueOf(hotDataAge));
+ return conf;
+ }
+
+ private static HStoreFile createHStoreFile(Path storeDir, long timestamp) throws IOException {
+ String columnFamily = storeDir.getName();
+
+ StoreFileWriter storeFileWriter = new StoreFileWriter.Builder(defaultConf, cacheConf, fs)
+ .withOutputDir(storeDir).withFileContext(new HFileContextBuilder().build()).build();
+
+ writeStoreFileRandomData(storeFileWriter, Bytes.toBytes(columnFamily), Bytes.toBytes("random"),
+ timestamp);
+
+ return new HStoreFile(fs, storeFileWriter.getPath(), defaultConf, cacheConf, BloomType.NONE,
+ true);
+ }
+
+ private static void writeStoreFileRandomData(final StoreFileWriter writer, byte[] columnFamily,
+ byte[] qualifier, long timestamp) throws IOException {
+ try {
+ for (char d = 'a'; d <= 'z'; d++) {
+ for (char e = 'a'; e <= 'z'; e++) {
+ byte[] b = new byte[] { (byte) d, (byte) e };
+ writer.append(new KeyValue(b, columnFamily, qualifier, timestamp, b));
+ }
+ }
+ } finally {
+ writer.appendTrackedTimestampsToMetadata();
+ writer.close();
+ }
+ }
+}
(hbase) 04/07: HBASE-28468: Integrate the data-tiering logic into cache evictions. (#5829)
Posted by wc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wchevreuil pushed a commit to branch HBASE-28463
in repository https://gitbox.apache.org/repos/asf/hbase.git
commit 42d3d36951d76a0257766aeff8d958993d6af526
Author: jhungund <10...@users.noreply.github.com>
AuthorDate: Thu Apr 25 15:29:36 2024 +0530
HBASE-28468: Integrate the data-tiering logic into cache evictions. (#5829)
Signed-off-by: Wellington Chevreuil <wc...@apache.org>
---
.../hadoop/hbase/io/hfile/bucket/BucketCache.java | 36 ++++-
.../hbase/regionserver/DataTieringManager.java | 42 ++++-
.../hbase/regionserver/TestDataTieringManager.java | 178 +++++++++++++++++++++
3 files changed, 253 insertions(+), 3 deletions(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
index 63ae163dee5..e987730c7b0 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
@@ -1154,6 +1154,14 @@ public class BucketCache implements BlockCache, HeapSize {
// the cached time is recored in nanos, so we need to convert the grace period accordingly
long orphanGracePeriodNanos = orphanBlockGracePeriod * 1000000;
long bytesFreed = 0;
+ // Check the list of files to determine the cold files which can be readily evicted.
+ Map<String, String> coldFiles = null;
+ try {
+ DataTieringManager dataTieringManager = DataTieringManager.getInstance();
+ coldFiles = dataTieringManager.getColdFilesList();
+ } catch (IllegalStateException e) {
+ LOG.warn("Data Tiering Manager is not set. Ignore time-based block evictions.");
+ }
// Scan entire map putting bucket entry into appropriate bucket entry
// group
for (Map.Entry<BlockCacheKey, BucketEntry> bucketEntryWithKey : backingMap.entrySet()) {
@@ -1186,6 +1194,17 @@ public class BucketCache implements BlockCache, HeapSize {
}
}
}
+
+ if (bytesFreed < bytesToFreeWithExtra &&
+ coldFiles != null && coldFiles.containsKey(bucketEntryWithKey.getKey().getHfileName())
+ ) {
+ int freedBlockSize = bucketEntryWithKey.getValue().getLength();
+ if (evictBlockIfNoRpcReferenced(bucketEntryWithKey.getKey())) {
+ bytesFreed += freedBlockSize;
+ }
+ continue;
+ }
+
switch (entry.getPriority()) {
case SINGLE: {
bucketSingle.add(bucketEntryWithKey);
@@ -1201,6 +1220,22 @@ public class BucketCache implements BlockCache, HeapSize {
}
}
}
+
+ // Check if the cold file eviction is sufficient to create enough space.
+ bytesToFreeWithExtra -= bytesFreed;
+ if (bytesToFreeWithExtra <= 0) {
+ LOG.debug("Bucket cache free space completed; freed space : {} bytes of cold data blocks.",
+ StringUtils.byteDesc(bytesFreed));
+ return;
+ }
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug(
+ "Bucket cache free space completed; freed space : {} "
+ + "bytes of cold data blocks. {} more bytes required to be freed.",
+ StringUtils.byteDesc(bytesFreed), bytesToFreeWithExtra);
+ }
+
PriorityQueue<BucketEntryGroup> bucketQueue =
new PriorityQueue<>(3, Comparator.comparingLong(BucketEntryGroup::overflow));
@@ -1209,7 +1244,6 @@ public class BucketCache implements BlockCache, HeapSize {
bucketQueue.add(bucketMemory);
int remainingBuckets = bucketQueue.size();
-
BucketEntryGroup bucketGroup;
while ((bucketGroup = bucketQueue.poll()) != null) {
long overflow = bucketGroup.overflow();
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java
index dec96604774..6c699e77c2f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java
@@ -20,6 +20,7 @@ package org.apache.hadoop.hbase.regionserver;
import static org.apache.hadoop.hbase.regionserver.HStoreFile.TIMERANGE_KEY;
import java.io.IOException;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.OptionalLong;
@@ -173,12 +174,12 @@ public class DataTieringManager {
private long getMaxTimestamp(Path hFilePath) throws DataTieringException {
HStoreFile hStoreFile = getHStoreFile(hFilePath);
if (hStoreFile == null) {
- LOG.error("HStoreFile corresponding to " + hFilePath + " doesn't exist");
+ LOG.error("HStoreFile corresponding to {} doesn't exist", hFilePath);
return Long.MAX_VALUE;
}
OptionalLong maxTimestamp = hStoreFile.getMaximumTimestamp();
if (!maxTimestamp.isPresent()) {
- LOG.error("Maximum timestamp not present for " + hFilePath);
+ LOG.error("Maximum timestamp not present for {}", hFilePath);
return Long.MAX_VALUE;
}
return maxTimestamp.getAsLong();
@@ -270,4 +271,41 @@ public class DataTieringManager {
return Long.parseLong(
conf.get(DATATIERING_HOT_DATA_AGE_KEY, String.valueOf(DEFAULT_DATATIERING_HOT_DATA_AGE)));
}
+
+ /*
+ * This API traverses through the list of online regions and returns a subset of these files-names
+ * that are cold.
+ * @return List of names of files with cold data as per data-tiering logic.
+ */
+ public Map<String, String> getColdFilesList() {
+ Map<String, String> coldFiles = new HashMap<>();
+ for (HRegion r : this.onlineRegions.values()) {
+ for (HStore hStore : r.getStores()) {
+ Configuration conf = hStore.getReadOnlyConfiguration();
+ if (getDataTieringType(conf) != DataTieringType.TIME_RANGE) {
+ // Data-Tiering not enabled for the store. Just skip it.
+ continue;
+ }
+ Long hotDataAge = getDataTieringHotDataAge(conf);
+
+ for (HStoreFile hStoreFile : hStore.getStorefiles()) {
+ String hFileName =
+ hStoreFile.getFileInfo().getHFileInfo().getHFileContext().getHFileName();
+ OptionalLong maxTimestamp = hStoreFile.getMaximumTimestamp();
+ if (!maxTimestamp.isPresent()) {
+ LOG.warn("maxTimestamp missing for file: {}",
+ hStoreFile.getFileInfo().getActiveFileName());
+ continue;
+ }
+ long currentTimestamp = EnvironmentEdgeManager.getDelegate().currentTime();
+ long fileAge = currentTimestamp - maxTimestamp.getAsLong();
+ if (fileAge > hotDataAge) {
+ // Values do not matter.
+ coldFiles.put(hFileName, null);
+ }
+ }
+ }
+ }
+ return coldFiles;
+ }
}
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java
index 30420bcb779..013ed0f0a8b 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java
@@ -18,6 +18,7 @@
package org.apache.hadoop.hbase.regionserver;
import static org.apache.hadoop.hbase.HConstants.BUCKET_CACHE_SIZE_KEY;
+import static org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.DEFAULT_ERROR_TOLERATION_DURATION;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -51,7 +52,9 @@ import org.apache.hadoop.hbase.io.hfile.BlockCacheFactory;
import org.apache.hadoop.hbase.io.hfile.BlockCacheKey;
import org.apache.hadoop.hbase.io.hfile.BlockType;
import org.apache.hadoop.hbase.io.hfile.CacheConfig;
+import org.apache.hadoop.hbase.io.hfile.CacheTestUtils;
import org.apache.hadoop.hbase.io.hfile.HFileContextBuilder;
+import org.apache.hadoop.hbase.io.hfile.bucket.BucketCache;
import org.apache.hadoop.hbase.regionserver.storefiletracker.StoreFileTracker;
import org.apache.hadoop.hbase.regionserver.storefiletracker.StoreFileTrackerFactory;
import org.apache.hadoop.hbase.testclassification.RegionServerTests;
@@ -247,6 +250,181 @@ public class TestDataTieringManager {
}
}
+ @Test
+ public void testPickColdDataFiles() {
+ Map<String, String> coldDataFiles = dataTieringManager.getColdFilesList();
+ assertEquals(1, coldDataFiles.size());
+ // hStoreFiles[3] is the cold file.
+ assert (coldDataFiles.containsKey(hStoreFiles.get(3).getFileInfo().getActiveFileName()));
+ }
+
+ /*
+ * Verify that two cold blocks(both) are evicted when bucket reaches its capacity. The hot file
+ * remains in the cache.
+ */
+ @Test
+ public void testBlockEvictions() throws Exception {
+ long capacitySize = 40 * 1024;
+ int writeThreads = 3;
+ int writerQLen = 64;
+ int[] bucketSizes = new int[] { 8 * 1024 + 1024 };
+
+ // Setup: Create a bucket cache with lower capacity
+ BucketCache bucketCache = new BucketCache("file:" + testDir + "/bucket.cache", capacitySize,
+ 8192, bucketSizes, writeThreads, writerQLen, testDir + "/bucket.persistence",
+ DEFAULT_ERROR_TOLERATION_DURATION, defaultConf);
+
+ // Create three Cache keys with cold data files and a block with hot data.
+ // hStoreFiles.get(3) is a cold data file, while hStoreFiles.get(0) is a hot file.
+ Set<BlockCacheKey> cacheKeys = new HashSet<>();
+ cacheKeys.add(new BlockCacheKey(hStoreFiles.get(3).getPath(), 0, true, BlockType.DATA));
+ cacheKeys.add(new BlockCacheKey(hStoreFiles.get(3).getPath(), 8192, true, BlockType.DATA));
+ cacheKeys.add(new BlockCacheKey(hStoreFiles.get(0).getPath(), 0, true, BlockType.DATA));
+
+ // Create dummy data to be cached and fill the cache completely.
+ CacheTestUtils.HFileBlockPair[] blocks = CacheTestUtils.generateHFileBlocks(8192, 3);
+
+ int blocksIter = 0;
+ for (BlockCacheKey key : cacheKeys) {
+ bucketCache.cacheBlock(key, blocks[blocksIter++].getBlock());
+ // Ensure that the block is persisted to the file.
+ Waiter.waitFor(defaultConf, 10000, 100, () -> (bucketCache.getBackingMap().containsKey(key)));
+ }
+
+ // Verify that the bucket cache contains 3 blocks.
+ assertEquals(3, bucketCache.getBackingMap().keySet().size());
+
+ // Add an additional block into cache with hot data which should trigger the eviction
+ BlockCacheKey newKey = new BlockCacheKey(hStoreFiles.get(2).getPath(), 0, true, BlockType.DATA);
+ CacheTestUtils.HFileBlockPair[] newBlock = CacheTestUtils.generateHFileBlocks(8192, 1);
+
+ bucketCache.cacheBlock(newKey, newBlock[0].getBlock());
+ Waiter.waitFor(defaultConf, 10000, 100,
+ () -> (bucketCache.getBackingMap().containsKey(newKey)));
+
+ // Verify that the bucket cache now contains 2 hot blocks blocks only.
+ // Both cold blocks of 8KB will be evicted to make room for 1 block of 8KB + an additional
+ // space.
+ validateBlocks(bucketCache.getBackingMap().keySet(), 2, 2, 0);
+ }
+
+ /*
+ * Verify that two cold blocks(both) are evicted when bucket reaches its capacity, but one cold
+ * block remains in the cache since the required space is freed.
+ */
+ @Test
+ public void testBlockEvictionsAllColdBlocks() throws Exception {
+ long capacitySize = 40 * 1024;
+ int writeThreads = 3;
+ int writerQLen = 64;
+ int[] bucketSizes = new int[] { 8 * 1024 + 1024 };
+
+ // Setup: Create a bucket cache with lower capacity
+ BucketCache bucketCache = new BucketCache("file:" + testDir + "/bucket.cache", capacitySize,
+ 8192, bucketSizes, writeThreads, writerQLen, testDir + "/bucket.persistence",
+ DEFAULT_ERROR_TOLERATION_DURATION, defaultConf);
+
+ // Create three Cache keys with three cold data blocks.
+ // hStoreFiles.get(3) is a cold data file.
+ Set<BlockCacheKey> cacheKeys = new HashSet<>();
+ cacheKeys.add(new BlockCacheKey(hStoreFiles.get(3).getPath(), 0, true, BlockType.DATA));
+ cacheKeys.add(new BlockCacheKey(hStoreFiles.get(3).getPath(), 8192, true, BlockType.DATA));
+ cacheKeys.add(new BlockCacheKey(hStoreFiles.get(3).getPath(), 16384, true, BlockType.DATA));
+
+ // Create dummy data to be cached and fill the cache completely.
+ CacheTestUtils.HFileBlockPair[] blocks = CacheTestUtils.generateHFileBlocks(8192, 3);
+
+ int blocksIter = 0;
+ for (BlockCacheKey key : cacheKeys) {
+ bucketCache.cacheBlock(key, blocks[blocksIter++].getBlock());
+ // Ensure that the block is persisted to the file.
+ Waiter.waitFor(defaultConf, 10000, 100, () -> (bucketCache.getBackingMap().containsKey(key)));
+ }
+
+ // Verify that the bucket cache contains 3 blocks.
+ assertEquals(3, bucketCache.getBackingMap().keySet().size());
+
+ // Add an additional block into cache with hot data which should trigger the eviction
+ BlockCacheKey newKey = new BlockCacheKey(hStoreFiles.get(2).getPath(), 0, true, BlockType.DATA);
+ CacheTestUtils.HFileBlockPair[] newBlock = CacheTestUtils.generateHFileBlocks(8192, 1);
+
+ bucketCache.cacheBlock(newKey, newBlock[0].getBlock());
+ Waiter.waitFor(defaultConf, 10000, 100,
+ () -> (bucketCache.getBackingMap().containsKey(newKey)));
+
+ // Verify that the bucket cache now contains 1 cold block and a newly added hot block.
+ validateBlocks(bucketCache.getBackingMap().keySet(), 2, 1, 1);
+ }
+
+ /*
+ * Verify that a hot block evicted along with a cold block when bucket reaches its capacity.
+ */
+ @Test
+ public void testBlockEvictionsHotBlocks() throws Exception {
+ long capacitySize = 40 * 1024;
+ int writeThreads = 3;
+ int writerQLen = 64;
+ int[] bucketSizes = new int[] { 8 * 1024 + 1024 };
+
+ // Setup: Create a bucket cache with lower capacity
+ BucketCache bucketCache = new BucketCache("file:" + testDir + "/bucket.cache", capacitySize,
+ 8192, bucketSizes, writeThreads, writerQLen, testDir + "/bucket.persistence",
+ DEFAULT_ERROR_TOLERATION_DURATION, defaultConf);
+
+ // Create three Cache keys with two hot data blocks and one cold data block
+ // hStoreFiles.get(0) is a hot data file and hStoreFiles.get(3) is a cold data file.
+ Set<BlockCacheKey> cacheKeys = new HashSet<>();
+ cacheKeys.add(new BlockCacheKey(hStoreFiles.get(0).getPath(), 0, true, BlockType.DATA));
+ cacheKeys.add(new BlockCacheKey(hStoreFiles.get(0).getPath(), 8192, true, BlockType.DATA));
+ cacheKeys.add(new BlockCacheKey(hStoreFiles.get(3).getPath(), 0, true, BlockType.DATA));
+
+ // Create dummy data to be cached and fill the cache completely.
+ CacheTestUtils.HFileBlockPair[] blocks = CacheTestUtils.generateHFileBlocks(8192, 3);
+
+ int blocksIter = 0;
+ for (BlockCacheKey key : cacheKeys) {
+ bucketCache.cacheBlock(key, blocks[blocksIter++].getBlock());
+ // Ensure that the block is persisted to the file.
+ Waiter.waitFor(defaultConf, 10000, 100, () -> (bucketCache.getBackingMap().containsKey(key)));
+ }
+
+ // Verify that the bucket cache contains 3 blocks.
+ assertEquals(3, bucketCache.getBackingMap().keySet().size());
+
+ // Add an additional block which should evict the only cold block with an additional hot block.
+ BlockCacheKey newKey = new BlockCacheKey(hStoreFiles.get(2).getPath(), 0, true, BlockType.DATA);
+ CacheTestUtils.HFileBlockPair[] newBlock = CacheTestUtils.generateHFileBlocks(8192, 1);
+
+ bucketCache.cacheBlock(newKey, newBlock[0].getBlock());
+ Waiter.waitFor(defaultConf, 10000, 100,
+ () -> (bucketCache.getBackingMap().containsKey(newKey)));
+
+ // Verify that the bucket cache now contains 2 hot blocks.
+ // Only one of the older hot blocks is retained and other one is the newly added hot block.
+ validateBlocks(bucketCache.getBackingMap().keySet(), 2, 2, 0);
+ }
+
+ private void validateBlocks(Set<BlockCacheKey> keys, int expectedTotalKeys, int expectedHotBlocks,
+ int expectedColdBlocks) {
+ int numHotBlocks = 0, numColdBlocks = 0;
+
+ assertEquals(expectedTotalKeys, keys.size());
+ int iter = 0;
+ for (BlockCacheKey key : keys) {
+ try {
+ if (dataTieringManager.isHotData(key)) {
+ numHotBlocks++;
+ } else {
+ numColdBlocks++;
+ }
+ } catch (Exception e) {
+ fail("Unexpected exception!");
+ }
+ }
+ assertEquals(expectedHotBlocks, numHotBlocks);
+ assertEquals(expectedColdBlocks, numColdBlocks);
+ }
+
private void testDataTieringMethodWithPath(DataTieringMethodCallerWithPath caller, Path path,
boolean expectedResult, DataTieringException exception) {
try {
(hbase) 06/07: HBASE-28469: Integration of time-based priority caching into compaction paths (#5866)
Posted by wc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wchevreuil pushed a commit to branch HBASE-28463
in repository https://gitbox.apache.org/repos/asf/hbase.git
commit 4ce77d73d51a45fc42d4595b8fd98fe7c8034749
Author: vinayak hegde <vi...@gmail.com>
AuthorDate: Wed May 22 18:59:49 2024 +0530
HBASE-28469: Integration of time-based priority caching into compaction paths (#5866)
Signed-off-by: Wellington Chevreuil <wc...@apache.org>
Reviewed-by: Janardhan Hugund <ja...@cloudera.com>
---
.../apache/hadoop/hbase/io/hfile/BlockCache.java | 17 ++
.../hadoop/hbase/io/hfile/BlockCacheKey.java | 1 -
.../hadoop/hbase/io/hfile/CombinedBlockCache.java | 20 ++-
.../org/apache/hadoop/hbase/io/hfile/HFile.java | 5 +
.../hadoop/hbase/io/hfile/HFileWriterImpl.java | 42 +++++
.../hadoop/hbase/io/hfile/bucket/BucketCache.java | 13 ++
.../hbase/regionserver/DataTieringManager.java | 50 +++++-
.../hbase/regionserver/HRegionFileSystem.java | 25 +++
.../hadoop/hbase/regionserver/StoreFileWriter.java | 23 +--
.../hbase/regionserver/TimeRangeTracker.java | 4 +-
.../hbase/regionserver/TestDataTieringManager.java | 186 ++++++++++++++++++---
11 files changed, 330 insertions(+), 56 deletions(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java
index d923e4c0780..cef5a6488fa 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java
@@ -23,6 +23,7 @@ import java.util.Optional;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.conf.ConfigurationObserver;
+import org.apache.hadoop.hbase.regionserver.TimeRangeTracker;
import org.apache.hadoop.hbase.util.Pair;
import org.apache.yetus.audience.InterfaceAudience;
@@ -208,6 +209,22 @@ public interface BlockCache extends Iterable<CachedBlock>, ConfigurationObserver
return Optional.empty();
}
+ /**
+ * Checks whether the block represented by the given key should be cached or not. This method may
+ * not be overridden by all implementing classes. In such cases, the returned Optional will be
+ * empty. For subclasses implementing this logic, the returned Optional would contain the boolean
+ * value reflecting if the passed block should indeed be cached.
+ * @param key The key representing the block to check if it should be cached.
+ * @param timeRangeTracker the time range tracker containing the timestamps
+ * @param conf The configuration object to use for determining caching behavior.
+ * @return An empty Optional if this method is not supported; otherwise, the returned Optional
+ * contains the boolean value indicating if the block should be cached.
+ */
+ default Optional<Boolean> shouldCacheBlock(BlockCacheKey key, TimeRangeTracker timeRangeTracker,
+ Configuration conf) {
+ return Optional.empty();
+ }
+
/**
* Checks whether the block for the passed key is already cached. This method may not be
* overridden by all implementing classes. In such cases, the returned Optional will be empty. For
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheKey.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheKey.java
index bf22d38e373..bcc1f58ba5e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheKey.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheKey.java
@@ -116,5 +116,4 @@ public class BlockCacheKey implements HeapSize, java.io.Serializable {
public Path getFilePath() {
return filePath;
}
-
}
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java
index 9f173477108..672a7bc1e72 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java
@@ -26,6 +26,7 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.io.HeapSize;
import org.apache.hadoop.hbase.io.hfile.bucket.BucketCache;
+import org.apache.hadoop.hbase.regionserver.TimeRangeTracker;
import org.apache.hadoop.hbase.util.Pair;
import org.apache.yetus.audience.InterfaceAudience;
import org.slf4j.Logger;
@@ -488,11 +489,22 @@ public class CombinedBlockCache implements ResizableBlockCache, HeapSize {
@Override
public Optional<Boolean> shouldCacheFile(HFileInfo hFileInfo, Configuration conf) {
- Optional<Boolean> l1Result = l1Cache.shouldCacheFile(hFileInfo, conf);
- Optional<Boolean> l2Result = l2Cache.shouldCacheFile(hFileInfo, conf);
+ return combineCacheResults(l1Cache.shouldCacheFile(hFileInfo, conf),
+ l2Cache.shouldCacheFile(hFileInfo, conf));
+ }
+
+ @Override
+ public Optional<Boolean> shouldCacheBlock(BlockCacheKey key, TimeRangeTracker timeRangeTracker,
+ Configuration conf) {
+ return combineCacheResults(l1Cache.shouldCacheBlock(key, timeRangeTracker, conf),
+ l2Cache.shouldCacheBlock(key, timeRangeTracker, conf));
+ }
+
+ private Optional<Boolean> combineCacheResults(Optional<Boolean> result1,
+ Optional<Boolean> result2) {
final Mutable<Boolean> combinedResult = new MutableBoolean(true);
- l1Result.ifPresent(b -> combinedResult.setValue(b && combinedResult.getValue()));
- l2Result.ifPresent(b -> combinedResult.setValue(b && combinedResult.getValue()));
+ result1.ifPresent(b -> combinedResult.setValue(b && combinedResult.getValue()));
+ result2.ifPresent(b -> combinedResult.setValue(b && combinedResult.getValue()));
return Optional.of(combinedResult.getValue());
}
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java
index 135c6cfecbc..d8dffce59e8 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java
@@ -212,6 +212,11 @@ public final class HFile {
/** Add an element to the file info map. */
void appendFileInfo(byte[] key, byte[] value) throws IOException;
+ /**
+ * Add TimestampRange and earliest put timestamp to Metadata
+ */
+ void appendTrackedTimestampsToMetadata() throws IOException;
+
/** Returns the path to this {@link HFile} */
Path getPath();
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterImpl.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterImpl.java
index c8c21e0625c..96bfe42f1fd 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterImpl.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterImpl.java
@@ -18,6 +18,8 @@
package org.apache.hadoop.hbase.io.hfile;
import static org.apache.hadoop.hbase.io.hfile.BlockCompressedSizePredicator.MAX_BLOCK_SIZE_UNCOMPRESSED;
+import static org.apache.hadoop.hbase.regionserver.HStoreFile.EARLIEST_PUT_TS;
+import static org.apache.hadoop.hbase.regionserver.HStoreFile.TIMERANGE_KEY;
import java.io.DataOutput;
import java.io.DataOutputStream;
@@ -26,6 +28,7 @@ import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
+import java.util.Optional;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FSDataOutputStream;
import org.apache.hadoop.fs.FileSystem;
@@ -46,6 +49,7 @@ import org.apache.hadoop.hbase.io.crypto.Encryption;
import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
import org.apache.hadoop.hbase.io.encoding.IndexBlockEncoding;
import org.apache.hadoop.hbase.io.hfile.HFileBlock.BlockWritable;
+import org.apache.hadoop.hbase.regionserver.TimeRangeTracker;
import org.apache.hadoop.hbase.security.EncryptionUtil;
import org.apache.hadoop.hbase.security.User;
import org.apache.hadoop.hbase.util.BloomFilterWriter;
@@ -118,6 +122,8 @@ public class HFileWriterImpl implements HFile.Writer {
/** May be null if we were passed a stream. */
protected final Path path;
+ protected final Configuration conf;
+
/** Cache configuration for caching data on write. */
protected final CacheConfig cacheConf;
@@ -171,12 +177,16 @@ public class HFileWriterImpl implements HFile.Writer {
protected long maxMemstoreTS = 0;
+ private final TimeRangeTracker timeRangeTracker;
+ private long earliestPutTs = HConstants.LATEST_TIMESTAMP;
+
public HFileWriterImpl(final Configuration conf, CacheConfig cacheConf, Path path,
FSDataOutputStream outputStream, HFileContext fileContext) {
this.outputStream = outputStream;
this.path = path;
this.name = path != null ? path.getName() : outputStream.toString();
this.hFileContext = fileContext;
+ this.timeRangeTracker = TimeRangeTracker.create(TimeRangeTracker.Type.NON_SYNC);
DataBlockEncoding encoding = hFileContext.getDataBlockEncoding();
if (encoding != DataBlockEncoding.NONE) {
this.blockEncoder = new HFileDataBlockEncoderImpl(encoding);
@@ -191,6 +201,7 @@ public class HFileWriterImpl implements HFile.Writer {
}
closeOutputStream = path != null;
this.cacheConf = cacheConf;
+ this.conf = conf;
float encodeBlockSizeRatio = conf.getFloat(UNIFIED_ENCODED_BLOCKSIZE_RATIO, 0f);
this.encodedBlockSizeLimit = (int) (hFileContext.getBlocksize() * encodeBlockSizeRatio);
@@ -557,6 +568,9 @@ public class HFileWriterImpl implements HFile.Writer {
cacheConf.getBlockCache().ifPresent(cache -> {
HFileBlock cacheFormatBlock = blockWriter.getBlockForCaching(cacheConf);
BlockCacheKey key = buildCacheBlockKey(offset, cacheFormatBlock.getBlockType());
+ if (!shouldCacheBlock(cache, key)) {
+ return;
+ }
try {
cache.cacheBlock(key, cacheFormatBlock, cacheConf.isInMemory(), true);
} finally {
@@ -573,6 +587,11 @@ public class HFileWriterImpl implements HFile.Writer {
return new BlockCacheKey(name, offset, true, blockType);
}
+ private boolean shouldCacheBlock(BlockCache cache, BlockCacheKey key) {
+ Optional<Boolean> result = cache.shouldCacheBlock(key, timeRangeTracker, conf);
+ return result.orElse(true);
+ }
+
/**
* Ready a new block for writing.
*/
@@ -775,6 +794,8 @@ public class HFileWriterImpl implements HFile.Writer {
if (tagsLength > this.maxTagsLength) {
this.maxTagsLength = tagsLength;
}
+
+ trackTimestamps(cell);
}
@Override
@@ -867,4 +888,25 @@ public class HFileWriterImpl implements HFile.Writer {
outputStream = null;
}
}
+
+ /**
+ * Add TimestampRange and earliest put timestamp to Metadata
+ */
+ public void appendTrackedTimestampsToMetadata() throws IOException {
+ // TODO: The StoreFileReader always converts the byte[] to TimeRange
+ // via TimeRangeTracker, so we should write the serialization data of TimeRange directly.
+ appendFileInfo(TIMERANGE_KEY, TimeRangeTracker.toByteArray(timeRangeTracker));
+ appendFileInfo(EARLIEST_PUT_TS, Bytes.toBytes(earliestPutTs));
+ }
+
+ /**
+ * Record the earliest Put timestamp. If the timeRangeTracker is not set, update TimeRangeTracker
+ * to include the timestamp of this key
+ */
+ private void trackTimestamps(final ExtendedCell cell) {
+ if (Cell.Type.Put == cell.getType()) {
+ earliestPutTs = Math.min(earliestPutTs, cell.getTimestamp());
+ }
+ timeRangeTracker.includeTimestamp(cell);
+ }
}
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
index 5bbbb53fe11..2af46a49d89 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
@@ -86,6 +86,7 @@ import org.apache.hadoop.hbase.protobuf.ProtobufMagic;
import org.apache.hadoop.hbase.regionserver.DataTieringManager;
import org.apache.hadoop.hbase.regionserver.HRegion;
import org.apache.hadoop.hbase.regionserver.StoreFileInfo;
+import org.apache.hadoop.hbase.regionserver.TimeRangeTracker;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
import org.apache.hadoop.hbase.util.IdReadWriteLock;
@@ -2456,6 +2457,18 @@ public class BucketCache implements BlockCache, HeapSize {
return Optional.of(!fullyCachedFiles.containsKey(fileName));
}
+ @Override
+ public Optional<Boolean> shouldCacheBlock(BlockCacheKey key, TimeRangeTracker timeRangeTracker,
+ Configuration conf) {
+ DataTieringManager dataTieringManager = DataTieringManager.getInstance();
+ if (dataTieringManager != null && !dataTieringManager.isHotData(timeRangeTracker, conf)) {
+ LOG.debug("Data tiering is enabled for file: '{}' and it is not hot data",
+ key.getHfileName());
+ return Optional.of(false);
+ }
+ return Optional.of(true);
+ }
+
@Override
public Optional<Boolean> isAlreadyCached(BlockCacheKey key) {
boolean foundKey = backingMap.containsKey(key);
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java
index 952b4d4938d..aa56e3f6444 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java
@@ -131,6 +131,27 @@ public class DataTieringManager {
return isHotData(hFilePath);
}
+ /**
+ * Determines whether the data associated with the given time range tracker is considered hot. If
+ * the data tiering type is set to {@link DataTieringType#TIME_RANGE}, it uses the maximum
+ * timestamp from the time range tracker to determine if the data is hot. Otherwise, it considers
+ * the data as hot by default.
+ * @param timeRangeTracker the time range tracker containing the timestamps
+ * @param conf The configuration object to use for determining hot data criteria.
+ * @return {@code true} if the data is hot, {@code false} otherwise
+ */
+ public boolean isHotData(TimeRangeTracker timeRangeTracker, Configuration conf) {
+ DataTieringType dataTieringType = getDataTieringType(conf);
+ if (
+ dataTieringType.equals(DataTieringType.TIME_RANGE)
+ && timeRangeTracker.getMax() != TimeRangeTracker.INITIAL_MAX_TIMESTAMP
+ ) {
+ return hotDataValidator(timeRangeTracker.getMax(), getDataTieringHotDataAge(conf));
+ }
+ // DataTieringType.NONE or other types are considered hot by default
+ return true;
+ }
+
/**
* Determines whether the data in the HFile at the given path is considered hot based on the
* configured data tiering type and hot data age. If the data tiering type is set to
@@ -151,6 +172,27 @@ public class DataTieringManager {
return true;
}
+ /**
+ * Determines whether the data in the HFile at the given path is considered hot based on the
+ * configured data tiering type and hot data age. If the data tiering type is set to
+ * {@link DataTieringType#TIME_RANGE}, it validates the data against the provided maximum
+ * timestamp.
+ * @param hFilePath the path to the HFile
+ * @param maxTimestamp the maximum timestamp to validate against
+ * @return {@code true} if the data is hot, {@code false} otherwise
+ * @throws DataTieringException if there is an error retrieving data tiering information
+ */
+ public boolean isHotData(Path hFilePath, long maxTimestamp) throws DataTieringException {
+ Configuration configuration = getConfiguration(hFilePath);
+ DataTieringType dataTieringType = getDataTieringType(configuration);
+
+ if (dataTieringType.equals(DataTieringType.TIME_RANGE)) {
+ return hotDataValidator(maxTimestamp, getDataTieringHotDataAge(configuration));
+ }
+ // DataTieringType.NONE or other types are considered hot by default
+ return true;
+ }
+
/**
* Determines whether the data in the HFile being read is considered hot based on the configured
* data tiering type and hot data age. If the data tiering type is set to
@@ -231,10 +273,12 @@ public class DataTieringManager {
}
private HRegion getHRegion(Path hFilePath) throws DataTieringException {
- if (hFilePath.getParent() == null || hFilePath.getParent().getParent() == null) {
- throw new DataTieringException("Incorrect HFile Path: " + hFilePath);
+ String regionId;
+ try {
+ regionId = HRegionFileSystem.getRegionId(hFilePath);
+ } catch (IOException e) {
+ throw new DataTieringException(e.getMessage());
}
- String regionId = hFilePath.getParent().getParent().getName();
HRegion hRegion = this.onlineRegions.get(regionId);
if (hRegion == null) {
throw new DataTieringException("HRegion corresponding to " + hFilePath + " doesn't exist");
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
index 827051b9b3e..33ef304ce85 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
@@ -988,6 +988,31 @@ public class HRegionFileSystem {
}
}
+ /**
+ * Retrieves the Region ID from the given HFile path.
+ * @param hFilePath The path of the HFile.
+ * @return The Region ID extracted from the HFile path.
+ * @throws IOException If an I/O error occurs or if the HFile path is incorrect.
+ */
+ public static String getRegionId(Path hFilePath) throws IOException {
+ if (hFilePath.getParent() == null || hFilePath.getParent().getParent() == null) {
+ throw new IOException("Incorrect HFile Path: " + hFilePath);
+ }
+ Path dir = hFilePath.getParent().getParent();
+ if (isTemporaryDirectoryName(dir.getName())) {
+ if (dir.getParent() == null) {
+ throw new IOException("Incorrect HFile Path: " + hFilePath);
+ }
+ return dir.getParent().getName();
+ }
+ return dir.getName();
+ }
+
+ private static boolean isTemporaryDirectoryName(String dirName) {
+ return REGION_MERGES_DIR.equals(dirName) || REGION_SPLITS_DIR.equals(dirName)
+ || REGION_TEMP_DIR.equals(dirName);
+ }
+
/**
* Creates a directory. Assumes the user has already checked for this directory existence.
* @return the result of fs.mkdirs(). In case underlying fs throws an IOException, it checks
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileWriter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileWriter.java
index c2a9b839c82..569b9d3faa6 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileWriter.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileWriter.java
@@ -22,13 +22,11 @@ import static org.apache.hadoop.hbase.regionserver.HStoreFile.BLOOM_FILTER_PARAM
import static org.apache.hadoop.hbase.regionserver.HStoreFile.BLOOM_FILTER_TYPE_KEY;
import static org.apache.hadoop.hbase.regionserver.HStoreFile.COMPACTION_EVENT_KEY;
import static org.apache.hadoop.hbase.regionserver.HStoreFile.DELETE_FAMILY_COUNT;
-import static org.apache.hadoop.hbase.regionserver.HStoreFile.EARLIEST_PUT_TS;
import static org.apache.hadoop.hbase.regionserver.HStoreFile.HISTORICAL_KEY;
import static org.apache.hadoop.hbase.regionserver.HStoreFile.MAJOR_COMPACTION_KEY;
import static org.apache.hadoop.hbase.regionserver.HStoreFile.MAX_SEQ_ID_KEY;
import static org.apache.hadoop.hbase.regionserver.HStoreFile.MOB_CELLS_COUNT;
import static org.apache.hadoop.hbase.regionserver.HStoreFile.MOB_FILE_REFS;
-import static org.apache.hadoop.hbase.regionserver.HStoreFile.TIMERANGE_KEY;
import static org.apache.hadoop.hbase.regionserver.StoreEngine.STORE_ENGINE_CLASS_KEY;
import java.io.IOException;
@@ -52,7 +50,6 @@ import org.apache.hadoop.hbase.CellComparator;
import org.apache.hadoop.hbase.CellUtil;
import org.apache.hadoop.hbase.ExtendedCell;
import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.PrivateCellUtil;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder;
@@ -496,11 +493,9 @@ public class StoreFileWriter implements CellSink, ShipperListener {
private final BloomFilterWriter deleteFamilyBloomFilterWriter;
private final BloomType bloomType;
private byte[] bloomParam = null;
- private long earliestPutTs = HConstants.LATEST_TIMESTAMP;
private long deleteFamilyCnt = 0;
private BloomContext bloomContext = null;
private BloomContext deleteFamilyBloomContext = null;
- private final TimeRangeTracker timeRangeTracker;
private final Supplier<Collection<HStoreFile>> compactedFilesSupplier;
private HFile.Writer writer;
@@ -524,7 +519,6 @@ public class StoreFileWriter implements CellSink, ShipperListener {
HFileContext fileContext, boolean shouldDropCacheBehind,
Supplier<Collection<HStoreFile>> compactedFilesSupplier) throws IOException {
this.compactedFilesSupplier = compactedFilesSupplier;
- this.timeRangeTracker = TimeRangeTracker.create(TimeRangeTracker.Type.NON_SYNC);
// TODO : Change all writers to be specifically created for compaction context
writer =
HFile.getWriterFactory(conf, cacheConf).withPath(fs, path).withFavoredNodes(favoredNodes)
@@ -666,21 +660,7 @@ public class StoreFileWriter implements CellSink, ShipperListener {
* Add TimestampRange and earliest put timestamp to Metadata
*/
private void appendTrackedTimestampsToMetadata() throws IOException {
- // TODO: The StoreFileReader always converts the byte[] to TimeRange
- // via TimeRangeTracker, so we should write the serialization data of TimeRange directly.
- appendFileInfo(TIMERANGE_KEY, TimeRangeTracker.toByteArray(timeRangeTracker));
- appendFileInfo(EARLIEST_PUT_TS, Bytes.toBytes(earliestPutTs));
- }
-
- /**
- * Record the earlest Put timestamp. If the timeRangeTracker is not set, update TimeRangeTracker
- * to include the timestamp of this key
- */
- private void trackTimestamps(final ExtendedCell cell) {
- if (KeyValue.Type.Put.getCode() == cell.getTypeByte()) {
- earliestPutTs = Math.min(earliestPutTs, cell.getTimestamp());
- }
- timeRangeTracker.includeTimestamp(cell);
+ writer.appendTrackedTimestampsToMetadata();
}
private void appendGeneralBloomfilter(final ExtendedCell cell) throws IOException {
@@ -711,7 +691,6 @@ public class StoreFileWriter implements CellSink, ShipperListener {
appendGeneralBloomfilter(cell);
appendDeleteFamilyBloomFilter(cell);
writer.append(cell);
- trackTimestamps(cell);
}
private void beforeShipped() throws IOException {
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/TimeRangeTracker.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/TimeRangeTracker.java
index c0647ec01a0..1c2f1673b89 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/TimeRangeTracker.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/TimeRangeTracker.java
@@ -53,8 +53,8 @@ public abstract class TimeRangeTracker {
SYNC
}
- static final long INITIAL_MIN_TIMESTAMP = Long.MAX_VALUE;
- static final long INITIAL_MAX_TIMESTAMP = -1L;
+ public static final long INITIAL_MIN_TIMESTAMP = Long.MAX_VALUE;
+ public static final long INITIAL_MAX_TIMESTAMP = -1L;
public static TimeRangeTracker create(Type type) {
switch (type) {
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java
index 50878abf551..6b0cef666f7 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java
@@ -32,6 +32,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
+import java.util.Random;
import java.util.Set;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
@@ -99,6 +100,7 @@ public class TestDataTieringManager {
private static final Logger LOG = LoggerFactory.getLogger(TestDataTieringManager.class);
private static final HBaseTestingUtil TEST_UTIL = new HBaseTestingUtil();
+ private static final long DAY = 24 * 60 * 60 * 1000;
private static Configuration defaultConf;
private static FileSystem fs;
private static BlockCache blockCache;
@@ -109,20 +111,27 @@ public class TestDataTieringManager {
private static DataTieringManager dataTieringManager;
private static final List<HStoreFile> hStoreFiles = new ArrayList<>();
+ /**
+ * Represents the current lexicographically increasing string used as a row key when writing
+ * HFiles. It is incremented each time {@link #nextString()} is called to generate unique row
+ * keys.
+ */
+ private static String rowKeyString;
+
@BeforeClass
public static void setupBeforeClass() throws Exception {
testDir = TEST_UTIL.getDataTestDir(TestDataTieringManager.class.getSimpleName());
defaultConf = TEST_UTIL.getConfiguration();
- defaultConf.setBoolean(CacheConfig.PREFETCH_BLOCKS_ON_OPEN_KEY, true);
- defaultConf.setStrings(HConstants.BUCKET_CACHE_IOENGINE_KEY, "offheap");
- defaultConf.setLong(BUCKET_CACHE_SIZE_KEY, 32);
- defaultConf.setBoolean(DataTieringManager.GLOBAL_DATA_TIERING_ENABLED_KEY, true);
- fs = HFileSystem.get(defaultConf);
- blockCache = BlockCacheFactory.createBlockCache(defaultConf);
- cacheConf = new CacheConfig(defaultConf, blockCache);
+ updateCommonConfigurations();
assertTrue(DataTieringManager.instantiate(defaultConf, testOnlineRegions));
- setupOnlineRegions();
dataTieringManager = DataTieringManager.getInstance();
+ rowKeyString = "";
+ }
+
+ private static void updateCommonConfigurations() {
+ defaultConf.setBoolean(DataTieringManager.GLOBAL_DATA_TIERING_ENABLED_KEY, true);
+ defaultConf.setStrings(HConstants.BUCKET_CACHE_IOENGINE_KEY, "offheap");
+ defaultConf.setLong(BUCKET_CACHE_SIZE_KEY, 32);
}
@FunctionalInterface
@@ -136,7 +145,8 @@ public class TestDataTieringManager {
}
@Test
- public void testDataTieringEnabledWithKey() {
+ public void testDataTieringEnabledWithKey() throws IOException {
+ initializeTestEnvironment();
DataTieringMethodCallerWithKey methodCallerWithKey = DataTieringManager::isDataTieringEnabled;
// Test with valid key
@@ -154,7 +164,8 @@ public class TestDataTieringManager {
}
@Test
- public void testDataTieringEnabledWithPath() {
+ public void testDataTieringEnabledWithPath() throws IOException {
+ initializeTestEnvironment();
DataTieringMethodCallerWithPath methodCallerWithPath = DataTieringManager::isDataTieringEnabled;
// Test with valid path
@@ -184,7 +195,8 @@ public class TestDataTieringManager {
}
@Test
- public void testHotDataWithKey() {
+ public void testHotDataWithKey() throws IOException {
+ initializeTestEnvironment();
DataTieringMethodCallerWithKey methodCallerWithKey = DataTieringManager::isHotData;
// Test with valid key
@@ -197,7 +209,8 @@ public class TestDataTieringManager {
}
@Test
- public void testHotDataWithPath() {
+ public void testHotDataWithPath() throws IOException {
+ initializeTestEnvironment();
DataTieringMethodCallerWithPath methodCallerWithPath = DataTieringManager::isHotData;
// Test with valid path
@@ -215,6 +228,8 @@ public class TestDataTieringManager {
@Test
public void testPrefetchWhenDataTieringEnabled() throws IOException {
+ setPrefetchBlocksOnOpen();
+ initializeTestEnvironment();
// Evict blocks from cache by closing the files and passing evict on close.
// Then initialize the reader again. Since Prefetch on open is set to true, it should prefetch
// those blocks.
@@ -226,12 +241,17 @@ public class TestDataTieringManager {
// Since we have one cold file among four files, only three should get prefetched.
Optional<Map<String, Pair<String, Long>>> fullyCachedFiles = blockCache.getFullyCachedFiles();
assertTrue("We should get the fully cached files from the cache", fullyCachedFiles.isPresent());
- Waiter.waitFor(defaultConf, 60000, () -> fullyCachedFiles.get().size() == 3);
+ Waiter.waitFor(defaultConf, 10000, () -> fullyCachedFiles.get().size() == 3);
assertEquals("Number of fully cached files are incorrect", 3, fullyCachedFiles.get().size());
}
+ private void setPrefetchBlocksOnOpen() {
+ defaultConf.setBoolean(CacheConfig.PREFETCH_BLOCKS_ON_OPEN_KEY, true);
+ }
+
@Test
- public void testColdDataFiles() {
+ public void testColdDataFiles() throws IOException {
+ initializeTestEnvironment();
Set<BlockCacheKey> allCachedBlocks = new HashSet<>();
for (HStoreFile file : hStoreFiles) {
allCachedBlocks.add(new BlockCacheKey(file.getPath(), 0, true, BlockType.DATA));
@@ -257,7 +277,74 @@ public class TestDataTieringManager {
}
@Test
- public void testPickColdDataFiles() {
+ public void testCacheCompactedBlocksOnWriteDataTieringDisabled() throws IOException {
+ setCacheCompactBlocksOnWrite();
+ initializeTestEnvironment();
+
+ HRegion region = createHRegion("table3");
+ testCacheCompactedBlocksOnWrite(region, true);
+ }
+
+ @Test
+ public void testCacheCompactedBlocksOnWriteWithHotData() throws IOException {
+ setCacheCompactBlocksOnWrite();
+ initializeTestEnvironment();
+
+ HRegion region = createHRegion("table3", getConfWithTimeRangeDataTieringEnabled(5 * DAY));
+ testCacheCompactedBlocksOnWrite(region, true);
+ }
+
+ @Test
+ public void testCacheCompactedBlocksOnWriteWithColdData() throws IOException {
+ setCacheCompactBlocksOnWrite();
+ initializeTestEnvironment();
+
+ HRegion region = createHRegion("table3", getConfWithTimeRangeDataTieringEnabled(DAY));
+ testCacheCompactedBlocksOnWrite(region, false);
+ }
+
+ private void setCacheCompactBlocksOnWrite() {
+ defaultConf.setBoolean(CacheConfig.CACHE_COMPACTED_BLOCKS_ON_WRITE_KEY, true);
+ }
+
+ private void testCacheCompactedBlocksOnWrite(HRegion region, boolean expectDataBlocksCached)
+ throws IOException {
+ HStore hStore = createHStore(region, "cf1");
+ createTestFilesForCompaction(hStore);
+ hStore.refreshStoreFiles();
+
+ region.stores.put(Bytes.toBytes("cf1"), hStore);
+ testOnlineRegions.put(region.getRegionInfo().getEncodedName(), region);
+
+ long initialStoreFilesCount = hStore.getStorefilesCount();
+ long initialCacheDataBlockCount = blockCache.getDataBlockCount();
+ assertEquals(3, initialStoreFilesCount);
+ assertEquals(0, initialCacheDataBlockCount);
+
+ region.compact(true);
+
+ long compactedStoreFilesCount = hStore.getStorefilesCount();
+ long compactedCacheDataBlockCount = blockCache.getDataBlockCount();
+ assertEquals(1, compactedStoreFilesCount);
+ assertEquals(expectDataBlocksCached, compactedCacheDataBlockCount > 0);
+ }
+
+ private void createTestFilesForCompaction(HStore hStore) throws IOException {
+ long currentTime = System.currentTimeMillis();
+ Path storeDir = hStore.getStoreContext().getFamilyStoreDirectoryPath();
+ Configuration configuration = hStore.getReadOnlyConfiguration();
+
+ createHStoreFile(storeDir, configuration, currentTime - 2 * DAY,
+ hStore.getHRegion().getRegionFileSystem());
+ createHStoreFile(storeDir, configuration, currentTime - 3 * DAY,
+ hStore.getHRegion().getRegionFileSystem());
+ createHStoreFile(storeDir, configuration, currentTime - 4 * DAY,
+ hStore.getHRegion().getRegionFileSystem());
+ }
+
+ @Test
+ public void testPickColdDataFiles() throws IOException {
+ initializeTestEnvironment();
Map<String, String> coldDataFiles = dataTieringManager.getColdFilesList();
assertEquals(1, coldDataFiles.size());
// hStoreFiles[3] is the cold file.
@@ -270,6 +357,7 @@ public class TestDataTieringManager {
*/
@Test
public void testBlockEvictions() throws Exception {
+ initializeTestEnvironment();
long capacitySize = 40 * 1024;
int writeThreads = 3;
int writerQLen = 64;
@@ -320,6 +408,7 @@ public class TestDataTieringManager {
*/
@Test
public void testBlockEvictionsAllColdBlocks() throws Exception {
+ initializeTestEnvironment();
long capacitySize = 40 * 1024;
int writeThreads = 3;
int writerQLen = 64;
@@ -367,6 +456,7 @@ public class TestDataTieringManager {
*/
@Test
public void testBlockEvictionsHotBlocks() throws Exception {
+ initializeTestEnvironment();
long capacitySize = 40 * 1024;
int writeThreads = 3;
int writerQLen = 64;
@@ -414,6 +504,8 @@ public class TestDataTieringManager {
public void testFeatureKeyDisabled() throws Exception {
DataTieringManager.resetForTestingOnly();
defaultConf.setBoolean(DataTieringManager.GLOBAL_DATA_TIERING_ENABLED_KEY, false);
+ initializeTestEnvironment();
+
try {
assertFalse(DataTieringManager.instantiate(defaultConf, testOnlineRegions));
// Verify that the DataaTieringManager instance is not instantiated in the
@@ -546,7 +638,20 @@ public class TestDataTieringManager {
testDataTieringMethodWithKey(caller, key, expectedResult, null);
}
+ private static void initializeTestEnvironment() throws IOException {
+ setupFileSystemAndCache();
+ setupOnlineRegions();
+ }
+
+ private static void setupFileSystemAndCache() throws IOException {
+ fs = HFileSystem.get(defaultConf);
+ blockCache = BlockCacheFactory.createBlockCache(defaultConf);
+ cacheConf = new CacheConfig(defaultConf, blockCache);
+ }
+
private static void setupOnlineRegions() throws IOException {
+ testOnlineRegions.clear();
+ hStoreFiles.clear();
long day = 24 * 60 * 60 * 1000;
long currentTime = System.currentTimeMillis();
@@ -606,7 +711,12 @@ public class TestDataTieringManager {
HRegionFileSystem regionFs = HRegionFileSystem.createRegionOnFileSystem(testConf, fs,
CommonFSUtils.getTableDir(testDir, hri.getTable()), hri);
- return new HRegion(regionFs, null, conf, htd, null);
+ HRegion region = new HRegion(regionFs, null, conf, htd, null);
+ // Manually sets the BlockCache for the HRegion instance.
+ // This is necessary because the region server is not started within this method,
+ // and therefore the BlockCache needs to be explicitly configured.
+ region.setBlockCache(blockCache);
+ return region;
}
private static HStore createHStore(HRegion region, String columnFamily) throws IOException {
@@ -639,8 +749,7 @@ public class TestDataTieringManager {
StoreFileWriter storeFileWriter = new StoreFileWriter.Builder(conf, cacheConf, fs)
.withOutputDir(storeDir).withFileContext(new HFileContextBuilder().build()).build();
- writeStoreFileRandomData(storeFileWriter, Bytes.toBytes(columnFamily), Bytes.toBytes("random"),
- timestamp);
+ writeStoreFileRandomData(storeFileWriter, Bytes.toBytes(columnFamily), timestamp);
StoreContext storeContext =
StoreContext.getBuilder().withRegionFileSystem(regionFs).build();
@@ -649,18 +758,47 @@ public class TestDataTieringManager {
return new HStoreFile(fs, storeFileWriter.getPath(), conf, cacheConf, BloomType.NONE, true, sft);
}
+ /**
+ * Writes random data to a store file with rows arranged in lexicographically increasing order.
+ * Each row is generated using the {@link #nextString()} method, ensuring that each subsequent row
+ * is lexicographically larger than the previous one.
+ */
private static void writeStoreFileRandomData(final StoreFileWriter writer, byte[] columnFamily,
- byte[] qualifier, long timestamp) throws IOException {
+ long timestamp) throws IOException {
+ int cellsPerFile = 10;
+ byte[] qualifier = Bytes.toBytes("qualifier");
+ byte[] value = generateRandomBytes(4 * 1024);
try {
- for (char d = 'a'; d <= 'z'; d++) {
- for (char e = 'a'; e <= 'z'; e++) {
- byte[] b = new byte[] { (byte) d, (byte) e };
- writer.append(new KeyValue(b, columnFamily, qualifier, timestamp, b));
- }
+ for (int i = 0; i < cellsPerFile; i++) {
+ byte[] row = Bytes.toBytes(nextString());
+ writer.append(new KeyValue(row, columnFamily, qualifier, timestamp, value));
}
} finally {
writer.appendTrackedTimestampsToMetadata();
writer.close();
}
}
+
+ private static byte[] generateRandomBytes(int sizeInBytes) {
+ Random random = new Random();
+ byte[] randomBytes = new byte[sizeInBytes];
+ random.nextBytes(randomBytes);
+ return randomBytes;
+ }
+
+ /**
+ * Returns the lexicographically larger string every time it's called.
+ */
+ private static String nextString() {
+ if (rowKeyString == null || rowKeyString.isEmpty()) {
+ rowKeyString = "a";
+ }
+ char lastChar = rowKeyString.charAt(rowKeyString.length() - 1);
+ if (lastChar < 'z') {
+ rowKeyString = rowKeyString.substring(0, rowKeyString.length() - 1) + (char) (lastChar + 1);
+ } else {
+ rowKeyString = rowKeyString + "a";
+ }
+ return rowKeyString;
+ }
}
(hbase) 03/07: HBASE-28466 Integration of time-based priority logic of bucket cache in prefetch functionality of HBase (#5808)
Posted by wc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wchevreuil pushed a commit to branch HBASE-28463
in repository https://gitbox.apache.org/repos/asf/hbase.git
commit 643c5566bb879252b35d425c14045df0e9afadd5
Author: vinayak hegde <vi...@gmail.com>
AuthorDate: Mon Apr 22 15:23:30 2024 +0530
HBASE-28466 Integration of time-based priority logic of bucket cache in prefetch functionality of HBase (#5808)
Signed-off-by: Wellington Chevreuil <wc...@apache.org>
---
.../apache/hadoop/hbase/io/hfile/BlockCache.java | 5 +-
.../hadoop/hbase/io/hfile/CombinedBlockCache.java | 6 +-
.../apache/hadoop/hbase/io/hfile/HFileInfo.java | 6 ++
.../hadoop/hbase/io/hfile/HFilePreadReader.java | 2 +
.../hadoop/hbase/io/hfile/bucket/BucketCache.java | 15 +++-
.../hbase/regionserver/DataTieringManager.java | 91 +++++++++++++++++-----
.../hbase/regionserver/TestDataTieringManager.java | 64 +++++++++++----
7 files changed, 146 insertions(+), 43 deletions(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java
index 43d1e77c7e6..d923e4c0780 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java
@@ -199,11 +199,12 @@ public interface BlockCache extends Iterable<CachedBlock>, ConfigurationObserver
* overridden by all implementing classes. In such cases, the returned Optional will be empty. For
* subclasses implementing this logic, the returned Optional would contain the boolean value
* reflecting if the passed file should indeed be cached.
- * @param fileName to check if it should be cached.
+ * @param hFileInfo Information about the file to check if it should be cached.
+ * @param conf The configuration object to use for determining caching behavior.
* @return empty optional if this method is not supported, otherwise the returned optional
* contains the boolean value informing if the file should be cached.
*/
- default Optional<Boolean> shouldCacheFile(String fileName) {
+ default Optional<Boolean> shouldCacheFile(HFileInfo hFileInfo, Configuration conf) {
return Optional.empty();
}
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java
index 7e503f99f3f..9f173477108 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java
@@ -487,9 +487,9 @@ public class CombinedBlockCache implements ResizableBlockCache, HeapSize {
}
@Override
- public Optional<Boolean> shouldCacheFile(String fileName) {
- Optional<Boolean> l1Result = l1Cache.shouldCacheFile(fileName);
- Optional<Boolean> l2Result = l2Cache.shouldCacheFile(fileName);
+ public Optional<Boolean> shouldCacheFile(HFileInfo hFileInfo, Configuration conf) {
+ Optional<Boolean> l1Result = l1Cache.shouldCacheFile(hFileInfo, conf);
+ Optional<Boolean> l2Result = l2Cache.shouldCacheFile(hFileInfo, conf);
final Mutable<Boolean> combinedResult = new MutableBoolean(true);
l1Result.ifPresent(b -> combinedResult.setValue(b && combinedResult.getValue()));
l2Result.ifPresent(b -> combinedResult.setValue(b && combinedResult.getValue()));
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileInfo.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileInfo.java
index 0c3b7890f6e..2386e8d82a5 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileInfo.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileInfo.java
@@ -123,6 +123,7 @@ public class HFileInfo implements SortedMap<byte[], byte[]> {
private FixedFileTrailer trailer;
private HFileContext hfileContext;
+ private boolean initialized = false;
public HFileInfo() {
super();
@@ -364,6 +365,10 @@ public class HFileInfo implements SortedMap<byte[], byte[]> {
* should be called after initTrailerAndContext
*/
public void initMetaAndIndex(HFile.Reader reader) throws IOException {
+ if (initialized) {
+ return;
+ }
+
ReaderContext context = reader.getContext();
try {
HFileBlock.FSReader blockReader = reader.getUncachedBlockReader();
@@ -401,6 +406,7 @@ public class HFileInfo implements SortedMap<byte[], byte[]> {
throw new CorruptHFileException(
"Problem reading data index and meta index from file " + context.getFilePath(), t);
}
+ initialized = true;
}
private HFileContext createHFileContext(Path path, FixedFileTrailer trailer, Configuration conf)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePreadReader.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePreadReader.java
index 996d3a85e22..147e2598ef9 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePreadReader.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePreadReader.java
@@ -37,6 +37,8 @@ public class HFilePreadReader extends HFileReaderImpl {
public HFilePreadReader(ReaderContext context, HFileInfo fileInfo, CacheConfig cacheConf,
Configuration conf) throws IOException {
super(context, fileInfo, cacheConf, conf);
+ // Initialize HFileInfo object with metadata for caching decisions
+ fileInfo.initMetaAndIndex(this);
// master hosted regions, like the master procedures store wouldn't have a block cache
// Prefetch file blocks upon open if requested
if (cacheConf.getBlockCache().isPresent() && cacheConf.shouldPrefetchOnOpen()) {
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
index 7802d868bea..63ae163dee5 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
@@ -79,9 +79,11 @@ import org.apache.hadoop.hbase.io.hfile.CachedBlock;
import org.apache.hadoop.hbase.io.hfile.CombinedBlockCache;
import org.apache.hadoop.hbase.io.hfile.HFileBlock;
import org.apache.hadoop.hbase.io.hfile.HFileContext;
+import org.apache.hadoop.hbase.io.hfile.HFileInfo;
import org.apache.hadoop.hbase.nio.ByteBuff;
import org.apache.hadoop.hbase.nio.RefCnt;
import org.apache.hadoop.hbase.protobuf.ProtobufMagic;
+import org.apache.hadoop.hbase.regionserver.DataTieringManager;
import org.apache.hadoop.hbase.regionserver.HRegion;
import org.apache.hadoop.hbase.regionserver.StoreFileInfo;
import org.apache.hadoop.hbase.util.Bytes;
@@ -2410,7 +2412,18 @@ public class BucketCache implements BlockCache, HeapSize {
}
@Override
- public Optional<Boolean> shouldCacheFile(String fileName) {
+ public Optional<Boolean> shouldCacheFile(HFileInfo hFileInfo, Configuration conf) {
+ String fileName = hFileInfo.getHFileContext().getHFileName();
+ try {
+ DataTieringManager dataTieringManager = DataTieringManager.getInstance();
+ if (!dataTieringManager.isHotData(hFileInfo, conf)) {
+ LOG.debug("Data tiering is enabled for file: '{}' and it is not hot data", fileName);
+ return Optional.of(false);
+ }
+ } catch (IllegalStateException e) {
+ LOG.error("Error while getting DataTieringManager instance: {}", e.getMessage());
+ }
+
// if we don't have the file in fullyCachedFiles, we should cache it
return Optional.of(!fullyCachedFiles.containsKey(fileName));
}
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java
index 0bc04ddc428..dec96604774 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java
@@ -17,6 +17,9 @@
*/
package org.apache.hadoop.hbase.regionserver;
+import static org.apache.hadoop.hbase.regionserver.HStoreFile.TIMERANGE_KEY;
+
+import java.io.IOException;
import java.util.HashSet;
import java.util.Map;
import java.util.OptionalLong;
@@ -24,6 +27,7 @@ import java.util.Set;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.io.hfile.BlockCacheKey;
+import org.apache.hadoop.hbase.io.hfile.HFileInfo;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
import org.apache.yetus.audience.InterfaceAudience;
@@ -106,11 +110,13 @@ public class DataTieringManager {
}
/**
- * Determines whether the data associated with the given block cache key is considered hot.
+ * Determines whether the data associated with the given block cache key is considered hot. If the
+ * data tiering type is set to {@link DataTieringType#TIME_RANGE} and maximum timestamp is not
+ * present, it considers {@code Long.MAX_VALUE} as the maximum timestamp, making the data hot by
+ * default.
* @param key the block cache key
* @return {@code true} if the data is hot, {@code false} otherwise
- * @throws DataTieringException if there is an error retrieving data tiering information or the
- * HFile maximum timestamp
+ * @throws DataTieringException if there is an error retrieving data tiering information
*/
public boolean isHotData(BlockCacheKey key) throws DataTieringException {
Path hFilePath = key.getFilePath();
@@ -122,37 +128,82 @@ public class DataTieringManager {
/**
* Determines whether the data in the HFile at the given path is considered hot based on the
- * configured data tiering type and hot data age.
+ * configured data tiering type and hot data age. If the data tiering type is set to
+ * {@link DataTieringType#TIME_RANGE} and maximum timestamp is not present, it considers
+ * {@code Long.MAX_VALUE} as the maximum timestamp, making the data hot by default.
* @param hFilePath the path to the HFile
* @return {@code true} if the data is hot, {@code false} otherwise
- * @throws DataTieringException if there is an error retrieving data tiering information or the
- * HFile maximum timestamp
+ * @throws DataTieringException if there is an error retrieving data tiering information
*/
public boolean isHotData(Path hFilePath) throws DataTieringException {
Configuration configuration = getConfiguration(hFilePath);
DataTieringType dataTieringType = getDataTieringType(configuration);
if (dataTieringType.equals(DataTieringType.TIME_RANGE)) {
- long hotDataAge = getDataTieringHotDataAge(configuration);
-
- HStoreFile hStoreFile = getHStoreFile(hFilePath);
- if (hStoreFile == null) {
- LOG.error("HStoreFile corresponding to " + hFilePath + " doesn't exist");
- return false;
- }
- OptionalLong maxTimestamp = hStoreFile.getMaximumTimestamp();
- if (!maxTimestamp.isPresent()) {
- throw new DataTieringException("Maximum timestamp not present for " + hFilePath);
- }
+ return hotDataValidator(getMaxTimestamp(hFilePath), getDataTieringHotDataAge(configuration));
+ }
+ // DataTieringType.NONE or other types are considered hot by default
+ return true;
+ }
- long currentTimestamp = EnvironmentEdgeManager.getDelegate().currentTime();
- long diff = currentTimestamp - maxTimestamp.getAsLong();
- return diff <= hotDataAge;
+ /**
+ * Determines whether the data in the HFile being read is considered hot based on the configured
+ * data tiering type and hot data age. If the data tiering type is set to
+ * {@link DataTieringType#TIME_RANGE} and maximum timestamp is not present, it considers
+ * {@code Long.MAX_VALUE} as the maximum timestamp, making the data hot by default.
+ * @param hFileInfo Information about the HFile to determine if its data is hot.
+ * @param configuration The configuration object to use for determining hot data criteria.
+ * @return {@code true} if the data is hot, {@code false} otherwise
+ */
+ public boolean isHotData(HFileInfo hFileInfo, Configuration configuration) {
+ DataTieringType dataTieringType = getDataTieringType(configuration);
+ if (dataTieringType.equals(DataTieringType.TIME_RANGE)) {
+ return hotDataValidator(getMaxTimestamp(hFileInfo), getDataTieringHotDataAge(configuration));
}
// DataTieringType.NONE or other types are considered hot by default
return true;
}
+ private boolean hotDataValidator(long maxTimestamp, long hotDataAge) {
+ long currentTimestamp = getCurrentTimestamp();
+ long diff = currentTimestamp - maxTimestamp;
+ return diff <= hotDataAge;
+ }
+
+ private long getMaxTimestamp(Path hFilePath) throws DataTieringException {
+ HStoreFile hStoreFile = getHStoreFile(hFilePath);
+ if (hStoreFile == null) {
+ LOG.error("HStoreFile corresponding to " + hFilePath + " doesn't exist");
+ return Long.MAX_VALUE;
+ }
+ OptionalLong maxTimestamp = hStoreFile.getMaximumTimestamp();
+ if (!maxTimestamp.isPresent()) {
+ LOG.error("Maximum timestamp not present for " + hFilePath);
+ return Long.MAX_VALUE;
+ }
+ return maxTimestamp.getAsLong();
+ }
+
+ private long getMaxTimestamp(HFileInfo hFileInfo) {
+ try {
+ byte[] hFileTimeRange = hFileInfo.get(TIMERANGE_KEY);
+ if (hFileTimeRange == null) {
+ LOG.error("Timestamp information not found for file: {}",
+ hFileInfo.getHFileContext().getHFileName());
+ return Long.MAX_VALUE;
+ }
+ return TimeRangeTracker.parseFrom(hFileTimeRange).getMax();
+ } catch (IOException e) {
+ LOG.error("Error occurred while reading the timestamp metadata of file: {}",
+ hFileInfo.getHFileContext().getHFileName(), e);
+ return Long.MAX_VALUE;
+ }
+ }
+
+ private long getCurrentTimestamp() {
+ return EnvironmentEdgeManager.getDelegate().currentTime();
+ }
+
/**
* Returns a set of cold data filenames from the given set of cached blocks. Cold data is
* determined by the configured data tiering type and hot data age.
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java
index afb5862a8a4..30420bcb779 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java
@@ -17,7 +17,9 @@
*/
package org.apache.hadoop.hbase.regionserver;
+import static org.apache.hadoop.hbase.HConstants.BUCKET_CACHE_SIZE_KEY;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.IOException;
@@ -26,14 +28,17 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Optional;
import java.util.Set;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.HBaseTestingUtil;
+import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.Waiter;
import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder;
import org.apache.hadoop.hbase.client.RegionInfo;
@@ -47,10 +52,13 @@ import org.apache.hadoop.hbase.io.hfile.BlockCacheKey;
import org.apache.hadoop.hbase.io.hfile.BlockType;
import org.apache.hadoop.hbase.io.hfile.CacheConfig;
import org.apache.hadoop.hbase.io.hfile.HFileContextBuilder;
+import org.apache.hadoop.hbase.regionserver.storefiletracker.StoreFileTracker;
+import org.apache.hadoop.hbase.regionserver.storefiletracker.StoreFileTrackerFactory;
import org.apache.hadoop.hbase.testclassification.RegionServerTests;
import org.apache.hadoop.hbase.testclassification.SmallTests;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.CommonFSUtils;
+import org.apache.hadoop.hbase.util.Pair;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
@@ -85,22 +93,26 @@ public class TestDataTieringManager {
private static final HBaseTestingUtil TEST_UTIL = new HBaseTestingUtil();
private static Configuration defaultConf;
private static FileSystem fs;
+ private static BlockCache blockCache;
private static CacheConfig cacheConf;
private static Path testDir;
- private static Map<String, HRegion> testOnlineRegions;
+ private static final Map<String, HRegion> testOnlineRegions = new HashMap<>();
private static DataTieringManager dataTieringManager;
- private static List<HStoreFile> hStoreFiles;
+ private static final List<HStoreFile> hStoreFiles = new ArrayList<>();
@BeforeClass
public static void setupBeforeClass() throws Exception {
testDir = TEST_UTIL.getDataTestDir(TestDataTieringManager.class.getSimpleName());
defaultConf = TEST_UTIL.getConfiguration();
+ defaultConf.setBoolean(CacheConfig.PREFETCH_BLOCKS_ON_OPEN_KEY, true);
+ defaultConf.setStrings(HConstants.BUCKET_CACHE_IOENGINE_KEY, "offheap");
+ defaultConf.setLong(BUCKET_CACHE_SIZE_KEY, 32);
fs = HFileSystem.get(defaultConf);
- BlockCache blockCache = BlockCacheFactory.createBlockCache(defaultConf);
+ blockCache = BlockCacheFactory.createBlockCache(defaultConf);
cacheConf = new CacheConfig(defaultConf, blockCache);
- setupOnlineRegions();
DataTieringManager.instantiate(testOnlineRegions);
+ setupOnlineRegions();
dataTieringManager = DataTieringManager.getInstance();
}
@@ -189,7 +201,24 @@ public class TestDataTieringManager {
// Test with a filename where corresponding HStoreFile in not present
hFilePath = new Path(hStoreFiles.get(0).getPath().getParent(), "incorrectFileName");
- testDataTieringMethodWithPathNoException(methodCallerWithPath, hFilePath, false);
+ testDataTieringMethodWithPathNoException(methodCallerWithPath, hFilePath, true);
+ }
+
+ @Test
+ public void testPrefetchWhenDataTieringEnabled() throws IOException {
+ // Evict blocks from cache by closing the files and passing evict on close.
+ // Then initialize the reader again. Since Prefetch on open is set to true, it should prefetch
+ // those blocks.
+ for (HStoreFile file : hStoreFiles) {
+ file.closeStoreFile(true);
+ file.initReader();
+ }
+
+ // Since we have one cold file among four files, only three should get prefetched.
+ Optional<Map<String, Pair<String, Long>>> fullyCachedFiles = blockCache.getFullyCachedFiles();
+ assertTrue("We should get the fully cached files from the cache", fullyCachedFiles.isPresent());
+ Waiter.waitFor(defaultConf, 60000, () -> fullyCachedFiles.get().size() == 3);
+ assertEquals("Number of fully cached files are incorrect", 3, fullyCachedFiles.get().size());
}
@Test
@@ -271,21 +300,18 @@ public class TestDataTieringManager {
}
private static void setupOnlineRegions() throws IOException {
- testOnlineRegions = new HashMap<>();
- hStoreFiles = new ArrayList<>();
-
long day = 24 * 60 * 60 * 1000;
long currentTime = System.currentTimeMillis();
HRegion region1 = createHRegion("table1");
HStore hStore11 = createHStore(region1, "cf1", getConfWithTimeRangeDataTieringEnabled(day));
- hStoreFiles
- .add(createHStoreFile(hStore11.getStoreContext().getFamilyStoreDirectoryPath(), currentTime));
+ hStoreFiles.add(createHStoreFile(hStore11.getStoreContext().getFamilyStoreDirectoryPath(),
+ hStore11.getReadOnlyConfiguration(), currentTime, region1.getRegionFileSystem()));
hStore11.refreshStoreFiles();
HStore hStore12 = createHStore(region1, "cf2");
hStoreFiles.add(createHStoreFile(hStore12.getStoreContext().getFamilyStoreDirectoryPath(),
- currentTime - day));
+ hStore12.getReadOnlyConfiguration(), currentTime - day, region1.getRegionFileSystem()));
hStore12.refreshStoreFiles();
region1.stores.put(Bytes.toBytes("cf1"), hStore11);
@@ -296,11 +322,11 @@ public class TestDataTieringManager {
HStore hStore21 = createHStore(region2, "cf1");
hStoreFiles.add(createHStoreFile(hStore21.getStoreContext().getFamilyStoreDirectoryPath(),
- currentTime - 2 * day));
+ hStore21.getReadOnlyConfiguration(), currentTime - 2 * day, region2.getRegionFileSystem()));
hStore21.refreshStoreFiles();
HStore hStore22 = createHStore(region2, "cf2");
hStoreFiles.add(createHStoreFile(hStore22.getStoreContext().getFamilyStoreDirectoryPath(),
- currentTime - 3 * day));
+ hStore22.getReadOnlyConfiguration(), currentTime - 3 * day, region2.getRegionFileSystem()));
hStore22.refreshStoreFiles();
region2.stores.put(Bytes.toBytes("cf1"), hStore21);
@@ -359,17 +385,21 @@ public class TestDataTieringManager {
return conf;
}
- private static HStoreFile createHStoreFile(Path storeDir, long timestamp) throws IOException {
+ private static HStoreFile createHStoreFile(Path storeDir, Configuration conf, long timestamp,
+ HRegionFileSystem regionFs) throws IOException {
String columnFamily = storeDir.getName();
- StoreFileWriter storeFileWriter = new StoreFileWriter.Builder(defaultConf, cacheConf, fs)
+ StoreFileWriter storeFileWriter = new StoreFileWriter.Builder(conf, cacheConf, fs)
.withOutputDir(storeDir).withFileContext(new HFileContextBuilder().build()).build();
writeStoreFileRandomData(storeFileWriter, Bytes.toBytes(columnFamily), Bytes.toBytes("random"),
timestamp);
- return new HStoreFile(fs, storeFileWriter.getPath(), defaultConf, cacheConf, BloomType.NONE,
- true);
+ StoreContext storeContext =
+ StoreContext.getBuilder().withRegionFileSystem(regionFs).build();
+
+ StoreFileTracker sft = StoreFileTrackerFactory.create(conf, true, storeContext);
+ return new HStoreFile(fs, storeFileWriter.getPath(), conf, cacheConf, BloomType.NONE, true, sft);
}
private static void writeStoreFileRandomData(final StoreFileWriter writer, byte[] columnFamily,
(hbase) 05/07: HBASE-28535: Add a region-server wide key to enable data-tiering. (#5856)
Posted by wc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wchevreuil pushed a commit to branch HBASE-28463
in repository https://gitbox.apache.org/repos/asf/hbase.git
commit 58931cd49e118397e49ff34e09ef66e4b857462a
Author: jhungund <10...@users.noreply.github.com>
AuthorDate: Thu May 2 13:54:33 2024 +0530
HBASE-28535: Add a region-server wide key to enable data-tiering. (#5856)
Signed-off-by: Wellington Chevreuil <wc...@apache.org>
---
.../hadoop/hbase/io/hfile/bucket/BucketCache.java | 20 ++---
.../hbase/regionserver/DataTieringManager.java | 32 +++++---
.../hadoop/hbase/regionserver/HRegionServer.java | 5 +-
.../hbase/regionserver/TestDataTieringManager.java | 91 +++++++++++++++++++---
4 files changed, 114 insertions(+), 34 deletions(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
index e987730c7b0..5bbbb53fe11 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
@@ -1156,11 +1156,10 @@ public class BucketCache implements BlockCache, HeapSize {
long bytesFreed = 0;
// Check the list of files to determine the cold files which can be readily evicted.
Map<String, String> coldFiles = null;
- try {
- DataTieringManager dataTieringManager = DataTieringManager.getInstance();
+
+ DataTieringManager dataTieringManager = DataTieringManager.getInstance();
+ if (dataTieringManager != null) {
coldFiles = dataTieringManager.getColdFilesList();
- } catch (IllegalStateException e) {
- LOG.warn("Data Tiering Manager is not set. Ignore time-based block evictions.");
}
// Scan entire map putting bucket entry into appropriate bucket entry
// group
@@ -2448,16 +2447,11 @@ public class BucketCache implements BlockCache, HeapSize {
@Override
public Optional<Boolean> shouldCacheFile(HFileInfo hFileInfo, Configuration conf) {
String fileName = hFileInfo.getHFileContext().getHFileName();
- try {
- DataTieringManager dataTieringManager = DataTieringManager.getInstance();
- if (!dataTieringManager.isHotData(hFileInfo, conf)) {
- LOG.debug("Data tiering is enabled for file: '{}' and it is not hot data", fileName);
- return Optional.of(false);
- }
- } catch (IllegalStateException e) {
- LOG.error("Error while getting DataTieringManager instance: {}", e.getMessage());
+ DataTieringManager dataTieringManager = DataTieringManager.getInstance();
+ if (dataTieringManager != null && !dataTieringManager.isHotData(hFileInfo, conf)) {
+ LOG.debug("Data tiering is enabled for file: '{}' and it is not hot data", fileName);
+ return Optional.of(false);
}
-
// if we don't have the file in fullyCachedFiles, we should cache it
return Optional.of(!fullyCachedFiles.containsKey(fileName));
}
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java
index 6c699e77c2f..952b4d4938d 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DataTieringManager.java
@@ -45,6 +45,9 @@ import org.slf4j.LoggerFactory;
@InterfaceAudience.Private
public class DataTieringManager {
private static final Logger LOG = LoggerFactory.getLogger(DataTieringManager.class);
+ public static final String GLOBAL_DATA_TIERING_ENABLED_KEY =
+ "hbase.regionserver.datatiering.enable";
+ public static final boolean DEFAULT_GLOBAL_DATA_TIERING_ENABLED = false; // disabled by default
public static final String DATATIERING_KEY = "hbase.hstore.datatiering.type";
public static final String DATATIERING_HOT_DATA_AGE_KEY =
"hbase.hstore.datatiering.hot.age.millis";
@@ -58,28 +61,29 @@ public class DataTieringManager {
}
/**
- * Initializes the DataTieringManager instance with the provided map of online regions.
+ * Initializes the DataTieringManager instance with the provided map of online regions, only if
+ * the configuration "hbase.regionserver.datatiering.enable" is enabled.
+ * @param conf Configuration object.
* @param onlineRegions A map containing online regions.
+ * @return True if the instance is instantiated successfully, false otherwise.
*/
- public static synchronized void instantiate(Map<String, HRegion> onlineRegions) {
- if (instance == null) {
+ public static synchronized boolean instantiate(Configuration conf,
+ Map<String, HRegion> onlineRegions) {
+ if (isDataTieringFeatureEnabled(conf) && instance == null) {
instance = new DataTieringManager(onlineRegions);
LOG.info("DataTieringManager instantiated successfully.");
+ return true;
} else {
LOG.warn("DataTieringManager is already instantiated.");
}
+ return false;
}
/**
* Retrieves the instance of DataTieringManager.
- * @return The instance of DataTieringManager.
- * @throws IllegalStateException if DataTieringManager has not been instantiated.
+ * @return The instance of DataTieringManager, if instantiated, null otherwise.
*/
public static synchronized DataTieringManager getInstance() {
- if (instance == null) {
- throw new IllegalStateException(
- "DataTieringManager has not been instantiated. Call instantiate() first.");
- }
return instance;
}
@@ -308,4 +312,14 @@ public class DataTieringManager {
}
return coldFiles;
}
+
+ private static boolean isDataTieringFeatureEnabled(Configuration conf) {
+ return conf.getBoolean(DataTieringManager.GLOBAL_DATA_TIERING_ENABLED_KEY,
+ DataTieringManager.DEFAULT_GLOBAL_DATA_TIERING_ENABLED);
+ }
+
+ // Resets the instance to null. To be used only for testing.
+ public static void resetForTestingOnly() {
+ instance = null;
+ }
}
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
index c7044e7866d..953a0199a26 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
@@ -534,7 +534,10 @@ public class HRegionServer extends HBaseServerBase<RSRpcServices>
regionServerAccounting = new RegionServerAccounting(conf);
blockCache = BlockCacheFactory.createBlockCache(conf);
- DataTieringManager.instantiate(onlineRegions);
+ // The call below, instantiates the DataTieringManager only when
+ // the configuration "hbase.regionserver.datatiering.enable" is set to true.
+ DataTieringManager.instantiate(conf, onlineRegions);
+
mobFileCache = new MobFileCache(conf);
rsSnapshotVerifier = new RSSnapshotVerifier(conf);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java
index 013ed0f0a8b..50878abf551 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java
@@ -20,6 +20,8 @@ package org.apache.hadoop.hbase.regionserver;
import static org.apache.hadoop.hbase.HConstants.BUCKET_CACHE_SIZE_KEY;
import static org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.DEFAULT_ERROR_TOLERATION_DURATION;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -66,6 +68,8 @@ import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* This class is used to test the functionality of the DataTieringManager.
@@ -93,6 +97,7 @@ public class TestDataTieringManager {
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestDataTieringManager.class);
+ private static final Logger LOG = LoggerFactory.getLogger(TestDataTieringManager.class);
private static final HBaseTestingUtil TEST_UTIL = new HBaseTestingUtil();
private static Configuration defaultConf;
private static FileSystem fs;
@@ -111,10 +116,11 @@ public class TestDataTieringManager {
defaultConf.setBoolean(CacheConfig.PREFETCH_BLOCKS_ON_OPEN_KEY, true);
defaultConf.setStrings(HConstants.BUCKET_CACHE_IOENGINE_KEY, "offheap");
defaultConf.setLong(BUCKET_CACHE_SIZE_KEY, 32);
+ defaultConf.setBoolean(DataTieringManager.GLOBAL_DATA_TIERING_ENABLED_KEY, true);
fs = HFileSystem.get(defaultConf);
blockCache = BlockCacheFactory.createBlockCache(defaultConf);
cacheConf = new CacheConfig(defaultConf, blockCache);
- DataTieringManager.instantiate(testOnlineRegions);
+ assertTrue(DataTieringManager.instantiate(defaultConf, testOnlineRegions));
setupOnlineRegions();
dataTieringManager = DataTieringManager.getInstance();
}
@@ -270,9 +276,9 @@ public class TestDataTieringManager {
int[] bucketSizes = new int[] { 8 * 1024 + 1024 };
// Setup: Create a bucket cache with lower capacity
- BucketCache bucketCache = new BucketCache("file:" + testDir + "/bucket.cache", capacitySize,
- 8192, bucketSizes, writeThreads, writerQLen, testDir + "/bucket.persistence",
- DEFAULT_ERROR_TOLERATION_DURATION, defaultConf);
+ BucketCache bucketCache =
+ new BucketCache("file:" + testDir + "/bucket.cache", capacitySize, 8192, bucketSizes,
+ writeThreads, writerQLen, null, DEFAULT_ERROR_TOLERATION_DURATION, defaultConf);
// Create three Cache keys with cold data files and a block with hot data.
// hStoreFiles.get(3) is a cold data file, while hStoreFiles.get(0) is a hot file.
@@ -320,9 +326,9 @@ public class TestDataTieringManager {
int[] bucketSizes = new int[] { 8 * 1024 + 1024 };
// Setup: Create a bucket cache with lower capacity
- BucketCache bucketCache = new BucketCache("file:" + testDir + "/bucket.cache", capacitySize,
- 8192, bucketSizes, writeThreads, writerQLen, testDir + "/bucket.persistence",
- DEFAULT_ERROR_TOLERATION_DURATION, defaultConf);
+ BucketCache bucketCache =
+ new BucketCache("file:" + testDir + "/bucket.cache", capacitySize, 8192, bucketSizes,
+ writeThreads, writerQLen, null, DEFAULT_ERROR_TOLERATION_DURATION, defaultConf);
// Create three Cache keys with three cold data blocks.
// hStoreFiles.get(3) is a cold data file.
@@ -367,9 +373,9 @@ public class TestDataTieringManager {
int[] bucketSizes = new int[] { 8 * 1024 + 1024 };
// Setup: Create a bucket cache with lower capacity
- BucketCache bucketCache = new BucketCache("file:" + testDir + "/bucket.cache", capacitySize,
- 8192, bucketSizes, writeThreads, writerQLen, testDir + "/bucket.persistence",
- DEFAULT_ERROR_TOLERATION_DURATION, defaultConf);
+ BucketCache bucketCache =
+ new BucketCache("file:" + testDir + "/bucket.cache", capacitySize, 8192, bucketSizes,
+ writeThreads, writerQLen, null, DEFAULT_ERROR_TOLERATION_DURATION, defaultConf);
// Create three Cache keys with two hot data blocks and one cold data block
// hStoreFiles.get(0) is a hot data file and hStoreFiles.get(3) is a cold data file.
@@ -404,11 +410,74 @@ public class TestDataTieringManager {
validateBlocks(bucketCache.getBackingMap().keySet(), 2, 2, 0);
}
+ @Test
+ public void testFeatureKeyDisabled() throws Exception {
+ DataTieringManager.resetForTestingOnly();
+ defaultConf.setBoolean(DataTieringManager.GLOBAL_DATA_TIERING_ENABLED_KEY, false);
+ try {
+ assertFalse(DataTieringManager.instantiate(defaultConf, testOnlineRegions));
+ // Verify that the DataaTieringManager instance is not instantiated in the
+ // instantiate call above.
+ assertNull(DataTieringManager.getInstance());
+
+ // Also validate that data temperature is not honoured.
+ long capacitySize = 40 * 1024;
+ int writeThreads = 3;
+ int writerQLen = 64;
+ int[] bucketSizes = new int[] { 8 * 1024 + 1024 };
+
+ // Setup: Create a bucket cache with lower capacity
+ BucketCache bucketCache =
+ new BucketCache("file:" + testDir + "/bucket.cache", capacitySize, 8192, bucketSizes,
+ writeThreads, writerQLen, null, DEFAULT_ERROR_TOLERATION_DURATION, defaultConf);
+
+ // Create three Cache keys with two hot data blocks and one cold data block
+ // hStoreFiles.get(0) is a hot data file and hStoreFiles.get(3) is a cold data file.
+ List<BlockCacheKey> cacheKeys = new ArrayList<>();
+ cacheKeys.add(new BlockCacheKey(hStoreFiles.get(0).getPath(), 0, true, BlockType.DATA));
+ cacheKeys.add(new BlockCacheKey(hStoreFiles.get(0).getPath(), 8192, true, BlockType.DATA));
+ cacheKeys.add(new BlockCacheKey(hStoreFiles.get(3).getPath(), 0, true, BlockType.DATA));
+
+ // Create dummy data to be cached and fill the cache completely.
+ CacheTestUtils.HFileBlockPair[] blocks = CacheTestUtils.generateHFileBlocks(8192, 3);
+
+ int blocksIter = 0;
+ for (BlockCacheKey key : cacheKeys) {
+ LOG.info("Adding {}", key);
+ bucketCache.cacheBlock(key, blocks[blocksIter++].getBlock());
+ // Ensure that the block is persisted to the file.
+ Waiter.waitFor(defaultConf, 10000, 100,
+ () -> (bucketCache.getBackingMap().containsKey(key)));
+ }
+
+ // Verify that the bucket cache contains 3 blocks.
+ assertEquals(3, bucketCache.getBackingMap().keySet().size());
+
+ // Add an additional hot block, which triggers eviction.
+ BlockCacheKey newKey =
+ new BlockCacheKey(hStoreFiles.get(2).getPath(), 0, true, BlockType.DATA);
+ CacheTestUtils.HFileBlockPair[] newBlock = CacheTestUtils.generateHFileBlocks(8192, 1);
+
+ bucketCache.cacheBlock(newKey, newBlock[0].getBlock());
+ Waiter.waitFor(defaultConf, 10000, 100,
+ () -> (bucketCache.getBackingMap().containsKey(newKey)));
+
+ // Verify that the bucket still contains the only cold block and one newly added hot block.
+ // The older hot blocks are evicted and data-tiering mechanism does not kick in to evict
+ // the cold block.
+ validateBlocks(bucketCache.getBackingMap().keySet(), 2, 1, 1);
+ } finally {
+ DataTieringManager.resetForTestingOnly();
+ defaultConf.setBoolean(DataTieringManager.GLOBAL_DATA_TIERING_ENABLED_KEY, true);
+ assertTrue(DataTieringManager.instantiate(defaultConf, testOnlineRegions));
+ }
+ }
+
private void validateBlocks(Set<BlockCacheKey> keys, int expectedTotalKeys, int expectedHotBlocks,
int expectedColdBlocks) {
int numHotBlocks = 0, numColdBlocks = 0;
- assertEquals(expectedTotalKeys, keys.size());
+ Waiter.waitFor(defaultConf, 10000, 100, () -> (expectedTotalKeys == keys.size()));
int iter = 0;
for (BlockCacheKey key : keys) {
try {