[jira] [Created] (HBASE-28064) Implement truncate_region command to truncate region directly from FS

2023-09-05 Thread Ankit Singhal (Jira)
Ankit Singhal created HBASE-28064:
-

 Summary: Implement truncate_region command to truncate region 
directly from FS
 Key: HBASE-28064
 URL: https://issues.apache.org/jira/browse/HBASE-28064
 Project: HBase
  Issue Type: New Feature
Reporter: Ankit Singhal


One of our users has brought up a use-case where they need to truncate a region 
to delete data within a specific range. There are two scenarios to consider:

* In the first scenario, the region boundaries involve a time range defined 
through pre-splitting, and user is looking to efficiently clean old date data. 
If HBase can directly truncate the region from the file system and then the 
user can merge the empty region with adjacent regions to effectively eliminate 
it which will be more optimized compared to deleting the data using Delete API.

* In another case, if the HFile for that region becomes corrupted for some 
reason, user want to get rid of the HFile and reload the entire region to avoid 
consistency issues and ensure performance.

we can do this when the table is offline/disabled to avoid the consideration of 
race conditions involving Region In Transition (RITs), region re-opening, and 
merge/split scenarios, as taking the region offline is necessary regardless 




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (HBASE-27976) [hbase-operator-tools] Add spotless for hbase-operator-tools

2023-09-05 Thread Nihal Jain (Jira)


 [ 
https://issues.apache.org/jira/browse/HBASE-27976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nihal Jain resolved HBASE-27976.

Fix Version/s: hbase-operator-tools-1.3.0
 Release Note: Before creating a PR for hbase-operator-tools repo, 
developers can now run 'mvn spotless:apply' to fix code formatting issues .
   Resolution: Fixed

All the sub-tasks are done, marking the Jira as resolved.

> [hbase-operator-tools] Add spotless for hbase-operator-tools
> 
>
> Key: HBASE-27976
> URL: https://issues.apache.org/jira/browse/HBASE-27976
> Project: HBase
>  Issue Type: Umbrella
>  Components: build, hbase-operator-tools
>Reporter: Nihal Jain
>Assignee: Nihal Jain
>Priority: Major
> Fix For: hbase-operator-tools-1.3.0
>
>
> HBase code repo has spotless plugin to check and fix spotless issues 
> seamlessly, making it easier for developers to fix issue in case the builds 
> fails due to code formatting.
> The goal of this Jira is to integrate spotless with hbase-operator-tools.
>  * As a 1st step will try to add a plugin to run spotless check via maven
>  * Next will fix all spotless issues as part of same task or another (as 
> community suggests)
>  * Finally will integrate the same to pre-commit build to not let PRs wit 
> spotless issues get in. (Would need some support/direction on how to do this 
> as I am not much familiar with the Jenkins and related code.)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (HBASE-28063) Add documentation to HBase book

2023-09-05 Thread Andor Molnar (Jira)
Andor Molnar created HBASE-28063:


 Summary: Add documentation to HBase book
 Key: HBASE-28063
 URL: https://issues.apache.org/jira/browse/HBASE-28063
 Project: HBase
  Issue Type: Sub-task
  Components: documentation
Reporter: Andor Molnar
Assignee: Andor Molnar






--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (HBASE-28059) Use correct units in RegionLoad#getStoreUncompressedSizeMB()

2023-09-05 Thread Peter Somogyi (Jira)


 [ 
https://issues.apache.org/jira/browse/HBASE-28059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Somogyi resolved HBASE-28059.
---
Fix Version/s: 2.6.0
   2.4.18
   2.5.6
   Resolution: Fixed

Meged to branch-2, branch-2.5, and branch-2.4. Thanks for the contribution, 
[~charlesconnell]!

> Use correct units in RegionLoad#getStoreUncompressedSizeMB()
> 
>
> Key: HBASE-28059
> URL: https://issues.apache.org/jira/browse/HBASE-28059
> Project: HBase
>  Issue Type: Improvement
>  Components: Admin
>Affects Versions: 2.5.5
>Reporter: Charles Connell
>Assignee: Charles Connell
>Priority: Major
> Fix For: 2.6.0, 2.4.18, 2.5.6
>
>
> When I run a snippet of code like this:
> {code:java}
> Map regionLoadMap = admin
>   .getClusterStatus()
>   .getLoad(
> ServerName.parseServerName(
>   "my-server.my-company.net,60020,1693513660506"
> )
>   )
>   .getRegionsLoad();
> for (byte[] startKey : regionLoadMap.keySet()) {
>   RegionLoad regionLoad = regionLoadMap.get(startKey);
>   LOG.info("Region {}: {}", Bytes.toStringBinary(startKey), regionLoad);
> } {code}
> I get logs like this:
> {noformat}
> Region , key>,1659484033280.2b89407a1223720344bed425bf3c29b0.: numberOfStores=1, 
> numberOfStorefiles=3, storeRefCount=0, storefileUncompressedSizeMB=17998848, 
> lastMajorCompactionTimestamp=1693211464712, storefileSizeMB=5895, 
> compressionRatio=0.0003, memstoreSizeMB=1, readRequestsCount=118899553, 
> writeRequestsCount=731192, rootIndexSizeKB=9, totalStaticIndexSizeKB=10413, 
> totalStaticBloomSizeKB=6592, totalCompactingKVs=0, currentCompactedKVs=0, 
> compactionProgressPct=NaN, completeSequenceId=78093096, 
> dataLocality=1.0{noformat}
> The {{storefileUncompressedSizeMB}} is vastly larger than the 
> {{{}storefileSizeMB{}}}, so much more that it's not believable. I checked the 
> store files in question in this instance. Adding up the uncompressed size 
> reported in the HFile trailers sums to 5895 MiB, exactly 1024 times less than 
> the reported 17998848.
> The reason for the misreporting is that 
> {{RegionLoad#getStoreUncompressedSizeMB()}} converts the value from a 
> {{Size}} object wrong.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)