You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2017/05/23 15:39:02 UTC
[27/50] [abbrv] hbase git commit: Don't drop old master proc wal
files... need to debug
Don't drop old master proc wal files... need to debug
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/f2a5623d
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/f2a5623d
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/f2a5623d
Branch: refs/heads/HBASE-14614
Commit: f2a5623d63fa34e8751f1c459f1d7193d3136238
Parents: db1dcf3
Author: Michael Stack <st...@apache.org>
Authored: Sun Apr 30 21:16:05 2017 -1000
Committer: Michael Stack <st...@apache.org>
Committed: Tue May 23 08:36:53 2017 -0700
----------------------------------------------------------------------
.../hbase/procedure2/store/wal/ProcedureWALFile.java | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/f2a5623d/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java
index 012ddeb..585762b 100644
--- a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java
+++ b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java
@@ -26,6 +26,7 @@ import org.apache.hadoop.fs.FSDataInputStream;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.classification.InterfaceAudience;
import org.apache.hadoop.hbase.classification.InterfaceStability;
import org.apache.hadoop.hbase.procedure2.store.ProcedureStoreTracker;
@@ -157,7 +158,18 @@ public class ProcedureWALFile implements Comparable<ProcedureWALFile> {
public void removeFile() throws IOException {
close();
- fs.delete(logFile, false);
+ // TODO: FIX THIS. MAKE THIS ARCHIVE FORMAL.
+ Path archiveDir =
+ new Path(logFile.getParent().getParent(), HConstants.HFILE_ARCHIVE_DIRECTORY);
+ try {
+ fs.mkdirs(archiveDir);
+ } catch (IOException ioe) {
+ LOG.warn("Making " + archiveDir, ioe);
+ }
+ Path archivedFile = new Path(archiveDir, logFile.getName());
+ LOG.info("ARCHIVED WAL (FIX) " + logFile + " to " + archivedFile);
+ fs.rename(logFile, archivedFile);
+ // fs.delete(logFile, false);
}
public void setProcIds(long minId, long maxId) {