Re: [EXTERNAL] Re: Replace or Put after PutAsync causes Ignite to hang

2020-01-13 Thread Maxim Muzafarov
Igniters,

Bump this thread up. It seems the issue [1] is important but still
unassigned.


[1] https://issues.apache.org/jira/browse/IGNITE-12033

On Thu, 15 Aug 2019 at 15:01, Pavel Tupitsyn  wrote:

> Hi Eduard,
>
> Yes, that is the same issue.
> The workaround above is not enough, because SetSynchronizationContext
> affects only the current thread.
> After the first async operation completes, the continuation is dispatched
> to some ThreadPool thread,
> which may not have a SynchronizationContext set.
>
> Updated workaround:
>
> class ThreadPoolSynchronizationContext : SynchronizationContext
> {
> public override void Post(SendOrPostCallback d, object state)
> {
> ThreadPool.QueueUserWorkItem(s =>
> {
> SetSynchronizationContext(this);
> d(s);
> }, state);
> }
>
>
> Bear in mind, though - this can affect your entire application performance.
>
> We are discussing Ignite-wide fix for this on the dev list.
>
>
>
> On Wed, Aug 14, 2019 at 1:21 PM e.llull  wrote:
>
>> Hi guys,
>>
>> We are also facing a similar problem, if not the same. Our main difference
>> with the initial reproducer is that we are using the Thick Client. We
>> applied the suggested fix of setting the SynchronizationContext, but we
>> also
>> perform a GetAsync after the initial PutAsync. Also, I added a loop around
>> the Replace because sometimes it takes several iterations to block.
>>
>> Here is the code:
>> using System;
>> using System.Collections.Generic;
>> using System.Threading;
>> using System.Threading.Tasks;
>> using Apache.Ignite.Core;
>> using Apache.Ignite.Core.Cache.Configuration;
>> using Apache.Ignite.Core.Transactions;
>>
>> namespace IgniteHangTest
>> {
>> class Program : IDisposable
>> {
>> protected readonly IIgnite server;
>>
>> protected readonly IIgnite client;
>>
>> public static async Task Main(string[] args)
>> {
>> SynchronizationContext.SetSynchronizationContext(new
>> ThreadPoolSynchronizationContext());
>>
>> using (var program = new Program())
>> {
>> await program.Run();
>> }
>> }
>>
>> public Program() {
>> server = Ignition.Start(IgniteConfiguration("server"));
>> server.GetOrCreateCache(new
>> CacheConfiguration("TestCache")
>> {
>> AtomicityMode = CacheAtomicityMode.Transactional,
>>
>> });
>>
>> var clientConfiguration = IgniteConfiguration("client");
>> clientConfiguration.ClientMode = true;
>> client = Ignition.Start(clientConfiguration);
>> }
>>
>> private async Task Run() {
>> var cache = client.GetCache("TestCache");
>>
>> Console.WriteLine("Put initial value");
>> await cache.PutAsync(0, "Test");
>>
>> Console.WriteLine("Get initial value");
>> string initialValue = await cache.GetAsync(0);  // if removed,
>> it works
>>
>> Console.WriteLine("Entering Replace loop");
>> for(int i = 0; i < 100; i++)
>> {
>> cache.Replace(0, "Replace " + i);  // It blocks here
>> Console.WriteLine("Loop: i = {0}", i);
>> }
>>
>> Console.WriteLine("End");
>> }
>>
>> public void Dispose() {
>> Ignition.Stop("client", true);
>> Ignition.Stop("server", true);
>> }
>>
>> private IgniteConfiguration IgniteConfiguration(string
>> instanceName)
>> {
>> return new IgniteConfiguration
>> {
>> IgniteInstanceName = instanceName,
>> JvmOptions = new List { "-DIGNITE_QUIET=false",
>> },
>> TransactionConfiguration = new TransactionConfiguration
>> {
>> DefaultTimeout = TimeSpan.FromSeconds(5),
>> DefaultTransactionConcurrency =
>> TransactionConcurrency.Optimistic,
>> DefaultTransactionIsolation =
>> TransactionIsolation.Serializable
>> },
>> };
>> }
>> }
>>
>> class ThreadPoolSynchronizationContext : SynchronizationContext { }
>> }
>>
>> In the reproducer we are starting two Ignite nodes, one as the server and
>> one with ClientMode = true. This is only in the reproducer, in the real
>> use
>> case the server Ignite node is started in a different machine but the
>> problem also arises with the "external" server Ignite node.
>>
>> If the line `string initialValue = await cache.GetAsync(0);` is removed
>> the
>> programs finishes successfully.
>>
>> In the console, the relevant logs are:
>>
>> Critical system error detected. Will be handled accordingly to configured
>> handler [hnd=StopNodeOrHaltFailureHandler [tryStop=false, timeout=0,
>> super=AbstractFailureHandler
>> [ignoredFailureTypes=[SYSTEM_WORKER_BLOCKED]]],
>> 

Getting all data from cache via scan query is taking lot of time

2020-01-13 Thread Tunas
Configuration of Ignite server

backups = 1
persistenceEnabled = true
atomicityMode = true

I have two nodes on one server and only one ignite server instance is
running.

I am using C# thin client to fetch data from collection.

I am storing custom user defined object collection in my cache. 
1. custom object has around 30 fields
2. collection contains around 7000 custom objects. 
3. I am storing object by converting it to JSON 

Now when i fetch whole collection from cache using "ScanQuery" it is taking
more time then traditional database (SQL/Oracle/Sybase)

I create cache for each custom object collection like below
ICacheClient cacheClient =
_igniteStore.IgniteThinClient.GetOrCreateCache(typeof(T).FullName);


and when i want to fetch all data from collection i do it like below
var cacheEntries = cacheClient.Query(new
Apache.Ignite.Core.Cache.Query.*ScanQuery(null)).GetAll()*;


I have tried multiple times but for my custom object which has 30 fields and
collection has around 7k of this custom objects

*It takes around 2 milliseconds out of which 18500 milliseconds taken by
"ScanQuery" statement above and 1500 milliseconds by newton json converter.

If i fetch same from my traditional RDBMS (SQL) then it takes only 5500
milliseconds.*


Can some one please let me know what i am doing wrong?
Anything to do with configuration of ignite server or any other way to fetch
all data from cache.







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


Re: Failed to execute DML statement Ignite JDBC

2020-01-13 Thread siva
Hi,
sorry,there was a typo mistake or post message issue.as i edited after post
post message.

this is log as exception getting on server:
--





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


Re: Failed to execute DML statement Ignite JDBC

2020-01-13 Thread Ilya Kasnacheev
Hello!

Pretty descriptive:
*Caused by: org.apache.ignite.IgniteChecke**dException: Key is missing from
query*

How is your cache key declared? Which fields are supposed to go in it?

Regards,
-- 
Ilya Kasnacheev


пн, 13 янв. 2020 г. в 13:05, siva :

> Hi,
> Thank you for suggestion.
> Please find the Server log exception:
> 
> org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to
> execute DML statement [stmt=INSERT INTO
>
> "C091E548-B45A-49B4-B8EC-2CB5E27C7AF6".ENTITIESTABLEINFO(EntityId,EntityInfoJson,EntityName,EntityType,Fabric,SequenceNumber,TenantId,TenantName)
> VALUES ('0-pulsar', '{}', 'Testing Topic0 Name', 'testpulsarType',
> 'pulsarFabric', 0.0, 'pulsar-123-tenantid', 'pulsar-tenantName'),
> params=null]
> at
>
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.doRunPrepared(IgniteH2Indexing.java:2284)
> ~[ignite-indexing-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:2209)
> ~[ignite-indexing-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2128)
> ~[ignite-core-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2123)
> ~[ignite-core-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
> ~[ignite-core-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2693)
> ~[ignite-core-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2137)
> ~[ignite-core-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.executeQuery(JdbcRequestHandler.java:511)
> [ignite-core-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.doHandle(JdbcRequestHandler.java:245)
> [ignite-core-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.handle(JdbcRequestHandler.java:208)
> [ignite-core-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:162)
> [ignite-core-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:45)
> [ignite-core-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
> [ignite-core-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
> [ignite-core-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
> [ignite-core-2.7.5.jar:2.7.5]
> at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
> [ignite-core-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
> [ignite-core-2.7.5.jar:2.7.5]
> at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> [?:1.8.0_144]
> at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> [?:1.8.0_144]
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
> Caused by: org.apache.ignite.IgniteCheckedException: Key is missing from
> query
> at
>
> org.apache.ignite.internal.processors.query.h2.dml.UpdatePlanBuilder.createSupplier(UpdatePlanBuilder.java:604)
> ~[ignite-indexing-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.processors.query.h2.dml.UpdatePlanBuilder.planForInsert(UpdatePlanBuilder.java:270)
> ~[ignite-indexing-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.processors.query.h2.dml.UpdatePlanBuilder.planForStatement(UpdatePlanBuilder.java:135)
> ~[ignite-indexing-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.getPlanForStatement(DmlStatementsProcessor.java:741)
> ~[ignite-indexing-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFields(DmlStatementsProcessor.java:175)
> ~[ignite-indexing-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFieldsDistributed(DmlStatementsProcessor.java:358)
> ~[ignite-indexing-2.7.5.jar:2.7.5]
> at
>
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.doRunPrepared(IgniteH2Indexing.java:2263)
> ~[ignite-indexing-2.7.5.jar:2.7.5]
> ... 19 more
>
>
>
> --
> Sent from: 

Re: Failed to reinitialize local partitions (rebalancing will be stopped)

2020-01-13 Thread ashishb888
Yes, I cleared the directories.

Case 1: Exception occurs worker node and the node get killed
Steps:
-start data node
-worker node
-start data node
-activate the cluster by client node (or by control script)


Case 2: All nodes comes under baseline topology instead of 2 nodes (data
nodes)
Steps:
-worker node
-start data node
-start data node
-activate the cluster by client node (or by control script)






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


Re: write behind is not triggering for created table through query

2020-01-13 Thread siva
Hi,
Thanks for reply...write behind triggering now.but getting exception in
writeAll() method.

I have one query on insert what will be the key and value for writeAll()
method,if i defined or not in create query commond key_type and
value_type?.is this key_type and value_type needed.?

but in case of cache.putAsync(key,tableModel); working properly.

WriteAll(IEnumerable> entries){
List> entityList =
entries.ToList();//on sql insert error
foreach (var recordEntry in entityList)
 {
   
   
 }
}

*create and insert query*:
--
CREATE TABLE IF NOT EXISTS
"C091E548-B45A-49B4-B8EC-2CB5E27C7AF6".EntitiesPulsarTest(EntityId
varchar,EntityType varchar,EntityInfoJson varchar,TenantName
varchar,TenantId varchar,Fabric varchar,EntityName varchar,SequenceNumber
Double,PRIMARY KEY(EntityId)) WITH
"template=CacheConfigurationTemplate,backups=0,key_type=TableName,value_type=EntitiesPulsarTest";


INSERT INTO 
"C091E548-B45A-49B4-B8EC-2CB5E27C7AF6".EntitiesPulsarTest(EntityId,EntityInfoJson,EntityName,EntityType,Fabric,SequenceNumber,TenantId,TenantName)
VALUES ('0-pulsar', '{}', 'Testing Topic0 Name', 'testpulsarType',
'pulsarFabric', 0.0, 'pulsar-123-tenantid', 'pulsar-tenantName');

Exception:
Apache.Ignite.Core.Binary.BinaryObjectException: Invalid header on
deserialization [pos=136, hdr=0]
   at Apache.Ignite.Core.Impl.Binary.BinaryReader.TryDeserialize[T](T& res,
Type typeOverride)
   at Apache.Ignite.Core.Impl.Binary.BinaryReader.Deserialize[T](Type
typeOverride)
   at
Apache.Ignite.Core.Impl.Cache.Store.CacheStoreInternal`2.d__14.MoveNext()
   at System.Collections.Generic.List`1.AddEnumerable(IEnumerable`1
enumerable)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at
IgnitePersistenceApp.CacheStore.TenantCacheStore.WriteAll(IEnumerable`1
entries) 

anything i have to change in create or insert query?




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


Re: write behind is not triggering for created table through query

2020-01-13 Thread Ilya Kasnacheev
Hello!

You need to employ cache configuration templates to add Write Behind to
cache configured via SQL:

https://apacheignite.readme.io/docs/cache-template

In your case, you created two caches: one is empty but with write behind,
other is with SQL-inserted data but without Write Behind.

Regards,
-- 
Ilya Kasnacheev


вс, 12 янв. 2020 г. в 19:56, siva :

> Hi,
> I am using .Net Core for client and Server Ignite v2.7.6.
>
> *Create Cache and  configuration*:
> ---
>
>
>
> where cache name is 32 bit guid(e.g:"C091E548-B45A-49B4-B8EC-2CB5E27C7AF6")
>
> *i have created table from sqlline on cache*
>
>
> after that ,did *insert statement*:
> insert into Person(id,name) values(1,"Ram");
>
> where some of table and indexes created at the time of cache configuration.
>
> *persist store*
> C:\server\storage\node00-e03ee70f-0903-41db-beb7-190ead503597
> where i found two folder for the cache,name as
> 1.cache-C091E548-B45A-49B4-B8EC-2CB5E27C7AF6
> 2.cache-SQL_C091E548-B45A-49B4-B8EC-2CB5E27C7AF6_PERSON
>
> recorded inserted successfully in cache,
> but write behind is not called/triggering...any
> configuration/implementation
> needed?
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Failed to reinitialize local partitions (rebalancing will be stopped)

2020-01-13 Thread ashishb888
Client node
  
Data node

  
Worker node

   



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


Re: Failed to execute DML statement Ignite JDBC

2020-01-13 Thread Ilya Kasnacheev
Hello!

This is a mailing list, so messages are not editable.

Unfortunately I can't see any exception in your last message. Please paste
it as text.

Regards,
-- 
Ilya Kasnacheev


пн, 13 янв. 2020 г. в 12:57, siva :

> Hi,
> sorry,there was a typo mistake or post message issue.as i edited after
> post
> post message.
>
> this is log as exception getting on server:
> --
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Failed to execute DML statement Ignite JDBC

2020-01-13 Thread Ilya Kasnacheev
Hello!

You should search your server nodes' logs for an exact error message
corresponding to this client error. Can you find it, paste to your message?

Regards,
-- 
Ilya Kasnacheev


сб, 11 янв. 2020 г. в 08:41, siva :

> Cache,table and index created through QueryEntities.
> like below
>
> cacheCfg = new CacheConfiguration
> {
> ...
> QueryEntities = queryList,
> ...
>
> };
> here is the code i am executing
> public static void main( String[] args ) throws ClassNotFoundException,
> SQLException
> {
> System.out.println( "main start!" );
>
>
> // Register JDBC driver.
> Class.forName("org.apache.ignite.IgniteJdbcThinDriver");
>
> // Open the JDBC connection.
> Connection conn =
>
> DriverManager.getConnection("jdbc:ignite:thin://localhost/9E7B08B5-3BFD-4026-B322-C4A34FFFAFD7");//cacheName
>
> /*
> //Select query...
> Statement stmt = conn.createStatement();
> String query = "select * from
> \"9E7B08B5-3BFD-4026-B322-C4A34FFFAFD7\".ENTITIESTABLEINFO";
> boolean status = stmt.execute(query);
> if(status){
> ResultSet rs = stmt.getResultSet();
> while(rs.next()){
>
> System.out.println(rs.getString(1));
> }
> rs.close();
> }*/
>
> String sqlQuery = "INSERT INTO ENTITIESTABLEINFO
>
> (ENTITYID,ENTITYINFOJSON,ENTITYNAME,ENTITYTYPE,FABRIC,SEQUENCENUMBER,TENANTID,TENANTNAME)"
> + " VALUES(?, ?, ?, ?,?,?,?,?)";
> PreparedStatement prepStmt =
> conn.prepareStatement(sqlQuery);
> prepStmt.setString(1,
> "pulsarTesting-1-1-1-1-EntityId");
> prepStmt.setString(2, "{}");
> prepStmt.setString(3, "PulsarEntityName");
> prepStmt.setString(4, "PulsarEntityType");
> prepStmt.setString(5, "PulsarFabric");
> prepStmt.setDouble(6, 123.0);
> prepStmt.setString(7, "pulsar-TenantId");
> prepStmt.setString(8, "PulsarTenant");
>
> prepStmt.execute();
>
> System.out.println("Statement executed...");
> }
>
> here is an Exception:
>
> Exception in thread "main" java.sql.SQLException: Failed to execute DML
> statement [stmt=INSERT INTO ENTITIESTABLEINFO
>
> (ENTITYID,ENTITYINFOJSON,ENTITYNAME,ENTITYTYPE,FABRIC,SEQUENCENUMBER,TENANTID,TENANTNAME)
> VALUES(?, ?, ?, ?,?,?,?,?), params=[pulsarTesting-1-1-1-1-EntityId, aa,
> PulsarEntityName, PulsarEntityType, PulsarFabric, 123.0, pulsar-TenantId,
> PulsarTenant]]
> at
>
> org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:750)
> at
>
> org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:212)
> at
>
> org.apache.ignite.internal.jdbc.thin.JdbcThinPreparedStatement.executeWithArguments(JdbcThinPreparedStatement.java:252)
> at
>
> org.apache.ignite.internal.jdbc.thin.JdbcThinPreparedStatement.execute(JdbcThinPreparedStatement.java:240)
> at
> org.apache.pulsar.io.jdbc.javaclienttest.project.App.main(App.java:133)
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Failed to execute DML statement Ignite JDBC

2020-01-13 Thread siva
Hi,
Thank you for suggestion.
Please find the Server log exception:

org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to
execute DML statement [stmt=INSERT INTO 
"C091E548-B45A-49B4-B8EC-2CB5E27C7AF6".ENTITIESTABLEINFO(EntityId,EntityInfoJson,EntityName,EntityType,Fabric,SequenceNumber,TenantId,TenantName)
VALUES ('0-pulsar', '{}', 'Testing Topic0 Name', 'testpulsarType',
'pulsarFabric', 0.0, 'pulsar-123-tenantid', 'pulsar-tenantName'),
params=null]
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.doRunPrepared(IgniteH2Indexing.java:2284)
~[ignite-indexing-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:2209)
~[ignite-indexing-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2128)
~[ignite-core-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2123)
~[ignite-core-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
~[ignite-core-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2693)
~[ignite-core-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2137)
~[ignite-core-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.executeQuery(JdbcRequestHandler.java:511)
[ignite-core-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.doHandle(JdbcRequestHandler.java:245)
[ignite-core-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.handle(JdbcRequestHandler.java:208)
[ignite-core-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:162)
[ignite-core-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:45)
[ignite-core-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
[ignite-core-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
[ignite-core-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
[ignite-core-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
[ignite-core-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
[ignite-core-2.7.5.jar:2.7.5]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[?:1.8.0_144]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[?:1.8.0_144]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
Caused by: org.apache.ignite.IgniteCheckedException: Key is missing from
query
at
org.apache.ignite.internal.processors.query.h2.dml.UpdatePlanBuilder.createSupplier(UpdatePlanBuilder.java:604)
~[ignite-indexing-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.processors.query.h2.dml.UpdatePlanBuilder.planForInsert(UpdatePlanBuilder.java:270)
~[ignite-indexing-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.processors.query.h2.dml.UpdatePlanBuilder.planForStatement(UpdatePlanBuilder.java:135)
~[ignite-indexing-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.getPlanForStatement(DmlStatementsProcessor.java:741)
~[ignite-indexing-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFields(DmlStatementsProcessor.java:175)
~[ignite-indexing-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFieldsDistributed(DmlStatementsProcessor.java:358)
~[ignite-indexing-2.7.5.jar:2.7.5]
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.doRunPrepared(IgniteH2Indexing.java:2263)
~[ignite-indexing-2.7.5.jar:2.7.5]
... 19 more



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


Re: Failed to reinitialize local partitions (rebalancing will be stopped)

2020-01-13 Thread Ilya Kasnacheev
Hello!

What are steps to reproduce?

I tried to start 2 data nodes, 1 worker node and 1 client, then activated
cluster with control.sh. I didn't see any errors.

Have you tried clearing persistence dirs before a run?

Regards,
-- 
Ilya Kasnacheev


пн, 13 янв. 2020 г. в 13:08, ashishb888 :

> Client node
> 
>
> Data node
> <
> https://github.com/ashishb888/ignite-poc/tree/master/ignite-persistence-data-node>
>
> Worker node
> <
> https://github.com/ashishb888/ignite-poc/tree/master/ignite-persistence-worker-node>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


How does a cache behave in LOCAL mode ?

2020-01-13 Thread userx
Hi team,

I went through the documentation available at
https://apacheignite.readme.io/docs/cache-modes#section-local-mode to
understand what does the LOCAL mode mean.

I have a following scenario.

1) There are 5 Ignite data grid servers. I1, I2, I3, I4, I5. The machines
are M1, M2, M3, M4, M5.
2) There are 20 clients (C1 to C20) writing data to the same cache (say name
"CACHE1") in the LOCAL MODE. They are running on M1 to M5. So there are four
java clients on one machine.
3) Say C1 writes CACHE1.put("1", "1"). There are no back ups in the
configuration so its just the primary node clients are writing to.
4) Can C5 which is running on M2 query CACHE.get("1") and get "1" ?

Since this is the most light weight configuration, I am trying this
configuration (the assumption is that all the  Ignite servers are running)



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


Re: Getting all data from cache via scan query is taking lot of time

2020-01-13 Thread Pavel Tupitsyn
20 seconds for a collection of 7k objects is way too slow.
Can you please attach full reproducer so I can run it and dig deeper?

On Mon, Jan 13, 2020 at 2:47 PM Tunas 
wrote:

> Configuration of Ignite server
>
> backups = 1
> persistenceEnabled = true
> atomicityMode = true
>
> I have two nodes on one server and only one ignite server instance is
> running.
>
> I am using C# thin client to fetch data from collection.
>
> I am storing custom user defined object collection in my cache.
> 1. custom object has around 30 fields
> 2. collection contains around 7000 custom objects.
> 3. I am storing object by converting it to JSON
>
> Now when i fetch whole collection from cache using "ScanQuery" it is taking
> more time then traditional database (SQL/Oracle/Sybase)
>
> I create cache for each custom object collection like below
> ICacheClient cacheClient =
> _igniteStore.IgniteThinClient.GetOrCreateCache string>(typeof(T).FullName);
>
>
> and when i want to fetch all data from collection i do it like below
> var cacheEntries = cacheClient.Query(new
> Apache.Ignite.Core.Cache.Query.*ScanQuery(null)).GetAll()*;
>
>
> I have tried multiple times but for my custom object which has 30 fields
> and
> collection has around 7k of this custom objects
>
> *It takes around 2 milliseconds out of which 18500 milliseconds taken
> by
> "ScanQuery" statement above and 1500 milliseconds by newton json converter.
>
> If i fetch same from my traditional RDBMS (SQL) then it takes only 5500
> milliseconds.*
>
>
> Can some one please let me know what i am doing wrong?
> Anything to do with configuration of ignite server or any other way to
> fetch
> all data from cache.
>
>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Getting all data from cache via scan query is taking lot of time

2020-01-13 Thread Tunas
Configuration of Ignite server

backups = 1
persistenceEnabled = true
atomicityMode = true

I have two nodes on one server and only one ignite server instance is
running.

I am using C# thin client to fetch data from collection.

I am storing custom user defined object collection in my cache. 
1. custom object has around 30 fields
2. collection contains around 7000 custom objects. 
3. I am storing object by converting it to JSON 

Now when i fetch whole collection from cache using "ScanQuery" it is taking
more time then traditional database (SQL/Oracle/Sybase)

I create cache for each custom object collection like below
ICacheClient cacheClient =
_igniteStore.IgniteThinClient.GetOrCreateCache(typeof(T).FullName);


and when i want to fetch all data from collection i do it like below
var cacheEntries = cacheClient.Query(new
Apache.Ignite.Core.Cache.Query.*ScanQuery(null)).GetAll()*;


I have tried multiple times but for my custom object which has 30 fields and
collection has around 7k of this custom objects

*It takes around 2 milliseconds out of which 18500 milliseconds taken by
"ScanQuery" statement above and 1500 milliseconds by newton json converter.

If i fetch same from my traditional RDBMS (SQL) then it takes only 5500
milliseconds.*


Can some one please let me know what i am doing wrong?
Anything to do with configuration of ignite server or any other way to fetch
all data from cache.







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


Re: Failed to execute DML statement Ignite JDBC

2020-01-13 Thread siva
*Step-1:Model class*
-
namespace Models.Ignite
{
   public class ENTITIESTABLEINFO : ICustomCacheStore
{
[QuerySqlField]
[Key]
public String EntityId { get; set; }
[QuerySqlField]
public String EntityType { get; set; }
[QuerySqlField]
public String EntityInfoJson { get; set; }
[QuerySqlField]
public String TenantName { get; set; }
[QuerySqlField]
public String TenantId { get; set; }
[QuerySqlField]
public String Fabric { get; set; }
[QuerySqlField]
public String EntityName { get; set; }
[QuerySqlField]
public double SequenceNumber { get; set; }
}
}




*Step-2:Create Cache,table and indexes:*
--
using Models.Ignite.ENTITIESTABLEINFO;

//create indexes
struct QueryEntityIndexFields
{
public string[] PrimaryKeys;
public Type ModelType;
//public string QueryIndexType;
}
private static readonly string[] indexFieldOfEntityId = new[] { "EntityId"
};
private static readonly QueryEntityIndexFields[] prodModels = new[] {
//fdc models
new QueryEntityIndexFields(){PrimaryKeys=indexFieldOfEntityId,
ModelType=  typeof(ENTITIESTABLEINFO)}
}

private async Task>
GetQueryEntitiesBasedOnCapability(QueryEntityIndexFields[]
queryEntityIndexFieldsList)
{
List queryList = new List();
foreach (var modelObject in queryEntityIndexFieldsList)
{
var query = new QueryEntity(typeof(string),
modelObject.ModelType)
{
Indexes = new
List(modelObject.PrimaryKeys.Count() + 1)
{
new QueryIndex(true,0,modelObject.PrimaryKeys)
}
};
queryList.Add(query);
}
return queryList;
}
var queryList = await
_queryEntities.CreateQueryEntitiesListAsync(capabilityName);


//Cache configuration
cacheCfg = new CacheConfiguration(cacheName)
{
Name = cacheName,
CacheStoreFactory = new TenantCacheStoreFactory(_logger, 
connectionString),
KeepBinaryInStore = false,  // Cache store works with deserialized data.
ReadThrough = true,
WriteThrough = true,
WriteBehindEnabled = true,
QueryEntities = queryList,
WriteBehindFlushThreadCount = 2,
CacheMode = CacheMode.Partitioned,
Backups = 0,
DataRegionName = "IgniteDataRegion",
EvictionPolicy = new LruEvictionPolicy
{
MaxSize = 10
}
};

Ignite.AddCacheConfiguration(cacheCfg);
// Create cache with given name, if it does not exist.
ICache cache =
Ignite.GetOrCreateCache(cacheCfg);

where cacheName is "C091E548-B45A-49B4-B8EC-2CB5E27C7AF6";
*
Step-3:Insert Statement:*
-
INSERT INTO
"C091E548-B45A-49B4-B8EC-2CB5E27C7AF6".ENTITIESTABLEINFO(EntityId,EntityInfoJson,EntityName,EntityType,Fabric,SequenceNumber,TenantId,TenantName)
VALUES ('0-pulsar', '{}', 'Testing Topic0 Name', 'testpulsarType',
'pulsarFabric', 0.0, 'pulsar-123-tenantid', 'pulsar-tenantName');

onces insert statement execute get before mention exception.
Anything else required,please let me know.



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


Re: Failed to execute DML statement Ignite JDBC

2020-01-13 Thread Pavel Tupitsyn
[Key] attribute is not recognized by Ignite, you should set
QueryEntity.KeyFieldName = "EntityId".

This is a good catch, by the way - I've filed a ticket:
https://issues.apache.org/jira/browse/IGNITE-12532

On Mon, Jan 13, 2020 at 5:32 PM siva  wrote:

> *Step-1:Model class*
> -
> namespace Models.Ignite
> {
>public class ENTITIESTABLEINFO : ICustomCacheStore
> {
> [QuerySqlField]
> [Key]
> public String EntityId { get; set; }
> [QuerySqlField]
> public String EntityType { get; set; }
> [QuerySqlField]
> public String EntityInfoJson { get; set; }
> [QuerySqlField]
> public String TenantName { get; set; }
> [QuerySqlField]
> public String TenantId { get; set; }
> [QuerySqlField]
> public String Fabric { get; set; }
> [QuerySqlField]
> public String EntityName { get; set; }
> [QuerySqlField]
> public double SequenceNumber { get; set; }
> }
> }
>
>
>
>
> *Step-2:Create Cache,table and indexes:*
> --
> using Models.Ignite.ENTITIESTABLEINFO;
>
> //create indexes
> struct QueryEntityIndexFields
> {
> public string[] PrimaryKeys;
> public Type ModelType;
> //public string QueryIndexType;
> }
> private static readonly string[] indexFieldOfEntityId = new[] { "EntityId"
> };
> private static readonly QueryEntityIndexFields[] prodModels = new[] {
> //fdc models
> new QueryEntityIndexFields(){PrimaryKeys=indexFieldOfEntityId,
> ModelType=  typeof(ENTITIESTABLEINFO)}
> }
>
> private async Task>
> GetQueryEntitiesBasedOnCapability(QueryEntityIndexFields[]
> queryEntityIndexFieldsList)
> {
> List queryList = new List();
> foreach (var modelObject in queryEntityIndexFieldsList)
> {
> var query = new QueryEntity(typeof(string),
> modelObject.ModelType)
> {
> Indexes = new
> List(modelObject.PrimaryKeys.Count() + 1)
> {
> new QueryIndex(true,0,modelObject.PrimaryKeys)
> }
> };
> queryList.Add(query);
> }
> return queryList;
> }
> var queryList = await
> _queryEntities.CreateQueryEntitiesListAsync(capabilityName);
>
>
> //Cache configuration
> cacheCfg = new CacheConfiguration(cacheName)
> {
> Name = cacheName,
> CacheStoreFactory = new TenantCacheStoreFactory(_logger,
> connectionString),
> KeepBinaryInStore = false,  // Cache store works with deserialized
> data.
> ReadThrough = true,
> WriteThrough = true,
> WriteBehindEnabled = true,
> QueryEntities = queryList,
> WriteBehindFlushThreadCount = 2,
> CacheMode = CacheMode.Partitioned,
> Backups = 0,
> DataRegionName = "IgniteDataRegion",
> EvictionPolicy = new LruEvictionPolicy
> {
> MaxSize = 10
> }
> };
>
> Ignite.AddCacheConfiguration(cacheCfg);
> // Create cache with given name, if it does not exist.
> ICache cache =
> Ignite.GetOrCreateCache(cacheCfg);
>
> where cacheName is "C091E548-B45A-49B4-B8EC-2CB5E27C7AF6";
> *
> Step-3:Insert Statement:*
> -
> INSERT INTO
>
> "C091E548-B45A-49B4-B8EC-2CB5E27C7AF6".ENTITIESTABLEINFO(EntityId,EntityInfoJson,EntityName,EntityType,Fabric,SequenceNumber,TenantId,TenantName)
> VALUES ('0-pulsar', '{}', 'Testing Topic0 Name', 'testpulsarType',
> 'pulsarFabric', 0.0, 'pulsar-123-tenantid', 'pulsar-tenantName');
>
> onces insert statement execute get before mention exception.
> Anything else required,please let me know.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: WriteAll() method on insert statement execute from sqlline

2020-01-13 Thread Pavel Tupitsyn
When you insert data from C# code, Ignite registers Person class
automatically
and knows how to deserialize it later.

But when you insert data from Sqline, Ignite.NET does not know about Person
class yet,
so deserialization fails.

You can fix this by setting
IgniteConfiguration.BinaryConfiguration = new
BinaryConfiguration(typeof(Person)).

Or, after Ignite has been started:
ignite.GetBinary().GetBinaryType(typeof(Person))

On Mon, Jan 13, 2020 at 7:23 PM siva  wrote:

>
> Hi,
> I am using .net core Application for Ignite client and server,Ignite
> V2.7.6.
>
> Table and indexes created through QueryEntity from Model class.
>
> So same table i am using with 3rd party thin client to put data into cache.
>
> e.g:
> 
> public interface ICustomCacheStore
> {
> }
>
> public class Person:ICustomCacheStore{
> [QuerySqlField]
> public String Id { get; set; }
> [QuerySqlField]
> public String Name { get; set; }
> ...
> }
>
> var personObject = new Person(){
> Id=123,
> Name=Ram
> };
>
> cache.putAsync("Person",personObject);
>
> On putAsync writeAll through write behind enable calling
> here is the writeAll() method implementation.
>
>  public void WriteAll(IEnumerable ICustomCacheStore>> entries){
>  //parse incoming entries and insert into sql server code
>  
>  ...
>  //successfully insertion happening
>  }
>
> but some other table created through create command.
> e.g:
> CREATE TABLE IF NOT EXISTS
> "C091E548-B45A-49B4-B8EC-2CB5E27C7AF6".EntitiesPulsarTest(EntityId
> varchar,EntityType varchar,EntityInfoJson varchar,TenantName
> varchar,TenantId varchar,Fabric varchar,EntityName varchar,SequenceNumber
> Double) WITH "template=partitioned,backups=0";
>
>
> but on insert statement execute from sqlline inside WriteAll() method
> getting the following exception:
> public void WriteAll(IEnumerable ICustomCacheStore>>
> entries)
> {
> List>
> entityList =
> entries.ToList();//here getting an exception
> foreach (var recordEntry in entityList)
> {
> ...
> ...
> ...
> }
> }
>
> Unknown pair [platformId=1, typeId=1505474372]
>
> class org.apache.ignite.binary.BinaryObjectException: Unknown pair
> [platformId=1, typeId=1505474372]
> at
>
> org.apache.ignite.internal.processors.platform.binary.PlatformBinaryProcessor.processInStreamOutStream(PlatformBinaryProcessor.java:126)
> at
>
> org.apache.ignite.internal.processors.platform.PlatformTargetProxyImpl.inStreamOutStream(PlatformTargetProxyImpl.java:136)
> at
>
> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.inLongOutLong(Native
> Method)
> at
>
> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreInvoke(PlatformCallbackGateway.java:80)
> at
>
> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.doInvoke(PlatformDotNetCacheStore.java:480)
> at
>
> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.writeAll(PlatformDotNetCacheStore.java:277)
> at
>
> org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore.updateStore(GridCacheWriteBehindStore.java:816)
> at
>
> org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore.applyBatch(GridCacheWriteBehindStore.java:726)
> at
>
> org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore.access$2400(GridCacheWriteBehindStore.java:76)
> at
>
> org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore$Flusher.flushCacheCoalescing(GridCacheWriteBehindStore.java:1147)
> at
>
> org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore$Flusher.body(GridCacheWriteBehindStore.java:1018)
> at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.ClassNotFoundException: Unknown pair [platformId=1,
> typeId=1505474372]
> at
>
> org.apache.ignite.internal.MarshallerContextImpl.getClassName(MarshallerContextImpl.java:394)
> at
>
> org.apache.ignite.internal.processors.platform.binary.PlatformBinaryProcessor.processInStreamOutStream(PlatformBinaryProcessor.java:121)
> ... 12 more
>
>
> So how to receive as key value pair result as same working like putAsync
> cache.
>
> Receive WriteAll(IEnumerable>
> entries) method acceptable format data where table created through query,
> on
> insert statement execute from sqlline?
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: How does a cache behave in LOCAL mode ?

2020-01-13 Thread userx
hi team,

Any comments on the same ?



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


Getting all data from cache via scan query is taking lot of time

2020-01-13 Thread Tunas
Configuration of Ignite server

backups = 1
persistenceEnabled = true
atomicityMode = true

I have two nodes on one server and only one ignite server instance is
running.

I am using C# thin client to fetch data from collection.

I am storing custom user defined object collection in my cache. 
1. custom object has around 30 fields
2. collection contains around 7000 custom objects. 
3. I am storing object by converting it to JSON 

Now when i fetch whole collection from cache using "ScanQuery" it is taking
more time then traditional database (SQL/Oracle/Sybase)

I create cache for each custom object collection like below
ICacheClient cacheClient =
_igniteStore.IgniteThinClient.GetOrCreateCache(typeof(T).FullName);


and when i want to fetch all data from collection i do it like below
var cacheEntries = cacheClient.Query(new
Apache.Ignite.Core.Cache.Query.*ScanQuery(null)).GetAll()*;


I have tried multiple times but for my custom object which has 30 fields and
collection has around 7k of this custom objects

*It takes around 2 milliseconds out of which 18500 milliseconds taken by
"ScanQuery" statement above and 1500 milliseconds by newton json converter.

If i fetch same from my traditional RDBMS (SQL) then it takes only 5500
milliseconds.*


Can some one please let me know what i am doing wrong?
Anything to do with configuration of ignite server or any other way to fetch
all data from cache.







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


WriteAll() method on insert statement execute from sqlline

2020-01-13 Thread siva


Hi,
I am using .net core Application for Ignite client and server,Ignite V2.7.6.

Table and indexes created through QueryEntity from Model class.

So same table i am using with 3rd party thin client to put data into cache.

e.g:

public interface ICustomCacheStore
{
}

public class Person:ICustomCacheStore{
[QuerySqlField]
public String Id { get; set; }
[QuerySqlField]
public String Name { get; set; }
...
}

var personObject = new Person(){
Id=123,
Name=Ram
};

cache.putAsync("Person",personObject);

On putAsync writeAll through write behind enable calling
here is the writeAll() method implementation.

 public void WriteAll(IEnumerable> entries){
 //parse incoming entries and insert into sql server code
 
 ...
 //successfully insertion happening
 }
 
but some other table created through create command.
e.g:
CREATE TABLE IF NOT EXISTS
"C091E548-B45A-49B4-B8EC-2CB5E27C7AF6".EntitiesPulsarTest(EntityId
varchar,EntityType varchar,EntityInfoJson varchar,TenantName
varchar,TenantId varchar,Fabric varchar,EntityName varchar,SequenceNumber
Double) WITH "template=partitioned,backups=0";

 
but on insert statement execute from sqlline inside WriteAll() method
getting the following exception:
public void WriteAll(IEnumerable>
entries)
{
List> entityList =
entries.ToList();//here getting an exception
foreach (var recordEntry in entityList)
{
...
...
...
}
}

Unknown pair [platformId=1, typeId=1505474372]

class org.apache.ignite.binary.BinaryObjectException: Unknown pair
[platformId=1, typeId=1505474372]
at
org.apache.ignite.internal.processors.platform.binary.PlatformBinaryProcessor.processInStreamOutStream(PlatformBinaryProcessor.java:126)
at
org.apache.ignite.internal.processors.platform.PlatformTargetProxyImpl.inStreamOutStream(PlatformTargetProxyImpl.java:136)
at
org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.inLongOutLong(Native
Method)
at
org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreInvoke(PlatformCallbackGateway.java:80)
at
org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.doInvoke(PlatformDotNetCacheStore.java:480)
at
org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.writeAll(PlatformDotNetCacheStore.java:277)
at
org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore.updateStore(GridCacheWriteBehindStore.java:816)
at
org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore.applyBatch(GridCacheWriteBehindStore.java:726)
at
org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore.access$2400(GridCacheWriteBehindStore.java:76)
at
org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore$Flusher.flushCacheCoalescing(GridCacheWriteBehindStore.java:1147)
at
org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore$Flusher.body(GridCacheWriteBehindStore.java:1018)
at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: Unknown pair [platformId=1,
typeId=1505474372]
at
org.apache.ignite.internal.MarshallerContextImpl.getClassName(MarshallerContextImpl.java:394)
at
org.apache.ignite.internal.processors.platform.binary.PlatformBinaryProcessor.processInStreamOutStream(PlatformBinaryProcessor.java:121)
... 12 more


So how to receive as key value pair result as same working like putAsync
cache.

Receive WriteAll(IEnumerable>
entries) method acceptable format data where table created through query, on
insert statement execute from sqlline?




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


Re: Load Data with Streamer

2020-01-13 Thread narges saleh
Thanks Saikat for the feedback.

I have a simple design. I have external data sources which send data to the
ignite cluster via http post requests. I wanted to see if I can utilize
ignite's rest API for this purpose and at the same time take advantage of
the streamer high performant data load ( the same way that it is possible
with TCP socket via socket streamer). It seems that is not possible. I will
need to write a http listener myself that ingest the data and persist the
data into cache via the streamer.

On Sun, Jan 12, 2020 at 11:28 AM Saikat Maitra 
wrote:

> Hi,
>
> I think rest api interface and streamer interface are separate interfaces
> where streamer interface is built for high performant data loading
> capabilities and rest interface is built for easily access the cache, run
> task or run sql queries.
>
> I could not clearly understand the design of the application like how are
> you planning to use streamer using REST api. If you have a design docs then
> we can review and share feedback.
>
> Regards,
> Saikat
>
> On Sun, Jan 12, 2020 at 12:24 AM narges saleh 
> wrote:
>
>> Hi All,
>> The issue with socket streamer example is resolved (the try clause was
>> closing the cache).
>> I'd appreciate the answer to the question regarding rest API and ignite
>> streamer.
>>
>> thanks.
>>
>> On Sat, Jan 11, 2020 at 4:03 PM narges saleh 
>> wrote:
>>
>>> Hi All,
>>> Can someone please provide a concrete answer whether it is possible to
>>> load data via the streamer using the REST API? If yes, can you please
>>> provide an example? I have searched and watched webinars and so far have
>>> not been to find an answer/example.
>>>
>>> Can also provide a working example of using ignite's socket streamer for
>>> loading data? The one that comes with ignite source does not work for me.
>>>
>>> Do I need to write my own tcp socket or http listener to accept the data
>>> from the client and load the cache with ignite data streamer interface?
>>>
>>> thanks.
>>>
>>> On Fri, Jan 10, 2020 at 4:36 AM narges saleh 
>>> wrote:
>>>
 Thanks Saikat. Please let me know if you find anything. I'll try to
 debug on my side too.

 Does anyone have a working example for using socket streamer?

 On Thu, Jan 9, 2020 at 9:07 PM Saikat Maitra 
 wrote:

> Hi,
>
> I tried to reproduce the issue in local in debug mode and I can see
> that after sockStmr.start(); the WordsSocketStreamerServer node is
> getting stopped.
>
> I do not see any exception in console and I think it stopped
> gracefully.
>
> We will need to debug further why it is getting stopped and not
> listening to port  for client messages.
>
> Regards,
> Saikat
>
> On Thu, Jan 9, 2020 at 5:48 AM narges saleh 
> wrote:
>
>> Any clue what could be wrong?
>>
>> On Tue, Jan 7, 2020 at 8:52 AM narges saleh 
>> wrote:
>>
>>> Thanks Saikat for the reply.
>>>
>>> 1) I will check out the webinar. thanks.
>>> 2) The socket streamer server code goes to the finally clause right
>>> after the socket streamer is starts. The screen snapshot with 2 servers 
>>> and
>>> one client is here.
>>>
>>> [image: image.png]
>>>
>>> On Mon, Jan 6, 2020 at 7:59 PM Saikat Maitra <
>>> saikat.mai...@gmail.com> wrote:
>>>
 Hi,

 1. If you define schema for your dataset then you should be able to
 execute qry to get the desired resultset. Please take a look into 
 Valentin
 Kulichenko's webinar related to using jdbc thin client and getting
 resultset. You can execute similar qry using rest api. Alternatively, 
 you
 can also use rest api to Execute command to perform any task in the 
 Ignite
 grid.

 https://www.youtube.com/watch?v=eMs_2vEsbBk=3103s

 2. If I understand correctly the topology for the grid, we have 4
 ignite servers and 1 Data streamer client which is pushing the data to
 Ignite cluster. If the Ignite Data Streamer client is stopped in 
 finally
 clause then where do you receive the "Ignite node stopped message".

 Also, can you please share if this is a INFO message or ERROR
 message?

 Regards,
 Saikat



 On Sun, Jan 5, 2020 at 8:23 PM narges saleh 
 wrote:

> Hello Saikat,
> 1) Any service method; say I have an affinity based deployed
> service with a method that  aggregates the balances for each customer 
> based
> on their location.
>Also, I take it that it is not possible to have rest
> API/streamer producer/consumer arrangement as you would have in tcp 
> socket
> connection between the client data producer and streamer data 
> consumer,
> right?
> 2)Yes 

Best approach for jdbc sink into ignite cache with write behind .net client and server 3rd party application

2020-01-13 Thread siva
Hi,
I have  .net core client and Server application Ignite v2.7.6.

All tables and indexes created through IgniteConfiguration and QueryEntity
in .net application at the time of cache creation.

currently i am using from source to
client.putAsync(key,tableModelClassObject) to put data in cache as well
write behind into SQL Server Database.

but now planning to sink source data from jdbc into ignite cache as well as
write behind for sql server with same follow instead of using
client.putAsync()...using JDBC.

All kind of suggestion are welcome.what kind of changes i need to do if any
refrence link.

Thank you.




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


Re: Failed to execute DML statement Ignite JDBC

2020-01-13 Thread siva
Hi,
Thanks for reply.I will look into this.




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


Re: Best approach for jdbc sink into ignite cache with write behind .net client and server 3rd party application

2020-01-13 Thread Pavel Tupitsyn
Hi,

The question is not very clear - do you have any difficulties with JDBC?

On Tue, Jan 14, 2020 at 7:28 AM siva  wrote:

> Hi,
> I have  .net core client and Server application Ignite v2.7.6.
>
> All tables and indexes created through IgniteConfiguration and QueryEntity
> in .net application at the time of cache creation.
>
> currently i am using from source to
> client.putAsync(key,tableModelClassObject) to put data in cache as well
> write behind into SQL Server Database.
>
> but now planning to sink source data from jdbc into ignite cache as well as
> write behind for sql server with same follow instead of using
> client.putAsync()...using JDBC.
>
> All kind of suggestion are welcome.what kind of changes i need to do if any
> refrence link.
>
> Thank you.
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


unsubscribe

2020-01-13 Thread Shahid Muhamed

unsubscribe


Thanks,

Muhamed Shahid