You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2015/09/22 21:32:29 UTC
[4/5] accumulo git commit: ACCUMULO-4008 remove the file if it fails
to close cleanly
ACCUMULO-4008 remove the file if it fails to close cleanly
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/758abd65
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/758abd65
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/758abd65
Branch: refs/heads/master
Commit: 758abd6518958c6c7ef22f06e23e41113007200b
Parents: 035b540
Author: Eric C. Newton <er...@gmail.com>
Authored: Tue Sep 22 14:59:07 2015 -0400
Committer: Eric C. Newton <er...@gmail.com>
Committed: Tue Sep 22 14:59:07 2015 -0400
----------------------------------------------------------------------
.../org/apache/accumulo/tserver/tablet/Compactor.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/758abd65/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Compactor.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Compactor.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Compactor.java
index d705a39..88b73fe 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Compactor.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Compactor.java
@@ -218,14 +218,14 @@ public class Compactor implements Callable<CompactionStats> {
FileSKVWriter mfwTmp = mfw;
mfw = null; // set this to null so we do not try to close it again in finally if the close fails
try {
- mfwTmp.close(); // if the close fails it will cause the compaction to fail
+ mfwTmp.close(); // if the close fails it will cause the compaction to fail
} catch (IOException ex) {
- if (!fs.deleteRecursively(outputFile.path())) {
- if (fs.exists(outputFile.path())) {
- log.error("Unable to delete " + outputFile);
- }
- }
- throw ex;
+ if (!fs.deleteRecursively(outputFile.path())) {
+ if (fs.exists(outputFile.path())) {
+ log.error("Unable to delete " + outputFile);
+ }
+ }
+ throw ex;
}
log.debug(String.format("Compaction %s %,d read | %,d written | %,6d entries/sec | %,6.3f secs | %,12d bytes | %9.3f byte/sec", extent,