Uh oh!
There was an error while loading. Please reload this page.
HBASE-27902 Utility to invoke coproc on multiple servers using AsyncAdmin - #5266
Conversation
Apache-HBase
commented
Jun 3, 2023
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 3, 2023
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 3, 2023
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 3, 2023
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 3, 2023
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 3, 2023
💔 -1 overall
This message was automatically generated. |
Apache9
commented
Jun 3, 2023
Have you guys read my comment on the jira issue? In the async admin implementation, I do not think we need a thread pool for executing the coprocessor calls for each server... |
The code should be just like this. The return value is a Map to map the region server to its result, I use Object so it could also represent the failure when requesting a region server, instead of failing the whole CompletableFuture, so later you can check the returned map and find out the failed region servers and try to send requests again. |
Apache9
commented
Jun 3, 2023
Oh, you have passed the server names in... Then it will easier, just move the code in the first level of callback out is enough... |
virajjasani
commented
Jun 3, 2023
virajjasani
commented
Jun 3, 2023
correct, we don't even need call to |
jinggou
commented
Jun 5, 2023
Thanks @Apache9 ! I've made code changes. Please take a look. |
Apache-HBase
commented
Jun 5, 2023
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 5, 2023
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 5, 2023
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 6, 2023
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 6, 2023
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 6, 2023
🎊 +1 overall
This message was automatically generated. |
| } else { | ||
| resultMap.put(rs, r); | ||
| } | ||
| done = resultMap.size() == serverNames.size(); |
Apache9
commented
Jun 8, 2023
I still have concerns about the necessity for introducing this method, especially that if you pass the list of server names in and get a List of CompletableFuture back, why not just write code by our own? |
virajjasani
commented
Jun 8, 2023
@Apache9 i understand your point, maybe we can update existing method and use List instead of single ServerName and that is more flexible as client can pass single server as well, correct? but since we already have that method since 2.0, we will have to go through deprecation cycle (maybe we still can). However given that FutureUtils have bunch of nice utilities worth using by methods like this one, and it is IA.Private, it would be nice to have it in hbase IMHO than let client use CompletableFuture callbacks/whenCompleted etc. better to let the client only worry about using if you are fine, i can now start reviewing. please let me know. Thanks |
what if we have one more argument our usecase is anyways to be able to run on all servers but just to make it look more flexible for any other client usecases, we thought of using list of servers. if Duo's opinion remains same, there is nothing wrong with removing |
Uh oh!
There was an error while loading. Please reload this page.
virajjasani
commented
Jun 9, 2023
@jinggou could you please update this to not include list of servers? let's go with Duo's suggestion and let the api internally get server list and also pass it to listener util of FutureUtils (similar to Duo's suggestion at the beginning). |
Apache-HBase
commented
Jun 14, 2023
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 14, 2023
🎊 +1 overall
This message was automatically generated. |
virajjasani
left a comment
There was a problem hiding this comment.
+1, pending jenkins QA results
Apache-HBase
commented
Jun 14, 2023
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 14, 2023
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 14, 2023
🎊 +1 overall
This message was automatically generated. |
virajjasani
commented
Jun 15, 2023
Apache9
commented
Jun 16, 2023
As replied on the branch-2 PR, I still have concerns about whether we should introduce the method in our AsyncAdmin interfaces, as it is easy to implement this method through the combination of public methods in the AsyncAdmin interface... |
virajjasani
commented
Jun 16, 2023
since using FutureUtil utilities by clients directly is not recommended, let's keep this logic in AsyncAdmin as "default" implementation rather than keeping it in implementing classes |
Apache-HBase
commented
Jun 16, 2023
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 16, 2023
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 16, 2023
🎊 +1 overall
This message was automatically generated. |
…iceOnAllRegionServers method
Apache-HBase
commented
Jun 19, 2023
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 19, 2023
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 19, 2023
🎊 +1 overall
This message was automatically generated. |
virajjasani
left a comment
There was a problem hiding this comment.
left one nit, looks good otherwise
| adminMethodNames.removeAll(getMethodNames(Closeable.class)); | ||
| asyncAdminMethodNames.remove("coprocessorService"); | ||
| asyncAdminMethodNames.remove("coprocessorServiceOnAllRegionServers"); |
There was a problem hiding this comment.
do we need this change anymore?
Apache9
left a comment
There was a problem hiding this comment.
Just a minor nit for TestInterfaceAlign.
Otherwise LGTM.
| adminMethodNames.removeAll(getMethodNames(Closeable.class)); | ||
| asyncAdminMethodNames.remove("coprocessorService"); | ||
| asyncAdminMethodNames.remove("coprocessorServiceOnAllRegionServers"); |
virajjasani
commented
Jun 20, 2023
will merge once pending Jenkins QA is done |
Apache-HBase
commented
Jun 20, 2023
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 20, 2023
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jun 20, 2023
🎊 +1 overall
This message was automatically generated. |
…dmin (#5266) Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
No description provided.