You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2011/08/17 00:03:32 UTC
svn commit: r1158459 - in /hbase/branches/0.90: CHANGES.txt
src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
Author: stack
Date: Tue Aug 16 22:03:32 2011
New Revision: 1158459
URL: http://svn.apache.org/viewvc?rev=1158459&view=rev
Log:
HBASE-4161 Incorrect use of listStatus() in HBase region initialization
Modified:
hbase/branches/0.90/CHANGES.txt
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1158459&r1=1158458&r2=1158459&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Tue Aug 16 22:03:32 2011
@@ -12,6 +12,8 @@ Release 0.90.5 - Unreleased
HBASE-4148 HFileOutputFormat doesn't fill in TIMERANGE_KEY metadata (Jonathan Hsieh)
HBASE-4159 HBaseServer - IPC Reader threads are not daemons (Douglas
Campbell)
+ HBASE-4161 Incorrect use of listStatus() in HBase region initialization
+ (Pritam Damania)
IMPROVEMENT
HBASE-4205 Enhance HTable javadoc (Eric Charles)
Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java?rev=1158459&r1=1158458&r2=1158459&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java (original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java Tue Aug 16 22:03:32 2011
@@ -1333,23 +1333,28 @@ public class HLog implements Syncable {
final Path regiondir)
throws IOException {
Path editsdir = getRegionDirRecoveredEditsDir(regiondir);
- FileStatus[] files = fs.listStatus(editsdir, new PathFilter() {
- @Override
- public boolean accept(Path p) {
- boolean result = false;
- try {
- // Return files and only files that match the editfile names pattern.
- // There can be other files in this directory other than edit files.
- // In particular, on error, we'll move aside the bad edit file giving
- // it a timestamp suffix. See moveAsideBadEditsFile.
- Matcher m = EDITFILES_NAME_PATTERN.matcher(p.getName());
- result = fs.isFile(p) && m.matches();
- } catch (IOException e) {
- LOG.warn("Failed isFile check on " + p);
+
+ FileStatus [] files = null;
+ if (fs.exists(editsdir)) {
+ files = fs.listStatus(editsdir, new PathFilter () {
+ @Override
+ public boolean accept(Path p) {
+ boolean result = false;
+ try {
+ // Return files and only files that match the editfile names pattern.
+ // There can be other files in this directory other than edit files.
+ // In particular, on error, we'll move aside the bad edit file giving
+ // it a timestamp suffix. See moveAsideBadEditsFile.
+ Matcher m = EDITFILES_NAME_PATTERN.matcher(p.getName());
+ result = fs.isFile(p) && m.matches();
+ } catch (IOException e) {
+ LOG.warn("Failed isFile check on " + p);
+ }
+ return result;
}
- return result;
- }
- });
+ });
+ }
+
NavigableSet<Path> filesSorted = new TreeSet<Path>();
if (files == null) return filesSorted;
for (FileStatus status: files) {