Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-1289

HDFSEventSink doesn't log exception when config points to incorrect NN hostname

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Sinks+Sources
    • None

    Description

      It appears from test that if hdfs sink path points to incorrect NameNode hostname, there is no exception in log when BucketWriter append happens, there is no easy way to debug and correct the config file for hdfs path in hdfs sink.

      Looks like exception is eaten somewhere.

      Do we need to catch Exception here?

       private static <T> T callWithTimeout(final ExecutorService executor,
            long timeout, final Callable<T> callable)
            throws IOException, InterruptedException {
          Future<T> future = executor.submit(callable);
          try {
            if (timeout > 0) {
              return future.get(timeout, TimeUnit.MILLISECONDS);
            } else {
              return future.get();
            }
          } catch (TimeoutException eT) {
            future.cancel(true);
            throw new IOException("Callable timed out", eT);
          } catch (ExecutionException e1) {
            Throwable cause = e1.getCause();
            if (cause instanceof IOException) {
              throw (IOException) cause;
            } else if (cause instanceof InterruptedException) {
              throw (InterruptedException) cause;
            } else if (cause instanceof RuntimeException) {
              throw (RuntimeException) cause;
            } else if (cause instanceof Error) {
              throw (Error)cause;
            } else {
              throw new RuntimeException(e1);
            }
          } catch (CancellationException ce) {
            throw new InterruptedException(
                "Blocked callable interrupted by rotation event");
          } catch (InterruptedException ex) {
            LOG.warn("Unexpected Exception " + ex.getMessage(), ex);
            throw ex;
          }
        }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            mubarakseyed Mubarak Seyed
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: