@Override protected void map(ImmutableBytesWritable key, Result value, Context context) throws IOException, InterruptedException { try { // first, finish any hash batches that end before the scanned row while (nextSourceKey != null && key.compareTo(nextSourceKey) >= 0) { moveToNextBatch(context); } // next, add the scanned row (as long as we've reached the first batch) if (targetHasher.isBatchStarted()) { targetHasher.hashResult(value); } } catch (Throwable t) { mapperException = t; Throwables.propagateIfInstanceOf(t, IOException.class); Throwables.propagateIfInstanceOf(t, InterruptedException.class); Throwables.propagate(t); } }
@Override protected void map(ImmutableBytesWritable key, Result value, Context context) throws IOException, InterruptedException { try { // first, finish any hash batches that end before the scanned row while (nextSourceKey != null && key.compareTo(nextSourceKey) >= 0) { moveToNextBatch(context); } // next, add the scanned row (as long as we've reached the first batch) if (targetHasher.isBatchStarted()) { targetHasher.hashResult(value); } } catch (Throwable t) { mapperException = t; Throwables.propagateIfInstanceOf(t, IOException.class); Throwables.propagateIfInstanceOf(t, InterruptedException.class); Throwables.propagate(t); } }
@Override protected void map(ImmutableBytesWritable key, Result value, Context context) throws IOException, InterruptedException { try { // first, finish any hash batches that end before the scanned row while (nextSourceKey != null && key.compareTo(nextSourceKey) >= 0) { moveToNextBatch(context); } // next, add the scanned row (as long as we've reached the first batch) if (targetHasher.isBatchStarted()) { targetHasher.hashResult(value); } } catch (Throwable t) { mapperException = t; Throwables.propagateIfInstanceOf(t, IOException.class); Throwables.propagateIfInstanceOf(t, InterruptedException.class); Throwables.propagate(t); } }
moveToNextBatch(context);
@Override protected void map(ImmutableBytesWritable key, Result value, Context context) throws IOException, InterruptedException { try { // first, finish any hash batches that end before the scanned row while (nextSourceKey != null && key.compareTo(nextSourceKey) >= 0) { moveToNextBatch(context); } // next, add the scanned row (as long as we've reached the first batch) if (targetHasher.isBatchStarted()) { targetHasher.hashResult(value); } } catch (Throwable t) { mapperException = t; Throwables.propagateIfInstanceOf(t, IOException.class); Throwables.propagateIfInstanceOf(t, InterruptedException.class); Throwables.propagate(t); } }