Package com.alibaba.wasp.protobuf.generated.ClientProtos

Examples of com.alibaba.wasp.protobuf.generated.ClientProtos.ExecuteResponse


    return execute(callable);
  }

  private Pair<String, Pair<Boolean, List<ExecuteResult>>> execute(
      FClientCallable callable) throws IOException {
    ExecuteResponse response = null;

    try {
      response = callable.withRetries();
      if (response.hasSessionId()) {
        callables.put(response.getSessionId(), callable);
      }
      List<ExecuteResultProto> results = response.getResultList();
      List<StringDataTypePair> metaDatas = response.getMetaList();
      return new Pair<String, Pair<Boolean, List<ExecuteResult>>>(
          response.getSessionId(), new Pair<Boolean, List<ExecuteResult>>(
              response.getLastScan(), ProtobufUtil.toExecuteResult(results,
          metaDatas)));
    } catch (Exception e) {
      if (response != null) {
        callables.remove(response.getSessionId());
      }
      if (e instanceof IOException) {
        throw (IOException) e;
      }
      throw new IOException(e);
View Full Code Here


      throws IOException {
    FClientCallable callable = callables.get(sessionId);
    if (callable == null) {
      throw new UnknownSessionException(sessionId);
    }
    ExecuteResponse response = null;
    try {
      response = callable.withRetries();
      List<ExecuteResultProto> results = response.getResultList();
      List<StringDataTypePair> metaDatas = response.getMetaList();
      return new Pair<String, Pair<Boolean, List<ExecuteResult>>>(
          response.getSessionId(), new Pair<Boolean, List<ExecuteResult>>(
              response.getLastScan(), ProtobufUtil.toExecuteResult(results,
          metaDatas)));
    } catch (Exception e) {
      if (response != null) {
        callables.remove(response.getSessionId());
      }
      if (e instanceof IOException) {
        throw (IOException) e;
      }
      throw new IOException(e);
View Full Code Here

      request = RequestConverter.buildExecuteRequest(sqls, sessionId, true);
    } else {
      request = RequestConverter.buildExecuteRequest(sql, model, fetchSize, sessionId);
    }
    try {
      ExecuteResponse response = server.execute(null, request);
      sessionId = response.getSessionId();
      return response;
    } catch (ServiceException e) {
      throw ProtobufUtil.getRemoteException(e);
    }
  }
View Full Code Here

TOP

Related Classes of com.alibaba.wasp.protobuf.generated.ClientProtos.ExecuteResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.