Package org.apache.tajo.jdbc

Examples of org.apache.tajo.jdbc.TajoResultSet


              ResultSet res = null;
              try {
                ClientProtos.GetQueryResultResponse response = tajoClient.getResultResponse(tajoQueryId);
                TableDesc desc = CatalogUtil.newTableDesc(response.getTableDesc());
                tajoClient.getConf().setVar(TajoConf.ConfVars.USERNAME, response.getTajoUserName());
                res = new TajoResultSet(tajoClient, queryId, tajoClient.getConf(), desc);

                ResultSetMetaData rsmd = res.getMetaData();
                resultSize = desc.getStats().getNumBytes();
                LOG.info("Tajo Query Result: " + desc.getPath() + "\n");
View Full Code Here


      QueryStatus queryStatus = client.getQueryStatus(queryId);
      assertNotNull(queryStatus);
      assertTrue(!TajoClient.isQueryRunnning(queryStatus.getState()));

      TajoResultSet resultSet = (TajoResultSet) client.getQueryResult(queryId);
      assertNotNull(resultSet);

      int count = 0;
      while(resultSet.next()) {
        count++;
      }

      assertEquals(5, count);
    } finally {
View Full Code Here

  }

  @Test
  public final void testBroadcastBasicJoin() throws Exception {
    ResultSet res = executeQuery();
    TajoResultSet ts = (TajoResultSet)res;
    assertResultSet(res);
    cleanupQuery(res);

    MasterPlan plan = getQueryPlan(ts.getQueryId());
    ExecutionBlock rootEB = plan.getRoot();

    /*
    |-eb_1395998037360_0001_000006
       |-eb_1395998037360_0001_000005
View Full Code Here

      return createNullResultSet(queryId);
    }
    GetQueryResultResponse response = getResultResponse(queryId);
    TableDesc tableDesc = CatalogUtil.newTableDesc(response.getTableDesc());
    conf.setVar(ConfVars.USERNAME, response.getTajoUserName());
    return new TajoResultSet(this, queryId, conf, tableDesc);
  }
View Full Code Here

  public static ResultSet createResultSet(TajoClient client, QueryId queryId, GetQueryResultResponse response)
      throws IOException {
    TableDesc desc = CatalogUtil.newTableDesc(response.getTableDesc());
    TajoConf conf = new TajoConf(client.getConf());
    conf.setVar(ConfVars.USERNAME, response.getTajoUserName());
    return new TajoResultSet(client, queryId, conf, desc);
  }
View Full Code Here

  public static ResultSet createResultSet(TajoClient client, SubmitQueryResponse response) throws IOException {
    if (response.hasTableDesc()) {
      TajoConf conf = new TajoConf(client.getConf());
      conf.setVar(ConfVars.USERNAME, response.getUserName());
      if (response.hasMaxRowNum()) {
        return new TajoResultSet(
            client,
            QueryIdFactory.NULL_QUERY_ID,
            conf,
            new TableDesc(response.getTableDesc()),
            response.getMaxRowNum());
      } else {
        return new TajoResultSet(
            client,
            QueryIdFactory.NULL_QUERY_ID,
            conf,
            new TableDesc(response.getTableDesc()));
      }
View Full Code Here

      return createNullResultSet(queryId);
    }
  }

  public ResultSet createNullResultSet(QueryId queryId) throws IOException {
    return new TajoResultSet(this, queryId);
  }
View Full Code Here

TOP

Related Classes of org.apache.tajo.jdbc.TajoResultSet

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.