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

AvroSource to use TransceiverThreadFactory for Thread naming while initializing NioServerSocketChannelFactory

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4.0
    • 1.5.0
    • Sinks+Sources
    • None

    Description

      Currently in Avro source, we use
      socketChannelFactory = new NioServerSocketChannelFactory
      (Executors .newCachedThreadPool(), Executors.newCachedThreadPool());

      This would create generic Thread names like pool-1-thread-1. It would be good to use a ThreadFactory, like we use in NettyAvroRpcClient for better identification of Threads in log file

      ExecutorService bossExecutor = Executors.newCachedThreadPool(new TransceiverThreadFactory(
      "Avro " + NettyTransceiver.class.getSimpleName() + " Boss"));
      ExecutorService workerExecutor = Executors.newCachedThreadPool(new TransceiverThreadFactory(
      "Avro " + NettyTransceiver.class.getSimpleName() + " I/O Worker"));

      Move the TransceiverThreadFactory class to util package (from private static class) and update the usage in code.

      Attachments

        1. FLUME-2243-0.patch
          3 kB
          Ashish Paliwal
        2. FLUME-2243-1.patch
          2 kB
          Ashish Paliwal

        Issue Links

          Activity

            People

              paliwalashish Ashish Paliwal
              paliwalashish Ashish Paliwal
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: