kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject [01/23] incubator-kylin git commit: parse connectionURL parameters
Date Tue, 03 Mar 2015 09:59:05 GMT
Repository: incubator-kylin
Updated Branches:
  refs/heads/master 81eb205ce -> 4907794ba


parse connectionURL parameters

Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/69305823
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/69305823
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/69305823

Branch: refs/heads/master
Commit: 69305823febe3274f591521a9df27390654be764
Parents: 1c67f4b
Author: rongcui <cuirong198610@hotmail.com>
Authored: Wed Feb 4 11:36:17 2015 +0800
Committer: rongcui <cuirong198610@hotmail.com>
Committed: Wed Feb 4 11:36:17 2015 +0800

----------------------------------------------------------------------
 .../java/com/kylinolap/jdbc/KylinConnectionImpl.java | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/69305823/jdbc/src/main/java/com/kylinolap/jdbc/KylinConnectionImpl.java
----------------------------------------------------------------------
diff --git a/jdbc/src/main/java/com/kylinolap/jdbc/KylinConnectionImpl.java b/jdbc/src/main/java/com/kylinolap/jdbc/KylinConnectionImpl.java
index 2b412ed..61ad17c 100644
--- a/jdbc/src/main/java/com/kylinolap/jdbc/KylinConnectionImpl.java
+++ b/jdbc/src/main/java/com/kylinolap/jdbc/KylinConnectionImpl.java
@@ -37,6 +37,7 @@ import org.slf4j.LoggerFactory;
 
 import com.kylinolap.jdbc.KylinMetaImpl.MetaProject;
 import com.kylinolap.jdbc.KylinPrepare.PrepareResult;
+import com.kylinolap.jdbc.util.URLEncodedUtils;
 
 /**
  * Kylin connection implementation
@@ -52,12 +53,14 @@ public abstract class KylinConnectionImpl extends AvaticaConnection {
     private MetaProject metaProject;
     public final List<AvaticaStatement> statements;
     static final Trojan TROJAN = createTrojan();
+    private Properties paraInfo = new Properties();
 
     protected KylinConnectionImpl(UnregisteredDriver driver, AvaticaFactory factory, String
url, Properties info) {
         super(driver, factory, url, info);
 
-        String odbcUrl = url;
-        odbcUrl = odbcUrl.replace(Driver.CONNECT_STRING_PREFIX + "//", "");
+        paraInfo.putAll(this.info);
+        
+        String odbcUrl = URLEncodedUtils.parse(url, paraInfo);
         String[] temps = odbcUrl.split("/");
 
         assert temps.length == 2;
@@ -140,6 +143,14 @@ public abstract class KylinConnectionImpl extends AvaticaConnection {
     public void setMetaProject(MetaProject metaProject) {
         this.metaProject = metaProject;
     }
+    
+    public Properties getParaInfo() {
+        return paraInfo;
+    }
+
+    public void setParaInfo(Properties paraInfo) {
+        this.paraInfo = paraInfo;
+    }
 
     @Override
     public void close() throws SQLException {


Mime
View raw message