You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by pa...@apache.org on 2015/05/06 07:26:20 UTC
[4/9] drill git commit: DRILL-2951: Schema not getting specified when
direct drillbit is specified in the connection URL
DRILL-2951: Schema not getting specified when direct drillbit is specified in the connection URL
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/5769278b
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/5769278b
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/5769278b
Branch: refs/heads/master
Commit: 5769278b866cbe5e756db31be139753ad19b8356
Parents: 68bc116
Author: Parth Chandra <pc...@maprtech.com>
Authored: Mon May 4 18:32:22 2015 -0700
Committer: Parth Chandra <pc...@maprtech.com>
Committed: Tue May 5 17:40:13 2015 -0700
----------------------------------------------------------------------
.../org/apache/drill/exec/client/DrillClient.java | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/5769278b/exec/java-exec/src/main/java/org/apache/drill/exec/client/DrillClient.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/client/DrillClient.java b/exec/java-exec/src/main/java/org/apache/drill/exec/client/DrillClient.java
index 3fda9c1..5b28f16 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/client/DrillClient.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/client/DrillClient.java
@@ -191,15 +191,6 @@ public class DrillClient implements Closeable, ConnectionThrottle {
}
}
- if (props != null) {
- UserProperties.Builder upBuilder = UserProperties.newBuilder();
- for (String key : props.stringPropertyNames()) {
- upBuilder.addProperties(Property.newBuilder().setKey(key).setValue(props.getProperty(key)));
- }
-
- this.props = upBuilder.build();
- }
-
ArrayList<DrillbitEndpoint> endpoints = new ArrayList<>(clusterCoordinator.getAvailableEndpoints());
checkState(!endpoints.isEmpty(), "No DrillbitEndpoint can be found");
// shuffle the collection then get the first endpoint
@@ -207,6 +198,15 @@ public class DrillClient implements Closeable, ConnectionThrottle {
endpoint = endpoints.iterator().next();
}
+ if (props != null) {
+ UserProperties.Builder upBuilder = UserProperties.newBuilder();
+ for (String key : props.stringPropertyNames()) {
+ upBuilder.addProperties(Property.newBuilder().setKey(key).setValue(props.getProperty(key)));
+ }
+
+ this.props = upBuilder.build();
+ }
+
eventLoopGroup = createEventLoop(config.getInt(ExecConstants.CLIENT_RPC_THREADS), "Client-");
client = new UserClient(supportComplexTypes, allocator, eventLoopGroup);
logger.debug("Connecting to server {}:{}", endpoint.getAddress(), endpoint.getUserPort());