Source:
private void runDataSource() { synchronized (GuestProcessor.this) { final AdvertisedDataSource ads = new AdvertisedDataSource( m_source.getPartitionId(), m_source.getTableName(), m_source.getPartitionColumnName(), System.currentTimeMillis(), m_source.getGeneration(), m_source.m_columnNames, m_types, m_source.m_columnLengths, m_source.getExportFormat()); final Runnable waitForBarrierRelease = new Runnable() { @Override public void run() { try { if (m_startPolling) { if (exportLog.isDebugEnabled()) { exportLog.debug("Beginning export processing for export source " + m_source.getTableName() + " partition " + m_source.getPartitionId()); } m_source.setReadyForPolling(true); synchronized (GuestProcessor.this) { if (m_shutdown) { exportLog.warn("Got shutdown before starting polling."); return; } buildListener(ads); } } else { Thread.sleep(5); resubmitSelf(); } } catch(InterruptedException e) { resubmitSelf(); } catch (Exception e) { VoltDB.crashLocalVoltDB("Failed to initiate export binary deque poll", true, e); } } private void resubmitSelf() { synchronized (GuestProcessor.this) { if (m_shutdown) { exportLog.warn("Got shutdown while waiting for truncation."); return; } if (m_source.getExecutorService().isShutdown()) { exportLog.warn("Data source shutdown while waiting for truncation."); return; } try { m_source.getExecutorService().submit(this); } catch (RejectedExecutionException whenExportDataSourceIsClosed) { exportLog.warn("Got rejected execution exception while waiting for truncation to finish"); } } } }; if (m_shutdown) { exportLog.warn("Got shutdown while starting."); return; } if (m_source.getExecutorService().isShutdown()) { exportLog.warn("Data source shutdown while starting."); return; } try { m_source.getExecutorService().submit(waitForBarrierRelease); } catch (RejectedExecutionException whenExportDataSourceIsClosed) { exportLog.warn("Got rejected execution exception while trying to start"); } } }

Target:
private void runDataSource() { synchronized (GuestProcessor.this) { final AdvertisedDataSource ads = new AdvertisedDataSource( m_source.getPartitionId(), m_source.getTableName(), m_source.getPartitionColumnName(), System.currentTimeMillis(), m_source.getGeneration(), m_source.m_columnNames, m_types, m_source.m_columnLengths, m_source.getExportFormat()); final Runnable waitForBarrierRelease = new Runnable() { @Override public void run() { try { if (m_startPolling) { if (EXPORTLOG.isDebugEnabled()) { EXPORTLOG.debug("Beginning export processing for export source " + m_source.getTableName() + " partition " + m_source.getPartitionId()); } m_source.setReadyForPolling(true); synchronized (GuestProcessor.this) { if (m_shutdown) { EXPORTLOG.warn("Got shutdown before starting polling."); return; } buildListener(ads); } } else { Thread.sleep(5); resubmitSelf(); } } catch(InterruptedException e) { resubmitSelf(); } catch (Exception e) { VoltDB.crashLocalVoltDB("Failed to initiate export binary deque poll", true, e); } } private void resubmitSelf() { synchronized (GuestProcessor.this) { if (m_shutdown) { EXPORTLOG.warn("Got shutdown while waiting for truncation."); return; } if (m_source.getExecutorService().isShutdown()) { EXPORTLOG.warn("Data source shutdown while waiting for truncation."); return; } try { m_source.getExecutorService().submit(this); } catch (RejectedExecutionException whenExportDataSourceIsClosed) { EXPORTLOG.warn("Got rejected execution exception while waiting for truncation to finish"); } } } }; if (m_shutdown) { EXPORTLOG.warn("Got shutdown while starting."); return; } if (m_source.getExecutorService().isShutdown()) { EXPORTLOG.warn("Data source shutdown while starting."); return; } try { m_source.getExecutorService().submit(waitForBarrierRelease); } catch (RejectedExecutionException whenExportDataSourceIsClosed) { EXPORTLOG.warn("Got rejected execution exception while trying to start"); } } }