narendly commented on issue #357: [WIP] Add getWorkflows(long timeout) to 
TaskDriver.
URL: https://github.com/apache/helix/pull/357#issuecomment-514133992
 
 
   I don't think using Optional just for the sake of removing null is 
appropriate. I wouldn't think it would help with performance either. You could 
call isWorkflowConfig and parse if it is true, and skip if false, thereby doing 
minimal amount of parsing needed overall.
   
   On Jul 23, 2019, 11:26, at 11:26, pkuwm <[email protected]> wrote:
   >> As for parseWorkflow - I think it will be cleaner if we could have
   >something like isWorkflowConfig() instead that returns T/F, and based
   >on the result, include it here or not. This way, we do not return null
   >(a code smell), and there are other places in the codebase where we
   >could re-use isWorkflowConfig.
   >> […](#)
   >> On Jul 23, 2019, 10:02, at 10:02, pkuwm ***@***.***> wrote: Wonder
   >what the unit test requirement is. Can you please suggest? -- You are
   >receiving this because you are subscribed to this thread. Reply to this
   >email directly or view it on GitHub: [#357
   >(comment)](https://github.com/apache/helix/pull/357#issuecomment-514099797)
   >
   >OK. If null is not welcomed (everyone hates null), how about Optional
   >to avoid null? I personally like Optional more than `null` or ignore
   >exceptions in a catch block. Do you guys like Optional to possibly
   >handle the `null` cases?
   >
   >> As for parseWorkflow - I think it will be cleaner if we could have
   >something like isWorkflowConfig() instead that returns T/F, and based
   >on the result, include it here or not. This way, we do not return null
   >(a code smell), and there are other places in the codebase where we
   >could re-use isWorkflowConfig.
   >> […](#)
   >> On Jul 23, 2019, 10:02, at 10:02, pkuwm ***@***.***> wrote: Wonder
   >what the unit test requirement is. Can you please suggest? -- You are
   >receiving this because you are subscribed to this thread. Reply to this
   >email directly or view it on GitHub: [#357
   >(comment)](https://github.com/apache/helix/pull/357#issuecomment-514099797)
   >
   >
   >
   >-- 
   >You are receiving this because you commented.
   >Reply to this email directly or view it on GitHub:
   >https://github.com/apache/helix/pull/357#issuecomment-514130185
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to