@Test public void cleanup() throws Exception { }
@OnStopped public void cleanup() { ComponentLog log = getLogger(); sendHeartBeat.set(false); for (Map.Entry<HiveEndPoint, HiveWriter> entry : allWriters.entrySet()) { try { HiveWriter w = entry.getValue(); w.flushAndClose(); } catch (Exception ex) { log.warn("Error while closing writer to " + entry.getKey() + ". Exception follows.", ex); if (ex instanceof InterruptedException) { Thread.currentThread().interrupt(); } } } callTimeoutPool.shutdown(); try { while (!callTimeoutPool.isTerminated()) { callTimeoutPool.awaitTermination(options.getCallTimeOut(), TimeUnit.MILLISECONDS); } } catch (Throwable t) { log.warn("shutdown interrupted on " + callTimeoutPool, t); } callTimeoutPool = null; ugi = null; hiveConfigurator.stopRenewer(); }
PutHiveStreaming extends AbstractProcessor { @OnStopped public void cleanup() { ComponentLog log = getLogger(); sendHeartBeat.set(false); for (Map.Entry<HiveEndPoint, HiveWriter> entry : allWriters.entrySet()) { try { HiveWriter w = entry.getValue(); w.flushAndClose(); } catch (Exception ex) { log.warn("Error while closing writer to " + entry.getKey() + ". Exception follows.", ex); if (ex instanceof InterruptedException) { Thread.currentThread().interrupt(); } } } callTimeoutPool.shutdown(); try { while (!callTimeoutPool.isTerminated()) { callTimeoutPool.awaitTermination(options.getCallTimeOut(), TimeUnit.MILLISECONDS); } } catch (Throwable t) { log.warn("shutdown interrupted on " + callTimeoutPool, t); } callTimeoutPool = null; ugi = null; hiveConfigurator.stopRenewer(); } }
PutHiveStreaming extends AbstractProcessor { @OnStopped public void cleanup() { ComponentLog log = getLogger(); sendHeartBeat.set(false); for (Map.Entry<HiveEndPoint, HiveWriter> entry : allWriters.entrySet()) { try { HiveWriter w = entry.getValue(); w.flushAndClose(); } catch (Exception ex) { log.warn("Error while closing writer to " + entry.getKey() + ". Exception follows.", ex); if (ex instanceof InterruptedException) { Thread.currentThread().interrupt(); } } } callTimeoutPool.shutdown(); try { while (!callTimeoutPool.isTerminated()) { callTimeoutPool.awaitTermination(options.getCallTimeOut(), TimeUnit.MILLISECONDS); } } catch (Throwable t) { log.warn("shutdown interrupted on " + callTimeoutPool, t); } callTimeoutPool = null; ugi = null; hiveConfigurator.stopRenewer(); }  }
PutHiveStreaming extends AbstractProcessor { @OnStopped public void cleanup() { ComponentLog log = getLogger(); sendHeartBeat.set(false); for (Map.Entry<HiveEndPoint, HiveWriter> entry : allWriters.entrySet()) { try { HiveWriter w = entry.getValue(); w.flushAndClose(); } catch (Exception ex) { log.warn("Error while closing writer to " + entry.getKey() + ". Exception follows.", ex); if (ex instanceof InterruptedException) { Thread.currentThread().interrupt(); } } } callTimeoutPool.shutdown(); try { while (!callTimeoutPool.isTerminated()) { callTimeoutPool.awaitTermination(options.getCallTimeOut(), TimeUnit.MILLISECONDS); } } catch (Throwable t) { log.warn("shutdown interrupted on " + callTimeoutPool, t); } callTimeoutPool = null; ugi = null; hiveConfigurator.stopRenewer(); }  @Override Set<Relationship> getRelationships(); @OnScheduled void setup(final ProcessContext context); @Override void onTrigger(ProcessContext context, ProcessSession session); @OnStopped void cleanup(); }
PutHiveStreaming extends AbstractProcessor { @OnStopped public void cleanup() { ComponentLog log = getLogger(); sendHeartBeat.set(false); for (Map.Entry<HiveEndPoint, HiveWriter> entry : allWriters.entrySet()) { try { HiveWriter w = entry.getValue(); w.flushAndClose(); } catch (Exception ex) { log.warn("Error while closing writer to " + entry.getKey() + ". Exception follows.", ex); if (ex instanceof InterruptedException) { Thread.currentThread().interrupt(); } } } callTimeoutPool.shutdown(); try { while (!callTimeoutPool.isTerminated()) { callTimeoutPool.awaitTermination(options.getCallTimeOut(), TimeUnit.MILLISECONDS); } } catch (Throwable t) { log.warn("shutdown interrupted on " + callTimeoutPool, t); } callTimeoutPool = null; ugi = null; hiveConfigurator.stopRenewer(); }  @Override Set<Relationship> getRelationships(); @OnScheduled void setup(final ProcessContext context); @Override void onTrigger(ProcessContext context, ProcessSession session); @OnStopped void cleanup(); static final String HIVE_STREAMING_RECORD_COUNT_ATTR; static final PropertyDescriptor METASTORE_URI; static final PropertyDescriptor HIVE_CONFIGURATION_RESOURCES; static final PropertyDescriptor DB_NAME; static final PropertyDescriptor TABLE_NAME; static final PropertyDescriptor PARTITION_COLUMNS; static final PropertyDescriptor AUTOCREATE_PARTITIONS; static final PropertyDescriptor MAX_OPEN_CONNECTIONS; static final PropertyDescriptor HEARTBEAT_INTERVAL; static final PropertyDescriptor TXNS_PER_BATCH; static final PropertyDescriptor RECORDS_PER_TXN; static final Relationship REL_SUCCESS; static final Relationship REL_FAILURE; static final Relationship REL_RETRY; }