HBASE-6928 TestStoreFile sometimes fails with 'Column family prefix used twice' -- ATTEMPTED FIX

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1393923 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2012-10-04 05:46:51 +00:00
parent 7d2479983a
commit 610ea30534

View File

@ -176,9 +176,10 @@ public class TestStoreFile extends HBaseTestCase {
}
public void testHFileLink() throws IOException {
final String columnFamily = "f";
HRegionInfo hri = new HRegionInfo(Bytes.toBytes("table-link"));
Path storedir = new Path(new Path(FSUtils.getRootDir(conf),
new Path(hri.getTableNameAsString(), hri.getEncodedName())), "cf");
new Path(hri.getTableNameAsString(), hri.getEncodedName())), columnFamily);
// Make a store file and write data to it.
StoreFile.Writer writer = new StoreFile.WriterBuilder(conf, cacheConf,
@ -189,7 +190,7 @@ public class TestStoreFile extends HBaseTestCase {
writeStoreFile(writer);
writer.close();
Path dstPath = new Path(FSUtils.getRootDir(conf), new Path("test-region", "cf"));
Path dstPath = new Path(FSUtils.getRootDir(conf), new Path("test-region", columnFamily));
HFileLink.create(conf, this.fs, dstPath, hri, storeFilePath.getName());
Path linkFilePath = new Path(dstPath,
HFileLink.createHFileLinkName(hri, storeFilePath.getName()));