[ 
https://issues.apache.org/jira/browse/HADOOP-2653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12560269#action_12560269
 ] 

udanax edited comment on HADOOP-2653 at 1/17/08 11:37 PM:
---------------------------------------------------------------

{code}
BEFORE: 

while(....) {
  HQLClient hql = new HQLClient(...);
  hql.executeQuery(queryString);
}

AFTER:

HQLClient hql = new HQLClient(...);
while(....) {
  hql.executeQuery(queryString);
}
{code}
BEFORE involves the creation of hqlclient object per iteration.
AFTER avoids hqlclient object creation in the loop.

It's too trivial change, but i prefer short-term patch because i need a confirm.
If it is not good work model, please let me know.

      was (Author: udanax):
    {code}
BEFORE: 

while(....) {
  HQLClient hql = new HQLClient(...);
  hql.executeQuery(queryString);
}

AFTER:

HQLClient hql = new HQLClient(...);
while(....) {
  hql.executeQuery(queryString);
}

BEFORE involves the creation of hqlclient object per iteration.
AFTER avoids hqlclient object creation in the loop.

It's too trivial change, but i prefer short-term patch because i need a confirm.
If it is not good work model, please let me know.
  
> [HQL] Unnecessary HQLClient Object creation in a shell loop.
> ------------------------------------------------------------
>
>                 Key: HADOOP-2653
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2653
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.16.0
>            Reporter: Edward Yoon
>            Assignee: Edward Yoon
>            Priority: Minor
>             Fix For: 0.17.0
>
>         Attachments: 2653.patch
>
>
> {code}
> Shell.java
> while(....) {
>   HQLClient hql = new HQLClient(...);
> }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to