Re: Streaming test

2017-08-18 Thread Jessie Lin
Hi Val, thank you getting back.  The source type will be different, and the
client will deal with the difference in a preprocess that's unique to that
data source. Once that's done, it'll be ready for a standard
transformation. So we can encapsulate it in a single service or callable.

Thanks for explaining the difference between client and servers. It
clarifies things and make sense.
We wanted to build different type of clients to accommodate the differences
in the data sources.

Does this make sense? what kind of solutions would you suggest?

Jessie



On Fri, Aug 18, 2017 at 3:34 PM, vkulichenko 
wrote:

> If data sources are different, then transformations are different as well,
> no? If so, how are you going to encapsulate them in a single service? I
> would really appreciate a concrete example, it might make this much easier.
> I'm probably missing something now.
>
> Difference between clients and servers is the same is in other systems.
> Servers store data, run services and computations, etc. while clients are
> only used to interact with the cluster.
>
> -Val
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Streaming-test-tp14039p16310.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>


Re: Cache use between client and servers.

2017-08-18 Thread vkulichenko
Correct.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Cache-use-between-client-and-servers-tp16290p16311.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Streaming test

2017-08-18 Thread vkulichenko
If data sources are different, then transformations are different as well,
no? If so, how are you going to encapsulate them in a single service? I
would really appreciate a concrete example, it might make this much easier.
I'm probably missing something now.

Difference between clients and servers is the same is in other systems.
Servers store data, run services and computations, etc. while clients are
only used to interact with the cluster.

-Val



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


Re: 2.1 new feature - warm up the cache / memory

2017-08-18 Thread Marco
Val,
Thanks for the explanation, that makes sense. Now I know you guys are making
a 'hybrid engine',  the new feature is amazing, maybe it's time to request
new ssd drive.
Have a nice day.

-Marco



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/2-1-new-feature-warm-up-the-cache-memory-tp16278p16309.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Confused about QueryEntity configuration

2017-08-18 Thread vkulichenko
JdbcType and QueryEntity configurations are unrelated to each other. The
former configures persistence (i.e. mapping between cache and database),
while the latter configures queryable and indexed fields for Ignite SQL
engine.

It sounds like empNo field is part of value object. If you do not provide
mapping for it in JdbcType#valueFields, then persistence store will not
initialize it and it always be null. I believe this is the reason for your
issue.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Confused-about-QueryEntity-configuration-tp16281p16308.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Spring Bean Injection To IgniteRunnable Implementation

2017-08-18 Thread vkulichenko
First of all, I don't see MetaDataService in the XML. Why do you expect it to
be available?

Second of all, the way you start it, Ignite will not be aware of application
context at all. You need to either provide path to XML directly to
Ignition.start() method, or use IgniteSpring factory class which allows to
provide external context explicitly.

BTW, IgnitionEx is internal class, it is not supposed to be used in your
code.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Spring-Bean-Injection-To-IgniteRunnable-Implementation-tp16275p16307.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: problems in running Ignite examples in cluster.

2017-08-18 Thread vkulichenko
The easiest way to run examples is to open the project in IDE and run
everything from there. If you run PersistentStoreExampleNodeStartup class
instead of using ignite.sh script, everything will work fine.

However, having model classes on server is not a requirement in general
case. I fixed the example in master so that it doesn't require this as well.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/problems-in-running-Ignite-examples-in-cluster-tp16282p16306.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Cache use between client and servers.

2017-08-18 Thread golgoti
Thank you very much val.

This is confirming, using the cache, I suppose we can dramatically reduce the 
serialization workload upon each job.

As I understand it, CacheConfiguration should be configured the same way in 
both Spring config files, Ignition.ignite()then will know exactly where to 
point at ?

From: "vkulichenko [via Apache Ignite Users]" 
Date: Fri, 18 Aug 2017 14:07:14 -0700
To: golgoti
Subject: Re: Cache use between client and servers.

API is fully available within the job, just acquire Ignite instance using 
Ignition.ignite() method. Once done, you can take the cache and get the value.

-Val


If you reply to this email, your message will be added to the discussion below:
http://apache-ignite-users.70518.x6.nabble.com/Cache-use-between-client-and-servers-tp16290p16302.html
To unsubscribe from Cache use between client and servers., click 
here.
NAML




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Cache-use-between-client-and-servers-tp16290p16305.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: 2.1 new feature - warm up the cache / memory

2017-08-18 Thread Denis Magda
Hi Macro,

Val is trying to convey that the memory warmup is an optional operation if the 
Ignite Native Persistence is used. The data will be brought to memory 
automatically while you will be executing specific queries touching specific 
data on disk.

As for the explicit warmup it can be done this way:
https://apacheignite.readme.io/docs/data-loading#section-ignitecacheloadcache

—
Denis

> On Aug 18, 2017, at 11:39 AM, Marco  wrote:
> 
> Hi Val,
> According to your clarification, This new feature somehow looks like a
> background warm-up, if it's not blocking operation, how do we know
> initialization is done and data is ready? when should we start the new data
> process? to be frank, this design feels a bit like the transaction log as to
> RDBMS.
> 
> -Marco
> 
> 
> 
> --
> View this message in context: 
> http://apache-ignite-users.70518.x6.nabble.com/2-1-new-feature-warm-up-the-cache-memory-tp16278p16298.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.



Re: 2.1 new feature - warm up the cache / memory

2017-08-18 Thread vkulichenko
Marco,

It's not a background warmup, there is no explicit warm-up at all. Ignite
starting with 2.0 uses page memory architecture, i.e. data is organized in
pages. Any page can be stored both in memory and on disk, and access to this
page is transparent to client, regardless of where it resides. This means
that when you access it (run a SQL query, for example), Ignite will detect
if it's in memory or not, and fetch into memory if it isn't. When if
everything is on disk (which is the case after cluster restart), you can
still access any data.

>From architecture standpoint, there is indeed a lot in common with
databases. However Ignite follows memory-centric approach rather than
disk-centric, plus it's distributed and scalable.

Makes sense?

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/2-1-new-feature-warm-up-the-cache-memory-tp16278p16303.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Cache use between client and servers.

2017-08-18 Thread vkulichenko
API is fully available within the job, just acquire Ignite instance using
Ignition.ignite() method. Once done, you can take the cache and get the
value.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Cache-use-between-client-and-servers-tp16290p16302.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: JDBC store Date deserialization problem

2017-08-18 Thread vkulichenko
Hi Franck,

Can you attach your configuration and model classes if you have any? I'm
looking at the code and don't see how what you describe can happen. Date is
always written with type flag value 11.

As for store on the client, this is actually a requirement for transactional
caches which update the store from the node that runs transaction. For
atomic caches there is no such requirement, but internal mechanisms work in
the same way. You will have to deploy store implementation everywhere.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/JDBC-store-Date-deserialization-problem-tp16276p16301.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Spring Bean Injection To IgniteRunnable Implementation

2017-08-18 Thread sijusuresh


This is the configuration file

http://www.springframework.org/schema/beans";
xmlns:security="http://www.springframework.org/schema/security";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd";>

  




  






  

  






  

  



How i start the server is ..

Resource igniteConfigResource = new
ClassPathResource("/spring/scheduler.ignite.config.xml");
String igniteConfig =
IOUtils.toString(igniteConfigResource.getInputStream());
igniteConfig = igniteConfig.replaceAll("\\$\\{environment.name\\}",
environmentName);
IgniteConfiguration igniteConfiguration = IgnitionEx.loadConfigurations(new 
ByteArrayInputStream(igniteConfig.getBytes())).get1().iterator().next();
Ignite ignite = Ignition.start(igniteConfiguration);
IgniteServices services = ignite.services(ignite.cluster().forServers());
services.deployClusterSingleton("myClusterSingletonService", new
IgniteSchedulerService());

My Ignite Service class execute method is 

@Override 
public void execute(ServiceContext ctx) throws Exception {
SchedulerFuture fut = ignite.scheduler().scheduleLocal(new
FetchMetadataTask(appContext), "*/5 * * * *");
}



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Spring-Bean-Injection-To-IgniteRunnable-Implementation-tp16275p16300.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Spring Bean Injection To IgniteRunnable Implementation

2017-08-18 Thread vkulichenko
How do you start the server node where this runnable is executed? Does the
configuration contains the required bean?

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Spring-Bean-Injection-To-IgniteRunnable-Implementation-tp16275p16299.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: 2.1 new feature - warm up the cache / memory

2017-08-18 Thread Marco
Hi Val,
According to your clarification, This new feature somehow looks like a
background warm-up, if it's not blocking operation, how do we know
initialization is done and data is ready? when should we start the new data
process? to be frank, this design feels a bit like the transaction log as to
RDBMS.

-Marco



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/2-1-new-feature-warm-up-the-cache-memory-tp16278p16298.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: 答复: problems in test ignite PersistentStore

2017-08-18 Thread vkulichenko
You don't see anything in /ssd folder, because you provided it in
PersistenceStoreConfiguration object which is not even set anywhere. This
code has no effect:

val psc = new PersistentStoreConfiguration
psc.setPersistentStorePath("/ssd")

Actually, Ignite configuration can't be changed in runtime anyway, so it
should be done in XML as part of PersistentStoreConfiguration bean:






-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/problems-in-test-ignite-PersistentStore-tp16244p16297.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Failure to deserialize simple model object

2017-08-18 Thread vkulichenko
Thanks Alexey, that's great!

Looks like we can expect the fix in 2.2.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Failure-to-deserialize-simple-model-object-tp15440p16296.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Customise persistent store

2017-08-18 Thread vkulichenko
This means that pages will never be evicted from memory (actually, this is
default behavior). But the data will still be persisted on disk.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Customise-persistent-store-tp16260p16295.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: 2.1 new feature - warm up the cache / memory

2017-08-18 Thread vkulichenko
Just to clarify: data will not be fetch into in-memory cache right away after
cluster restart. But it will be available for any IgniteCache operations,
including queries. Data will lazily loaded into memory while these
operations are executed.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/2-1-new-feature-warm-up-the-cache-memory-tp16278p16294.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Streaming test

2017-08-18 Thread Jessie Lin
We'd like to take either input from streaming or a cache to do some
transformation and insert data into another cache.
Because the input could be different types, I thought I could encapsulate
the transformation and just let a client to call it.

The difference between client and server in Ignite isn't very clear to me,
to be honest :)
One thing I can think of is client doesn't hold data. But I don't know the
difference in terms of computation.

Jessie


On Thu, Aug 17, 2017 at 3:56 PM, vkulichenko 
wrote:

> What does business logic do exactly? Is it supposed to be executed on
> server
> or client side?
>
> Can you give an example?
>
> -Val
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Streaming-test-tp14039p16270.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>


Questions about "ignite-indexing"

2017-08-18 Thread Chris Berry
Hi,

I have a few questions about efficiency and the “ignite-indexing” module…
(Sorry, I asked this inside another thread, but wanted to surface it as
first-class questions)

I have the following code. Which is clearly inefficient.

    public Set getCacheKeys() { 
        String tableName = valueClass.getSimpleName(); 
        SqlFieldsQuery qry = new SqlFieldsQuery("select _key from " +
tableName); 
        Collection> res =
 igniteCacheHandle.query(qry).getAll(); 

        Set keys = new HashSet<>(); 
        for(List row : res) { 
            keys.add((TKey)row.get(0)); 
        } 
        return keys; 
    } 

Using a SqlFieldsQuery. 

And I use it like this: 

    public List findMatches(SearchTerms searchTerms) { 
        Map map = cache.getAll(cache.getCacheKeys()); 
        return matchingStrategy.match(map, searchTerms); 
    } 

I wanted to get something working – which it is.
But it is clearly inefficient (get all the Keys, to get all the Entries, to
create a local Map)
And my perf-tests validate that this is not the best way to accomplish this.
(Even though this is a relatively small cache) 

So. I have a few questions. 

1) I have only one REPLICATED cache – out of many caches -- that I need to
do a Query against. 
The rest are all used as simple KV stores. 

Have I introduced an inefficiency by introducing the ignite-indexing
module?? 
Is there a way to use it ONLY for 1 cache?? 

Or is indexing always present, and I have just now become aware of it?? 
(This seems unlikely since the H2 DB issue I encountered when I introduced
“ignite-indexing” should have bitten me sooner??) But, of course, some form
of index must be there to allow the K/V lookup...

2) Would it be more efficient to use a ScanQuery above?? 
Or is the SqlFieldsQuery roughly equivalent?? 

NOTE: I assume to do this whole thing more efficiently I would
use a ScanQuery with a Filter?? 
Which would eliminate the need for the interim copies. 
Is that correct??

3) I am using:  igniteConfig.setMarshaller(new BinaryMarshaller())  --
paired with:  cache.withKeepBinary() 
Do I need to do anything special in this case?? 
Presently it seems not?? 

NOTE:  I am using only this: igniteCacheConfig.setIndexedTypes(keyClass,
valueClass); 
And it all is working as expected. 
Still. If I used IgniteBiPredictae would it be more efficient?? 

Thanks,
-- Chris  




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Questions-about-ignite-indexing-tp16292.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: 2.1 new feature - warm up the cache / memory

2017-08-18 Thread Alexey Kukushkin
Hi, 

With persistence enabled the data must be in the cache after the cluster
restart. Can you double check your application or may be share it for
review?

"Warming up" data with persistence enabled makes sense only if not all data
first into memory and you really want to force some specific data into
memory. It looks your problem is you do not see data at all and that is not
normal.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/2-1-new-feature-warm-up-the-cache-memory-tp16278p16291.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Cache use between client and servers.

2017-08-18 Thread golgoti
Hi all,

I try to read all I can about the Ignite cache, but I'm still not quite sure
how to handle it accurately. Then, I ask for advice here, and I'm new to
Ignite as well. Then, please bear with me ;).

My use case : I do have a client and 2 nodes (servers, standalone). I want
to execute some stuff on servers using ComputeJobAdapter. Cache is
configured the same manner into the 2 XML Spring config.

Client (clientMode set to ON in XML config):
Ignite ignite = Ignition.getOrStart(igniteConfiguration);
IgniteCache cache = ignite.getOrCreateCache(CACHE_NAME)
cache.put("1",1)

Server: (clientMode = OFF)
ComputeTaskAdapter : do some stuff

Q : how can I get back my value 1 from cache in the server side,
ComputeTaskAdapter , if possible.
Maybe the cache cannot be used through both clients and servers ?

Thank you very much, any help appreciated.





--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Cache-use-between-client-and-servers-tp16290.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: problems in running Ignite examples in cluster.

2017-08-18 Thread slava.koptilin
Hello!

It seems that ignite-example-{version}.jar is not included into CLASSPATH
variable.

In order to build ignite-example-{version}.jar, please go to the
{apache-ignite}/examples/ directory
and execute the following command: mvn clean package -DskipTests
Once the jar file successfully built, copy ignite-example-{version}.jar to
the {apache-ignite}/libs directory.


Regards,
Slava.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/problems-in-running-Ignite-examples-in-cluster-tp16282p16289.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: problems in running Ignite examples in cluster.

2017-08-18 Thread Alexey Kukushkin
Hi, did you set USER_LIBS on the client side only? You have to set USER_LIBS
on the server side. Let me know if it did not work.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/problems-in-running-Ignite-examples-in-cluster-tp16282p16288.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Ignite 2.1 with Karaf 4.1.2

2017-08-18 Thread Denis Mekhanikov
Hi Devis!

Could you please clarify, what doesn't work and how does it show up? I
would really appreciate if you provide steps to reproduce your problem with
expected and actual behavior.

Thanks!

Denis.

пт, 11 авг. 2017 г. в 18:54, devis76 :

> Hi guys,
> i'm testing with Ignite 2.1 with Karaf 4.1.2.
>
> "Feature install ignite" doesn't works for me like was with Ignite 1.7.
>
> The problem is with ignite-indexing, other bundles works fine.
>
> I have modify your ignite-indexing manifest and i have installed manually
> 213 │ Active   │  80 │ 1.4.196   │ H2 Database Engine
> 216 │ Active   │  80 │ 5.5.2.1│ Apache ServiceMix :: Bundles ::
> lucene-analyzers-common
> 217 │ Active   │  80 │ 5.5.2.1│ Apache ServiceMix :: Bundles ::
> lucene-queries
> 218 │ Active   │  80 │ 5.5.2.1│ Apache ServiceMix :: Bundles ::
> lucene-core
> 219 │ Active   │  80 │ 2.1.0  │ ignite-indexing  ->  Your
> default works like Fragment-hosts but
> H2 1.4.x can works in fragment with lucene-5.5.x. I suggest you to use
> ServiceMix osgify works like a sharm.
>
> in this way now works.
> Regards
> Devis
>
>
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Ignite-2-1-with-Karaf-4-1-2-tp16140.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>


Re: Confused about QueryEntity configuration

2017-08-18 Thread franck102
After some experimentation I have one answer, and more questions :)

I guess QueryEntity.keyType is only used to identify which objects will be
considered in the queries - I had forgotten that a cache can contain objects
of multiple types.

I am still struggling to configure queries for a JDBC store though. With
this store configuration:



...and this QueryEntity:



... running 
returns the expected number of results, but the single value inside the
result is null.

If I copy the JdbcTypeField from keyFields and add it to valueFields then
the query works as expected... so question is, are SQL field queries only
able to extract values from valueFields?

I also wonder what the aliases are for? I would prefer to use "SELECT empNo
..." in my queries, but I can't figure out how to configure that?

Thanks!
Franck



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Confused-about-QueryEntity-configuration-tp16281p16286.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Customise persistent store

2017-08-18 Thread daivanov
Maybe I could turn off eviction for some caches by setting
memoryConfiguration with properties like  












Could it help?



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Customise-persistent-store-tp16260p16285.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Customise persistent store

2017-08-18 Thread Alexey Kukushkin
Hi, unfortunately presently you have no way to exclude a cache from being
persisted if persistence is enabled. Configuring cache store will not
disable persistence. Please wait for IGNITE-6030 to be implemented. Also,
are you sure not persisting some particular cache is critical for you? Do
you have performance issues?

On Fri, Aug 18, 2017 at 3:27 PM, daivanov  wrote:

> Hi. I have one more question. If I set CacheStore which do nothing with
> configuration.setCacheStoreFactory method to all caches with I don't want
> persisit into Ignite strorage, can it help?
> Maybe there is some special property?
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Customise-persistent-store-tp16260p16283.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Best regards,
Alexey


Re: Customise persistent store

2017-08-18 Thread daivanov
Hi. I have one more question. If I set CacheStore which do nothing with
configuration.setCacheStoreFactory method to all caches with I don't want
persisit into Ignite strorage, can it help?
Maybe there is some special property?



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Customise-persistent-store-tp16260p16283.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


problems in running Ignite examples in cluster.

2017-08-18 Thread 罗 辉
hello there

 I got classpath problems to run the examples in my cluster.

 I'm trying to run 
examples.(https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/persistentstore/PersistentStoreExampleNodeStartup.java)
 in my cluster with following command:


"bin/ignite.shexamples/config/persistentstore/example-persistent-store.xml"

,then I got this exception:

[root@dserver1ignite]# bin/ignite.sh 
examples/config/persistentstore/example-persistent-store.xml
class org.apache.ignite.IgniteException: Failed to instantiate Spring XML 
application context (make sure all classes used in Spring configuration are 
present at CLASSPATH) 
[springUrl=file:/data/disk01/huzongxing/ignite/examples/config/persistentstore/example-persistent-store.xml]
at 
org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:957)
at org.apache.ignite.Ignition.start(Ignition.java:350)
at 
org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:302)

Caused by: java.lang.ClassNotFoundException: 
org.apache.ignite.examples.model.Organization
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:250)
at 
org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:284)
... 40 more
Failed to start grid: Failed to instantiate Spring XML application context 
(make sure all classes used in Spring configuration are present at CLASSPATH) 
[springUrl=file:/data/disk01/huzongxing/ignite/examples/config/persistentstore/example-persistent-store.xml]
Note! You may use 'USER_LIBS' environment variable to specify your classpath.

I tried to set various  'USER_LIBS' settings ,however none of them worked. Is 
there a guide to to start my ignite node with this class correctly? Should I 
compile Ignite via maven so that the dependencies included in the jar?

Any ideas are welcome~!



Confused about QueryEntity configuration

2017-08-18 Thread franck102
Hi all,

Despite reading the doc many times I can't quite figure out how SQL queries
should be configured. In particular what is query.keyType used for in that
context?
The key type doesn't seem to have any impact on what SQL queries I can
execute on the cache?
Does it simply have to match the cache key type for things to work
internally?

Say for example I have this (pseudo-code) CacheConfiguration:


... what can I / should I use for a keyType in the QueryEntities I define on
the cache? And what will the impact be on the SQL queries I can execute
agains the cache?

Thanks!
Franck




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Confused-about-QueryEntity-configuration-tp16281.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Failure to deserialize simple model object

2017-08-18 Thread kukushal .
This is a suggested fix:
https://reviews.ignite.apache.org/ignite/review/IGNT-CR-269

On Fri, Aug 18, 2017 at 12:15 PM, kukushal . 
wrote:

> I am fixing this issue: https://issues.apache.org/jira/browse/IGNITE-5966?
> filter=-1
> Reviewing it with Vladimir Ozerov and Sergey Chugunov:
> --
> ПРОБЛЕМА
> “get” не работает для данных загруженных из cache store
> ROOT CAUSE
> There two separate type information stores: metadata store backed by the
> file system and binary marshaller’s “type ID -> type name” store. Binary
> marshaller use the latter one when deserialising objects.
> BinaryObjectBuilderImpl used by the CacheJdbcPojoStore updates only
> metadata store but not the marshaller mappings cache. Thus we get this
> issue described in the ticket.
> SOLUTION
> Update BinaryObjectBuilderImpl to add type mapping to the marshaller cache.
>
> On Fri, Aug 18, 2017 at 1:41 AM, Valentin Kulichenko <
> valentin.kuliche...@gmail.com> wrote:
>
>> Guys,
>>
>> Does anyone has ideas?
>>
>> -Val
>>
>> On Mon, Aug 14, 2017 at 4:33 PM, Valentin Kulichenko <
>> valentin.kuliche...@gmail.com> wrote:
>>
>>> Cross-posting to dev
>>>
>>> Folks,
>>>
>>> I'm confused by the issue discussed in this thread.
>>>
>>> Here is the scenario:
>>> - Start server node with a cache with POJO store configured. There is
>>> one type declared, read-through enabled.
>>> - Start client node and execute get() for a key that exists in
>>> underlying DB.
>>> - During deserialization on the client, 'Requesting mapping from grid
>>> failed for' exception is thrown.
>>>
>>> Specifying the type explicitly in BinaryConfiguration solves the issue,
>>> and I think I understand technical reasons for this. But is this really
>>> expected? Is it possible to fix the issue without requiring to provide this
>>> configuration?
>>>
>>> I thought we do not require to provide types in configuration as long as
>>> there is only one platform involved, am I wrong? If yes, we need to
>>> identify scenarios when this documentation is required and document them.
>>>
>>> -Val
>>>
>>> On Mon, Aug 14, 2017 at 4:23 AM, franck102  wrote:
>>>
 My bad, here is the whole project.

 Franck ignite-binary-sample.zip
 



 --
 View this message in context: http://apache-ignite-users.705
 18.x6.nabble.com/Failure-to-deserialize-simple-model-object-
 tp15440p16158.html
 Sent from the Apache Ignite Users mailing list archive at Nabble.com.

>>>
>>>
>>
>
>
> --
> Best regards,
> Alexey
>



-- 
Best regards,
Alexey


Re: Failure to deserialize simple model object

2017-08-18 Thread kukushal .
I am fixing this issue:
https://issues.apache.org/jira/browse/IGNITE-5966?filter=-1
Reviewing it with Vladimir Ozerov and Sergey Chugunov:
--
ПРОБЛЕМА
“get” не работает для данных загруженных из cache store
ROOT CAUSE
There two separate type information stores: metadata store backed by the
file system and binary marshaller’s “type ID -> type name” store. Binary
marshaller use the latter one when deserialising objects.
BinaryObjectBuilderImpl used by the CacheJdbcPojoStore updates only
metadata store but not the marshaller mappings cache. Thus we get this
issue described in the ticket.
SOLUTION
Update BinaryObjectBuilderImpl to add type mapping to the marshaller cache.

On Fri, Aug 18, 2017 at 1:41 AM, Valentin Kulichenko <
valentin.kuliche...@gmail.com> wrote:

> Guys,
>
> Does anyone has ideas?
>
> -Val
>
> On Mon, Aug 14, 2017 at 4:33 PM, Valentin Kulichenko <
> valentin.kuliche...@gmail.com> wrote:
>
>> Cross-posting to dev
>>
>> Folks,
>>
>> I'm confused by the issue discussed in this thread.
>>
>> Here is the scenario:
>> - Start server node with a cache with POJO store configured. There is one
>> type declared, read-through enabled.
>> - Start client node and execute get() for a key that exists in underlying
>> DB.
>> - During deserialization on the client, 'Requesting mapping from grid
>> failed for' exception is thrown.
>>
>> Specifying the type explicitly in BinaryConfiguration solves the issue,
>> and I think I understand technical reasons for this. But is this really
>> expected? Is it possible to fix the issue without requiring to provide this
>> configuration?
>>
>> I thought we do not require to provide types in configuration as long as
>> there is only one platform involved, am I wrong? If yes, we need to
>> identify scenarios when this documentation is required and document them.
>>
>> -Val
>>
>> On Mon, Aug 14, 2017 at 4:23 AM, franck102  wrote:
>>
>>> My bad, here is the whole project.
>>>
>>> Franck ignite-binary-sample.zip
>>> >> ignite-binary-sample.zip>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://apache-ignite-users.705
>>> 18.x6.nabble.com/Failure-to-deserialize-simple-model-object-
>>> tp15440p16158.html
>>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>>
>>
>>
>


-- 
Best regards,
Alexey


2.1 new feature - warm up the cache / memory

2017-08-18 Thread kane
How to config to warm up the cache automatically after restart the cluster


my case:

1, data loaded into IgniteCache

2, restart the cluster

3, expect data to be re-loaded into the IgniteCache, but it doesn't. 

But I can see the wal log file and caches folder with specific cache name
has been created under &IGNITE_HOME/work

Has done following configurations in the ignite config xml.


















java.lang.String
xxx.xxx.xxx
















--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/2-1-new-feature-warm-up-the-cache-memory-tp16278.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: JDBC store Date deserialization problem

2017-08-18 Thread franck102
Here is a related issue: if I install a custom JdbcTypesTransformer on my
JDBC store, I have to make that transformer class available on client nodes
- else discovery fails with the exception below.

It would be nice if client nodes didn't have to have dependencies on cache
store implementations, you would expect a client to never have to deal with
the cache store?

Franck

org.apache.ignite.IgniteCheckedException: Failed to find class with given
class loader for unmarshalling (make sure same versions of all classes are
available on all nodes or enable peer-class-loading)
[clsLdr=sun.misc.Launcher$AppClassLoader@18b4aac2,
cls=com.fico.dmp.data.registry.jdbc.DateAwareTransformer]
at
org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal0(JdkMarshaller.java:124)
at
org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:94)
at
org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal0(JdkMarshaller.java:143)
at
org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:82)
at
org.apache.ignite.spi.discovery.tcp.internal.DiscoveryDataPacket.unmarshalData(DiscoveryDataPacket.java:274)
at
org.apache.ignite.spi.discovery.tcp.internal.DiscoveryDataPacket.unmarshalGridData(DiscoveryDataPacket.java:117)
at
org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.onExchange(TcpDiscoverySpi.java:1820)
at
org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.processNodeAddFinishedMessage(ClientImpl.java:1985)
at
org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.processDiscoveryMessage(ClientImpl.java:1864)
at
org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.body(ClientImpl.java:1758)
at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
Caused by: java.lang.ClassNotFoundException:
com.fico.dmp.data.registry.jdbc.DateAwareTransformer
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at
org.apache.ignite.internal.util.IgniteUtils.forName(IgniteUtils.java:8465)
at
org.apache.ignite.marshaller.jdk.JdkMarshallerObjectInputStream.resolveClass(JdkMarshallerObjectInputStream.java:54)
at 
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1819)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1713)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1986)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535)
at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2231)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2155)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2013)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535)
at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2231)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2155)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2013)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535)
at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2231)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2155)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2013)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:422)
at java.util.HashMap.readObject(HashMap.java:1404)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1058)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2122)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2013)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535)
at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2231)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2155)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2013)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535)
 

JDBC store Date deserialization problem

2017-08-18 Thread franck102
Hi all,

I am using a JDBC store with storeKeepBinary enabled, and getting a single
value that has a SQL date column. The JdbcTypeField for that column has
javaFieldType == java.util.Date.

The  JdbcTypesDefaultTransformer however return java.sql.Date as a value for
the field:



As a result the BinaryObjectBuilder writes that field using the optimized
marshaller (type id -2); and on the client side deserialization fails
because the readers expects typeId=11 for that field (java.util.Date).

I can't use java.sql.Date in my Pojo (it is used in other non-SQL stores)...
shouldn't the transformer be improved to create a java.util.Date value?

Thanks,
Franck



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/JDBC-store-Date-deserialization-problem-tp16276.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.