[ https://issues.apache.org/jira/browse/HBASE-5134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13181749#comment-13181749 ]
jirapos...@reviews.apache.org commented on HBASE-5134: ------------------------------------------------------ ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3419/#review4230 ----------------------------------------------------------- Ship it! This is so much cleaner than before. src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java <https://reviews.apache.org/r/3419/#comment9559> +1 This does not belong here. src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java <https://reviews.apache.org/r/3419/#comment9560> nice! src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java <https://reviews.apache.org/r/3419/#comment9561> yep src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java <https://reviews.apache.org/r/3419/#comment9562> yes src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java <https://reviews.apache.org/r/3419/#comment9563> Why it this no longer needed? - Lars On 2012-01-07 00:51:43, Michael Stack wrote: bq. bq. ----------------------------------------------------------- bq. This is an automatically generated e-mail. To reply, visit: bq. https://reviews.apache.org/r/3419/ bq. ----------------------------------------------------------- bq. bq. (Updated 2012-01-07 00:51:43) bq. bq. bq. Review request for hbase. bq. bq. bq. Summary bq. ------- bq. bq. Untangle HConnection. Makes it so I can mock scanning which wasn't bq. possible when Callables had HConnections and HConnections had Callables. bq. I want this so we can write tests around some of the interesting master fails bq. we've seen of late; e.g. shutdown handler running at same time as a balance. bq. bq. With this change I can do things like standup an AssignmentManager and bq. concurrently run a ServerShutdownHandler apart from their HMaster context; bq. I can fake out the ServerShutdownHandler feeding it whatever for metarows, etc. bq. Included are new tests that run an AssignmentManager#balance end-to-end and bq. that put up a ServerShutdownHandler and run a server shutdown processing. bq. bq. M src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java bq. Add a note that timeouts need fixup in here. bq. Handle RetriesExhaustedException (Now we can mock at a lower-level bq. than previous, below Callables where we used short-circuit them, we bq. see Callable exceptions coming out in tests -- add handling). bq. bq. M src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java bq. Callable retrying is done on the Callable now, not via HConnection. bq. bq. A src/main/java/org/apache/hadoop/hbase/client/ConnectionUtils.java bq. Move common connection utility here, shared by HConnection and Callable. bq. bq. M src/main/java/org/apache/hadoop/hbase/client/HConnection.java bq. (getRegionServerWithRetries, getRegionServerWithoutRetries): deprecated. bq. They are done on the Callable itself itself now. bq. (clearCaches): Added. bq. bq. M src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java bq. (getPauseTime): Moved out to ConnectionUtils bq. (getRegionServerWithRetries, getRegionServerWithoutRetries): deprecated. bq. Changed body of methods to call new implementation. bq. Removed dead code. Added doc and comments on other stuff to move. bq. (translateException): Moved out to ServerCallable where its used. bq. bq. M src/main/java/org/apache/hadoop/hbase/client/HTable.java bq. Callable retrying is done on the Callable now, not via HConnection. bq. bq. M src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java bq. Callable retrying is done on the Callable now, not via HConnection. bq. bq. M src/main/java/org/apache/hadoop/hbase/client/ServerCallable.java bq. (getConnection): Added bq. (withRetries, withoutRetries): These replace old bq. getRegionServerWithRetries, getRegionServerWithoutRetries that used to bq. be done via HConnection. bq. bq. M src/main/java/org/apache/hadoop/hbase/ipc/ExecRPCInvoker.java bq. Callable retrying is done on the Callable now, not via HConnection. bq. bq. M src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java bq. Callable retrying is done on the Callable now, not via HConnection. bq. bq. M src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java bq. Comment. bq. bq. M src/main/java/org/apache/hadoop/hbase/master/handler/ClosedRegionHandler.java bq. Comment. bq. bq. M src/main/java/org/apache/hadoop/hbase/master/handler/ServerShutdownHandler.java bq. Make use of a data member previous unused. bq. bq. M src/test/java/org/apache/hadoop/hbase/catalog/TestCatalogTracker.java bq. Callables are in the mix now so stuff gets retried. Deal with it. bq. bq. M src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java bq. Add a method that mocks out more methods in a mocked HConnection. bq. bq. M src/test/java/org/apache/hadoop/hbase/mapreduce/TestLoadIncrementalHFilesSplitRecovery.java bq. Comment. bq. bq. M src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManager.java bq. Add two tests, a testBalance and testServerShutdown bq. bq. M src/test/java/org/apache/hadoop/hbase/master/TestCatalogJanitor.java bq. Use new utility. bq. bq. M src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionServerBulkLoad.java bq. Callables are in the mix now so stuff gets retried. Deal with it. bq. bq. bq. This addresses bug HBASE-5134. bq. https://issues.apache.org/jira/browse/HBASE-5134 bq. bq. bq. Diffs bq. ----- bq. bq. src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java 8ec5042 bq. src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java 6cdeec1 bq. src/main/java/org/apache/hadoop/hbase/client/ConnectionUtils.java PRE-CREATION bq. src/main/java/org/apache/hadoop/hbase/client/HConnection.java 0e78d96 bq. src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java 852a810 bq. src/main/java/org/apache/hadoop/hbase/client/HTable.java 839d79b bq. src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java 4135e55 bq. src/main/java/org/apache/hadoop/hbase/client/ServerCallable.java 9b568e3 bq. src/main/java/org/apache/hadoop/hbase/ipc/ExecRPCInvoker.java 3ad6cd5 bq. src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java bd574b2 bq. src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java d13daf0 bq. src/main/java/org/apache/hadoop/hbase/master/handler/ClosedRegionHandler.java 2dfc3e7 bq. src/main/java/org/apache/hadoop/hbase/master/handler/ServerShutdownHandler.java 2dd497b bq. src/test/java/org/apache/hadoop/hbase/catalog/TestCatalogTracker.java dada051 bq. src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java c1a077f bq. src/test/java/org/apache/hadoop/hbase/mapreduce/TestLoadIncrementalHFilesSplitRecovery.java 5e3e994 bq. src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManager.java 82b32aa bq. src/test/java/org/apache/hadoop/hbase/master/TestCatalogJanitor.java c359f4b bq. src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionServerBulkLoad.java 0a34371 bq. bq. Diff: https://reviews.apache.org/r/3419/diff bq. bq. bq. Testing bq. ------- bq. bq. bq. Thanks, bq. bq. Michael bq. bq. > Remove getRegionServerWithoutRetries and getRegionServerWithRetries from > HConnection Interface > ---------------------------------------------------------------------------------------------- > > Key: HBASE-5134 > URL: https://issues.apache.org/jira/browse/HBASE-5134 > Project: HBase > Issue Type: Improvement > Reporter: stack > > Its broke having these meta methods in HConnection. They take > ServerCallables which themselves have HConnections inevitably. It makes for > a tangle in the model and frustrates being able to do mocked implemenations > of HConnection. These methods better belong in something like > HConnectionManager, or elsewhere altogether. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira