Flume
  1. Flume
  2. FLUME-2243

AvroSource to use TransceiverThreadFactory for Thread naming while initializing NioServerSocketChannelFactory

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: v1.4.0
    • Fix Version/s: v1.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.

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

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development