Re: Clarification on binary object cache configuration

2016-01-26 Thread Romain Gilles
Ok,
Thank you!

Romain

Le mar. 26 janv. 2016 à 11:28, Alexey Goncharuk 
a écrit :

> Hi Romain,
>
> No, if you set storeKeepBinary(true), then values will be passed to a
> store in binary format regardless of the withKeepBinary() flag on cache API.
> ​
>


Clarification on binary object cache configuration

2016-01-26 Thread Romain Gilles
Hi Igniters,
I would like a clarification. If I create my cache with the following
option:
config.setStoreKeepBinary(true);
Do I have to use the following call in order to work with BinaryObject?
ignite.cache(cacheName).withKeepBinary()...

Thanks in advance,

Romain


RE: Warning about java.time.Ser

2016-01-26 Thread Andrey Kornev
This warning is a nuisance as is another one about "For best performance you 
should implement java.io.Externalizable for all cache keys and values: 
com.mycompany.MyKey". It should be possible to suppress them (for example, in 
production environment). The system property 
"IGNITE_PERFORMANCE_SUGGESTIONS_DISABLED" could be the right candidate for the 
job. Setting it to "true" should disable them both.

Ignite is being excessively patronizing at runtime (which is a bit too late). 
Better documentation would be more helpful.

Regards
Andrey

> Date: Mon, 25 Jan 2016 03:09:50 -0800
> From: d.lope...@gmail.com
> To: user@ignite.apache.org
> Subject: Warning about java.time.Ser
> 
> Hi,
> 
> We are using Java 8 and when we define a cache that uses some of the new
> classes in the java.time package, so you get the warning: Class
> "java.time.Ser" cannot be written in binary format because it either
> implements Externalizable interface or have writeObject/readObject methods.
> Please...
> 
> I understand the warning and the reason behind it, but it might be better to
> at least move it to debug level for this specific case, or for java.*, as it
> can be a bit confusing for users to be warned about a java standard class...
> that they probably don't even know they are using. To make it even funnier,
> it is an internal serializable delegate that you can't even find in the
> javadocs.
> 
> My 2c
> D.
> 
> 
> 
> --
> View this message in context: 
> http://apache-ignite-users.70518.x6.nabble.com/Warning-about-java-time-Ser-tp2693.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
  

Re: Sql query performance with partitioned caches

2016-01-26 Thread Andrey Nestrogaev
Hi Valentin, 

1. We have partitioned cache "myCache" where store entities like Account(id,
name)
2. key = id e.g. cache.put(1, new Account(1,"account 1"));
3. Assume I execute throuth jdbc query "select * from account where id=1", i
want that query doesn't broadcast on every node.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Sql-query-performance-with-partitioned-caches-tp2700p2734.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Issue while extending out of the box classes

2016-01-26 Thread Saurabh Sharma
Hi,

I am facing issue while trying to extend any out of the box Ignite classes. I 
am trying to extend DataStreamerImpl class and overriding addData(K,V) method 
to do extra processing before saving it to cache.
I did not find bean definitions defined in Bean configuration file except 
Ignite configuration in Ignite.

If I need to extend any bean which has parametrized constructor then I had to 
define that constructor of base class into my child class. I passed constructor 
argument through Bean configuration file.

public CustomStreamer(
   final GridKernalContext ctx,
   @Nullable final String cacheName,
   DelayQueue> flushQ) {
  super(ctx, cacheName, flushQ);
   }



  
  
  


But then it gave error for GridKernalContextImpl class like no default 
constructor defined which got resolved when I extended this class and defined 
parameterized constructor. But then again it contains many objects in 
constructor for which I again have to define beans and constructor arguments.

I wanted to confirm if this is the right approach or am I missing anything here.

Thanks,
Saurabh


Re: Is there a way to get cache metrics for all the nodes in cluster combined

2016-01-26 Thread vinshar
Hi Val,

What Denis mentioned was correct. I got correct number of get / put / size
and eviction after i put a sleep time. so query 1 is resolved. 

You mentioned that 2,3 and 4 are issues which has to be fixed and a new
ticket will be created. I will look forward to the resolution of ticket.

Regarding 5.


5. Currently metrics() method without parameters returns metrics for local
node only, and I agree this is counterintuitive. I think we should calculate
numbers for the whole cluster instead. 




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Is-there-a-way-to-get-cache-metrics-for-all-the-nodes-in-cluster-combined-tp2674p2724.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Is there a way to get cache metrics for all the nodes in cluster combined

2016-01-26 Thread vinshar
Hi Val, 

What Denis mentioned was correct. I got correct number of get / put / size
and eviction after i put a sleep time. so query 1 is resolved. 

You mentioned that 2,3 and 4 are issues which has to be fixed and a new
ticket will be created. I will look forward to the resolution of ticket. 

Regarding 5. 


vkulichenko wrote
> 5. Currently metrics() method without parameters returns metrics for local
> node only, and I agree this is counterintuitive. I think we should
> calculate numbers for the whole cluster instead. 

If i understood correctly then we think that we should call
"cache.metrics(ignite.cluster())" on each call to cache.metrics() for cache
with no data on client node. is that right?
Even if we start returning numbers of whole cluster, there will be no way to
see numbers of just client node cache. 
I understand that most of metrics attributes like "getAverageTxCommitTime"
etc will be zero on client node cache but should't there be some way to get
some basic metrics attributes like total gets, puts etc for these caches?

Regards,
Vinay





--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Is-there-a-way-to-get-cache-metrics-for-all-the-nodes-in-cluster-combined-tp2674p2725.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Can I use the JCache API for distributed caches in Apache Ignite?

2016-01-26 Thread Henrik Lundahl
Hi

I would like to configure a distributed cache with Apache Ignite using the
JCache API (JSR107, javax.cache). Is this possible?

The examples I have found either create a local cache with the JCache API
or create a distributed cache (or datagrid) using the Apache Ignite API.

Here

is the same question on Stack Overflow.


BR

--
Henrik


Re: Sql query performance with partitioned caches

2016-01-26 Thread vkulichenko
Hi Andrey,

The cache is created by the application and it defines on which nodes it's
deployed (all server nodes by default or according to provided node filter).
Also Ignite provides Affinity API that gives you information about data
locality, as well as the ways to collocate data with data and computations
with the data (as in my example above). For more information refer to [1].

In other words, you have a lot of control on where the data is stored and
where the computations are executed. And I can't imagine a use case where
you don't need to broadcast the query, but existing affinity capabilities
doesn't help. If you have such a use case in mind, the example would be
useful.

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

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Sql-query-performance-with-partitioned-caches-tp2700p2727.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Cross join bug for partitioned caches

2016-01-26 Thread vkulichenko
Andrey,

I just provided the general rules on how to design the domain model to get
correct results for SQL queries.

I agree that for cross joins without condition only the second option works.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Cross-join-bug-for-partitioned-caches-tp2694p2728.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


IGNITE-1144

2016-01-26 Thread Neelesh
We are planning to try out ignite at our org and are using it for some
pilot projects. Since we are a SaaS company, we need better control over
job scheduling/load balancing. IgniteQueue looked very promising for most
cases, but I stumbled in to
https://issues.apache.org/jira/browse/IGNITE-1144. Anyone knows if this
will be on the radar soon?

I was also comparing Geode to Ignite, and I love Ignite's documentation,
programming model and hadoop/spark support! Thank you for building a great
product!

Thanks!


Re: Can I use the JCache API for distributed caches in Apache Ignite?

2016-01-26 Thread vkulichenko
Hi Henrik,

JCache allows to provide provider-specific configuration when creating a
cache. I.e., you can do this:

// Get or create a cache manager.
CacheManager cacheMgr = Caching.getCachingProvider().getCacheManager();

// This is an Ignite configuration object
(org.apache.ignite.configuration.CacheConfiguration).
CacheConfiguration cfg = new CacheConfiguration<>();

// Specify cache mode and/or any other Ignite-specific configuration
properties.
cfg.setCacheMode(CacheMode.PARTITIONED);

// Create a cache based on configuration create above.
Cache cache = cacheMgr.createCache("a", cfg);

Also note that partitioned mode is actually the default one in Ignite, so
you are not required to specify it explicitly.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Can-I-use-the-JCache-API-for-distributed-caches-in-Apache-Ignite-tp2726p2731.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.