Examples of RSERegistry


Examples of org.apache.drill.exec.ref.rse.RSERegistry

  @Test
  public void parseSimplePlan() throws Throwable{
    DrillConfig config = DrillConfig.create();
    LogicalPlan plan = LogicalPlan.parse(config, Files.toString(FileUtils.getResourceAsFile("/simple_plan.json"), Charsets.UTF_8));
    IteratorRegistry ir = new IteratorRegistry();
    ReferenceInterpreter i = new ReferenceInterpreter(plan, ir, new BasicEvaluatorFactory(ir), new RSERegistry(config));
    i.setup();
    Collection<RunOutcome> outcomes = i.run();
    assertEquals(outcomes.size(), 1);
    assertEquals(outcomes.iterator().next().records, 2);
  }
View Full Code Here

Examples of org.apache.drill.exec.ref.rse.RSERegistry

            org.junit.Assert.assertEquals("Edge between constant operator and sink not recognized.",
                    plan.getGraph().getRoots().toString(), "[Store [memo=output sink]]");

           
            IteratorRegistry ir = new IteratorRegistry();
            ReferenceInterpreter i = new ReferenceInterpreter(plan, ir, new BasicEvaluatorFactory(ir), new RSERegistry(config));
            i.setup();
            Collection<RunOutcome> outcomes = i.run();

            for(RunOutcome outcome : outcomes){
                System.out.println("============");
View Full Code Here

Examples of org.apache.drill.exec.ref.rse.RSERegistry

  @Test
  public void joinPlan() throws Throwable{
    DrillConfig config = DrillConfig.create();
    LogicalPlan plan = LogicalPlan.parse(config, Files.toString(FileUtils.getResourceAsFile("/simple_join.json"), Charsets.UTF_8));
    IteratorRegistry ir = new IteratorRegistry();
    ReferenceInterpreter i = new ReferenceInterpreter(plan, ir, new BasicEvaluatorFactory(ir), new RSERegistry(config));
    i.setup();
    Collection<RunOutcome> outcomes = i.run();
    assertEquals(outcomes.size(), 1);
    RunOutcome out = outcomes.iterator().next();
    if(out.outcome != OutcomeType.FAILED && out.exception != null) logger.error("Failure while running {}", out.exception);
View Full Code Here

Examples of org.apache.drill.exec.ref.rse.RSERegistry

  @Test
  public void flattenPlan() throws Throwable{
    DrillConfig config = DrillConfig.create();
    LogicalPlan plan = LogicalPlan.parse(config, Files.toString(FileUtils.getResourceAsFile("/simple_plan_flattened.json"), Charsets.UTF_8));
    IteratorRegistry ir = new IteratorRegistry();
    ReferenceInterpreter i = new ReferenceInterpreter(plan, ir, new BasicEvaluatorFactory(ir), new RSERegistry(config));
    i.setup();
    Collection<RunOutcome> outcomes = i.run();
    assertEquals(outcomes.size(), 1);
    RunOutcome out = outcomes.iterator().next();
    if(out.outcome != OutcomeType.FAILED && out.exception != null) logger.error("Failure while running {}", out.exception);
View Full Code Here

Examples of org.apache.drill.exec.ref.rse.RSERegistry

public class RSERegistryTest {

  @Test
  public void testEnginesWithTheSameNameAreEqual() {
    DrillConfig config = DrillConfig.create();
    RSERegistry rses = new RSERegistry(config);
    StorageEngineConfig hconfig = new ConsoleRSE.ConsoleRSEConfig();
    ConsoleRSE engine = (ConsoleRSE) rses.getEngine(hconfig);
    ConsoleRSE engine2 = (ConsoleRSE) rses.getEngine(hconfig);
    assertSame(engine, engine2);
  }
View Full Code Here

Examples of org.apache.drill.exec.ref.rse.RSERegistry

   * @throws IOException
   */
  public static Collection<RunOutcome> getOutcome(DrillConfig config, String resourcePath) throws IOException{
    LogicalPlan plan = LogicalPlan.parse(config, Files.toString(FileUtils.getResourceAsFile(resourcePath), Charsets.UTF_8));
    IteratorRegistry ir = new IteratorRegistry();
    ReferenceInterpreter i = new ReferenceInterpreter(plan, ir, new BasicEvaluatorFactory(ir), new RSERegistry(config));
    i.setup();
    return i.run();
  }
View Full Code Here

Examples of org.apache.drill.exec.ref.rse.RSERegistry

    } else {
      planString = Files.toString(new File(jsonFile), Charsets.UTF_8);
    }
    LogicalPlan plan = LogicalPlan.parse(config, planString);
    IteratorRegistry ir = new IteratorRegistry();
    ReferenceInterpreter i = new ReferenceInterpreter(plan, ir, new BasicEvaluatorFactory(ir), new RSERegistry(config));
    i.setup();
    final Object[] result = {null};
    final Thread thread;
    if (queue != null) {
      thread = new Thread(
View Full Code Here

Examples of org.apache.drill.exec.ref.rse.RSERegistry

  /** Runs the plan as a background task. */
  Future<Collection<RunOutcome>> runPlan(CompletionService<Collection<RunOutcome>> service) {
    IteratorRegistry ir = new IteratorRegistry();
    DrillConfig config = DrillConfig.create();
    config.setSinkQueues(0, queue);
    final ReferenceInterpreter i = new ReferenceInterpreter(plan, ir, new BasicEvaluatorFactory(ir), new RSERegistry(
        config));
    try {
      i.setup();
    } catch (IOException e) {
      logger.error("IOException during query", e);
View Full Code Here

Examples of org.apache.drill.exec.ref.rse.RSERegistry

    LogicalPlan parsedPlan = LogicalPlan.parse(DrillConfig.create(), plan);
    IteratorRegistry ir = new IteratorRegistry();
    DrillConfig config = DrillConfig.create();
    config.setSinkQueues(0, queue);
    final ReferenceInterpreter i = new ReferenceInterpreter(parsedPlan, ir, new BasicEvaluatorFactory(ir),
        new RSERegistry(config));
    try {
      i.setup();
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
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.