Uh oh!
There was an error while loading. Please reload this page.
HBASE-25510 Optimize TableName.valueOf from O(n) to O(1) - #2885
HBASE-25510 Optimize TableName.valueOf from O(n) to O(1)#2885zhengzhuobinzzb wants to merge 1 commit into
Conversation
saintstack
commented
Jan 15, 2021
I edited the summary to remove square brackets around the JIRA number. |
Apache-HBase
commented
Jan 15, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jan 15, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jan 15, 2021
🎊 +1 overall
This message was automatically generated. |
Apache9
commented
Jan 22, 2021
It is a bit strange that we convert bytes or ByteBuffer to String, and then convert back to store them... |
zhengzhuobinzzb
commented
Jan 22, 2021
In face, i tryed to use ByteBuffer as hash key. But there ars some reasons i choose String finally.
Benchmark Result For ByteBuffer: Benchmark Result For String: |
Apache9
commented
Jan 22, 2021
I think the problem is we convert it back to bytes. Could we introduce an internal methods which takes both string and bytes? So after checking the cache, we need to use bytes to create a new TableName, we just use it directly instead of converting the String back. |
zhengzhuobinzzb
commented
Apr 15, 2021
The matter is we can't believe outside bytes(because it can be modifyed outside). So we have to go through two conversions. The diff is below:
So, I think we choose 1 here is not a problem |
Apache-HBase
commented
May 14, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
May 14, 2021
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
May 14, 2021
🎊 +1 overall
This message was automatically generated. |
Apache9
commented
Mar 30, 2023
In the constructor of TableName, we will copy the bytes out. So let's avoid the extra converting? |
Apache9
commented
Dec 16, 2023
Any updates here? Thanks. |
Optimize TableName.valueOf from O(n) to O(1). We can get benefits when the number of tables in the cluster is greater than dozens