accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [09/10] git commit: ACCUMULO-1452 remove any junk _tmp files when openning the tablet
Date Thu, 12 Sep 2013 16:38:27 GMT
ACCUMULO-1452 remove any junk _tmp files when openning the tablet


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

Branch: refs/heads/master
Commit: 2737b846751ef248cfe055acd54e4d3d6f97feda
Parents: fcf613b
Author: Eric Newton <eric.newton@gmail.com>
Authored: Thu Sep 12 11:43:51 2013 -0400
Committer: Eric Newton <eric.newton@gmail.com>
Committed: Thu Sep 12 11:43:51 2013 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/server/tabletserver/Tablet.java     | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/2737b846/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java b/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
index e7a2b82..5a0138f 100644
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
@@ -1250,12 +1250,13 @@ public class Tablet {
   private Tablet(final TabletServer tabletServer, final Text location, final KeyExtent extent,
final TabletResourceManager trm, final Configuration conf,
       final VolumeManager fs, final List<LogEntry> logEntries, final SortedMap<FileRef,DataFileValue>
datafiles, String time,
       final TServerInstance lastLocation, Set<FileRef> scanFiles, long initFlushID,
long initCompactID) throws IOException {
+    Path locationPath;
     if (location.find(":") >= 0) {
-      this.location = new Path(location.toString());
+      locationPath = new Path(location.toString());
     } else {
-      this.location = new Path(ServerConstants.getTablesDirs()[0] + "/" + extent.getTableId().toString()
+ location.toString());
+      locationPath = new Path(ServerConstants.getTablesDirs()[0] + "/" + extent.getTableId().toString()
+ location.toString());
     }
-    this.location = this.location.makeQualified(fs.getFileSystemByPath(this.location));
+    this.location = locationPath.makeQualified(fs.getFileSystemByPath(locationPath));
     this.lastLocation = lastLocation;
     this.conf = conf;
     this.acuTableConf = tabletServer.getTableConfiguration(extent);
@@ -1432,7 +1433,7 @@ public class Tablet {
     try {
       for (FileStatus tmp : fs.globStatus(new Path(location, "*_tmp"))){
         try {
-          fs.delete(tmp.getPath(), true);
+          fs.delete(tmp.getPath());
         } catch (IOException ex) {
           log.error("Unable to remove old temp file " + tmp.getPath() + ": " + ex);
         }


Mime
View raw message