accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [3/5] accumulo git commit: Merge branch '1.7'
Date Tue, 22 Sep 2015 19:32:28 GMT
Merge branch '1.7'


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/035b540d
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/035b540d
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/035b540d

Branch: refs/heads/master
Commit: 035b540d812aa53a445078c876c4e195c126dc0c
Parents: 4dee3c1 1fa8ab9
Author: Eric C. Newton <eric.newton@gmail.com>
Authored: Tue Sep 22 13:45:27 2015 -0400
Committer: Eric C. Newton <eric.newton@gmail.com>
Committed: Tue Sep 22 13:45:27 2015 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/tserver/tablet/Compactor.java    | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/035b540d/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Compactor.java
----------------------------------------------------------------------
diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Compactor.java
index 4c55db9,bd5ff62..d705a39
--- 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
@@@ -217,13 -217,30 +217,22 @@@ public class Compactor implements Calla
  
        FileSKVWriter mfwTmp = mfw;
        mfw = null; // set this to null so we do not try to close it again in finally if the
close fails
-       mfwTmp.close(); // if the close fails it will cause the compaction to fail
+       try {
+     	  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;
+       }
  
 -      // Verify the file, since hadoop 0.20.2 sometimes lies about the success of close()
 -      try {
 -        FileSKVIterator openReader = fileFactory.openReader(outputFile.path().toString(),
false, ns, ns.getConf(), acuTableConf);
 -        openReader.close();
 -      } catch (IOException ex) {
 -        log.error("Verification of successful compaction fails!!! " + extent + " " + outputFile,
ex);
 -        throw ex;
 -      }
 -
 -      log.debug(String.format("Compaction %s %,d read | %,d written | %,6d entries/sec |
%6.3f secs", extent, majCStats.getEntriesRead(),
 -          majCStats.getEntriesWritten(), (int) (majCStats.getEntriesRead() / ((t2 - t1)
/ 1000.0)), (t2 - t1) / 1000.0));
 +      log.debug(String.format("Compaction %s %,d read | %,d written | %,6d entries/sec |
%,6.3f secs | %,12d bytes | %9.3f byte/sec", extent,
 +          majCStats.getEntriesRead(), majCStats.getEntriesWritten(), (int) (majCStats.getEntriesRead()
/ ((t2 - t1) / 1000.0)), (t2 - t1) / 1000.0,
 +          mfwTmp.getLength(), mfwTmp.getLength() / ((t2 - t1) / 1000.0)));
  
 -      majCStats.setFileSize(fileFactory.getFileSize(outputFile.path().toString(), ns, ns.getConf(),
acuTableConf));
 +      majCStats.setFileSize(mfwTmp.getLength());
        return majCStats;
      } catch (IOException e) {
        log.error("{}", e.getMessage(), e);


Mime
View raw message