From d87c550b948c11992660015ef26954a699929869 Mon Sep 17 00:00:00 2001 From: stack Date: Tue, 18 Nov 2014 21:54:48 -0800 Subject: [PATCH] HBASE-12532 TestFilter failing occasionally with ExitCodeException doing chmod since HBASE-10378 --- .../org/apache/hadoop/hbase/regionserver/HRegion.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java index 1615a2548d9..e9b360d53d5 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -4563,9 +4563,13 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver { // WAL effectiveWAL = wal; if (wal == null && !ignoreWAL) { // TODO HBASE-11983 There'll be no roller for this wal? - effectiveWAL = (new WALFactory(conf, + // The WAL subsystem will use the default rootDir rather than the passed in rootDir + // unless I pass along via the conf. + Configuration confForWAL = new Configuration(conf); + confForWAL.set(HConstants.HBASE_DIR, rootDir.toString()); + effectiveWAL = (new WALFactory(confForWAL, Collections.singletonList(new MetricsWAL()), - "hregion-" + RandomStringUtils.random(8))).getWAL(info.getEncodedNameAsBytes()); + "hregion-" + RandomStringUtils.randomAscii(8))).getWAL(info.getEncodedNameAsBytes()); } HRegion region = HRegion.newHRegion(tableDir, effectiveWAL, fs, conf, info, hTableDescriptor, null);