[jira] [Created] (IGNITE-8417) Intermittent failure to insert tuples using JDBC Thin driver

2018-04-27 Thread mark pettovello (JIRA)
mark pettovello created IGNITE-8417:
---

 Summary: Intermittent failure to insert tuples using JDBC Thin 
driver
 Key: IGNITE-8417
 URL: https://issues.apache.org/jira/browse/IGNITE-8417
 Project: Ignite
  Issue Type: Bug
  Components: clients
Affects Versions: 2.4
 Environment: Ignite version 2.4

 

Single Node Ignite running locally on Windows

 

Java 1.8.0_152

Ignite-core-2.4.0.jar

Class.forName("org.apache.ignite.IgniteJdbcThinDriver");

 

 

 
Reporter: mark pettovello


Insert Statement Failed.  Failed to execute DML statement.

Error: Failed to map keys for cache (all partition nodes left the grid)

Using basic Java SQL process: Connection, PreparedStatement, bind variables, 
execute()

Some inserts are failing, approximately 30%.  Problem is repeatable.

 

[14:43:54,644][SEVERE][client-connector-#66][JdbcRequestHandler] Failed to 
execute SQL query [reqId=0, req=JdbcQueryExecuteRequest [schemaName=PUBLIC, 
pageSize=1024, maxRows=0, sqlQry=Insert Into ...redacted...]]
class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to 
execute DML statement [stmt=Insert Into ...redacted... ]]
 at 
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.doRunPrepared(IgniteH2Indexing.java:1633)
 at 
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:1577)
 at 
org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2039)
 at 
org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2034)
 at 
org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
 at 
org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2555)
 at 
org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2048)
 at 
org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:1979)
 at 
org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.executeQuery(JdbcRequestHandler.java:310)
 at 
org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.handle(JdbcRequestHandler.java:169)
 at 
org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:148)
 at 
org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:41)
 at 
org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
 at 
org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
 at 
org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
 at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
 at 
org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
 at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at java.lang.Thread.run(Thread.java:748)
Caused by: class 
org.apache.ignite.internal.cluster.ClusterTopologyServerNotFoundException: 
Failed to map keys for cache (all partition nodes left the grid).
 at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateFuture.mapSingleUpdate(GridNearAtomicSingleUpdateFuture.java:562)
 at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateFuture.map(GridNearAtomicSingleUpdateFuture.java:454)
 at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateFuture.mapOnTopology(GridNearAtomicSingleUpdateFuture.java:443)
 at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicAbstractUpdateFuture.map(GridNearAtomicAbstractUpdateFuture.java:248)
 at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.update0(GridDhtAtomicCache.java:1117)
 at 
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.put0(GridDhtAtomicCache.java:606)
 at 
org.apache.ignite.internal.processors.cache.GridCacheAdapter.put(GridCacheAdapter.java:2369)
 at 
org.apache.ignite.internal.processors.cache.GridCacheAdapter.putIfAbsent(GridCacheAdapter.java:2752)
 at 
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.doInsert(DmlStatementsProcessor.java:795)
 at 
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.processDmlSelectResult(DmlStatementsProcessor.java:576)
 at 
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.executeUpdateStatement(DmlStatementsProcessor.java:534)
 at 

[jira] [Created] (IGNITE-8165) Spark Dataset Write intermittent "Failed to map key to node" error

2018-04-06 Thread mark pettovello (JIRA)
mark pettovello created IGNITE-8165:
---

 Summary: Spark Dataset Write intermittent "Failed to map key to 
node" error 
 Key: IGNITE-8165
 URL: https://issues.apache.org/jira/browse/IGNITE-8165
 Project: Ignite
  Issue Type: Bug
  Components: jdbc, spark
Affects Versions: 2.4
 Environment: Spark 2.1.0

Java 1.8.0_152

Ignite-core-2.4.0.jar

ignite-spark_2.10-2.4.0.jar

Scala 2.11.8

 

 
Reporter: mark pettovello


Inserts partially fail when issuing a Dataset  write() operation.  
Rerunning write operation causes different sets of rows fail to insert.  Not 
all of the rows in dsCity.show() are inserted into Ignite.  All random missing 
rows encountered "Failed to map key to node" exception.

 

SparkSession spark = SparkSession
 .builder()
 .appName("IgniteSQLDataSource example")
.master("local[4]")//run local PC using Winutils
.config("spark.local.dir","/tmp")
 .getOrCreate();

 ... create about 10 \{(int) ID, (string) NAME} tuples and add them to the 
dsCity dataset ...

Dataset dsCity = spark.createDataset(...).toDF("ID","NAME");

dsCity.show(1000);

String tblName = "CITY";
String jdbcURL = "jdbc:ignite:thin://127.0.0.1/";

 

dsCity.write()
 .format("jdbc")
.option("primary_key_fields", "ID")
 .option("url", jdbcURL)
 .option("driver", "org.apache.ignite.IgniteJdbcThinDriver")
 .option("batchsize", 1000)
 .option("dbtable", tblName)
.mode(SaveMode.Append)
 .save();

 

18/04/06 09:33:23 ERROR Executor: Exception in task 3.0 in stage 2.0 (TID 5)
java.sql.BatchUpdateException: Failed to map key to node.
 at 
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.executeBatch(JdbcThinStatement.java:435)
 at 
org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$.savePartition(JdbcUtils.scala:597)
 at 
org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$$anonfun$saveTable$1.apply(JdbcUtils.scala:670)
 at 
org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$$anonfun$saveTable$1.apply(JdbcUtils.scala:670)
 at 
org.apache.spark.rdd.RDD$$anonfun$foreachPartition$1$$anonfun$apply$29.apply(RDD.scala:925)
 at 
org.apache.spark.rdd.RDD$$anonfun$foreachPartition$1$$anonfun$apply$29.apply(RDD.scala:925)
 at 
org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1944)
 at 
org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1944)
 at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:87)
 at org.apache.spark.scheduler.Task.run(Task.scala:99)
 at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:282)
 at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at java.lang.Thread.run(Thread.java:748)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)