public ExternalShuffleBlockResolver(TransportConf conf, File registeredExecutorFile) throws IOException { this(conf, registeredExecutorFile, Executors.newSingleThreadExecutor( // Add `spark` prefix because it will run in NM in Yarn mode. NettyUtils.createThreadFactory("spark-shuffle-directory-cleaner"))); }
public ExternalShuffleBlockResolver(TransportConf conf, File registeredExecutorFile) throws IOException { this(conf, registeredExecutorFile, Executors.newSingleThreadExecutor( // Add `spark` prefix because it will run in NM in Yarn mode. NettyUtils.createThreadFactory("spark-shuffle-directory-cleaner"))); }
public ExternalShuffleBlockResolver(TransportConf conf, File registeredExecutorFile) throws IOException { this(conf, registeredExecutorFile, Executors.newSingleThreadExecutor( // Add `spark` prefix because it will run in NM in Yarn mode. NettyUtils.createThreadFactory("spark-shuffle-directory-cleaner"))); }
/** Creates a Netty EventLoopGroup based on the IOMode. */ public static EventLoopGroup createEventLoop(IOMode mode, int numThreads, String threadPrefix) { ThreadFactory threadFactory = createThreadFactory(threadPrefix); switch (mode) { case NIO: return new NioEventLoopGroup(numThreads, threadFactory); case EPOLL: return new EpollEventLoopGroup(numThreads, threadFactory); default: throw new IllegalArgumentException("Unknown io mode: " + mode); } }
/** Creates a Netty EventLoopGroup based on the IOMode. */ public static EventLoopGroup createEventLoop(IOMode mode, int numThreads, String threadPrefix) { ThreadFactory threadFactory = createThreadFactory(threadPrefix); switch (mode) { case NIO: return new NioEventLoopGroup(numThreads, threadFactory); case EPOLL: return new EpollEventLoopGroup(numThreads, threadFactory); default: throw new IllegalArgumentException("Unknown io mode: " + mode); } }
/** Creates a Netty EventLoopGroup based on the IOMode. */ public static EventLoopGroup createEventLoop(IOMode mode, int numThreads, String threadPrefix) { ThreadFactory threadFactory = createThreadFactory(threadPrefix); switch (mode) { case NIO: return new NioEventLoopGroup(numThreads, threadFactory); case EPOLL: return new EpollEventLoopGroup(numThreads, threadFactory); default: throw new IllegalArgumentException("Unknown io mode: " + mode); } }
/** Creates a Netty EventLoopGroup based on the IOMode. */ public static EventLoopGroup createEventLoop(IOMode mode, int numThreads, String threadPrefix) { ThreadFactory threadFactory = createThreadFactory(threadPrefix); switch (mode) { case NIO: return new NioEventLoopGroup(numThreads, threadFactory); case EPOLL: return new EpollEventLoopGroup(numThreads, threadFactory); default: throw new IllegalArgumentException("Unknown io mode: " + mode); } }