[
https://issues.apache.org/jira/browse/HBASE-26340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17447414#comment-17447414
]
Norbert Kalmár commented on HBASE-26340:
----------------------------------------
Made another patch, just tested it:
{code:java}
hbase:001:0> create 'emp', 'personal data', 'professional data'
2021-11-22T14:47:57,545 INFO [RPCClient-NioEventLoopGroup-1-2]
client.AsyncHBaseAdmin: Operation: CREATE, Table Name: default:emp completed
Created table emp
Took 1.5477 seconds
=> Hbase::Table - emp
hbase:002:0> list_regions 'emp'
SERVER_NAME |
REGION_NAME | START_KEY | END_KEY | SIZE | REQ | LOCALITY |
-------------------------------- |
---------------------------------------------------- | ---------- | ----------
| ----- | ----- | ---------- |
192.168.1.75,16020,1637588865433 |
emp,,1637588876835.d6b9eaddeedbf2342c8e834a1151cc2a. | |
| 0.0MB | 0 | 0.0 |
1 rows
Took 0.3317 seconds
hbase:003:0> put 'emp','1','personal data:name','raju'
Took 0.0650 seconds
hbase:004:0> flush 'emp'
Took 0.3037 seconds
hbase:005:0> list_regions 'emp'
SERVER_NAME |
REGION_NAME | START_KEY | END_KEY | SIZE | REQ | LOCALITY |
-------------------------------- |
---------------------------------------------------- | ---------- | ----------
| ----- | ----- | ---------- |
192.168.1.75,16020,1637588865433 |
emp,,1637588876835.d6b9eaddeedbf2342c8e834a1151cc2a. | |
| 1.0MB | 1 | 1.0 |
1 rows
Took 0.0175 seconds
{code}
> TableSplit returns false size under 1MB
> ---------------------------------------
>
> Key: HBASE-26340
> URL: https://issues.apache.org/jira/browse/HBASE-26340
> Project: HBase
> Issue Type: Bug
> Reporter: Norbert Kalmár
> Assignee: Norbert Kalmár
> Priority: Major
>
> We calculate region size in the mapreduce package by getting the size in MB
> first and multiplying:
> https://github.com/apache/hbase/blob/39a20c528e2bf27cedf12734dbdb1b7b1e538076/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/RegionSizeCalculator.java#L87
> This will give a size of 0 until at least 1MB is reached. (And it will have
> an unwanted rounding affect as well).
> Spark for example can be tuned to do some performance tuning by eliminating
> the 0 sized regions. This will eliminate any small regions which are not
> actually empty. The hadoop interface states the size is returned in bytes,
> and while this is true do to the multiplication, we multiply by 0 until 1MB
> is reached. I'm not sure why we get the size in MB units and not in bytes
> straight up.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)