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

AvroSource to use TransceiverThreadFactory for Thread naming while initializing NioServerSocketChannelFactory

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.5.0
    • Component/s: Sinks+Sources
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: