@Before public void setUp() throws Exception { byte[] ROW_BEFORE = ConnectionUtils.createCloseRowBefore(ROW); Configuration conf = Mockito.mock(Configuration.class); HRegionLocation regionLocation = Mockito.mock(HRegionLocation.class); ServerName serverName = Mockito.mock(ServerName.class); Mockito.when(connection.getConfiguration()).thenReturn(conf); Mockito.when(regionLocations.size()).thenReturn(1); Mockito.when(regionLocations.getRegionLocation(0)).thenReturn(regionLocation); Mockito.when(regionLocation.getHostname()).thenReturn("localhost"); Mockito.when(regionLocation.getServerName()).thenReturn(serverName); Mockito.when(scan.includeStartRow()).thenReturn(true); Mockito.when(scan.getStartRow()).thenReturn(ROW); }
byte[] locateStartRow = createCloseRowBefore(getRow()); List<HRegionLocation> locatedRegions = locateRegionsInRange( locateStartRow, getRow(), reload);
@Before public void setUp() throws Exception { byte[] ROW_BEFORE = ConnectionUtils.createCloseRowBefore(ROW); Configuration conf = Mockito.mock(Configuration.class); HRegionLocation regionLocation = Mockito.mock(HRegionLocation.class); ServerName serverName = Mockito.mock(ServerName.class); Mockito.when(connection.getConfiguration()).thenReturn(conf); Mockito.when(regionLocations.size()).thenReturn(1); Mockito.when(regionLocations.getRegionLocation(0)).thenReturn(regionLocation); Mockito.when(regionLocation.getHostname()).thenReturn("localhost"); Mockito.when(regionLocation.getServerName()).thenReturn(serverName); Mockito.when(scan.includeStartRow()).thenReturn(true); Mockito.when(scan.getStartRow()).thenReturn(ROW); }
byte[] locateStartRow = createCloseRowBefore(getRow()); List<HRegionLocation> locatedRegions = locateRegionsInRange( locateStartRow, getRow(), reload);
byte[] locateStartRow = createCloseRowBefore(getRow()); List<HRegionLocation> locatedRegions = locateRegionsInRange( locateStartRow, getRow(), reload);