[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16480400#comment-16480400 ] Nihal Jain commented on HBASE-14391: We met a similar scenario in our environment. If no body is working on this right now, I can take this up. > 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 >Priority: Major > 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 (v7.6.3#76005)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15422240#comment-15422240 ] stack commented on HBASE-14391: --- Moved fix version to 1.2.4 from 1.2.3 (patch was committed and then reverted) > 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.1, 1.1.7, 1.2.4 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15265886#comment-15265886 ] Nick Dimiduk commented on HBASE-14391: -- Reading more carefully. Please disregard. > 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.2, 1.1.6 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15265885#comment-15265885 ] Nick Dimiduk commented on HBASE-14391: -- This one looks committed. [~jinghe] please mark it resolved with the fixVersion field set appropriately for all branches. > 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.1.5, 1.2.2 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14902253#comment-14902253 ] Hudson commented on HBASE-14391: FAILURE: Integrated in HBase-1.2 #191 (See [https://builds.apache.org/job/HBase-1.2/191/]) Revert: HBASE-14391 Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale (jerryjch: rev 05cb051423953b913156e4950b67f3d9b28ada5f) * hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java > 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.2.0, 1.3.0, 1.1.3 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14902261#comment-14902261 ] Hudson commented on HBASE-14391: SUCCESS: Integrated in HBase-1.3-IT #173 (See [https://builds.apache.org/job/HBase-1.3-IT/173/]) Revert: HBASE-14391 Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale (jerryjch: rev 73ec3fdd5c64354ae8339baceed4ed0de229712d) * hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java > 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.2.0, 1.3.0, 1.1.3 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14902162#comment-14902162 ] Hudson commented on HBASE-14391: FAILURE: Integrated in HBase-1.3 #192 (See [https://builds.apache.org/job/HBase-1.3/192/]) Revert: HBASE-14391 Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale (jerryjch: rev 73ec3fdd5c64354ae8339baceed4ed0de229712d) * hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java > 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.2.0, 1.3.0, 1.1.3 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14902001#comment-14902001 ] Hudson commented on HBASE-14391: FAILURE: Integrated in HBase-TRUNK #6827 (See [https://builds.apache.org/job/HBase-TRUNK/6827/]) Revert: HBASE-14391 Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale (jerryjch: rev 45d67435adc9195325bfccc78b7e1a0202a446e5) * hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java > 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.2.0, 1.3.0, 1.1.3 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14901849#comment-14901849 ] stack commented on HBASE-14391: --- For sure failures are related [~jerryhe]? Often we see failure on integration > 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.2.0, 1.3.0, 1.1.3 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14901938#comment-14901938 ] Jerry He commented on HBASE-14391: -- Yes. They are. The original patch is possibly deleting newly created logDir that does not yet have a writer created yet in a race. My bad. > 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.2.0, 1.3.0, 1.1.3 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14901992#comment-14901992 ] Hudson commented on HBASE-14391: FAILURE: Integrated in HBase-1.1 #672 (See [https://builds.apache.org/job/HBase-1.1/672/]) Revert: HBASE-14391 Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale (jerryjch: rev 489dd6427a499d09fb8cde4fbdd46303f0a57b20) * hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java > 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.2.0, 1.3.0, 1.1.3 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14901720#comment-14901720 ] Hudson commented on HBASE-14391: SUCCESS: Integrated in HBase-1.3-IT #171 (See [https://builds.apache.org/job/HBase-1.3-IT/171/]) HBASE-14391 Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale (Qianxi Zhang) (jerryjch: rev 9574c67610cf30eaad58de64171726eac954be9c) * hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java > 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.2.0, 1.3.0, 1.1.3 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14901703#comment-14901703 ] Hudson commented on HBASE-14391: SUCCESS: Integrated in HBase-1.2-IT #160 (See [https://builds.apache.org/job/HBase-1.2-IT/160/]) HBASE-14391 Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale (Qianxi Zhang) (jerryjch: rev 7e9f7b53a2c3900ba7a305dd8effab252c55e8f4) * hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java > 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.2.0, 1.3.0, 1.1.3 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14901674#comment-14901674 ] Hudson commented on HBASE-14391: FAILURE: Integrated in HBase-1.1 #671 (See [https://builds.apache.org/job/HBase-1.1/671/]) HBASE-14391 Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale (Qianxi Zhang) (jerryjch: rev 242594d0b65ede977282520b5d4edecf3d2b9e26) * hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java > 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.2.0, 1.3.0, 1.1.3 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14901724#comment-14901724 ] Hudson commented on HBASE-14391: FAILURE: Integrated in HBase-TRUNK #6825 (See [https://builds.apache.org/job/HBase-TRUNK/6825/]) HBASE-14391 Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale (Qianxi Zhang) (jerryjch: rev 8765ffb0ca2b1c39d864ac495f0b3ee2abc520ed) * hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java > 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.2.0, 1.3.0, 1.1.3 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14901663#comment-14901663 ] Hudson commented on HBASE-14391: FAILURE: Integrated in HBase-1.3 #190 (See [https://builds.apache.org/job/HBase-1.3/190/]) HBASE-14391 Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale (Qianxi Zhang) (jerryjch: rev 9574c67610cf30eaad58de64171726eac954be9c) * hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java > 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.2.0, 1.3.0, 1.1.3 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14901708#comment-14901708 ] Hudson commented on HBASE-14391: FAILURE: Integrated in HBase-1.2 #189 (See [https://builds.apache.org/job/HBase-1.2/189/]) HBASE-14391 Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale (Qianxi Zhang) (jerryjch: rev 7e9f7b53a2c3900ba7a305dd8effab252c55e8f4) * hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java > 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.2.0, 1.3.0, 1.1.3 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14901803#comment-14901803 ] Jerry He commented on HBASE-14391: -- Some of the test case failures seem to be related to the patch. I will take a look and revert if needed. > 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.2.0, 1.3.0, 1.1.3 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14901843#comment-14901843 ] Jerry He commented on HBASE-14391: -- Reverted from all branches. > 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.2.0, 1.3.0, 1.1.3 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14901513#comment-14901513 ] Jerry He commented on HBASE-14391: -- I ran the patch on a cluster. It works well. Committed to branch 1.1+ Thanks for the patch [~qianxiZhang]. Thanks for the review [~stack]. > 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 > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14901971#comment-14901971 ] Hudson commented on HBASE-14391: SUCCESS: Integrated in HBase-1.2-IT #161 (See [https://builds.apache.org/job/HBase-1.2-IT/161/]) Revert: HBASE-14391 Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale (jerryjch: rev 05cb051423953b913156e4950b67f3d9b28ada5f) * hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java > 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.2.0, 1.3.0, 1.1.3 > > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14900998#comment-14900998 ] Jerry He commented on HBASE-14391: -- v4 patch looks good. Will do some brief testing shortly and commit if there is no objection. Will fix nit (e.g add warning message if delete failed) on commit. > 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 > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14900539#comment-14900539 ] Hadoop QA commented on HBASE-14391: --- {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12761384/HBASE_14391_master_v4.patch against master branch at commit a7afc132e2db7ebbb571b43ae17161bff40b59c5. ATTACHMENT ID: 12761384 {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:red}-1 tests included{color}. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color:green}+1 hadoop versions{color}. The patch compiles with all supported hadoop versions (2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.6.0 2.7.0 2.7.1) {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 protoc{color}. The applied patch does not increase the total number of protoc compiler warnings. {color:green}+1 javadoc{color}. The javadoc tool did not generate any warning messages. {color:green}+1 checkstyle{color}. The applied patch does not increase the total number of checkstyle errors {color:green}+1 findbugs{color}. The patch does not introduce any new Findbugs (version 2.0.3) warnings. {color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings. {color:green}+1 lineLengths{color}. The patch does not introduce lines longer than 100 {color:green}+1 site{color}. The mvn post-site goal succeeds with this patch. {color:green}+1 core tests{color}. The patch passed unit tests in . Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/15648//testReport/ Release Findbugs (version 2.0.3)warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/15648//artifact/patchprocess/newFindbugsWarnings.html Checkstyle Errors: https://builds.apache.org/job/PreCommit-HBASE-Build/15648//artifact/patchprocess/checkstyle-aggregate.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/15648//console This message is automatically generated. > 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 > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14901181#comment-14901181 ] stack commented on HBASE-14391: --- Patch LGTM. Thanks for doing a bit of testing [~jerryhe] > 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 > 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14900237#comment-14900237 ] Qianxi Zhang commented on HBASE-14391: -- Of course. Thanks for the good advice. > 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 > Attachments: HBASE-14391-master-v3.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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14900238#comment-14900238 ] Qianxi Zhang commented on HBASE-14391: -- Of course. Thanks for the good advice. > 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 > Attachments: HBASE-14391-master-v3.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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14900020#comment-14900020 ] Jerry He commented on HBASE-14391: -- We can do some workaround fix to make the patch work, but it probably won't be a good one. On the other hand, we can try to clean the empty logDirs during master startup. [~qianxiZhang], do you want to provide another patch? > 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 > Attachments: HBASE-14391-master-v3.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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14876151#comment-14876151 ] Jerry He commented on HBASE-14391: -- Continue from my last comment. In theory, it looks like deleting the logDir should be done at the WALFactory level since it knows all Providers are closed and will do a final cleanup for what is shared by the WALFactory. But it does not make logical sense for the WALFactory to go down to the FSHLog level and know the FS layout in this case. There are still holes in the the abstraction work for WALFactory and WALProvider. Maybe [~busbey] has some insight suggestion. > 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 > Attachments: HBASE-14391-master-v3.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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14876075#comment-14876075 ] Hadoop QA commented on HBASE-14391: --- {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12761139/HBASE-14391-master-v3.patch against master branch at commit d81fba59cfab5ed368fe888ff811a7f5064b18cc. ATTACHMENT ID: 12761139 {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:red}-1 tests included{color}. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color:green}+1 hadoop versions{color}. The patch compiles with all supported hadoop versions (2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.6.0 2.7.0 2.7.1) {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 protoc{color}. The applied patch does not increase the total number of protoc compiler warnings. {color:green}+1 javadoc{color}. The javadoc tool did not generate any warning messages. {color:green}+1 checkstyle{color}. The applied patch does not increase the total number of checkstyle errors {color:green}+1 findbugs{color}. The patch does not introduce any new Findbugs (version 2.0.3) warnings. {color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings. {color:green}+1 lineLengths{color}. The patch does not introduce lines longer than 100 {color:green}+1 site{color}. The mvn post-site goal succeeds with this patch. {color:red}-1 core tests{color}. The patch failed these unit tests: org.apache.hadoop.hbase.util.hbck.TestOfflineMetaRebuildBase org.apache.hadoop.hbase.regionserver.TestHRegion org.apache.hadoop.hbase.regionserver.TestFailedAppendAndSync Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/15633//testReport/ Release Findbugs (version 2.0.3)warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/15633//artifact/patchprocess/newFindbugsWarnings.html Checkstyle Errors: https://builds.apache.org/job/PreCommit-HBASE-Build/15633//artifact/patchprocess/checkstyle-aggregate.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/15633//console This message is automatically generated. > 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 > Attachments: HBASE-14391-master-v3.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; > }
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14875940#comment-14875940 ] Jerry He commented on HBASE-14391: -- I attached a v3 patch, which I tested it on a cluster. The patch still does not work. Now I understand why HBASE-12522 removed the code to delete the logDir. Because now there can be multiple WALProvider sharing the same logDir. For example, there is metaProvider and a default provider on the region server that holds the meta. There are two FSHLog instances. When we close the metaProvider, we only archive its log files. We can not delete logDir because it may still contain log files from the other instance. > 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 > Attachments: HBASE-14391-master-v3.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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14742493#comment-14742493 ] Hadoop QA commented on HBASE-14391: --- {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12755304/HBASE_14391_trunk_v2.patch against master branch at commit a9157379a3046a9d4c377675c932257c4ecb6597. ATTACHMENT ID: 12755304 {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:red}-1 tests included{color}. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color:green}+1 hadoop versions{color}. The patch compiles with all supported hadoop versions (2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.6.0 2.7.0 2.7.1) {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 protoc{color}. The applied patch does not increase the total number of protoc compiler warnings. {color:green}+1 javadoc{color}. The javadoc tool did not generate any warning messages. {color:green}+1 checkstyle{color}. The applied patch does not increase the total number of checkstyle errors {color:green}+1 findbugs{color}. The patch does not introduce any new Findbugs (version 2.0.3) warnings. {color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings. {color:green}+1 lineLengths{color}. The patch does not introduce lines longer than 100 {color:green}+1 site{color}. The mvn post-site goal succeeds with this patch. {color:red}-1 core tests{color}. The patch failed these unit tests: org.apache.hadoop.hbase.regionserver.TestKeepDeletes org.apache.hadoop.hbase.client.TestIntraRowPagination org.apache.hadoop.hbase.filter.TestColumnPrefixFilter org.apache.hadoop.hbase.filter.TestMultipleColumnPrefixFilter org.apache.hadoop.hbase.regionserver.TestColumnSeeking org.apache.hadoop.hbase.regionserver.TestHRegionInfo org.apache.hadoop.hbase.filter.TestInvocationRecordFilter org.apache.hadoop.hbase.io.encoding.TestPrefixTree org.apache.hadoop.hbase.io.encoding.TestSeekBeforeWithReverseScan org.apache.hadoop.hbase.coprocessor.TestRegionObserverStacking org.apache.hadoop.hbase.regionserver.TestRegionMergeTransaction org.apache.hadoop.hbase.regionserver.TestMinVersions org.apache.hadoop.hbase.regionserver.TestScanner org.apache.hadoop.hbase.regionserver.TestDefaultCompactSelection org.apache.hadoop.hbase.io.hfile.TestScannerSelectionUsingKeyRange org.apache.hadoop.hbase.regionserver.wal.TestLogRollingNoCluster org.apache.hadoop.hbase.regionserver.wal.TestWALActionsListener org.apache.hadoop.hbase.regionserver.TestSplitTransaction org.apache.hadoop.hbase.filter.TestDependentColumnFilter org.apache.hadoop.hbase.filter.TestFilter org.apache.hadoop.hbase.regionserver.TestResettingCounters org.apache.hadoop.hbase.coprocessor.TestCoprocessorInterface org.apache.hadoop.hbase.regionserver.TestWideScanner org.apache.hadoop.hbase.regionserver.TestScanWithBloomError Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/15576//testReport/ Release Findbugs (version 2.0.3)warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/15576//artifact/patchprocess/newFindbugsWarnings.html Checkstyle Errors: https://builds.apache.org/job/PreCommit-HBASE-Build/15576//artifact/patchprocess/checkstyle-aggregate.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/15576//console This message is automatically generated. > 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 > Attachments: 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
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14742740#comment-14742740 ] Jerry He commented on HBASE-14391: -- The test failure are related. There is a mistake in v2. The delete should be on this.fullPathLogDir, not this.fullPathArchiveDir. > 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 > Attachments: 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14739960#comment-14739960 ] Qianxi Zhang commented on HBASE-14391: -- Thanks, [~jerryhe] and [~eclark] I will update the patch. > 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 > Attachments: HBASE_14391_trunk_v1.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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14740145#comment-14740145 ] Elliott Clark commented on HBASE-14391: --- Thanks so much that looks awesome to me. > 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 > Attachments: 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14740231#comment-14740231 ] Jerry He commented on HBASE-14391: -- Can you 'Submit the patch' so that we have 'PATCH AVAILABLE' to get a QA run? > 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 > Attachments: 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14739431#comment-14739431 ] Jerry He commented on HBASE-14391: -- We throw exception and error out if fs rename call fails: {code} if (!FSUtils.renameAndSetModifyTime(fs, file.getPath(), p)) { throw new IOException("Unable to rename " + file.getPath() + " to " + p); } {code} Is this enough, Elliott? > 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 > Attachments: HBASE_14391_trunk_v1.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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14739442#comment-14739442 ] Elliott Clark commented on HBASE-14391: --- Nope. I've seen moves fail silently before. There's no harm asking to remove the directory non-recursive. It should always be empty. If it's not then something went wrong and deleting is not the right thing to do > 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 > Attachments: HBASE_14391_trunk_v1.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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14739553#comment-14739553 ] Jerry He commented on HBASE-14391: -- Ok, Let's set recursive to false, and give appropriate warning if we can not delete the directory. > 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 > Attachments: HBASE_14391_trunk_v1.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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14738243#comment-14738243 ] Elliott Clark commented on HBASE-14391: --- We've seen hadoop moves fail before, why not be more conservative and not delete recursive ? > 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 > Attachments: HBASE_14391_trunk_v1.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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14738249#comment-14738249 ] Qianxi Zhang commented on HBASE-14391: -- Sorry Elliott, maybe I did not catch your idea. There are no fail moves, in fact we did not delete it before this patch. > 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 > Attachments: HBASE_14391_trunk_v1.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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14737894#comment-14737894 ] Qianxi Zhang commented on HBASE-14391: -- Yeah, I think so. I intend to fix this bug this weekend > 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 > Attachments: 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14738168#comment-14738168 ] Jerry He commented on HBASE-14391: -- The patch looks good. Or you want to be a little conservative by setting recursive to false. You can look at SplitLogManager.splitLogDistributed(). It cleans up the split log dirs. > 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 > Attachments: HBASE_14391_trunk_v1.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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14738018#comment-14738018 ] Jerry He commented on HBASE-14391: -- Sure. Attach a patch when you are ready. > 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 > Attachments: 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14738067#comment-14738067 ] Qianxi Zhang commented on HBASE-14391: -- Hey, Jerry I think there are two methods. 1. When the regionserver nomal stops(not abort) and closes the WAL, delete the regionserver WAL directory ( HBase 0.98 uses this method) 2. When the cluster starts, master checks all the regionserver directory, If the directory in empty then delete it. I incline to the first method. How do you think about it? > 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 > Attachments: 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14738068#comment-14738068 ] Qianxi Zhang commented on HBASE-14391: -- Hey, Jerry I think there are two methods. 1. When the regionserver nomal stops(not abort) and closes the WAL, delete the regionserver WAL directory ( HBase 0.98 uses this method) 2. When the cluster starts, master checks all the regionserver directory, If the directory in empty then delete it. I incline to the first method. How do you think about it? > 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 > Attachments: 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14738066#comment-14738066 ] Qianxi Zhang commented on HBASE-14391: -- Hey, Jerry I think there are two methods. 1. When the regionserver nomal stops(not abort) and closes the WAL, delete the regionserver WAL directory ( HBase 0.98 uses this method) 2. When the cluster starts, master checks all the regionserver directory, If the directory in empty then delete it. I incline to the first method. How do you think about it? > 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 > Attachments: 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14738064#comment-14738064 ] Qianxi Zhang commented on HBASE-14391: -- Hey, Jerry I think there are two methods. 1. When the regionserver nomal stops(not abort) and closes the WAL, delete the regionserver WAL directory ( HBase 0.98 uses this method) 2. When the cluster starts, master checks all the regionserver directory, If the directory in empty then delete it. I incline to the first method. How do you think about it? > 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 > Attachments: 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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14738192#comment-14738192 ] Jerry He commented on HBASE-14391: -- On the other hand, there isn't a real need to be conservative here. In the SplitLogManager, we want to be conservative because those logs are for recovery. +1 on your patch. > 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 > Attachments: HBASE_14391_trunk_v1.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)
[jira] [Commented] (HBASE-14391) Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale
[ https://issues.apache.org/jira/browse/HBASE-14391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14737139#comment-14737139 ] Jerry He commented on HBASE-14391: -- I have seen the same problem. There werea bunch of empty region server log directories stayed around if there were many region severs. See attached. This seems to be a regression from the refactoring in HBASE-12522. > 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 > Attachments: 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)