@Override public void close() throws IOException {
  running.set(false);
  service.shutdown();
  try {
    if (!service.awaitTermination(SHUTDOWN_TIMEOUT,TimeUnit.SECONDS)) {
      LOG.error("Was not able to process all remaining spans upon closing in: " + SHUTDOWN_TIMEOUT + " "+ TimeUnit.SECONDS+ ". Left Spans could be dropped.");
    }
  }
 catch (  InterruptedException e1) {
    LOG.warn("Thread interrupted when terminating executor.",e1);
  }
}

@ Override public void close ( ) throws IOException { running . set ( false ) ; service . shutdown ( ) ; try { if ( ! service . awaitTermination ( SHUTDOWN_TIMEOUT , TimeUnit . SECONDS ) ) { LOG . error ( "Was not able to process all remaining spans upon closing in: " + SHUTDOWN_TIMEOUT + " " + TimeUnit . SECONDS + ". Left Spans could be dropped." ) ; } } catch ( InterruptedException e1 ) { LOG . warn ( "Thread interrupted when terminating executor." , e1 ) ; } }
close the receiver and shut down the thread pool .
