From 851141a35746241636a39315553f49d89643b358 Mon Sep 17 00:00:00 2001 From: Jonathan Hsieh Date: Thu, 14 Feb 2013 13:05:31 +0000 Subject: [PATCH] HBASE-7752 [snapshot 130201 merge] Fix TestStoreFile failure Revert change to make it match trunk and pass git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/hbase-7290v2@1446156 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/hadoop/hbase/regionserver/TestStoreFile.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFile.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFile.java index d7bcc80ce97..f2667944103 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFile.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFile.java @@ -175,12 +175,13 @@ public class TestStoreFile extends HBaseTestCase { public void testHFileLink() throws IOException { final String columnFamily = "f"; - Configuration testConf = new Configuration(this.conf); - FSUtils.setRootDir(testConf, this.testDir); + // force temp data in hbase/target/test-data instead of /tmp/hbase-xxxx/ + Configuration testConf = new Configuration(this.conf); + FSUtils.setRootDir(testConf, this.testDir); HRegionInfo hri = new HRegionInfo(Bytes.toBytes("table-link")); Path storedir = new Path(new Path(this.testDir, - new Path(hri.getTableNameAsString(), hri.getEncodedName())), columnFamily); + new Path(hri.getTableNameAsString(), hri.getEncodedName())), columnFamily); // Make a store file and write data to it. StoreFile.Writer writer = new StoreFile.WriterBuilder(testConf, cacheConf, @@ -197,7 +198,7 @@ public class TestStoreFile extends HBaseTestCase { HFileLink.createHFileLinkName(hri, storeFilePath.getName())); // Try to open store file from link - StoreFile hsf = new StoreFile(this.fs, linkFilePath, conf, cacheConf, + StoreFile hsf = new StoreFile(this.fs, linkFilePath, testConf, cacheConf, BloomType.NONE, NoOpDataBlockEncoder.INSTANCE); assertTrue(hsf.isLink());