HBASE-2665 TestStoreReconstruction broke in trunk
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@951253 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
77279a3c2b
commit
1c233d1ba3
|
@ -91,21 +91,21 @@ public class TestStoreReconstruction {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void runReconstructionLog() throws Exception {
|
public void runReconstructionLog() throws Exception {
|
||||||
|
|
||||||
byte[] family = Bytes.toBytes("column");
|
byte[] family = Bytes.toBytes("column");
|
||||||
HColumnDescriptor hcd = new HColumnDescriptor(family);
|
HColumnDescriptor hcd = new HColumnDescriptor(family);
|
||||||
HTableDescriptor htd = new HTableDescriptor(TABLE);
|
HTableDescriptor htd = new HTableDescriptor(TABLE);
|
||||||
htd.addFamily(hcd);
|
htd.addFamily(hcd);
|
||||||
HRegionInfo info = new HRegionInfo(htd, null, null, false);
|
HRegionInfo info = new HRegionInfo(htd, null, null, false);
|
||||||
Path oldLogDir = new Path(this.dir, HConstants.HREGION_OLDLOGDIR_NAME);
|
Path oldLogDir = new Path(this.dir, HConstants.HREGION_OLDLOGDIR_NAME);
|
||||||
HLog log = new HLog(cluster.getFileSystem(),
|
Path logDir = new Path(this.dir, HConstants.HREGION_LOGDIR_NAME);
|
||||||
this.dir, oldLogDir, conf, null);
|
HLog log = new HLog(cluster.getFileSystem(), logDir, oldLogDir, conf, null);
|
||||||
HRegion region = new HRegion(dir, log,
|
HRegion region = new HRegion(dir, log,
|
||||||
cluster.getFileSystem(),conf, info, null);
|
cluster.getFileSystem(),conf, info, null);
|
||||||
List<KeyValue> result = new ArrayList<KeyValue>();
|
List<KeyValue> result = new ArrayList<KeyValue>();
|
||||||
|
|
||||||
// Empty set to get all columns
|
// Empty set to get all columns
|
||||||
NavigableSet<byte[]> qualifiers = new ConcurrentSkipListSet<byte[]>(Bytes.BYTES_COMPARATOR);
|
NavigableSet<byte[]> qualifiers =
|
||||||
|
new ConcurrentSkipListSet<byte[]>(Bytes.BYTES_COMPARATOR);
|
||||||
|
|
||||||
final byte[] tableName = Bytes.toBytes(TABLE);
|
final byte[] tableName = Bytes.toBytes(TABLE);
|
||||||
final byte[] rowName = tableName;
|
final byte[] rowName = tableName;
|
||||||
|
@ -136,9 +136,8 @@ public class TestStoreReconstruction {
|
||||||
// TODO dont close the file here.
|
// TODO dont close the file here.
|
||||||
log.close();
|
log.close();
|
||||||
|
|
||||||
List<Path> splits =
|
List<Path> splits = HLog.splitLog(new Path(conf.get(HConstants.HBASE_DIR)),
|
||||||
HLog.splitLog(new Path(conf.get(HConstants.HBASE_DIR)),
|
logDir, oldLogDir, cluster.getFileSystem(), conf);
|
||||||
this.dir, oldLogDir, cluster.getFileSystem(), conf);
|
|
||||||
|
|
||||||
// Split should generate only 1 file since there's only 1 region
|
// Split should generate only 1 file since there's only 1 region
|
||||||
assertEquals(1, splits.size());
|
assertEquals(1, splits.size());
|
||||||
|
|
Loading…
Reference in New Issue