Examples of DrillConfig


Examples of org.apache.drill.common.config.DrillConfig

    QuerySubmitter submitter = new QuerySubmitter();
    System.exit(submitter.submitQuery(args[0], args[1], args[2]));
  }

  public int submitQuery(String planLocation, String type, String zkQuorum) throws Exception {
    DrillConfig config = DrillConfig.create();
    ZKClusterCoordinator clusterCoordinator = new ZKClusterCoordinator(config, zkQuorum);
    clusterCoordinator.start(10000);
    DrillClient client = new DrillClient(config, clusterCoordinator);
    client.connect();
    QueryResultsListener listener = new QueryResultsListener();
View Full Code Here

Examples of org.apache.drill.common.config.DrillConfig

  /**
   * Creates a DrillEnumerable from a plan represented as a string. Each record returned is a {@link JsonNode}.
   */
  public static <E> EnumerableDrill<E> of(DrillHandler handler, String plan, final List<String> fieldNames, Class<E> clazz) {
    DrillConfig config = DrillConfig.create();
    final LogicalPlan parse = LogicalPlan.parse(config, plan);
    return new EnumerableDrill<>(config, parse, clazz, fieldNames);
  }
View Full Code Here

Examples of org.apache.drill.common.config.DrillConfig

  }

  /** 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) {
View Full Code Here

Examples of org.apache.drill.common.config.DrillConfig

  static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestParsePhysicalPlan.class);
 
 
  @Test
  public void parseSimplePlan() throws Exception{
    DrillConfig c = DrillConfig.create();
    PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
    ObjectReader r = c.getMapper().reader(PhysicalPlan.class);
    ObjectWriter writer = c.getMapper().writer();
    PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/physical_test1.json"), Charsets.UTF_8));
    System.out.println(plan.unparse(writer));
  }
View Full Code Here

Examples of org.apache.drill.common.config.DrillConfig

 
 
 
  public void testParquetFullEngineRemote(String plan, String filename, int numberOfTimesRead /* specified in json plan */, int numberOfRowGroups, int recordsPerRowGroup) throws Exception{
   
    DrillConfig config = DrillConfig.create();

    checkValues = false;

    try(DrillClient client = new DrillClient(config);){
      client.connect();
View Full Code Here

Examples of org.apache.drill.common.config.DrillConfig

  //specific tests should call this method, but it is not marked as a test itself intentionally
  public void testParquetFullEngineLocalText(String planText, String filename, int numberOfTimesRead /* specified in json plan */, int numberOfRowGroups, int recordsPerRowGroup) throws Exception{
   
    RemoteServiceSet serviceSet = RemoteServiceSet.getLocalServiceSet();

    DrillConfig config = DrillConfig.create();

    try(Drillbit bit1 = new Drillbit(config, serviceSet); DrillClient client = new DrillClient(config, serviceSet.getCoordinator());){
      bit1.run();
      client.connect();
      RecordBatchLoader batchLoader = new RecordBatchLoader(client.getAllocator());
View Full Code Here

Examples of org.apache.drill.common.config.DrillConfig

    RemoteServiceSet serviceSet = RemoteServiceSet.getLocalServiceSet();

    checkValues = false;

    DrillConfig config = DrillConfig.create();

    try(Drillbit bit1 = new Drillbit(config, serviceSet); DrillClient client = new DrillClient(config, serviceSet.getCoordinator());){
      bit1.run();
      client.connect();
      RecordBatchLoader batchLoader = new RecordBatchLoader(client.getAllocator());
View Full Code Here

Examples of org.apache.drill.common.config.DrillConfig

*/
public class BasicOptimizerTest {

    @Test
    public void parseSimplePlan() throws Exception{
        DrillConfig c = DrillConfig.create();
        LogicalPlan plan = LogicalPlan.parse(c, FileUtils.getResourceAsString("/scan_screen_logical.json"));
        System.out.println(plan.unparse(c));
        //System.out.println( new BasicOptimizer(DrillConfig.create()).convert(plan).unparse(c.getMapper().writer()));
    }
View Full Code Here

Examples of org.apache.drill.common.config.DrillConfig

  /**
   * Creates a DrillEnumerable from a plan represented as a string. Each record returned is a {@link JsonNode}.
   */
  public static <E> EnumerableDrillFullEngine<E> of(String plan, final List<String> fieldNames, Class<E> clazz,
      DataContext context) {
    DrillConfig config = DrillConfig.create();
    FakeSchema s = (FakeSchema) context.getSubSchema("--FAKE--");
    return new EnumerableDrillFullEngine<>(config, plan, clazz, fieldNames, s == null ? null : s.getClient());
  }
View Full Code Here

Examples of org.apache.drill.common.config.DrillConfig

  @Test
  @Ignore
  public void testParseParquetPhysicalPlan() throws Exception {
    RemoteServiceSet serviceSet = RemoteServiceSet.getLocalServiceSet();
    DrillConfig config = DrillConfig.create();

    try(Drillbit bit1 = new Drillbit(config, serviceSet); DrillClient client = new DrillClient(config, serviceSet.getCoordinator());){
      bit1.run();
      client.connect();
      List<QueryResultBatch> results = client.runQuery(UserProtos.QueryType.PHYSICAL, Resources.toString(Resources.getResource(fileName),Charsets.UTF_8));
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.