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();