[ https://issues.apache.org/jira/browse/HIVE-16191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15924789#comment-15924789 ]
Siddharth Seth commented on HIVE-16191: --------------------------------------- bq. It's not a style choice... it removes a lot of cruft. Why are all these objects needed? Since when cannot we remove unneeded code? Opinion. If I were to add a single thread in new code for similar functionality, I'd do it the same way it exists today (This particular case, I'm not sure who added this single ThreadPool). One possible change would be to convert it into a little helper, which automatically does the onCompletion additions. Something like startNewBackgroundThread(Callable c, String context). Also, if I were reviewing a patch which contained either an ExecutorService with a single thread, or a single thread created separately - I don't think I'll comment on 'fixing' something like this. Removing unneeded code - I'm sure there's plenty elsewhere, which actually causes harm, or is not used which can be removed. bq. When I found code that returned two objects by doing new HashMap, put(k, v), return map.iterator.next(), should I have kept it in place because it's a style choice? In this particular case, I'd agree with you, and will be in favor of removing the HashMap. > simplify thread usage in TaskExecutorService > -------------------------------------------- > > Key: HIVE-16191 > URL: https://issues.apache.org/jira/browse/HIVE-16191 > Project: Hive > Issue Type: Bug > Reporter: Sergey Shelukhin > Assignee: Sergey Shelukhin > Attachments: HIVE-16191.patch > > > Remove executors, futures, decorators etc where not needed -- This message was sent by Atlassian JIRA (v6.3.15#6346)