You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/04/15 03:27:06 UTC

[GitHub] [hbase] zhengzhuobinzzb commented on pull request #2885: HBASE-25510 Optimize TableName.valueOf from O(n) to O(1)

zhengzhuobinzzb commented on pull request #2885:
URL: https://github.com/apache/hbase/pull/2885#issuecomment-820029751


   > 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.
   
   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: 
   1. bytes -> string -> bytes
   2. bytes -> string + bytes -> inner bytes
   
   So, I think we choose 1 here is not a problem


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org