[jira] [Updated] (HIVE-19220) perfLogger = SessionState.getPerfLogger() in Driver.java need to combine

2018-04-18 Thread shengsiwei (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

shengsiwei updated HIVE-19220:
--
Attachment: HIVE-19220.1.patch

> perfLogger = SessionState.getPerfLogger() in Driver.java need to combine
> 
>
> Key: HIVE-19220
> URL: https://issues.apache.org/jira/browse/HIVE-19220
> Project: Hive
>  Issue Type: Improvement
>Affects Versions: 3.1.0
>Reporter: shengsiwei
>Assignee: shengsiwei
>Priority: Minor
> Attachments: HIVE-19220.1.patch
>
>
> I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
> improve the simplicity of the code
>  
> Before modification
> {code:java}
> PerfLogger perfLogger = null;
> if (!alreadyCompiled) {
>  // compile internal will automatically reset the perf logger
>  compileInternal(command, true);
>  // then we continue to use this perf logger
>  perfLogger = SessionState.getPerfLogger();
> } else {
>  // reuse existing perf logger.
>  perfLogger = SessionState.getPerfLogger();
>  // Since we're reusing the compiled plan, we need to update its start time 
> for current run
>  plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
> }
> {code}
>  
> After  modification 
>  
> {code:java}
> PerfLogger perfLogger = SessionState.getPerfLogger();
>   if (!alreadyCompiled) {
> // compile internal will automatically reset the perf logger
> compileInternal(command, true);
>   } else {
> // Since we're reusing the compiled plan, we need to update its start 
> time for current run
> 
> plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
>   }
> {code}
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19220) perfLogger = SessionState.getPerfLogger() in Driver.java need to combine

2018-04-18 Thread shengsiwei (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

shengsiwei updated HIVE-19220:
--
Attachment: (was: HIVE-19220.1.patch)

> perfLogger = SessionState.getPerfLogger() in Driver.java need to combine
> 
>
> Key: HIVE-19220
> URL: https://issues.apache.org/jira/browse/HIVE-19220
> Project: Hive
>  Issue Type: Improvement
>Affects Versions: 3.1.0
>Reporter: shengsiwei
>Assignee: shengsiwei
>Priority: Minor
>
> I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
> improve the simplicity of the code
>  
> Before modification
> {code:java}
> PerfLogger perfLogger = null;
> if (!alreadyCompiled) {
>  // compile internal will automatically reset the perf logger
>  compileInternal(command, true);
>  // then we continue to use this perf logger
>  perfLogger = SessionState.getPerfLogger();
> } else {
>  // reuse existing perf logger.
>  perfLogger = SessionState.getPerfLogger();
>  // Since we're reusing the compiled plan, we need to update its start time 
> for current run
>  plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
> }
> {code}
>  
> After  modification 
>  
> {code:java}
> PerfLogger perfLogger = SessionState.getPerfLogger();
>   if (!alreadyCompiled) {
> // compile internal will automatically reset the perf logger
> compileInternal(command, true);
>   } else {
> // Since we're reusing the compiled plan, we need to update its start 
> time for current run
> 
> plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
>   }
> {code}
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19220) perfLogger = SessionState.getPerfLogger() in Driver.java need to combine

2018-04-17 Thread shengsiwei (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

shengsiwei updated HIVE-19220:
--
Status: Open  (was: Patch Available)

> perfLogger = SessionState.getPerfLogger() in Driver.java need to combine
> 
>
> Key: HIVE-19220
> URL: https://issues.apache.org/jira/browse/HIVE-19220
> Project: Hive
>  Issue Type: Improvement
>Affects Versions: 3.1.0
>Reporter: shengsiwei
>Assignee: shengsiwei
>Priority: Minor
> Attachments: HIVE-19220.1.patch
>
>
> I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
> improve the simplicity of the code
>  
> Before modification
> {code:java}
> PerfLogger perfLogger = null;
> if (!alreadyCompiled) {
>  // compile internal will automatically reset the perf logger
>  compileInternal(command, true);
>  // then we continue to use this perf logger
>  perfLogger = SessionState.getPerfLogger();
> } else {
>  // reuse existing perf logger.
>  perfLogger = SessionState.getPerfLogger();
>  // Since we're reusing the compiled plan, we need to update its start time 
> for current run
>  plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
> }
> {code}
>  
> After  modification 
>  
> {code:java}
> PerfLogger perfLogger = SessionState.getPerfLogger();
>   if (!alreadyCompiled) {
> // compile internal will automatically reset the perf logger
> compileInternal(command, true);
>   } else {
> // Since we're reusing the compiled plan, we need to update its start 
> time for current run
> 
> plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
>   }
> {code}
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19220) perfLogger = SessionState.getPerfLogger() in Driver.java need to combine

2018-04-16 Thread shengsiwei (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

shengsiwei updated HIVE-19220:
--
Description: 
I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
improve the simplicity of the code

 

Before modification
{code:java}
PerfLogger perfLogger = null;
if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
 // then we continue to use this perf logger
 perfLogger = SessionState.getPerfLogger();
} else {
 // reuse existing perf logger.
 perfLogger = SessionState.getPerfLogger();
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

{code}
 

After  modification 

 
{code:java}
PerfLogger perfLogger = SessionState.getPerfLogger();

  if (!alreadyCompiled) {
// compile internal will automatically reset the perf logger
compileInternal(command, true);
  } else {
// Since we're reusing the compiled plan, we need to update its start 
time for current run
plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
  }

{code}

 

 

 

  was:
I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
improve the simplicity of the code

 

Before modification
{code:java}
PerfLogger perfLogger = null;
if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
 // then we continue to use this perf logger
 perfLogger = SessionState.getPerfLogger();
} else {
 // reuse existing perf logger.
 perfLogger = SessionState.getPerfLogger();
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

{code}
 

After  modification 

 
{code:java}
PerfLogger perfLogger = SessionState.getPerfLogger();

if (!alreadyCompiled)

{ // compile internal will automatically reset the perf logger 
compileInternal(command, true); }

else

{ // Since we're reusing the compiled plan, we need to update its start time 
for current run 
plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN)); }

{code}

 

 

 


> perfLogger = SessionState.getPerfLogger() in Driver.java need to combine
> 
>
> Key: HIVE-19220
> URL: https://issues.apache.org/jira/browse/HIVE-19220
> Project: Hive
>  Issue Type: Improvement
>Affects Versions: 3.1.0
>Reporter: shengsiwei
>Assignee: shengsiwei
>Priority: Minor
> Attachments: HIVE-19220.1.patch
>
>
> I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
> improve the simplicity of the code
>  
> Before modification
> {code:java}
> PerfLogger perfLogger = null;
> if (!alreadyCompiled) {
>  // compile internal will automatically reset the perf logger
>  compileInternal(command, true);
>  // then we continue to use this perf logger
>  perfLogger = SessionState.getPerfLogger();
> } else {
>  // reuse existing perf logger.
>  perfLogger = SessionState.getPerfLogger();
>  // Since we're reusing the compiled plan, we need to update its start time 
> for current run
>  plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
> }
> {code}
>  
> After  modification 
>  
> {code:java}
> PerfLogger perfLogger = SessionState.getPerfLogger();
>   if (!alreadyCompiled) {
> // compile internal will automatically reset the perf logger
> compileInternal(command, true);
>   } else {
> // Since we're reusing the compiled plan, we need to update its start 
> time for current run
> 
> plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
>   }
> {code}
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19220) perfLogger = SessionState.getPerfLogger() in Driver.java need to combine

2018-04-16 Thread shengsiwei (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

shengsiwei updated HIVE-19220:
--
Description: 
I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
improve the simplicity of the code

 

Before modification
{code:java}
PerfLogger perfLogger = null;
if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
 // then we continue to use this perf logger
 perfLogger = SessionState.getPerfLogger();
} else {
 // reuse existing perf logger.
 perfLogger = SessionState.getPerfLogger();
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

{code}
 

After  modification 

 
{code:java}
PerfLogger perfLogger = SessionState.getPerfLogger();

if (!alreadyCompiled)

{ // compile internal will automatically reset the perf logger 
compileInternal(command, true); }

else

{ // Since we're reusing the compiled plan, we need to update its start time 
for current run 
plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN)); }

{code}

 

 

 

  was:
I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
improve the simplicity of the code

 

Before modification
{code:java}
PerfLogger perfLogger = null;
if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
 // then we continue to use this perf logger
 perfLogger = SessionState.getPerfLogger();
} else {
 // reuse existing perf logger.
 perfLogger = SessionState.getPerfLogger();
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

{code}
 

After  modification 

 
{code:java}
PerfLogger perfLogger = SessionState.getPerfLogger();

if (!alreadyCompiled)

{ // compile internal will automatically reset the perf logger 
compileInternal(command, true); }

else

{ // Since we're reusing the compiled plan, we need to update its start time 
for current run 
plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN)); }

{code}

 

 

 


> perfLogger = SessionState.getPerfLogger() in Driver.java need to combine
> 
>
> Key: HIVE-19220
> URL: https://issues.apache.org/jira/browse/HIVE-19220
> Project: Hive
>  Issue Type: Improvement
>Affects Versions: 3.1.0
>Reporter: shengsiwei
>Assignee: shengsiwei
>Priority: Minor
> Attachments: HIVE-19220.1.patch
>
>
> I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
> improve the simplicity of the code
>  
> Before modification
> {code:java}
> PerfLogger perfLogger = null;
> if (!alreadyCompiled) {
>  // compile internal will automatically reset the perf logger
>  compileInternal(command, true);
>  // then we continue to use this perf logger
>  perfLogger = SessionState.getPerfLogger();
> } else {
>  // reuse existing perf logger.
>  perfLogger = SessionState.getPerfLogger();
>  // Since we're reusing the compiled plan, we need to update its start time 
> for current run
>  plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
> }
> {code}
>  
> After  modification 
>  
> {code:java}
> PerfLogger perfLogger = SessionState.getPerfLogger();
> if (!alreadyCompiled)
> { // compile internal will automatically reset the perf logger 
> compileInternal(command, true); }
> else
> { // Since we're reusing the compiled plan, we need to update its start time 
> for current run 
> plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN)); }
> {code}
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19220) perfLogger = SessionState.getPerfLogger() in Driver.java need to combine

2018-04-16 Thread shengsiwei (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

shengsiwei updated HIVE-19220:
--
Description: 
I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
improve the simplicity of the code

 

Before modification
{code:java}
PerfLogger perfLogger = null;
if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
 // then we continue to use this perf logger
 perfLogger = SessionState.getPerfLogger();
} else {
 // reuse existing perf logger.
 perfLogger = SessionState.getPerfLogger();
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

{code}
 

After  modification 

 
{code:java}
PerfLogger perfLogger = SessionState.getPerfLogger();

if (!alreadyCompiled)

{ // compile internal will automatically reset the perf logger 
compileInternal(command, true); }

else

{ // Since we're reusing the compiled plan, we need to update its start time 
for current run 
plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN)); }

{code}

 

 

 

  was:
I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
improve the simplicity of the code

 

Before modification
{code:java}
PerfLogger perfLogger = null;
if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
 // then we continue to use this perf logger
 perfLogger = SessionState.getPerfLogger();
} else {
 // reuse existing perf logger.
 perfLogger = SessionState.getPerfLogger();
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

{code}
 

After  modification 

{code:java}

PerfLogger perfLogger = SessionState.getPerfLogger();

if (!alreadyCompiled)

{ // compile internal will automatically reset the perf logger 
compileInternal(command, true); }

else

{ // Since we're reusing the compiled plan, we need to update its start time 
for current run 
plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN)); }

 \{code}

 

 

 


> perfLogger = SessionState.getPerfLogger() in Driver.java need to combine
> 
>
> Key: HIVE-19220
> URL: https://issues.apache.org/jira/browse/HIVE-19220
> Project: Hive
>  Issue Type: Improvement
>Affects Versions: 3.1.0
>Reporter: shengsiwei
>Assignee: shengsiwei
>Priority: Minor
> Attachments: HIVE-19220.1.patch
>
>
> I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
> improve the simplicity of the code
>  
> Before modification
> {code:java}
> PerfLogger perfLogger = null;
> if (!alreadyCompiled) {
>  // compile internal will automatically reset the perf logger
>  compileInternal(command, true);
>  // then we continue to use this perf logger
>  perfLogger = SessionState.getPerfLogger();
> } else {
>  // reuse existing perf logger.
>  perfLogger = SessionState.getPerfLogger();
>  // Since we're reusing the compiled plan, we need to update its start time 
> for current run
>  plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
> }
> {code}
>  
> After  modification 
>  
> {code:java}
> PerfLogger perfLogger = SessionState.getPerfLogger();
> if (!alreadyCompiled)
> { // compile internal will automatically reset the perf logger 
> compileInternal(command, true); }
> else
> { // Since we're reusing the compiled plan, we need to update its start time 
> for current run 
> plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN)); }
> {code}
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19220) perfLogger = SessionState.getPerfLogger() in Driver.java need to combine

2018-04-16 Thread shengsiwei (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

shengsiwei updated HIVE-19220:
--
Description: 
I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
improve the simplicity of the code

 

Before modification
{code:java}
PerfLogger perfLogger = null;
if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
 // then we continue to use this perf logger
 perfLogger = SessionState.getPerfLogger();
} else {
 // reuse existing perf logger.
 perfLogger = SessionState.getPerfLogger();
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

{code}
 

After  modification 

{code:java}

PerfLogger perfLogger = SessionState.getPerfLogger();

if (!alreadyCompiled)

{ // compile internal will automatically reset the perf logger 
compileInternal(command, true); }

else

{ // Since we're reusing the compiled plan, we need to update its start time 
for current run 
plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN)); }

 \{code}

 

 

 

  was:
I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
improve the simplicity of the code

 

Before modification
{code:java}
PerfLogger perfLogger = null;
if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
 // then we continue to use this perf logger
 perfLogger = SessionState.getPerfLogger();
} else {
 // reuse existing perf logger.
 perfLogger = SessionState.getPerfLogger();
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

{code}
 

After  modification 

{code.java}

PerfLogger perfLogger = SessionState.getPerfLogger();

if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
} else {
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

 \{code}

 

 

 


> perfLogger = SessionState.getPerfLogger() in Driver.java need to combine
> 
>
> Key: HIVE-19220
> URL: https://issues.apache.org/jira/browse/HIVE-19220
> Project: Hive
>  Issue Type: Improvement
>Affects Versions: 3.1.0
>Reporter: shengsiwei
>Assignee: shengsiwei
>Priority: Minor
> Attachments: HIVE-19220.1.patch
>
>
> I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
> improve the simplicity of the code
>  
> Before modification
> {code:java}
> PerfLogger perfLogger = null;
> if (!alreadyCompiled) {
>  // compile internal will automatically reset the perf logger
>  compileInternal(command, true);
>  // then we continue to use this perf logger
>  perfLogger = SessionState.getPerfLogger();
> } else {
>  // reuse existing perf logger.
>  perfLogger = SessionState.getPerfLogger();
>  // Since we're reusing the compiled plan, we need to update its start time 
> for current run
>  plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
> }
> {code}
>  
> After  modification 
> {code:java}
> PerfLogger perfLogger = SessionState.getPerfLogger();
> if (!alreadyCompiled)
> { // compile internal will automatically reset the perf logger 
> compileInternal(command, true); }
> else
> { // Since we're reusing the compiled plan, we need to update its start time 
> for current run 
> plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN)); }
>  \{code}
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19220) perfLogger = SessionState.getPerfLogger() in Driver.java need to combine

2018-04-16 Thread shengsiwei (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

shengsiwei updated HIVE-19220:
--
Description: 
I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
improve the simplicity of the code

 

Before modification
{code:java}
PerfLogger perfLogger = null;
if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
 // then we continue to use this perf logger
 perfLogger = SessionState.getPerfLogger();
} else {
 // reuse existing perf logger.
 perfLogger = SessionState.getPerfLogger();
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

{code}
 

After  modification 

{code.java}

PerfLogger perfLogger = SessionState.getPerfLogger();

if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
} else {
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

 \{code}

 

 

 

  was:
I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
improve the simplicity of the code

 

Before modification
{code:java}
PerfLogger perfLogger = null;
if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
 // then we continue to use this perf logger
 perfLogger = SessionState.getPerfLogger();
} else {
 // reuse existing perf logger.
 perfLogger = SessionState.getPerfLogger();
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

{code}
 

After  modification 

{code.java}

PerfLogger perfLogger = SessionState.getPerfLogger();

if (!alreadyCompiled)

{ // compile internal will automatically reset the perf logger 
compileInternal(command, true); }

else

{ // Since we're reusing the compiled plan, we need to update its start time 
for current run 
plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN)); }

{code}

 

 

 

 


> perfLogger = SessionState.getPerfLogger() in Driver.java need to combine
> 
>
> Key: HIVE-19220
> URL: https://issues.apache.org/jira/browse/HIVE-19220
> Project: Hive
>  Issue Type: Improvement
>Affects Versions: 3.1.0
>Reporter: shengsiwei
>Assignee: shengsiwei
>Priority: Minor
> Attachments: HIVE-19220.1.patch
>
>
> I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
> improve the simplicity of the code
>  
> Before modification
> {code:java}
> PerfLogger perfLogger = null;
> if (!alreadyCompiled) {
>  // compile internal will automatically reset the perf logger
>  compileInternal(command, true);
>  // then we continue to use this perf logger
>  perfLogger = SessionState.getPerfLogger();
> } else {
>  // reuse existing perf logger.
>  perfLogger = SessionState.getPerfLogger();
>  // Since we're reusing the compiled plan, we need to update its start time 
> for current run
>  plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
> }
> {code}
>  
> After  modification 
> {code.java}
> PerfLogger perfLogger = SessionState.getPerfLogger();
> if (!alreadyCompiled) {
>  // compile internal will automatically reset the perf logger
>  compileInternal(command, true);
> } else {
>  // Since we're reusing the compiled plan, we need to update its start time 
> for current run
>  plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
> }
>  \{code}
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19220) perfLogger = SessionState.getPerfLogger() in Driver.java need to combine

2018-04-16 Thread shengsiwei (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

shengsiwei updated HIVE-19220:
--
Description: 
I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
improve the simplicity of the code

 

Before modification
{code:java}
PerfLogger perfLogger = null;
if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
 // then we continue to use this perf logger
 perfLogger = SessionState.getPerfLogger();
} else {
 // reuse existing perf logger.
 perfLogger = SessionState.getPerfLogger();
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

{code}
 

After  modification 

{code.java}

PerfLogger perfLogger = SessionState.getPerfLogger();

if (!alreadyCompiled)

{ // compile internal will automatically reset the perf logger 
compileInternal(command, true); }

else

{ // Since we're reusing the compiled plan, we need to update its start time 
for current run 
plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN)); }

{code}

 

 

 

 

  was:
I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
improve the simplicity of the code

 

Before modification
{code:java}
PerfLogger perfLogger = null;
if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
 // then we continue to use this perf logger
 perfLogger = SessionState.getPerfLogger();
} else {
 // reuse existing perf logger.
 perfLogger = SessionState.getPerfLogger();
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

{code}
 

After  modification 

{code.java}

PerfLogger perfLogger = SessionState.getPerfLogger();

if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
} else {
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

{code}

 

 

 

 


> perfLogger = SessionState.getPerfLogger() in Driver.java need to combine
> 
>
> Key: HIVE-19220
> URL: https://issues.apache.org/jira/browse/HIVE-19220
> Project: Hive
>  Issue Type: Improvement
>Affects Versions: 3.1.0
>Reporter: shengsiwei
>Assignee: shengsiwei
>Priority: Minor
> Attachments: HIVE-19220.1.patch
>
>
> I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
> improve the simplicity of the code
>  
> Before modification
> {code:java}
> PerfLogger perfLogger = null;
> if (!alreadyCompiled) {
>  // compile internal will automatically reset the perf logger
>  compileInternal(command, true);
>  // then we continue to use this perf logger
>  perfLogger = SessionState.getPerfLogger();
> } else {
>  // reuse existing perf logger.
>  perfLogger = SessionState.getPerfLogger();
>  // Since we're reusing the compiled plan, we need to update its start time 
> for current run
>  plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
> }
> {code}
>  
> After  modification 
> {code.java}
> PerfLogger perfLogger = SessionState.getPerfLogger();
> if (!alreadyCompiled)
> { // compile internal will automatically reset the perf logger 
> compileInternal(command, true); }
> else
> { // Since we're reusing the compiled plan, we need to update its start time 
> for current run 
> plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN)); }
> {code}
>  
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19220) perfLogger = SessionState.getPerfLogger() in Driver.java need to combine

2018-04-16 Thread shengsiwei (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

shengsiwei updated HIVE-19220:
--
Description: 
I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
improve the simplicity of the code

 

Before modification
{code:java}
PerfLogger perfLogger = null;
if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
 // then we continue to use this perf logger
 perfLogger = SessionState.getPerfLogger();
} else {
 // reuse existing perf logger.
 perfLogger = SessionState.getPerfLogger();
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

{code}
 

After  modification 

{code.java}

PerfLogger perfLogger = SessionState.getPerfLogger();

if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
} else {
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

{code}

 

 

 

 

  was:
I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
improve the simplicity of the code

 

{code:java}

PerfLogger perfLogger = null;
if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
 // then we continue to use this perf logger
 perfLogger = SessionState.getPerfLogger();
} else {
 // reuse existing perf logger.
 perfLogger = SessionState.getPerfLogger();
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

{code}

 

 

 


> perfLogger = SessionState.getPerfLogger() in Driver.java need to combine
> 
>
> Key: HIVE-19220
> URL: https://issues.apache.org/jira/browse/HIVE-19220
> Project: Hive
>  Issue Type: Improvement
>Affects Versions: 3.1.0
>Reporter: shengsiwei
>Assignee: shengsiwei
>Priority: Minor
> Attachments: HIVE-19220.1.patch
>
>
> I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
> improve the simplicity of the code
>  
> Before modification
> {code:java}
> PerfLogger perfLogger = null;
> if (!alreadyCompiled) {
>  // compile internal will automatically reset the perf logger
>  compileInternal(command, true);
>  // then we continue to use this perf logger
>  perfLogger = SessionState.getPerfLogger();
> } else {
>  // reuse existing perf logger.
>  perfLogger = SessionState.getPerfLogger();
>  // Since we're reusing the compiled plan, we need to update its start time 
> for current run
>  plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
> }
> {code}
>  
> After  modification 
> {code.java}
> PerfLogger perfLogger = SessionState.getPerfLogger();
> if (!alreadyCompiled) {
>  // compile internal will automatically reset the perf logger
>  compileInternal(command, true);
> } else {
>  // Since we're reusing the compiled plan, we need to update its start time 
> for current run
>  plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
> }
> {code}
>  
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19220) perfLogger = SessionState.getPerfLogger() in Driver.java need to combine

2018-04-16 Thread shengsiwei (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

shengsiwei updated HIVE-19220:
--
Description: 
I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
improve the simplicity of the code

 

{code:java}

PerfLogger perfLogger = null;
if (!alreadyCompiled) {
 // compile internal will automatically reset the perf logger
 compileInternal(command, true);
 // then we continue to use this perf logger
 perfLogger = SessionState.getPerfLogger();
} else {
 // reuse existing perf logger.
 perfLogger = SessionState.getPerfLogger();
 // Since we're reusing the compiled plan, we need to update its start time for 
current run
 plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
}

{code}

 

 

 

  was:I find  duplicate code in Driver.java. We need to eliminate duplicate 
code to improve the simplicity of the code


> perfLogger = SessionState.getPerfLogger() in Driver.java need to combine
> 
>
> Key: HIVE-19220
> URL: https://issues.apache.org/jira/browse/HIVE-19220
> Project: Hive
>  Issue Type: Improvement
>Affects Versions: 3.1.0
>Reporter: shengsiwei
>Assignee: shengsiwei
>Priority: Minor
> Attachments: HIVE-19220.1.patch
>
>
> I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
> improve the simplicity of the code
>  
> {code:java}
> PerfLogger perfLogger = null;
> if (!alreadyCompiled) {
>  // compile internal will automatically reset the perf logger
>  compileInternal(command, true);
>  // then we continue to use this perf logger
>  perfLogger = SessionState.getPerfLogger();
> } else {
>  // reuse existing perf logger.
>  perfLogger = SessionState.getPerfLogger();
>  // Since we're reusing the compiled plan, we need to update its start time 
> for current run
>  plan.setQueryStartTime(perfLogger.getStartTime(PerfLogger.DRIVER_RUN));
> }
> {code}
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19220) perfLogger = SessionState.getPerfLogger() in Driver.java need to combine

2018-04-16 Thread shengsiwei (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

shengsiwei updated HIVE-19220:
--
Status: Patch Available  (was: Open)

> perfLogger = SessionState.getPerfLogger() in Driver.java need to combine
> 
>
> Key: HIVE-19220
> URL: https://issues.apache.org/jira/browse/HIVE-19220
> Project: Hive
>  Issue Type: Improvement
>Affects Versions: 3.1.0
>Reporter: shengsiwei
>Assignee: shengsiwei
>Priority: Minor
> Attachments: HIVE-19220.1.patch
>
>
> I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
> improve the simplicity of the code



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19220) perfLogger = SessionState.getPerfLogger() in Driver.java need to combine

2018-04-16 Thread shengsiwei (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

shengsiwei updated HIVE-19220:
--
Attachment: HIVE-19220.1.patch

> perfLogger = SessionState.getPerfLogger() in Driver.java need to combine
> 
>
> Key: HIVE-19220
> URL: https://issues.apache.org/jira/browse/HIVE-19220
> Project: Hive
>  Issue Type: Improvement
>Affects Versions: 3.1.0
>Reporter: shengsiwei
>Assignee: shengsiwei
>Priority: Minor
> Attachments: HIVE-19220.1.patch
>
>
> I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
> improve the simplicity of the code



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19220) perfLogger = SessionState.getPerfLogger() in Driver.java need to combine

2018-04-16 Thread shengsiwei (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

shengsiwei updated HIVE-19220:
--
Description: I find  duplicate code in Driver.java. We need to eliminate 
duplicate code to improve the simplicity of the code

> perfLogger = SessionState.getPerfLogger() in Driver.java need to combine
> 
>
> Key: HIVE-19220
> URL: https://issues.apache.org/jira/browse/HIVE-19220
> Project: Hive
>  Issue Type: Improvement
>Affects Versions: 3.1.0
>Reporter: shengsiwei
>Assignee: shengsiwei
>Priority: Minor
>
> I find  duplicate code in Driver.java. We need to eliminate duplicate code to 
> improve the simplicity of the code



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19220) perfLogger = SessionState.getPerfLogger() in Driver.java need to combine

2018-04-16 Thread shengsiwei (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

shengsiwei updated HIVE-19220:
--
Summary: perfLogger = SessionState.getPerfLogger() in Driver.java need to 
combine  (was: perfLogger in Driver.java need to combine)

> perfLogger = SessionState.getPerfLogger() in Driver.java need to combine
> 
>
> Key: HIVE-19220
> URL: https://issues.apache.org/jira/browse/HIVE-19220
> Project: Hive
>  Issue Type: Improvement
>Affects Versions: 3.1.0
>Reporter: shengsiwei
>Assignee: shengsiwei
>Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)