[ https://issues.apache.org/jira/browse/HBASE-4224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182231#comment-13182231 ]
jirapos...@reviews.apache.org commented on HBASE-4224: ------------------------------------------------------ bq. On 2012-01-07 17:27:49, Ted Yu wrote: bq. > /src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java, line 2794 bq. > <https://reviews.apache.org/r/3308/diff/3/?file=66890#file66890line2794> bq. > bq. > Do we need to place a try/catch block around line 2795 ? bq. > Currently the first failure would stop subsequent flushes. Ted this sounds good and we'd want to surround it with a try catch. But then we'd be masking those errors right? If I were the user and called flush through the shell, I'd not only wanna know that all flushes didn't go successful but I'd also want to know how many of them were unsuccessful and which region flushes failed due to what reason. So do you think it would be a good idea to return a status object which gives the client more information regarding the flushes ? bq. On 2012-01-07 17:27:49, Ted Yu wrote: bq. > /src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java, line 486 bq. > <https://reviews.apache.org/r/3308/diff/3/?file=66889#file66889line486> bq. > bq. > This and flushAllRegions() are similar. bq. > Can we introduce just one new method which checks whether the list is empty to decide what to do ? bq. > i.e. move the check @ line 1403 of HBaseAdmin to the implementation of the new method. This is rather a flag defined on the client which means when the regions == null then u flush the entire RegionServer. IF we move this to the region server side then we'd be making this an API level definition. I think flushAllRegions is more intuitive as a RegionServer API than an API which flushes the Region Server when the regions parameter is null. Assume a new person wants to flushAllRegions. flush(List<HRegionInfo> regions) tells him that hey I can flush a list of regions and unless he looks at the implementation or the javadoc he'd miss the fact that this API can also flush all the regions. On the other hand flushAllRegions invites the person with open arms saying that hey i'll flush all the regions for you. bq. On 2012-01-07 17:27:49, Ted Yu wrote: bq. > /src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java, line 1409 bq. > <https://reviews.apache.org/r/3308/diff/3/?file=66888#file66888line1409> bq. > bq. > regions could be empty, right ? The only condition when regions could be empty is when the name to be flushed is a RegionServer and not a single Region or table. This is based on the presumption that MetaReader.getTableRegionsAndLocations doesn't return null regions and isRegionsName is null then it never executes the flush. So this is fine ? - Akash ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3308/#review4236 ----------------------------------------------------------- On 2012-01-06 18:48:11, Akash Ashok wrote: bq. bq. ----------------------------------------------------------- bq. This is an automatically generated e-mail. To reply, visit: bq. https://reviews.apache.org/r/3308/ bq. ----------------------------------------------------------- bq. bq. (Updated 2012-01-06 18:48:11) bq. bq. bq. Review request for hbase. bq. bq. bq. Summary bq. ------- bq. bq. Flush by RegionServer bq. bq. bq. This addresses bug HBase-4224. bq. https://issues.apache.org/jira/browse/HBase-4224 bq. bq. bq. Diffs bq. ----- bq. bq. /src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java 1226330 bq. /src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 1226330 bq. /src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java 1226330 bq. /src/main/java/org/apache/hadoop/hbase/ServerName.java 1226330 bq. bq. Diff: https://reviews.apache.org/r/3308/diff bq. bq. bq. Testing bq. ------- bq. bq. bq. Thanks, bq. bq. Akash bq. bq. > Need a flush by regionserver rather than by table option > -------------------------------------------------------- > > Key: HBASE-4224 > URL: https://issues.apache.org/jira/browse/HBASE-4224 > Project: HBase > Issue Type: Bug > Components: shell > Reporter: stack > Assignee: Akash Ashok > Attachments: HBase-4224-v2.patch, HBase-4224.patch > > > This evening needed to clean out logs on the cluster. logs are by > regionserver. to let go of logs, we need to have all edits emptied from > memory. only flush is by table or region. We need to be able to flush the > regionserver. Need to add this. -- 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