You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2020/03/27 12:30:38 UTC

[GitHub] [incubator-iotdb] etiennerobinet opened a new pull request #952: Make JDBC OSGi usable and added a feature file

etiennerobinet opened a new pull request #952: Make JDBC OSGi usable and added a feature file
URL: https://github.com/apache/incubator-iotdb/pull/952
 
 
   I don't know if you are interested, but I made some minor modifications on the JDBC so it can be used inside an OSGi Container Datasources. I also created a pax.jdbc.iotdb that I also submit to a PR.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] etiennerobinet commented on issue #952: Make JDBC OSGi usable and added a feature file

Posted by GitBox <gi...@apache.org>.
etiennerobinet commented on issue #952: Make JDBC OSGi usable and added a feature file
URL: https://github.com/apache/incubator-iotdb/pull/952#issuecomment-604975953
 
 
   If you want, like a memeber ofthe org.ops4j told me, we can also add this JDBC DataSource adapter inside this Project

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] jixuan1989 commented on a change in pull request #952: Make JDBC OSGi usable and added a feature file

Posted by GitBox <gi...@apache.org>.
jixuan1989 commented on a change in pull request #952: Make JDBC OSGi usable and added a feature file
URL: https://github.com/apache/incubator-iotdb/pull/952#discussion_r400915354
 
 

 ##########
 File path: hadoop/pom.xml
 ##########
 @@ -49,6 +49,61 @@
     </dependencies>
     <build>
         <plugins>
+            <!--
+        Generate an OSGI compatible MANIFEST file.
+      -->
+            <plugin>
 
 Review comment:
   I think the tsfile and service-rpc pom files are modified because the two modules are dependent by jdbc.
   But why this Hadoop pom is also modified?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] jixuan1989 commented on issue #952: Make JDBC OSGi usable and added a feature file

Posted by GitBox <gi...@apache.org>.
jixuan1989 commented on issue #952: Make JDBC OSGi usable and added a feature file
URL: https://github.com/apache/incubator-iotdb/pull/952#issuecomment-604994814
 
 
   Hi, @etiennerobinet,  supporting OSGi is a good feature for IoTDB, thanks for the contribution. 
   
   > If you want, like a memeber ofthe org.ops4j told me, we can also add this JDBC DataSource adapter inside this Project
   
   Why not? It will make it easier to use IoTDB.
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] etiennerobinet commented on issue #952: Make JDBC OSGi usable and added a feature file

Posted by GitBox <gi...@apache.org>.
etiennerobinet commented on issue #952: Make JDBC OSGi usable and added a feature file
URL: https://github.com/apache/incubator-iotdb/pull/952#issuecomment-606652314
 
 
   Hi all, 
   I will add the README and do the refactor. The Hadoop Tsfile was also a dependency that’s why I also had to create a bundle out of it.
   
   Etienne ROBINET
   
   > Le 31 mars 2020 à 15:31, Xiangdong Huang <no...@github.com> a écrit :
   > 
   > 
   > @jixuan1989 commented on this pull request.
   > 
   > In hadoop/pom.xml:
   > 
   > > @@ -49,6 +49,61 @@
   >      </dependencies>
   >      <build>
   >          <plugins>
   > +            <!--
   > +        Generate an OSGI compatible MANIFEST file.
   > +      -->
   > +            <plugin>
   > I think the tsfile and service-rpc pom files are modified because the two modules are dependent by jdbc.
   > But why this Hadoop pom is also modified?
   > 
   > —
   > You are receiving this because you were mentioned.
   > Reply to this email directly, view it on GitHub, or unsubscribe.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] qiaojialin commented on a change in pull request #952: Make JDBC OSGi usable and added a feature file

Posted by GitBox <gi...@apache.org>.
qiaojialin commented on a change in pull request #952: Make JDBC OSGi usable and added a feature file
URL: https://github.com/apache/incubator-iotdb/pull/952#discussion_r400624347
 
 

 ##########
 File path: jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDbDataSource.java
 ##########
 @@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.iotdb.jdbc;
+
+import javax.sql.DataSource;
+import java.io.PrintWriter;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
+import java.util.Properties;
+import org.apache.thrift.transport.TTransportException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class IoTDbDataSource implements DataSource {
 
 Review comment:
   ```suggestion
   public class IoTDBDataSource implements DataSource {
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] jixuan1989 commented on issue #952: Make JDBC OSGi usable and added a feature file

Posted by GitBox <gi...@apache.org>.
jixuan1989 commented on issue #952: Make JDBC OSGi usable and added a feature file
URL: https://github.com/apache/incubator-iotdb/pull/952#issuecomment-606032082
 
 
   Hi @etiennerobinet , 
   I am very interested in this feature, and I have downloaded karaf for testing.
   Can you add a readme to introduce how to use iotdb with karaf?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] jixuan1989 commented on issue #952: Make JDBC OSGi usable and added a feature file

Posted by GitBox <gi...@apache.org>.
jixuan1989 commented on issue #952: Make JDBC OSGi usable and added a feature file
URL: https://github.com/apache/incubator-iotdb/pull/952#issuecomment-609024249
 
 
   Hi @etiennerobinet , this PR is merged. Thanks for your contribution!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] jixuan1989 commented on issue #952: Make JDBC OSGi usable and added a feature file

Posted by GitBox <gi...@apache.org>.
jixuan1989 commented on issue #952: Make JDBC OSGi usable and added a feature file
URL: https://github.com/apache/incubator-iotdb/pull/952#issuecomment-606627108
 
 
   Hi @etiennerobinet ,
   
   Thanks for the introduction.
   
   Hm.. After applying Jialin's review suggestion, the code can not compile successfully...
   
   Because you have to replace the class name among the whole project. IDE can help you do that easily.
   
   Besides, I suggest you put the following content as a Readme file:
   
   # How to try IoTDB JDBC using Karaf
   
   Suppose you have started Karaf 4.2.8.
   
   1. Put the iotdb-jdbc jars into your maven repository:
   
   `mvn install -DskipTests -pl iotdb-jdbc -am`
   
   2. In your Karaf client shell:
   ```
   feature:repo-add mvn:org.apache.iotdb/iotdb-jdbc/0.10.0-SNPASHOT/xml/features
   # notice that you must install JDBC first and then iotdb-feature
   feature:install jdbc 
   feature:install iotdb-feature
   ```
   
   3. Start a data source instance:
   Suppose you have started IoTDB:
   
   ```
   jdbc:ds-create -dc org.apache.iotdb.jdbc.IoTDBDriver -u root -p root -url "jdbc:iotdb://127.0.0.1:6667/" IoTDB
   ```
   
   4. Try query:
   ```
   jdbc:query IoTDB "select * from root"
   ```
   
   Enjoy it!
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] etiennerobinet commented on issue #952: Make JDBC OSGi usable and added a feature file

Posted by GitBox <gi...@apache.org>.
etiennerobinet commented on issue #952: Make JDBC OSGi usable and added a feature file
URL: https://github.com/apache/incubator-iotdb/pull/952#issuecomment-605808582
 
 
   I added the Adapter and tested it on Karaf

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] etiennerobinet commented on issue #952: Make JDBC OSGi usable and added a feature file

Posted by GitBox <gi...@apache.org>.
etiennerobinet commented on issue #952: Make JDBC OSGi usable and added a feature file
URL: https://github.com/apache/incubator-iotdb/pull/952#issuecomment-605403362
 
 
   Ok I will integrate the DataSource Adapter inside the project this weekend and commit again. Thank you

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] etiennerobinet commented on issue #952: Make JDBC OSGi usable and added a feature file

Posted by GitBox <gi...@apache.org>.
etiennerobinet commented on issue #952: Make JDBC OSGi usable and added a feature file
URL: https://github.com/apache/incubator-iotdb/pull/952#issuecomment-606410322
 
 
   @jixuan1989 just build the project and install the feature:
   feature:repo-add mvn:org.apache.iotdb/iotdb-jdbc/0.10.0-SNPASHOT/xml/features
   feature:install iotdb-feature
   feature:install jdbc
   
   You can then create a DataSource with JDBC inside Karaf:
   jdbc:ds-create -dc org.apache.iotdb.jdbc.IoTDBDriver -u root -p root -url "jdbc:iotdb://127.0.0.1:6667/" IoTDB
   
   To interact with the DB, use jdbc:query or jdbc:execute. You can also use the Camel SQL Component inside your Karaf container

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] jixuan1989 merged pull request #952: Make JDBC OSGi usable and added a feature file

Posted by GitBox <gi...@apache.org>.
jixuan1989 merged pull request #952: Make JDBC OSGi usable and added a feature file
URL: https://github.com/apache/incubator-iotdb/pull/952
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services