use of org.apache.accumulo.core.metadata.TabletLocationState in project accumulo by apache.
the class TabletLocationStateTest method testConstruction_NoFuture_NoWalogs.
@Test
public void testConstruction_NoFuture_NoWalogs() throws Exception {
tls = new TabletLocationState(keyExtent, null, current, last, null, null, true);
assertNotNull(tls.walogs);
assertEquals(0, tls.walogs.size());
}
use of org.apache.accumulo.core.metadata.TabletLocationState in project accumulo by apache.
the class TabletLocationStateTest method testGetServer_Last.
@Test
public void testGetServer_Last() throws Exception {
tls = new TabletLocationState(keyExtent, null, null, last, null, walogs, true);
assertSame(last, tls.getLocation());
}
use of org.apache.accumulo.core.metadata.TabletLocationState in project accumulo by apache.
the class TabletLocationStateTest method testGetServer_Future.
@Test
public void testGetServer_Future() throws Exception {
tls = new TabletLocationState(keyExtent, future, null, last, null, walogs, true);
assertSame(future, tls.getLocation());
}
use of org.apache.accumulo.core.metadata.TabletLocationState in project accumulo by apache.
the class TabletLocationStateTest method testGetState_Dead2.
@Test
public void testGetState_Dead2() throws Exception {
Set<TServerInstance> liveServers = new java.util.HashSet<>();
liveServers.add(future);
tls = new TabletLocationState(keyExtent, null, current, last, null, walogs, true);
assertEquals(TabletState.ASSIGNED_TO_DEAD_SERVER, tls.getState(liveServers));
}
use of org.apache.accumulo.core.metadata.TabletLocationState in project accumulo by apache.
the class TabletLocationStateTest method testGetState_Unassigned1.
@Test
public void testGetState_Unassigned1() throws Exception {
tls = new TabletLocationState(keyExtent, null, null, null, null, walogs, true);
assertEquals(TabletState.UNASSIGNED, tls.getState(null));
}
Aggregations