Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9853C200C7E for ; Tue, 23 May 2017 17:38:40 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 96E19160BD9; Tue, 23 May 2017 15:38:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DB2A2160BDF for ; Tue, 23 May 2017 17:38:39 +0200 (CEST) Received: (qmail 26332 invoked by uid 500); 23 May 2017 15:38:37 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 25283 invoked by uid 99); 23 May 2017 15:38:36 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 May 2017 15:38:36 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C59B5E9681; Tue, 23 May 2017 15:38:36 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: stack@apache.org To: commits@hbase.apache.org Date: Tue, 23 May 2017 15:39:02 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [27/50] [abbrv] hbase git commit: Don't drop old master proc wal files... need to debug archived-at: Tue, 23 May 2017 15:38:40 -0000 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 Authored: Sun Apr 30 21:16:05 2017 -1000 Committer: Michael Stack 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 { 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) {