> On May 29, 2015, 10:34 a.m., Carl Steinbach wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/Driver.java, line 1133
> > <https://reviews.apache.org/r/34776/diff/2/?file=973800#file973800line1133>
> >
> >     This:
> >     
> >     if (isParallelEnabled && LOG.isDebugEnabled()) {
> >             LOG.debug("Entering compile: " + command);
> >     }
> >     
> >     is slower than this:
> >     
> >     if (isParallelEnabled){
> >             LOG.debug("Entering compile: " + command);
> >     }
> >     
> >     Ref: http://stackoverflow.com/a/963681

That stack overflow reference is about case where the log message is just a 
constant string, I agree that checking isDebugEnabled is not a great idea in 
that case.
In this case, two strings are being appended. Checking the boolean is likely 
cheaper than creating the new string object.


- Thejas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34776/#review85703
-----------------------------------------------------------


On May 28, 2015, 9:31 p.m., Sergey Shelukhin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34776/
> -----------------------------------------------------------
> 
> (Updated May 28, 2015, 9:31 p.m.)
> 
> 
> Review request for hive.
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> see jira
> 
> 
> Diffs
> -----
> 
>   common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 49b8f97 
>   ql/src/java/org/apache/hadoop/hive/ql/Driver.java 5dac29f 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/DefaultFetchFormatter.java 
> 37852ef 
>   ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java 20d0304 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java 0edfc5d 
>   ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java 37b6d6f 
>   service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java 
> 343c68e 
>   
> service/src/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java
>  a29e5d1 
>   service/src/java/org/apache/hive/service/server/HiveServer2.java 58e8e49 
>   service/src/test/org/apache/hive/service/cli/CLIServiceTest.java b4d517f 
> 
> Diff: https://reviews.apache.org/r/34776/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sergey Shelukhin
> 
>

Reply via email to