@Override protected void cleanup(Context context) throws IOException, InterruptedException { if (mapperException == null) { try { finishRemainingHashRanges(context); } catch (Throwable t) { mapperException = t; } } try { sourceTable.close(); targetTable.close(); sourceConnection.close(); targetConnection.close(); } catch (Throwable t) { if (mapperException == null) { mapperException = t; } else { LOG.error("Suppressing exception from closing tables", t); } } // propagate first exception if (mapperException != null) { Throwables.propagateIfInstanceOf(mapperException, IOException.class); Throwables.propagateIfInstanceOf(mapperException, InterruptedException.class); Throwables.propagate(mapperException); } }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { if (mapperException == null) { try { finishRemainingHashRanges(context); } catch (Throwable t) { mapperException = t; } } try { sourceTable.close(); targetTable.close(); sourceConnection.close(); targetConnection.close(); } catch (Throwable t) { if (mapperException == null) { mapperException = t; } else { LOG.error("Suppressing exception from closing tables", t); } } // propagate first exception if (mapperException != null) { Throwables.propagateIfInstanceOf(mapperException, IOException.class); Throwables.propagateIfInstanceOf(mapperException, InterruptedException.class); Throwables.propagate(mapperException); } }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { if (mapperException == null) { try { finishRemainingHashRanges(context); } catch (Throwable t) { mapperException = t; } } try { sourceTable.close(); targetTable.close(); sourceConnection.close(); targetConnection.close(); } catch (Throwable t) { if (mapperException == null) { mapperException = t; } else { LOG.error("Suppressing exception from closing tables", t); } } // propagate first exception if (mapperException != null) { Throwables.propagateIfInstanceOf(mapperException, IOException.class); Throwables.propagateIfInstanceOf(mapperException, InterruptedException.class); Throwables.propagate(mapperException); } }
if (mapperException == null) { try { finishRemainingHashRanges(context); } catch (Throwable t) { mapperException = t;