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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to