[ https://issues.apache.org/jira/browse/HADOOP-2261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546117 ]
Hadoop QA commented on HADOOP-2261: ----------------------------------- -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12370337/patch.txt against trunk revision r598780. @author +1. The patch does not contain any @author tags. javadoc +1. The javadoc tool did not generate any warning messages. javac +1. The applied patch does not generate any new compiler warnings. findbugs +1. The patch does not introduce any new Findbugs warnings. core tests -1. The patch failed core unit tests. contrib tests +1. The patch passed contrib unit tests. Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1182/testReport/ Findbugs warnings: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1182/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1182/artifact/trunk/build/test/checkstyle-errors.html Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1182/console This message is automatically generated. > [hbase] Change abort to finalize; does nothing if commit ran successfully > ------------------------------------------------------------------------- > > Key: HADOOP-2261 > URL: https://issues.apache.org/jira/browse/HADOOP-2261 > Project: Hadoop > Issue Type: Improvement > Components: contrib/hbase > Reporter: stack > Assignee: Jim Kellerman > Fix For: 0.16.0 > > Attachments: patch.txt > > > From Michael Bieniosek: > {code}I'm trying to do an update row, so I write code like: > long lockid = table.startUpdate(new Text(article.getName())); try { > for (File articleInfo: article.listFiles(new NonDirectories())) { > articleTable.put(lockid, columnName(articleInfo.getName()), > readFile(articleInfo)); } > table.commit(lockid); > } finally { > table.abort(lockid); > } > This doesn't work, because in the normal case it calls abort after commit. > But I'm not sure what the code should be, eg.: > long lockid = table.startUpdate(new Text(article.getName())); try { > for (File articleInfo: article.listFiles(new NonDirectories())) { > articleTable.put(lockid, columnName(articleInfo.getName()), > readFile(articleInfo)); } > table.commit(lockid); > } catch (IOException e) { > table.abort(lockid); > throw e; > } catch (RuntimeException e) { > table.abort(lockid); > throw e; > } > This gets unwieldy very quickly. Could you maybe change abort() to > finalize() which either aborts or does nothing if a commit was successful? > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.