Package org.apache.drill.common.config

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


  }

  @Test
  public void testOrderVarbinary() 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();
View Full Code Here




    try{
      if(config.isLocal()){
        DrillConfig dConfig = DrillConfig.create();
        this.allocator = new TopLevelAllocator(dConfig);
        RemoteServiceSet set = GlobalServiceSetReference.SETS.get();
        if(set == null){
          // we're embedded, start a local drill bit.
          serviceSet = RemoteServiceSet.getLocalServiceSet();
          set = serviceSet;
          try{
          bit = new Drillbit(dConfig, serviceSet);
          bit.run();
          }catch(Exception e){
            throw new SQLException("Failure while attempting to start Drillbit in embedded mode.", e);
          }
        }else{
          serviceSet = null;
          bit = null;
        }
        this.client = new DrillClient(dConfig, set.getCoordinator());
        this.client.connect(null, info);
      }else{
        DrillConfig dConfig = DrillConfig.createClient();
        this.allocator = new TopLevelAllocator(dConfig);
        this.client = new DrillClient();
        this.client.connect(config.getZookeeperConnectionString(), info);
      }
    }catch(RpcException e){
View Full Code Here

       .addLogicalOperator(scan)
       .addLogicalOperator(store);

     LogicalPlan fromBuilder = builder.build();

     DrillConfig config = DrillConfig.create();
     LogicalPlan fromJson = LogicalPlan.parse(config, FileUtils.getResourceAsString("/storage_engine_plan.json"));

     assertEquals(fromJson.toJsonString(config), fromBuilder.toJsonString(config));

   }
View Full Code Here

          Class.forName("org.eclipse.jetty.server.Handler");
        } catch (ClassNotFoundException e1) {
          throw new SQLException("Running Drill in embedded mode using the JDBC jar alone is not supported.");
        }

        DrillConfig dConfig = DrillConfig.create();
        this.allocator = new TopLevelAllocator(dConfig);
        RemoteServiceSet set = GlobalServiceSetReference.SETS.get();
        if (set == null) {
          // we're embedded, start a local drill bit.
          serviceSet = RemoteServiceSet.getLocalServiceSet();
          set = serviceSet;
          try {
            bit = new Drillbit(dConfig, serviceSet);
            bit.run();
          } catch (Exception e) {
            throw new SQLException("Failure while attempting to start Drillbit in embedded mode.", e);
          }
        } else {
          serviceSet = null;
          bit = null;
        }
        this.client = new DrillClient(dConfig, set.getCoordinator());
        this.client.connect(null, info);
      } else {
        DrillConfig dConfig = DrillConfig.createClient();
        this.allocator = new TopLevelAllocator(dConfig);
        this.client = new DrillClient();
        this.client.connect(config.getZookeeperConnectionString(), info);
      }
    } catch (RpcException e) {
View Full Code Here

  @Test
  public void sortOneKeyDescendingExternalSort() throws Throwable{
    RemoteServiceSet serviceSet = RemoteServiceSet.getLocalServiceSet();

    DrillConfig config = DrillConfig.create("drill-external-sort.conf");

    try (Drillbit bit1 = new Drillbit(config, serviceSet);
        Drillbit bit2 = new Drillbit(config, serviceSet);
        DrillClient client = new DrillClient(config, serviceSet.getCoordinator());) {
View Full Code Here

  @Test
  public void outOfMemoryExternalSort() throws Throwable{
    RemoteServiceSet serviceSet = RemoteServiceSet.getLocalServiceSet();

    DrillConfig config = DrillConfig.create("drill-oom-xsort.conf");

    try (Drillbit bit1 = new Drillbit(config, serviceSet);
        DrillClient client = new DrillClient(config, serviceSet.getCoordinator());) {

      bit1.run();
View Full Code Here

  }

  @Test
  public void testFilterPlan() 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();
View Full Code Here

  }

  @Test
  public void testJoinPlan() 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();
View Full Code Here

  }

  @Test
  public void testFilterString() 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();
View Full Code Here

  }

  @Test
  public void testLogicalJsonScan() 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();
View Full Code Here

TOP

Related Classes of org.apache.drill.common.config.DrillConfig

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.