Java 类org.apache.hadoop.hbase.regionserver.MemStoreFlusher.FlushRegionEntry 实例源码

项目:ditb    文件:TestFlushRegionEntry.java   
@Test
public void testFlushRegionEntryEquality() {
  HRegionInfo hri = new HRegionInfo(1, TableName.valueOf("TestTable"), 0);
  HRegion r = mock(HRegion.class);
  doReturn(hri).when(r).getRegionInfo();

  FlushRegionEntry entry = new FlushRegionEntry(r, true);
  FlushRegionEntry other = new FlushRegionEntry(r, true);

  assertEquals(entry.hashCode(), other.hashCode());
  assertEquals(entry, other);
}
项目:pbase    文件:TestFlushRegionEntry.java   
@Test
public void test() {
  HRegion r = Mockito.mock(HRegion.class);
  FlushRegionEntry entry = new FlushRegionEntry(r);
  FlushRegionEntry other = new FlushRegionEntry(r);

  assertEquals(entry.hashCode(), other.hashCode());
  assertEquals(entry, other);
}
项目:hbase    文件:TestFlushRegionEntry.java   
@Test
public void testFlushRegionEntryEquality() {
  RegionInfo hri = RegionInfoBuilder.newBuilder(TableName.valueOf(name.getMethodName()))
      .setRegionId(1).setReplicaId(0).build();
  HRegion r = mock(HRegion.class);
  doReturn(hri).when(r).getRegionInfo();

  FlushRegionEntry entry = new FlushRegionEntry(r, true, FlushLifeCycleTracker.DUMMY);
  FlushRegionEntry other = new FlushRegionEntry(r, true, FlushLifeCycleTracker.DUMMY);

  assertEquals(entry.hashCode(), other.hashCode());
  assertEquals(entry, other);
}