Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B7D6E19E6A for ; Tue, 8 Mar 2016 03:36:41 +0000 (UTC) Received: (qmail 24351 invoked by uid 500); 8 Mar 2016 03:36:41 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 24172 invoked by uid 500); 8 Mar 2016 03:36:41 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 24104 invoked by uid 99); 8 Mar 2016 03:36:41 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Mar 2016 03:36:41 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id CF9B82C1F68 for ; Tue, 8 Mar 2016 03:36:40 +0000 (UTC) Date: Tue, 8 Mar 2016 03:36:40 +0000 (UTC) From: "Nick Dimiduk (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nick Dimiduk updated HBASE-14391: --------------------------------- Fix Version/s: (was: 1.1.4) 1.1.5 > Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale > -------------------------------------------------------------------------------------------------- > > Key: HBASE-14391 > URL: https://issues.apache.org/jira/browse/HBASE-14391 > Project: HBase > Issue Type: Bug > Components: wal > Affects Versions: 1.0.2 > Reporter: Qianxi Zhang > Assignee: Qianxi Zhang > Fix For: 2.0.0, 1.3.0, 1.2.1, 1.1.5 > > Attachments: HBASE-14391-master-v3.patch, HBASE_14391_master_v4.patch, HBASE_14391_trunk_v1.patch, HBASE_14391_trunk_v2.patch, WALs-leftover-dir.txt > > > When I restarted the hbase cluster in which there was few data, I found there are two directories for one host with different timestamp which indicates that the old regionserver wal directory is not deleted. > FHLog#989 > {code} > @Override > public void close() throws IOException { > shutdown(); > final FileStatus[] files = getFiles(); > if (null != files && 0 != files.length) { > for (FileStatus file : files) { > Path p = getWALArchivePath(this.fullPathArchiveDir, file.getPath()); > // Tell our listeners that a log is going to be archived. > if (!this.listeners.isEmpty()) { > for (WALActionsListener i : this.listeners) { > i.preLogArchive(file.getPath(), p); > } > } > if (!FSUtils.renameAndSetModifyTime(fs, file.getPath(), p)) { > throw new IOException("Unable to rename " + file.getPath() + " to " + p); > } > // Tell our listeners that a log was archived. > if (!this.listeners.isEmpty()) { > for (WALActionsListener i : this.listeners) { > i.postLogArchive(file.getPath(), p); > } > } > } > LOG.debug("Moved " + files.length + " WAL file(s) to " + > FSUtils.getPath(this.fullPathArchiveDir)); > } > LOG.info("Closed WAL: " + toString()); > } > {code} > When regionserver is stopped, the hlog will be archived, so wal/regionserver is empty in hdfs. > MasterFileSystem#252 > {code} > if (curLogFiles == null || curLogFiles.length == 0) { > // Empty log folder. No recovery needed > continue; > } > {code} > The regionserver directory will be not splitted, it makes sense. But it will be not deleted. -- This message was sent by Atlassian JIRA (v6.3.4#6332)