Package org.apache.tajo

Examples of org.apache.tajo.QueryId


    Expr expr =  analyzer.parse(query);
    LogicalPlan plan = planner.createPlan(LocalTajoTestingUtility.createDummySession(), expr);

    optimizer.optimize(plan);

    QueryId queryId = QueryIdFactory.newQueryId(System.currentTimeMillis(), 0);
    QueryContext queryContext = new QueryContext();
    MasterPlan masterPlan = new MasterPlan(queryId, queryContext, plan);
    GlobalPlanner globalPlanner = new GlobalPlanner(conf, catalog);
    globalPlanner.build(masterPlan);
View Full Code Here


    Path tablePath = new Path(testDir, "testVariousTypes.data");
    Appender appender = StorageManagerFactory.getStorageManager(conf).getAppender(meta, schema, tablePath);
    appender.enableStats();
    appender.init();

    QueryId queryid = new QueryId("12345", 5);
    ProtobufDatumFactory factory = ProtobufDatumFactory.get(TajoIdProtos.QueryIdProto.class.getName());

    Tuple tuple = new VTuple(13);
    tuple.put(new Datum[] {
        DatumFactory.createBool(true),
        DatumFactory.createBit((byte) 0x99),
        DatumFactory.createChar("jinho"),
        DatumFactory.createInt2((short) 17),
        DatumFactory.createInt4(59),
        DatumFactory.createInt8(23l),
        DatumFactory.createFloat4(77.9f),
        DatumFactory.createFloat8(271.9f),
        DatumFactory.createText("jinho"),
        DatumFactory.createBlob("hyunsik babo".getBytes()),
        DatumFactory.createInet4("192.168.0.1"),
        NullDatum.get(),
        factory.createDatum(queryid.getProto())
    });
    appender.addTuple(tuple);
    appender.flush();
    appender.close();
View Full Code Here

    Path tablePath = new Path(testDir, "testVariousTypes.data");
    Appender appender = StorageManagerFactory.getStorageManager(conf).getAppender(meta, schema, tablePath);
    appender.enableStats();
    appender.init();

    QueryId queryid = new QueryId("12345", 5);
    ProtobufDatumFactory factory = ProtobufDatumFactory.get(TajoIdProtos.QueryIdProto.class.getName());

    Tuple tuple = new VTuple(13);
    tuple.put(new Datum[] {
        DatumFactory.createBool(true),
        DatumFactory.createBit((byte) 0x99),
        DatumFactory.createChar("jinho"),
        DatumFactory.createInt2((short) 17),
        DatumFactory.createInt4(59),
        DatumFactory.createInt8(23l),
        DatumFactory.createFloat4(77.9f),
        DatumFactory.createFloat8(271.9f),
        DatumFactory.createText("jinho"),
        DatumFactory.createBlob("hyunsik babo".getBytes()),
        DatumFactory.createInet4("192.168.0.1"),
        NullDatum.get(),
        factory.createDatum(queryid.getProto())
    });
    appender.addTuple(tuple);
    appender.flush();
    appender.close();
View Full Code Here

  public static final DecimalFormat MASTER_ID_FORMAT = new DecimalFormat("0000000000000");

  public static ExecutionBlockId createExecutionBlockId(String idStr) {
    String[] tokens = idStr.split("_");

    return new ExecutionBlockId(new QueryId(tokens[1], Integer.parseInt(tokens[2])), Integer.parseInt(tokens[3]));
  }
View Full Code Here

  public static QueryUnitAttemptId parseQueryUnitAttemptId(String idStr) {
    String[] tokens = idStr.split("_");

    return new QueryUnitAttemptId(new QueryUnitId(
        new ExecutionBlockId(new QueryId(tokens[1], Integer.parseInt(tokens[2])), Integer.parseInt(tokens[3])),
        Integer.parseInt(tokens[4])), Integer.parseInt(tokens[5]));
  }
View Full Code Here

        Integer.parseInt(tokens[4])), Integer.parseInt(tokens[5]));
  }

  public static QueryId parseQueryId(String idStr) {
    String[] tokens = idStr.split("_");
    return new QueryId(tokens[1], Integer.parseInt(tokens[2]));
  }
View Full Code Here

        TajoMasterClientProtocolService.BlockingInterface tajoMasterService = client.getStub();
        return tajoMasterService.submitQuery(null, builder.build());
      }
    }.withRetries();

    QueryId queryId = new QueryId(response.getQueryId());
    if (response.getIsForwarded()) {
      if (queryId.equals(QueryIdFactory.NULL_QUERY_ID)) {
        return this.createNullResultSet(queryId);
      } else {
        return this.getQueryResultAndWait(queryId);
      }
    } else {
View Full Code Here

TOP

Related Classes of org.apache.tajo.QueryId

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.