I can connect to ignite rmdbs table from spark but can't query it. ignite
server running in intellij - rmdbs integration (1 table) and cache loaded

in spark i have the following code:

   import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi
   import
org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder
   import org.apache.ignite.configuration.IgniteConfiguration
   import java.util.ArrayList
   import java.util.List
   
    val tcpDiscoverySpi: TcpDiscoverySpi = new TcpDiscoverySpi
    val ipFinder: TcpDiscoveryVmIpFinder = new TcpDiscoveryVmIpFinder
    val addressList: java.util.List[String] = new
java.util.ArrayList[String]
    addressList.add("127.0.0.1:47500")
    ipFinder.setAddresses(addressList)
    tcpDiscoverySpi.setIpFinder(ipFinder)
    tcpDiscoverySpi.setLocalAddress("127.0.0.1") 
        
    val igniteConf : IgniteConfiguration = new
IgniteConfiguration().setClientMode(true).setDiscoverySpi(tcpDiscoverySpi)

    val igniteContext = new IgniteContext(sc, () => igniteConf)
    val igniteCache = igniteContext.fromCache("COMPLIANCESUMMARYCACHE") 
        
    igniteCache.sql("select * from ComplianceSummary")

scala> res24.printSchema
root
 |-- COMPANYID: integer (nullable = true)
 |-- COMPLIANCESUMMARYITEM: string (nullable = true)
 |-- COMPLIANCESUMMARYVALUE: string (nullable = true)
 |-- RECORDVALIDFROM: date (nullable = true)
 |-- RECORDVALIDTO: date (nullable = true)


-----------------------------

I can print the schema out but if i try query it i get the following error
message:


org.apache.spark.SparkException: Job aborted due to stage failure: Task not
serializable: java.io.NotSerializableException:
org.apache.ignite.configuration.IgniteConfiguration
Serialization stack:
        - object not serializable (class:
org.apache.ignite.configuration.IgniteConfiguration, value:
IgniteConfiguration [igniteInstanceName=null, pubPoolSize=8,
svcPoolSize=null, callbackPoolSize=8, stripedPoolSize=8, sysPoolSize=8,
mgmtPoolSize=4, igfsPoolSize=2, dataStreamerPoolSize=8,
utilityCachePoolSize=8, utilityCacheKeepAliveTime=60000, p2pPoolSize=2,
qryPoolSize=8, igniteHome=null, igniteWorkDir=null, mbeanSrv=null,
nodeId=null, marsh=null, marshLocJobs=false, daemon=false, p2pEnabled=
false, netTimeout=5000, sndRetryDelay=1000, sndRetryCnt=3,
metricsHistSize=10000, metricsUpdateFreq=2000,
metricsExpTime=9223372036854775807, discoSpi=TcpDiscoverySpi
[addrRslvr=null, sockTimeout=0, ackTimeout=0, marsh=null, reconCnt=10,
reconDelay=2000, maxAckTimeout=600000, forceSrvMode=false,
clientReconnectDisabled=false, internalLsnr=null], segPlc=STOP,
segResolveAttempts=2, waitForSegOnStart=true, allResolversPassReq=true,
segChkFreq=10000, commSpi=null, evtSpi=null, colSpi=null, deploySpi
=null, indexingSpi=null, addrRslvr=null, clientMode=true,
rebalanceThreadPoolSize=1,
txCfg=org.apache.ignite.configuration.TransactionConfiguration@24766217,
cacheSanityCheckEnabled=true, discoStartupDelay=60000, deployMode=SHARED,
p2pMissedCacheSize=100, locHost=null, timeSrvPortBase=31100,
timeSrvPortRange=100, failureDetectionTimeout=10000,
clientFailureDetectionTimeout=30000, metricsLogFreq=60000, hadoopCfg=null,
connectorCfg=org.apache.ignite.configuration.ConnectorConfiguration@f8c34ef,
od
bcCfg=null, warmupClos=null, atomicCfg=AtomicConfiguration
[seqReserveSize=1000, cacheMode=PARTITIONED, backups=1, aff=null,
grpName=null], classLdr=null, sslCtxFactory=null, platformCfg=null,
binaryCfg=null, memCfg=null, pstCfg=null, dsCfg=null, activeOnStart=true,
autoActivation=true, longQryWarnTimeout=3000, sqlConnCfg=null,
cliConnCfg=ClientConnectorConfiguration [host=null, port=10800,
portRange=100, sockSndBufSize=0, sockRcvBufSize=0, tcpNoDelay=true,
maxOpenCursorsPerConn=128, threadPoolS
ize=8, idleTimeout=0, jdbcEnabled=true, odbcEnabled=true,
thinCliEnabled=true, sslEnabled=false, useIgniteSslCtxFactory=true,
sslClientAuth=false, sslCtxFactory=null], authEnabled=false,
failureHnd=null, commFailureRslvr=null])
        - field (class: $iw, name: igniteConf, type: class
org.apache.ignite.configuration.IgniteConfiguration)
        - object (class $iw, $iw@1bdb1284)
Caused by: java.io.NotSerializableException:
org.apache.ignite.configuration.IgniteConfiguration




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to