Can JAVA API SqlQuery query a cache create by SQL DDL?

2017-11-14 Thread gunman524
Hi guys,

I use JDBC client driver to create a table,like:

stmt.executeUpdate("CREATE TABLE IF NOT EXISTS person ( id int,orgId LONG,
name VARCHAR, salary LONG ,PRIMARY KEY (id)) WITH \"backups=1,
affinityKey=id\"");

Could I use SqlQuery API to query this cache? I tried this way but does not
work

IgniteCache cache =
ignite.cache("SQL_PUBLIC_PERSON").withKeepBinary();
SqlQuery sql = new SqlQuery("SQL_PUBLIC_PERSON","id >? and id > cursor =
cache.query(sql.setArgs(5,10))) {
for (Map.Entry e : cursor)
System.out.println(e.getValue().toString());
}

Thanks



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


Best way to configure a single node embedded ignite 2.3

2017-11-14 Thread Sumanta Ghosh
Hi,
I have a spring boot application which runs ignite in embedded mode; the
application will run in my laptop and will have a single node only. What is
the best way to set this up?

Thanks
Sumanta



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


Failed to find query with ID: 0

2017-11-14 Thread kenn_thomp...@qat.com
This should be super simple...

Started 2 nodes from the command line, they saw each other and now show
servers=2. Completely default configuration.

Installed the ODBC Driver and set up a DSN.

Started a C# app to open a connection and issue a create table sql
statement.

It fails with "Failed to find query with ID:[xx]" where xx is the number of
attempts since the node started.

Poured thru the docs and google to no avail. 

Help?



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


No Error/Exception on Data Loss ?

2017-11-14 Thread pradeepchanumolu
Hi, 



I have an Ignite cluster with 10nodes. Here is the snippet from one of the
ignite server log.

>>> [13:03:54] Topology snapshot [ver=11, servers=10, clients=0, CPUs=352,
>>> heap=1000.0GB]




Now I created a cache with mode PARTITIONED and loaded some data into the
cache without backups/replication. Here is the snippet from the visor
console. 

visor> cache
Time of the snapshot: 11/14/17, 13:08:22
+=+
|  Name(@)  |Mode | Nodes |
Entries (Heap / Off-heap) |   Hits|  Misses   |   Reads   |  Writes  
|
+=+
| 936ab7a0-60d3-11e7-b322-8f31ade02ac0(@c0) | PARTITIONED | 10| min:
112076 (0 / 112076)  | min: 0| min: 0| min: 0| min: 0   
|
|   | |   | avg:
118185.90 (0.00 / 118185.90) | avg: 0.00 | avg: 0.00 | avg: 0.00 | avg: 0.00
|
|   | |   | max:
124707 (0 / 124707)  | max: 0| max: 0| max: 0| max: 0   
|
+-+




Now I Intentionally killed one server node. Then the number of servers goes
down in server logs which is expected.

>>> [13:11:50] Topology snapshot [ver=46, servers=9, clients=0, CPUs=312,
>>> heap=900.0GB]


Its clear that at this point some data is lost as replication/backups is not
enabled. Visor console confirms the same.

visor> cache
Time of the snapshot: 11/14/17, 13:16:13
+=+
|  Name(@)  |Mode | Nodes |
Entries (Heap / Off-heap) |   Hits|  Misses   |   Reads   |  Writes  
|
+=+
| 936ab7a0-60d3-11e7-b322-8f31ade02ac0(@c0) | PARTITIONED | 9 | min:
112076 (0 / 112076)  | min: 0| min: 0| min: 0| min: 0   
|
|   | |   | avg:
117848.33 (0.00 / 117848.33) | avg: 0.00 | avg: 0.00 | avg: 0.00 | avg: 0.00
|
|   | |   | max:
124707 (0 / 124707)  | max: 0| max: 0| max: 0| max: 0   
|
+-+




Now I launch a client to read the data from cache and save it to filesystem.
The client job doesn't throw any exception/error regarding the server loss.
It just reads the data from the servers, saves it to filesystem and exits. 

Is this behavior expected? Shouldn't the client be aware that there is data
loss in the cache ? 
If this is expected behavior, then how will the client application know
about the data loss? In my scenario, I can't have replication enabled but my
client application need to read either full data or fail if there is data
loss. Is there any configuration for that? 


Thanks,
Pradeep




 






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


QueryEntity Based Configuration

2017-11-14 Thread daniels
Hi everyone. I want to use "QueryEntity Based Configuration."

my  model (i.e. valueType) is wrapedMap -

*class Model {

 Map data;

Object  get(String key){}


}*
I want that my "indexes" to be my "data" 's some keys. Can I use it for my
case? And how?


Will following config properly in my case`









  






 * ? What shall I put here? my "data"?*








 *? Can I put
here my "data" some key?*

  




id . ? Can I put here
my "data" some key?*
salary? Can I put
here my "data" some key?*

















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


Re: Affinity Compute latency

2017-11-14 Thread Andrey Mashenkov
Hi Ranjeev,

Also it is possible cache.get() return value is deserialized only once on
client side,
but when you use EntryProcessor, entry is deserialized before EP invoke,
then request result serialized before being sent back to client and then
deserialized on client.

Try to use get() for simple operations an use invoke only for changing
large objects.
Also you can try to use BinaryObjects [1] to avoid unnecessary
deserialization.

The numbers itselves make sense only comparing some cases in same
environment as they may differs in different environments.


[1] https://apacheignite.readme.io/docs/binary-marshaller#basic-concepts

On Wed, Nov 8, 2017 at 8:28 PM, rajivgandhi  wrote:

> Thanks Andrew.
>
> The nos are an average (not 90+ percentile) over a period of 60 minutes!
> We use the default deployment mode which is Shared.
> We used 3 nodes M4.large instances. Throughput less than 200-300 TPS
>
> 1. Are the nos below your expectations?
> 2. Given the above, what changes are recommended?
>
> thanks,
> Rajeev
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>



-- 
Best regards,
Andrey V. Mashenkov


Re: Using event to reconnect spring created cache client to server

2017-11-14 Thread Guilherme Melo
That worked, is it a reentry issue?
Should be flagged as a bug?
Because reconnecting a continuous query from a disconnect event should be
standard right?

On 14 Nov 2017 6:35 p.m., "ezhuravlev"  wrote:

> Try to start a new thread and access cache from it.
>
> Evgenii
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


AW: NullPointer in GridAffinityAssignment.initPrimaryBackupMaps

2017-11-14 Thread Lukas Lentner
IGNITE_HOME = null is usually no problem. What and how should I set? I use 
Ignite in embedded mode...




Lukas Lentner, B. Sc.
 
St.-Cajetan-Straße 13
81669 München
Deutschland
 
Fon: +49 / 89  / 44 38 61 27
Mobile:  +49 / 176 / 24 77 09 22
 
E-Mail:  kont...@lukaslentner.de
Website: www.LukasLentner.de

IBAN:DE33 7019  0001 1810 17
BIC: GENODEF1M01 (Münchner Bank)

> -Ursprüngliche Nachricht-
> Von: Alexey Popov [mailto:tank2.a...@gmail.com]
> Gesendet: Dienstag, 14. November 2017 09:03
> An: user@ignite.apache.org
> Betreff: Re: NullPointer in GridAffinityAssignment.initPrimaryBackupMaps
> 
> Hi Lukas,
> 
> It seems that a new node is just misconfigured and it can't correctly assign
> partitions by Affinity Function.
> 
> Please set a valid IGNITE_HOME and verify that Affinity Function [1] matches
> the cluster config
> 
> 2017-11-11 06:10:34:973 + [main] INFO
> org.apache.ignite.internal.IgniteKernal - IGNITE_HOME=null
> 
> [1]
> https://apacheignite.readme.io/docs/affinity-collocation#section-affinity-
> function
> 
> Thanks,
> Alexey
> 
> 
> 
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Out of memory in client node freezes complete cluster

2017-11-14 Thread Ilya Kasnacheev
Hello!

My recommendation here is to always leave some extra RAM and heap so that a
hot spot won't cause OOM. Maybe use less RAM-intensive algorithms.

Without stack traces and logs it's hard to say more, but OOM may not be a
recoverable error with Ignite.

Regards,

-- 
Ilya Kasnacheev

2017-11-11 19:12 GMT+03:00 Amit Pundir :

> Hi Ilya,
> Thanks for the response.
>
> I have been following the release notes for every release - 2.1/2.2/2.3. I
> haven't seen any fixes around this (or similar sounding) issue. Since I am
> using Ignite is a very critical application, I would like to use a stable
> version which meets my requirements. I don't have a usecase for disk
> persistence so I haven't upgraded.
>
> If there is an open transaction in the grid and OOM happens on one of the
> client node, would it stall the complete cluster? I have tried to allocate
> enough memory to the cluster but there is chance of creating hot spots with
> some nodes getting higher share of cache occupancy.
>
> I'll share the logs soon.
>
>
> Thanks
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Inserting data into Ignite got stuck when memory is full with persistent store enabled.

2017-11-14 Thread ilya.kasnacheev
Hello Ray,

Have you tried to rewrite ingestion using cache API, DML or better yet
DataStreamer? Because it's non-trivial to reason about problem when extra
Spark layer is added.

Why do you have such non-trivial amount of fields (and indices) in cache key
object? Maybe try synthetic keys?

Regards,



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


Re: Using event to reconnect spring created cache client to server

2017-11-14 Thread ezhuravlev
Try to start a new thread and access cache from it.

Evgenii



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


Re: Prohibit "Node is out of topology"

2017-11-14 Thread Yakov Zhdanov
Lukas, what about GC pauses in your cluster? What is the max?

What are network specs?

Also, do you use bare metal servers or virtual machines?

--Yakov


Re: Prohibit "Node is out of topology"

2017-11-14 Thread Alexey Popov
Hi Lukas,

Several "Finished serving remote node connection" shows that the node was
cut off the cluster (some socket issues)
Please enable DEBUG level for logs to see more details about possible
reasons (socket errors, malformed messages, etc)

Thanks,
Alexey



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


Re: NullPointer in GridAffinityAssignment.initPrimaryBackupMaps

2017-11-14 Thread Alexey Popov
Hi Lukas,

It seems that a new node is just misconfigured and it can't correctly assign
partitions by Affinity Function.

Please set a valid IGNITE_HOME and verify that Affinity Function [1] matches
the cluster config

2017-11-11 06:10:34:973 + [main] INFO
org.apache.ignite.internal.IgniteKernal - IGNITE_HOME=null

[1]
https://apacheignite.readme.io/docs/affinity-collocation#section-affinity-function

Thanks,
Alexey



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