[
https://issues.apache.org/jira/browse/HBASE-21585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16747302#comment-16747302
]
Duo Zhang commented on HBASE-21585:
-----------------------------------
{quote}
do we want to add getHbck to Connection? We were trying to hide it from general
audience (Do we need the getHbck that takes a ServerName. I think it was added
as a just-in-case... maybe we should wait till need if we are considering
exposing getHbck generally).
{quote}
The intention here is that, we will move ClusterConnection to hbase-server
module, and the hbck stuffs should remain in hbase-client so I moved the method
to Connection interface, and mark the method as IA.LimitedPrivate. Maybe we
should add default implementation to these two methods that throws
UnsupportedOperation exception?
{quote}
This for 3.0?
{quote}
Yes, the change on HBASE-21512 is radical, and will only be merged into master
branch. Replace the sync implementation with async implementation can removed
lots of redundant code, but the downside is that, the error stack error will be
broken, for example, if your call is hung, you can not see a whole stack trace
in jstack, instead, you will your call is hung in the Table implementation, may
be waiting on a CompletableFuture, and there maybe no other stack trace deep in
side the hbase code, as all things are event-driven now.
{quote}
Can below take a Connection Interface?
AsyncProcess(ConnectionImplementation hc
... ditto in BufferedMutatorImpl
or is it that these constructors are private and the use of the CI is all
internal?
{quote}
These are all sync client related stuffs. The AsyncProcess will be completely
removed(this is one of most important goal here, the code is hard to maintain
now...), and for BufferedMutator, we will replace the BufferedMutatorImpl with
a new implementation based on async client.
{quote}
locateRegion is changed to return an Interface instead?
{quote}
I do not change the return value of this method? I just removed all the
locateRegion and relocateRegion methods which return a HRegionLocation in
ClusterConnection, as we can just RegionLocator to get the HRegionLocation, it
is IA.Public. The methods which return a RegionLocations are still there, as
RegionLocations is IA.Private.
{quote}
isMasterRunning is deprecated? You want to just remove?
{quote}
IIRC the comment says do not use it any more?
{quote}
I'm lazy. How does async client do isTableAvailable ?
{quote}
You can see the code in RawAsyncHBaseAdmin. It will check whether the table is
enabled, and then get all the locations of the regions for this table, to see
if there are not deployed ones. And if splitKeys is provided, will check
whether the regions and splitKeys are matched.
{quote}
There'll be an AsyncConnnectionImpl or ConnectionImpl is shared between sync
and asycn?
{quote}
The AsyncConnectionImpl will be the core, and we will wrap a Connection upon
the AsyncConnectionImpl. And also for AsyncClusterConnection and
ClusterConnection. This is the plan.
> Use ConnectionImplementation instead of ClusterConnection for sync client
> implementation
> ----------------------------------------------------------------------------------------
>
> Key: HBASE-21585
> URL: https://issues.apache.org/jira/browse/HBASE-21585
> Project: HBase
> Issue Type: Sub-task
> Components: Client
> Reporter: Duo Zhang
> Assignee: Duo Zhang
> Priority: Major
> Attachments: HBASE-21585-HBASE-21512.patch
>
>
> So we can remove lots of method declarations in ClusterConnection, if they
> are only used by sync client implementation.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)