Re: Memory configuration change from 80%(Ignite 2.1) to 20%(Ignite 2.3)??

2017-12-14 Thread daniels
Thank you,dear Alexey.



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


Re: Memory configuration change from 80%(Ignite 2.1) to 20%(Ignite 2.3)??

2017-12-13 Thread daniels
Hi everyone.and I  also have  a question about this, I am using on-heap
cache,is this memory configuratin has affect only off-heap caches?.



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


Re: Ignite DataStream vs cache putAll

2017-11-30 Thread daniels
Thank you dear Denis,I will follow to your suggestions. 



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


IgniteCheckedException: Failed to register query type: QueryTypeDescriptorImpl

2017-11-29 Thread daniels
I'am using ignite 2.0 ],and in my Junit test Igntie brings bellow
excpetion,but my applicataion works properly,only during  junit test brings
that error.the configurations are same in both.
I did debug and noticed that the almost  same query in my application works
properly but in junit test it brigns error.

here  query - CREATE TABLE ""person-default"".TWOINDEXFIELDENTITYDTO (_KEY
OTHER INVISIBLE*[*]* NOT NULL,_VAL OTHER INVISIBLE,_VER OTHER
INVISIBLE,INDEXFIELD1 VARCHAR,INDEXFIELD2 VARCHAR) ENGINE
""org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$H2TableEngine""
 

And here  stack trace:

class org.apache.ignite.IgniteCheckedException: Failed to register query
type: QueryTypeDescriptorImpl [space=person-default,
name=TwoIndexFieldEntityDto, tblName=null, fields={indexField1=class
java.lang.String, indexField2=class java.lang.String},
idxs={twoindexfieldentitydto_indexfield1_asc_indexfield2_asc_idx=QueryIndexDescriptorImpl
[name=twoindexfieldentitydto_indexfield1_asc_indexfield2_asc_idx,
type=SORTED, inlineSize=-1]}, fullTextIdx=null, keyCls=class
java.lang.Object, valCls=class java.lang.Object,
keyTypeName=com.synisys.idm.shared.Identity,
valTypeName=com.synisys.idm.entity.caching.model.TwoIndexFieldEntityDto,
valTextIdx=false, typeId=0, affKey=null, keyFieldName=null,
valFieldName=null, obsolete=false]
at 
at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1806)
at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement
"CREATE TABLE ""person-default"".TWOINDEXFIELDENTITYDTO (_KEY OTHER
INVISIBLE[*] NOT NULL,_VAL OTHER INVISIBLE,_VER OTHER INVISIBLE,INDEXFIELD1
VARCHAR,INDEXFIELD2 VARCHAR) ENGINE
""org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$H2TableEngine""
"; expected "(, FOR, UNSIGNED, NOT, NULL, AS, DEFAULT, GENERATED, NOT, NULL,
AUTO_INCREMENT, BIGSERIAL, SERIAL, IDENTITY, NULL_TO_DEFAULT, SEQUENCE,
SELECTIVITY, COMMENT, CONSTRAINT, PRIMARY, UNIQUE, NOT, NULL, CHECK,
REFERENCES, ,, )"; SQL statement:
CREATE TABLE "person-default".TwoIndexFieldEntityDto (_key OTHER INVISIBLE
NOT NULL,_val OTHER INVISIBLE,_ver OTHER INVISIBLE,indexField1
VARCHAR,indexField2 VARCHAR) engine
"org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$H2TableEngine"
[42001-193]







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


Re: Error inserting into H2 database special symbols

2017-11-28 Thread daniels
Thank you very much!



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


Re: Ignite DataStream vs cache putAll

2017-11-28 Thread daniels
Thank you for response.

So.in my case(50.000 max size and no need server side processing ) is beter
to use putAll?
In other words, is  50.000 very big ammount data?



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


Ignite DataStream vs cache putAll

2017-11-28 Thread daniels
Hi,
Which one TO use  DataStream or cache putAll ?

My cache max-size is  ~50.000 items.

I did some comparison and noticed that in cases of some server nodes and
replicated cace putAll is faster.
Is'nt it?




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


Error inserting into H2 database special symbols

2017-11-28 Thread daniels
I use Ignite indexing, and I need to inset string into H2 with special
symbols. 
InlineIndexHelper brings NullPointer exception , for more please see in
attached image.
s = trimUTF8(s, maxSize - 3);  //this line returns null
size = (short)(s.length | 0x8000); //this line throws
nullPointer exception for s

Can I change CHARSET and not use UTF-8.


 



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


Re: QueryEntity Based Configuration

2017-11-28 Thread daniels
Thank you ,it works.



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


Re: Indexes on custom objects

2017-11-27 Thread daniels
Thank you dear ALexey,it wors for me. )



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


Indexes on custom objects

2017-11-26 Thread daniels
 "Indexes for nested collections and in particular for maps are not 
supported.". 

Is it true for complex(custom) objects 

Namely ,can I make my custom type indexable ? 

class Model { 
//index=true 
private CustomObject obj; 
} 

class CustomObject{ 
//index=true 
private String objName; 
} 

can I do filter on cache(of Models) with "objName" ? 




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


Re: Cache queries - Failed to run map query remotely

2017-11-25 Thread daniels
Thank you dear Alexey



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


Re: Cache queries - Failed to run map query remotely

2017-11-24 Thread daniels
Thank you for response,

It worked for me.
But the type of my fields is defined dhnamically. Isn't there an option to
keep the object  type?

And what you think, how works  "ORDER BY" ,when sortField type is Object? 



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


Cache queries - Failed to run map query remotely

2017-11-23 Thread daniels
Hi ,

 I am using cacheQuery.

My model have one index field 
 public class Model {
  ..
  .
@QuerySqlField(index = true)
private Object sortField;

}

this query works properly-

cache.query(new SqlQuery<>(Model.class, "ORDER BY sortField")).getAll();

but when I want to do some filter , for example

cache.query(new SqlQuery<>(Model.class, "sortField= ?").setArgs("10"));

It brings following CacheException-  "Failed to run map query remotely"

javax.cache.CacheException: Failed to execute map query on the node:
61a36250-d822-4696-b30c-007943966eed, class
org.apache.ignite.IgniteCheckedException:Failed to execute SQL query.

 More details -

 





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


Re: QueryEntity Based Configuration

2017-11-17 Thread daniels
Thank you,it's so clear.



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


Re: QueryEntity Based Configuration

2017-11-15 Thread daniels
Thank you for response.
I cant do the first offer(flatten map).
And that about the second one  I didnt understand ,can you please explain it
in details?


p.s. My cache value is List of Models. And I want get Models with sorting
(by some fields ) quikly. And therefore I decided to use indexes and cache
queries.If ignite not supported my case ,how xan I solve my problem with
another way?



--
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: Clients reconnection problem

2017-10-20 Thread daniels
Hi.thank you for response

No there isnt any logs.

The same bellow mentioned log appears for some time 

--
ERROR  1 --- [er-#2%%] o.a.i.spi.discovery.tcp.TcpDiscoverySpi  : Failed to
send message: null
 java.io.IOException: Failed to get acknowledge for message:
TcpDiscoveryClientMetricsUpdateMessage [super=TcpDiscoveryAbstractMessage
[sndNodeId=null, id=12qwrji-d--fsadas, verifierNodeId=null, topVer=0,
pendingIdx=0, failedNodes=null, isClient=true]]
at
org.apache.ignite.spi.discovery.tcp.ClientImpl$SocketWriter.body(ClientImpl.java:1246)
~[ignite-core-2.0.0.jar:2.0.0]
at
org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
[ignite-core-2.0.0.jar:2.0.0]


then this log disappears and starts to show 
this log before restarting



 2017-10-19 13:35:09.197  WARN [um-role-service,,,] 1 --- [-#228%sys_grid%]
o.a.i.spi.discovery.tcp.TcpDiscoverySpi  : Failed to reconnect to cluster
(will retry): class o.a.i.IgniteCheckedException: Failed to deserialize
object with given class loader: sun.misc.Launcher$AppClassLoader@5c647e05
-



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


Clients reconnection problem

2017-10-19 Thread daniels
I have 1 server and 3 client nodes,I use caching and messaging.
When I scale server node to 0,and then to 1 ,as a result some clients cannot
reconnect.

I have exception from client nodes

ERROR  1 --- [er-#2%%] o.a.i.spi.discovery.tcp.TcpDiscoverySpi  : Failed to
send message: null
 java.io.IOException: Failed to get acknowledge for message:
TcpDiscoveryClientMetricsUpdateMessage [super=TcpDiscoveryAbstractMessage
[sndNodeId=null, id=12qwrji-d--fsadas, verifierNodeId=null, topVer=0,
pendingIdx=0, failedNodes=null, isClient=true]]
at
org.apache.ignite.spi.discovery.tcp.ClientImpl$SocketWriter.body(ClientImpl.java:1246)
~[ignite-core-2.0.0.jar:2.0.0]
at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
[ignite-core-2.0.0.jar:2.0.0]
 2017-10-19 13:35:09.197  WARN [um-role-service,,,] 1 --- [-#228%sys_grid%]
o.a.i.spi.discovery.tcp.TcpDiscoverySpi  : Failed to reconnect to cluster
(will retry): class o.a.i.IgniteCheckedException: Failed to deserialize
object with given class loader: sun.misc.Launcher$AppClassLoader@5c647e05



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


Re: Ignite events related server nodes

2017-10-18 Thread daniels
Hi,
Thank you for answer.
e.g. I have 2 server nodes(scaled same node) and 4 clients. I am scaling
server node to  0 . Now I have 0 server 4 clients.
Now I am again scailing to 1 or 2.
And when first server node is connecting I want to do some refreshes in my
code (where my client node is located )  ,that refreshes are needed only one
time.from 0 nodes  to 1(firs connection) .(or from 2 nodes to 0-last
disconnection)

p.s. As to refreshing it can be for example  map clearing,not  related to
ignite.



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


Ignite events related server nodes

2017-10-18 Thread daniels
Hi everybody,

I want to listen first server node connection , or last server node
disconnection,for doing some actions.

I wrote the following code 
ingite.events().localListen(event -> {
if(!((DiscoveryEvent) event).eventNode().isClient()){
something();
}
return true;
}, EventType.EVT_NODE_LEFT);

 something() method  occures every server node disconnection,but I want on
last disconnection,or first conncetion. 

And one more question related events,
 I read (from documentations) what -
"To get notified of any tasks or cache events occurring within the cluster,
includeEventTypes property of IgniteConfiguration must be enabled."

the above mentioned code works even if I didnt set "includeEventTypes" in
IgniteCinfiguration explicitly. Why it is works? 


Thanks.








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


Re: PeerClassLoading example using cacheLoaders

2017-08-11 Thread daniels
Thank you,very much.

And one more question, The  load method  of cacheLoader is called when I do
get from cache with the key which does not exists. Isn't it?
 
 Isnt it solution without passing chacheLoader   -I do get and if the key is 
absent ,do put that key in the cache,in other words do  putIfAbsent but  in
my code ?



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/PeerClassLoading-example-using-cacheLoaders-tp16136p16149.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: PeerClassLoading example using cacheLoaders

2017-08-11 Thread daniels
Hi
I know it. I  dont want   to copy that classes to all nodes.Therefore I dont
want to use chackeLoaderFactories. I am searching other solution. Now I want
to remove loaders. How to organize my cache creation without loaders,but
keep the  logic in loaders,where to put that logic

Thank you






--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/PeerClassLoading-example-using-cacheLoaders-tp16136p16139.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


PeerClassLoading example using cacheLoaders

2017-08-11 Thread daniels
 I use the caching of ignite with cacheLoaderFactories. And I met the
perrClassLoading problem.
I  want not   to copy that classes to all nodes. 
 Now i want not to use cacheLoaderFactories.What methods will you offer to
replace them so that there doesn't come the problem of peerclasLoading?

My cache creation looks like this

ignite.getOrCreateCache((CacheConfiguration) new CacheConfiguration<>(
cacheConfiguration).setName(cacheName)
.setCacheLoaderFactory(factory)
.setReadThrough(true)
.setExpiryPolicyFactory(EternalExpiryPolicy.factoryOf()))




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/PeerClassLoading-example-using-cacheLoaders-tp16136.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Stoppin listen for topics in Ignite

2017-04-05 Thread daniels
Thank you very much.You helped me a lot. 
p.s. Ignite is very powerfull. :-)



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Stoppin-listen-for-topics-in-Ignite-tp11604p11762.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Stoppin listen for topics in Ignite

2017-04-05 Thread daniels
I mean all  concurrently sending messages . During stop I want to know
wheather there are messages being done in process so let them be done.And i
will execute by hand the ones that just came.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Stoppin-listen-for-topics-in-Ignite-tp11604p11738.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Stoppin listen for topics in Ignite

2017-04-04 Thread daniels
Yes, I do it concurrently. I send messages concurrently. And before stopping
I want know whether listener called or not for all messages,if not before
stopping must wait for the working BiPredicate to finish and new coming ones
must collect for executing by hand.




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Stoppin-listen-for-topics-in-Ignite-tp11604p11708.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Stoppin listen for topics in Ignite

2017-04-03 Thread daniels
Dear vkulichenko,I want to listen ignMessage.send  and IgnitePredicate
execution.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Stoppin-listen-for-topics-in-Ignite-tp11604p11656.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Stoppin listen for topics in Ignite

2017-04-02 Thread daniels
Thank you,everything works well!

An additional question- can I listen to IgniteMessage based events(such us
beforeExecuting,afterExecuting...),by adding listeners.




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Stoppin-listen-for-topics-in-Ignite-tp11604p11641.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Stoppin listen for topics in Ignite

2017-03-31 Thread daniels
How to stop listen for topic in Ignite? 
I'm using https://apacheignite.readme.io/docs/messaging Topic Based
Messaging.
Everything works well,but I cant stop topic listening.

Ignite ignite = Ignition.start("ignite-config.xml");
IgniteMessaging rmtMsg = ignite.message();

rmtMsg.localListen("MyOrderedTopic", (nodeId, msg) -> {
System.out.println("accepted");
return true;
});
rmtMsg.send("MyOrderedTopic", "message");
rmtMsg.stopLocalListen("MyOrderedTopic", (nodeId, msg) -> {
System.out.println("stopped");
return true;
});
rmtMsg.send("MyOrderedTopic", "message");



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Stoppin-listen-for-topics-in-Ignite-tp11604.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Performance in case of 1 server node

2016-07-12 Thread daniels
Hi Denis,
I will remove startSize.
Is there any need to add or remove anything?


Before,I used JCache(JSR 107).
Now instead of it I use Ignite(one node).
And want to get better performance.
Also,
I use   read-through cacheLoaderFactory(in MutableConfiguration) for cache
configuration,and not Ignite CacheStoreFactory.
But  in  cases of putAll,I use IgniteDataStreamer.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Performance-in-case-of-1-server-node-tp6207p6239.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Cache Partitioned Mode

2016-07-11 Thread daniels
-"it will load it from the cache store, puts into memory and returns for the
client. "

It means that  load occurrs on server node by server node loader (and not by
client node loader)and then  puts in memory on server side and returns for
client.
Doesnt it?




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Cache-Partitioned-Mode-tp6172p6211.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Performance in case of 1 server node

2016-07-11 Thread daniels
Hi ,
I have one server node (embedded Ignite).
My ignite and cache configurations is bellow,
please help me to add or remove configs for better performance


   













 

P.S. I read Performance Tips in Documentation,it mostly related  >1 nodes.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Performance-in-case-of-1-server-node-tp6207.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Cache Partitioned Mode

2016-07-11 Thread daniels
Hi,
I use  CacheLoaderFactory(read-through) ,and do simple
cache.get("absentKey");
after it  CacheLoaderFactory  loades data from DB.
Now I want know data loaded on client and seted it on server node   or  load
occured on server node?

daniels,



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Cache-Partitioned-Mode-tp6172p6202.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Cache Partitioned Mode

2016-07-10 Thread daniels
Thank you dear vkulichenko,it's so clear.
But I have one more question 
I have 2 server nodes(remote)and 1 client.and do get from existing cache(on
clie t node),which key is absent in that  cache,(i have cacheloaderfactory
for that cache)thus must work cacheLoader.

Now question on which  node will the load work?
Whether the load will work on client node and then set in server nodes?



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Cache-Partitioned-Mode-tp6172p6197.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Cache Partitioned Mode

2016-07-08 Thread daniels
Hi dear AndreyVel,

In what cases can I get better performance for big size cahes?
Is it in case of 50/50 (2 node).?



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Cache-Partitioned-Mode-tp6172p6181.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Cache Partitioned Mode

2016-07-08 Thread daniels
Hi dear Alexei.
Its clear,thank you.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Cache-Partitioned-Mode-tp6172p6180.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: IgniteClientDisconnectedException: Client node disconnected 'grid_name'

2016-07-08 Thread daniels
Ok thank you very mutch.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/IgniteClientDisconnectedException-Client-node-disconnected-grid-name-tp6041p6179.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.