Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E699E200B96 for ; Thu, 6 Oct 2016 16:57:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E541E160AAD; Thu, 6 Oct 2016 14:57:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2CDF8160AC6 for ; Thu, 6 Oct 2016 16:57:00 +0200 (CEST) Received: (qmail 30659 invoked by uid 500); 6 Oct 2016 14:56:59 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 30648 invoked by uid 99); 6 Oct 2016 14:56:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2016 14:56:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id B7E81180516 for ; Thu, 6 Oct 2016 14:56:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.919 X-Spam-Level: X-Spam-Status: No, score=0.919 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_NONE=-0.0001, SPF_FAIL=0.919] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id xkK6_FAfJGiY for ; Thu, 6 Oct 2016 14:56:57 +0000 (UTC) Received: from mbob.nabble.com (mbob.nabble.com [162.253.133.15]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id C2B975F1F5 for ; Thu, 6 Oct 2016 14:56:56 +0000 (UTC) Received: from static.162.255.23.37.macminivault.com (unknown [162.255.23.37]) by mbob.nabble.com (Postfix) with ESMTP id A905432FF517 for ; Thu, 6 Oct 2016 07:51:51 -0700 (PDT) Date: Thu, 6 Oct 2016 07:56:56 -0700 (MST) From: Tracyl To: user@ignite.apache.org Message-ID: <1475765816436-8117.post@n6.nabble.com> Subject: Does IgniteCache could be access thr Spark JDBC data source api? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Thu, 06 Oct 2016 14:57:01 -0000 Hey team, I was able to use JDBC driver tool to access IgniteCache. Is it possible to connect to Ignite thr Spark JDBC data source api? Below are the code and exceptions I got. It seems like the connection is successful but there are datatype mapping issues. Do I need to define some schema from the server side? Any suggestion would be really helpful for me. Thanks in advance! Sample Code: val props = Map( "url" -> "jdbc:ignite://ip:11211/TestCache", "driver" -> "org.apache.ignite.IgniteJdbcDriver", "dbtable" -> "Person" ) val personDF = ctx.read.format("jdbc").options(props).load() Exceptions: Exception in thread "main" java.sql.SQLException: Unsupported type 1111 at org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$.org$apache$spark$sql$execution$datasources$jdbc$JDBCRDD$$getCatalystType(JDBCRDD.scala:103) at org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$$anonfun$1.apply(JDBCRDD.scala:140) at org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$$anonfun$1.apply(JDBCRDD.scala:140) at scala.Option.getOrElse(Option.scala:120) at org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$.resolveTable(JDBCRDD.scala:139) at org.apache.spark.sql.execution.datasources.jdbc.JDBCRelation.(JDBCRelation.scala:91) at org.apache.spark.sql.execution.datasources.jdbc.DefaultSource.createRelation(DefaultSource.scala:60) at org.apache.spark.sql.execution.datasources.ResolvedDataSource$.apply(ResolvedDataSource.scala:158) at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:119) at ignite.spark.DataFrameLoader$.personTest(DataFrameLoader.scala:131) at ignite.spark.DataFrameLoader.personTest(DataFrameLoader.scala) at jdbc.PersonLoader.executeTransaction(PersonLoader.java:175) at jdbc.PersonLoader.main(PersonLoader.java:115) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:731) at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:181) at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:206) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:121) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Does-IgniteCache-could-be-access-thr-Spark-JDBC-data-source-api-tp8117.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.