functioner commented on pull request #2737: URL: https://github.com/apache/hadoop/pull/2737#issuecomment-822649368
> Thanks @functioner > The detailed discussions (except the lambda argument) should have been on the Jira. I see. I will make a comment of summary in Jira after the discussion in this PR is finalized. > > > If any concerns about lambda expression, we could improve it rather than reject it directly. > > > > > > @amahussein A common way to eliminate such overhead is preparing multiple consumer threads, and feed them with requests. > > If the lambda expressions cause significant overhead, we can improve in that way. > > This design pattern is widely used in Cassandra. Example: SEPWorker - SEPExecutor > > https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/concurrent/SEPWorker.java > > https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/concurrent/SEPExecutor.java > > This is not what I meant. It is recommended to avoid use of lambda expressions in hot execution paths. Actually we are on the same page. Maybe my comment has made some confusion. > There are so many ways to avoid lambda expressions simply by having runnables waiting for tasks to be added to a queue. That's exactly what I meant. I will push a commit soon. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org