Examples of TRowSet


Examples of org.apache.hive.service.cli.thrift.TRowSet

        // Rowset is an interface in Hive 13, but a class in Hive 12, so we use reflection
        // so that the compiler does not make assumption on the return type of fetchResults
        Object rowSet = getCliService().fetchResults(operationHandle, FetchOrientation.FETCH_NEXT, size);
        Class rowSetClass = Class.forName("org.apache.hive.service.cli.RowSet");
        Method toTRowSetMethod = rowSetClass.getMethod("toTRowSet");
        TRowSet tRowSet = (TRowSet) toTRowSetMethod.invoke(rowSet);

        ImmutableList.Builder<QueryResult> rowsBuilder = ImmutableList.builder();
        for (TRow tRow : tRowSet.getRows()) {
          List<Object> cols = Lists.newArrayList();
          for (TColumnValue tColumnValue : tRow.getColVals()) {
            cols.add(tColumnToObject(tColumnValue));
          }
          rowsBuilder.add(new QueryResult(cols));
View Full Code Here

Examples of org.apache.hive.service.cli.thrift.TRowSet

            transportLock.unlock();
          }
        }
        Utils.verifySuccessWithInfo(fetchResp.getStatus());

        TRowSet results = fetchResp.getResults();
        fetchedRows = RowSetFactory.create(results, protocol);
        fetchedRowsItr = fetchedRows.iterator();
      }

      String rowStr = "";
View Full Code Here

Examples of org.apache.hive.service.cli.thrift.TRowSet

        TFetchResultsReq fetchReq = new TFetchResultsReq(stmtHandle,
            orientation, fetchSize);
        TFetchResultsResp fetchResp = client.FetchResults(fetchReq);
        Utils.verifySuccessWithInfo(fetchResp.getStatus());

        TRowSet results = fetchResp.getResults();
        fetchedRows = RowSetFactory.create(results, protocol);
        fetchedRowsItr = fetchedRows.iterator();
      }

      String rowStr = "";
View Full Code Here

Examples of org.apache.hive.service.cli.thrift.TRowSet

  public int getSize() {
    return rows.size();
  }

  public TRowSet toTRowSet() {
    TRowSet tRowSet = new TRowSet();
    tRowSet.setStartRowOffset(startOffset);
    tRowSet.setRows(new ArrayList<TRow>(rows));
    return tRowSet;
  }
View Full Code Here

Examples of org.apache.hive.service.cli.thrift.TRowSet

  public void setStartOffset(long startOffset) {
    this.startOffset = startOffset;
  }

  public TRowSet toTRowSet() {
    TRowSet tRowSet = new TRowSet(startOffset, new ArrayList<TRow>());
    for (int i = 0; i < columns.size(); i++) {
      tRowSet.addToColumns(columns.get(i).toTColumn());
    }
    return tRowSet;
  }
View Full Code Here

Examples of org.apache.hive.service.cli.thrift.TRowSet

  public int getSize() {
    return rows.size();
  }

  public TRowSet toTRowSet() {
    TRowSet tRowSet = new TRowSet();
    tRowSet.setStartRowOffset(startOffset);
    List<TRow> tRows = new ArrayList<TRow>();
    for (Row row : rows) {
      tRows.add(row.toTRow());
    }
    tRowSet.setRows(tRows);

    /*
    //List<Boolean> booleanColumn = new ArrayList<Boolean>();
    //List<Byte> byteColumn = new ArrayList<Byte>();
    //List<Short> shortColumn = new ArrayList<Short>();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.