156157158159160161162163164165166
try { Event e = q.take(); updateEventProcessingStats(e); return e; } catch (InterruptedException e) { e.printStackTrace(); throw new IOException("Waiting for queue element was interrupted! " + e); } } public static void main(String[] argv) {
126127128129130131132133134135136
Event e = new EventImpl(("This is a test " + i).getBytes()); sink.append(e); Thread.sleep(200); } } catch (IOException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } }
128129130131132133134135136137138
Thread.sleep(200); } } catch (IOException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } } public static SinkBuilder builder() {
147148149150151152153154155156157
149150151152153154155156157158159
979899100101102103104105106107
99100101102103104105106107108
Thread.sleep(200); } } catch (IOException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } } }
} finally { if (in != null && in.isConnected()) { try { in.close(); } catch (IOException e) { e.printStackTrace(); } } readers.remove(this); } }
632633634635636637638639640641642
try { for (int i = 0; i < ROLLS; i++) { roll.rotate(); } } catch (InterruptedException e) { e.printStackTrace(); } } }; t.start();
469470471472473474475476477478479
LOG.error("Error while reading from / write " + "to flume source / sink. Exception follows.", e); workerFailed.set(true); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }; thread.start();