[ 
https://issues.apache.org/jira/browse/TAJO-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14519403#comment-14519403
 ] 

ASF GitHub Bot commented on TAJO-1583:
--------------------------------------

Github user jihoonson commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/556#discussion_r29339013
  
    --- Diff: 
tajo-client/src/main/java/org/apache/tajo/client/QueryClientImpl.java ---
    @@ -416,119 +387,86 @@ public TajoMemoryResultSet 
fetchNextQueryResult(final QueryId queryId, final int
       @Override
       public boolean updateQuery(final String sql) throws ServiceException {
     
    -    return new ServerCallable<Boolean>(connection.manager, 
connection.getTajoMasterAddr(),
    -        TajoMasterClientProtocol.class, false) {
    +    NettyClientBase client = connection.getTajoMasterConnection();
    +    connection.checkSessionAndGet(client);
    +    TajoMasterClientProtocolService.BlockingInterface tajoMasterService = 
client.getStub();
     
    -      public Boolean call(NettyClientBase client) throws ServiceException {
    +    QueryRequest.Builder builder = QueryRequest.newBuilder();
    +    builder.setSessionId(connection.sessionId);
    +    builder.setQuery(sql);
    +    builder.setIsJson(false);
    +    ClientProtos.UpdateQueryResponse response = 
tajoMasterService.updateQuery(null, builder.build());
     
    -        connection.checkSessionAndGet(client);
    -        TajoMasterClientProtocolService.BlockingInterface 
tajoMasterService = client.getStub();
    -
    -        QueryRequest.Builder builder = QueryRequest.newBuilder();
    -        builder.setSessionId(connection.sessionId);
    -        builder.setQuery(sql);
    -        builder.setIsJson(false);
    -        ClientProtos.UpdateQueryResponse response = 
tajoMasterService.updateQuery(null, builder.build());
    -
    -        if (response.getResultCode() == ClientProtos.ResultCode.OK) {
    -          
connection.updateSessionVarsCache(ProtoUtil.convertToMap(response.getSessionVars()));
    -          return true;
    -        } else {
    -          if (response.hasErrorMessage()) {
    -            System.err.println("ERROR: " + response.getErrorMessage());
    -          }
    -          return false;
    -        }
    +    if (response.getResultCode() == ClientProtos.ResultCode.OK) {
    +      
connection.updateSessionVarsCache(ProtoUtil.convertToMap(response.getSessionVars()));
    +      return true;
    +    } else {
    +      if (response.hasErrorMessage()) {
    +        System.err.println("ERROR: " + response.getErrorMessage());
    --- End diff --
    
    Even though you just move this line, it would be nice if you change to use 
LOG.


> Remove ServerCallable in RPC client
> -----------------------------------
>
>                 Key: TAJO-1583
>                 URL: https://issues.apache.org/jira/browse/TAJO-1583
>             Project: Tajo
>          Issue Type: Task
>          Components: client
>            Reporter: Jinho Kim
>            Assignee: Jinho Kim
>            Priority: Minor
>         Attachments: TAJO-1583.patch
>
>
> TAJO-1563 contains retry during invocation internally.
> We should remove it for more clearly. because it invoke repeatedly without 
> reference to an application error



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to