Re: Serialization problem when combining Spring boot (hateoas) with Ignite

2018-01-31 Thread Pim D
Hi Andrew,

Indeed, I've changed the lambda / anonymous class with field to become an
actual class.
This fixed one of the problems.
The other problem is more of a design issue: CacheStoreAdapters are part of
the CacheConfiguration that is being exchanged between nodes. This basically
requires nodes to have this CacheStoraAdapter on it's classpath, even though
the nodes don't use them. :(



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


Re: Serialization problem when combining Spring boot (hateoas) with Ignite

2018-01-31 Thread Pim D
UPDATE:

I've created an implementation for the IgnitePredicate which is
available on both sides (client/server node).
This solved the serialization issue with the CacheConfiguration.

Next problem:
The cache store adapter backing one of the caches, is not known by the
client (and I don't want this dependency in the client either).
The design of Ignite regarding this part bothers me.
I guess to only solution left is to let an IgniteService do the continuous
queries and stream the events using React... :(




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


Re: Serialization problem when combining Spring boot (hateoas) with Ignite

2018-01-31 Thread Pim D
P.s. the stacktrace when using a static method as proposed by Val:
Classes:

public class WaxPhantomDataActivator implements LifecycleBean {
@IgniteInstanceResource
private Ignite grid;
private IgnitePredicate filter =
FlipperkastCluster.spookhuis().data().nodeFilter();
@Override
public void onLifecycleEvent(LifecycleEventType event) throws
IgniteException {
if (event == LifecycleEventType.AFTER_NODE_START) {
if (filter.apply(grid.cluster().localNode())) {
grid.getOrCreateCache(new
WaxPhantomCacheConfiguratie<>(filter));
}
}
}
}

public class WaxPhantomCacheConfiguratie extends
FlipperkastCacheConfiguratie {

public static final String NAAM = "WaxPhantom";

public WaxPhantomCacheConfiguratie() {
this(null);
}

public WaxPhantomCacheConfiguratie(IgnitePredicate filter)
{
super(filter);
setName(NAAM);
}
}

Stacktrace:

Caused by: org.apache.ignite.IgniteCheckedException: Failed to serialize
object: CacheConfiguration [name=WaxPhantom, grpName=null, memPlcName=null,
storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
rebalanceTimeout=1, evictPlc=null, onheapCache=true, evictFilter=null,
eagerTtl=true, dfltLockTimeout=0, nearCfg=null, writeSync=PRIMARY_SYNC,
storeFactory=null, storeKeepBinary=false, loadPrevVal=false, aff=null,
cacheMode=PARTITIONED, atomicityMode=ATOMIC, backups=0, invalidate=false,
tmLookupClsName=null, rebalanceMode=ASYNC, rebalanceOrder=0,
rebalanceBatchSize=524288, rebalanceBatchesPrefetchCnt=2,
maxConcurrentAsyncOps=500, sqlIdxMaxInlineSize=-1, writeBehindEnabled=false,
writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
writeBehindCoalescing=true, maxQryIterCnt=1024, affMapper=null,
rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
longQryWarnTimeout=3000, qryDetailMetricsSz=0, readFromBackup=true,
nodeFilter=nl.donna.workshop.ignite.flipperkast.api.cluster.FlipperkastCluster$2@17f6ab76,
sqlSchema=null, sqlEscapeAll=false, cpOnRead=true, topValidator=null,
partLossPlc=IGNORE, qryParallelism=1]




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


Re: Serialization problem when combining Spring boot (hateoas) with Ignite

2018-01-31 Thread Pim D
UPDATE:

Wiring the application context instead of the bean helped solve the problem
in exchanging the cahce configuration (and it's cachestoreadapter).

Now I'm only stuck on this when I exclude the jars which the client should
not have knowledge of: 
Caused by: java.lang.ClassCastException: cannot assign instance of
java.lang.invoke.SerializedLambda to field
org.apache.ignite.configuration.CacheConfiguration.nodeFilter of type
org.apache.ignite.lang.IgnitePredicate in instance of
org.apache.ignite.configuration.CacheConfiguration

At first I used this property to set the node filter which resulted in an
unsuccesfull serialization attempt by Ignite on the static method :
private IgnitePredicate filter =
FlipperkastCluster.backbox().data().nodeFilter();

Thus I changed this to:
private IgnitePredicate filter = ClusterNode ->
FlipperkastCluster.backbox().data().nodeFilter().apply(ClusterNode);
And now the client receives an SerializedLambda which can not be resolved.

So how should I do this



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


Re: Serialization problem when combining Spring boot (hateoas) with Ignite

2018-01-31 Thread Pim D
UPDATE:

I guess my issue is related to
http://apache-ignite-users.70518.x6.nabble.com/Client-requires-DataSource-bean-configuration-copy-td15491.html

My caches are ATOMIC and because I want to externalize my datasource
configuration (by making it a Spring bean), I have issues now.

So how can I avoid the client from getting confronted with this cache
configuration?
Should I move my continuous queries to a service in a node and let that
service provide a flux (Reactive)?
Should I wire the spring context instead of the bean and look it up when
needed (client should not need it)?



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


Re: Serialization problem when combining Spring boot (hateoas) with Ignite

2018-01-31 Thread Pim D
Logging of the client (which should not create the cache, yet somehow it gets
instructed to create the cache on the client node)

2018-01-31T11:15:58.424 INFO  [BackboxPlayerScoreController] - Createdsabled
(to enable configure any GridCheckpointSpi implementation)
2018-01-31T11:15:58.900 WARN  [BinaryContext] - Class
"com.fasterxml.jackson.core.io.SerializedString" cannot be serialized using
BinaryMarshaller because it either implements Externalizable interface or
have writeObject/readObject methods. OptimizedMarshaller will be used
instead and class instances will be deserialized on the server. Please
ensure that all nodes have this class in classpath. To enable binary
serialization either implement Binarylizable interface or set explicit
serializer using BinaryTypeConfiguration.setSerializer() method.
2018-01-31T11:15:58.928 WARN  [BinaryContext] - Class
"com.fasterxml.jackson.databind.util.LRUMap" cannot be serialized using
BinaryMarshaller because it either implements Externalizable interface or
have writeObject/readObject methods. OptimizedMarshaller will be used
instead and class instances will be deserialized on the server. Please
ensure that all nodes have this class in classpath. To enable binary
serialization either implement Binarylizable interface or set explicit
serializer using BinaryTypeConfiguration.setSerializer() method.
2018-01-31T11:15:59.380 INFO  [HighScoreDispatcher] - Geabonneerd op high
score updates
2018-01-31T11:15:59.513 INFO  [MessageDispatcher] - Geabonneerd op message
updates
2018-01-31T11:15:59.532 ERROR [GridCachePartitionExchangeManager] - Failed
to process custom exchange task: ClientCacheChangeDummyDiscoveryMessage
[reqId=98b5ab8a-0822-4617-a477-c710f962df9f, cachesToClose=null,
startCaches=[PlayerScores]]
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'playerScoreDS' available
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:687)
~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1207)
~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)
~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1080)
~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at
org.apache.ignite.internal.processors.resource.GridResourceSpringBeanInjector.getBeanByResourceAnnotation(GridResourceSpringBeanInjector.java:120)
~[ignite-spring-2.3.0.jar:2.3.0]
at
org.apache.ignite.internal.processors.resource.GridResourceSpringBeanInjector.inject(GridResourceSpringBeanInjector.java:64)
~[ignite-spring-2.3.0.jar:2.3.0]
at
org.apache.ignite.internal.processors.resource.GridResourceIoc$ClassDescriptor.injectInternal(GridResourceIoc.java:440)
~[ignite-core-2.3.0.jar:2.3.0]
at
org.apache.ignite.internal.processors.resource.GridResourceIoc$ClassDescriptor.inject(GridResourceIoc.java:470)
~[ignite-core-2.3.0.jar:2.3.0]
at
org.apache.ignite.internal.processors.resource.GridResourceProcessor.inject(GridResourceProcessor.java:278)
~[ignite-core-2.3.0.jar:2.3.0]
at
org.apache.ignite.internal.processors.resource.GridResourceProcessor.inject(GridResourceProcessor.java:248)
~[ignite-core-2.3.0.jar:2.3.0]
at
org.apache.ignite.internal.processors.resource.GridResourceProcessor.injectGeneric(GridResourceProcessor.java:229)
~[ignite-core-2.3.0.jar:2.3.0]
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepare(GridCacheProcessor.java:537)
~[ignite-core-2.3.0.jar:2.3.0]
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepare(GridCacheProcessor.java:526)
~[ignite-core-2.3.0.jar:2.3.0]
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1342)
~[ignite-core-2.3.0.jar:2.3.0]
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1799)
~[ignite-core-2.3.0.jar:2.3.0]
at
org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.processClientCacheStartRequests(CacheAffinitySharedManager.java:428)
~[ignite-core-2.3.0.jar:2.3.0]
at
org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.processClientCachesChanges(CacheAffinitySharedManager.java:611)
~[ignite-core-2.3.0.jar:2.3.0]
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.processCustomExchangeTask(GridCacheProcessor.java:338)
~[ignite-core-2.3.0.jar:2.3.0]
at

Re: Serialization problem when combining Spring boot (hateoas) with Ignite

2018-01-31 Thread Pim D
UPDATE:
I've put all my classes on the classpath of the client.
Now I get a different issue.
One of the caches in the grid has a CacheStoreAdapter which requires a
SpringResource which is not available on the client.
The client does not create this cache (lookup by name), the server data
nodes do this.
Bit puzzled why the client is confronted with the cache configuration.



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


Re: Serialization problem when combining Spring boot (hateoas) with Ignite

2018-01-31 Thread Pim D
Hi Val,

This nodeFilter is in fact created from a static utility class.
However I had to provide the lambda
(IgnitePredicate) because Ignite could not
serialiize the static method.

What I find strange is that the cache configurations in the grid are
communicated to a client node.
And if this is normal, how can it be that the ignite classes
(IgnitePredicate which extends Serializable) can not be
serialized?



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


Re: Serialization problem when combining Spring boot (hateoas) with Ignite

2018-01-31 Thread Pim D
Hi Amir,


Regarding your questions:
1) Clients are not able to communicatie with the nodes in the grid, none of
the ignite messages can be deserialized by the client.
2) The project is to big to share for reproduction, but I try to provide the
relevant parts.
Server(s):

@Bean
@Scope(BeanDefinition.SCOPE_SINGLETON)
@DependsOn(value = "playerScoreDS")
public Ignite getIgnite() throws IgniteCheckedException {
Map attr = new HashMap<>();
attr.put(ClusterUtils.GROEP,groepen);
FlipperkastClusterConfiguratie conf = new
FlipperkastClusterConfiguratie();
conf.setUserAttributes(attr);
conf.setAddresses(servers);
conf.setLifecycleBeans(
new NodeCacheEventListener()
,new PlungerActivator()
,new GootActivator()
,new WaxPhantomActivator()
,new PescadoDiabolicoActivator()
,new BackboxActivator()
,new BackboxAccessActivator()
);
return IgniteSpring.start(conf,context);
}

Client:

@Bean
public IgniteConfiguration getIgniteConfiguratie() {
FlipperkastClusterConfiguratie conf = new
FlipperkastClusterConfiguratie(); // (has peerClassloading disabled and the
log4j2 logger and Ignite Home set to the folder where the application is
started)
conf.setIgniteInstanceName(naam);
conf.setClientMode(true);
Map> attr = new HashMap<>();
attr.put(ClusterUtils.GROEP,groepen);
conf.setUserAttributes(attr);
conf.setAddresses(servers);
return conf;
}

@Bean
public Ignite getIgnite() throws IgniteCheckedException {
if (client == null) {
synchronized (this) {
if (client == null) {
FlipperkastClusterConfiguratie conf = new
FlipperkastClusterConfiguratie();
conf.setIgniteInstanceName(naam);
conf.setClientMode(true);
Map> attr = new HashMap<>();
attr.put(ClusterUtils.GROEP, groepen);
conf.setUserAttributes(attr);
conf.setAddresses(servers);
client = IgniteSpring.start(conf, context);
}
}
}
return client;
}

3) The project is to big to share for reproduction.
It requires various frameworks.





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


Re: Serialization problem when combining Spring boot (hateoas) with Ignite

2018-01-30 Thread Pim D
Update:
Not quite sure if this is the problem but the issue is with client nodes.
I have peer class loading disabled and the client is also logging unknown
classes of Ignite lifecyclebeans which are present on server nodes (but
definitely NOT on client nodes).

This behaviour seems really awkward to me.





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


Serialization problem when combining Spring boot (hateoas) with Ignite

2018-01-30 Thread Pim D
Hi,

I'm encountering an issue when I start an ignite client inside a spring boot
app (with hate-aos).
It seems as if there are classloader or marshalling conflicts between both
frameworks.
Can anyone confirm (or even better: a clue on how to solve this?):




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


Re: CacheStoreAdapter write and delete are not being called by Ignite's GridCacheStoreManager

2018-01-26 Thread Pim D
Hi Slava,

Guess I overlooked that part, thanx!



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


Re: When is CacheStoreAdapter sessionEnd method called?

2018-01-20 Thread Pim D
How did you guys managed to get this working?
My sessionEnd is not called either (nor are write and delete).
Details:
http://apache-ignite-users.70518.x6.nabble.com/CacheStoreAdapter-write-and-delete-are-not-being-called-by-Ignite-s-GridCacheStoreManager-td19624.html



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


RE: CacheStoreAdapter not getting called on cache operation.

2018-01-20 Thread Pim D
Hi,

I'm experiencing the same problem (with write-behind set to false).
Were you able to identify the problem?

http://apache-ignite-users.70518.x6.nabble.com/CacheStore-example-for-partitioned-cache-backed-with-a-postgres-database-td19624.html

  



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


DataStreamer does not persist in cache when a receiver is set

2018-01-20 Thread Pim D
Hi,

I have created a datastreamer that will stream data from a database to my
cache.
This works very nice, untill...
... I include a StreamTransformer in the data streamer.
When the transformer is set, nothing gets stored in the cache?!?

In a simple example my transformer extends the StreamTransformer and
implements process:
@Override
public Object process(MutableEntry entry, Object...
arg) throws EntryProcessorException {
if (log.isDebugEnabled())
log.debug("Laad " + entry.getKey() + " in de cache");
if (arg.length==1 && arg[0] instanceof HighScore) {
// Transformeer stream argument naar het cache object en zet
deze
entry.setValue((Integer) arg[0]);
}
return arg[0];
}

Eventually I would really like to transform the object read from the
database to a new object which corresponds with my cache value object (basic
ETL).
But for now I first need to get the Streamer to work properly.
Any clues why this is not working?



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


CacheStore example for partitioned cache backed with a postgres database

2018-01-20 Thread Pim D
Hi,

I can't seem to find a good example on how to implement a CacheStoreAdapter
that also writes cache updates to a postgres database.

I've tried the standaard CacheJdbcStoreFactory, yet it does not write the
updates (even with read and write through set to true and WAL disabled).
I've created my own implementation of de CacheStoreAdapter and load(key) is
being called (and working), but Ignite does not call the write nor the
delete actions of the store.

I've been looking at the cassandra example, but that one is way more complex
and seems to require a lot more than I need (and thus adds even more
complexity).

Many thanks in advance,
Pim



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


Re: Prefer ignite nodes on same Availability Zone

2017-10-07 Thread Pim D
Have a look at the clustergroup feature of Ignite.
This feature can be used widely (computation, data).
Also interesting: AffinityKey and AffinityKeyFunction.




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


Re: Ignite Web Console login?

2017-10-07 Thread Pim D
Hi,

Unfortunately, creating a new account does not seem to work with de Web
Console provided in the Docker image by Apache.
I get a connection refused on http://localhost/api/v1/user/ when filling the
signup form (on http://locahost/).
@ Apache documentation I could not find any information on the accounts.
Also funny localhost is reachable, 127.0.0.1 or my actuall ip adres is
not...



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


Re: SqlQuery results missing

2017-10-07 Thread Pim D
Ok, I found the problem.
CacheConfiguration.setIndexTypes(a1,a2,...) requires pairs of type key.class
and value.class.
I used String.class for key while I should have been using
AffinityKey.class. 



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


Re: SqlQuery results missing

2017-10-05 Thread Pim D
Hi,

No, not executed locally (would not work either because of client mode).

Here the output generated during the test against 5 nodes in docker
containers having 2 caches where I'm only searching through
'sectie-passage':

[17:40:14] Quiet mode.
[17:40:14]   ^-- To see **FULL** console log here add
-DIGNITE_QUIET=false or "-v" to ignite.{sh|bat}
[17:40:14]
[17:40:14] OS: Windows 10 10.0 amd64
[17:40:14] VM information: Java(TM) SE Runtime Environment 1.8.0_121-b13
Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.121-b13
[17:40:14] Initial heap size is 128MB (should be no less than 512MB, use
-Xms512m -Xmx512m).
[17:40:14] Configured plugins:
[17:40:14]   ^-- None
[17:40:14]
[17:40:23] Message queue limit is set to 0 which may lead to potential
OOMEs when running cache operations in FULL_ASYNC or PRIMARY_SYNC modes due
to message queues growth on sender and receiver sides.
[17:40:24] Security status [authentication=off, tls/ssl=off]
[17:40:24] REST protocols do not start on client node. To start the
protocols on client node set '-DIGNITE_REST_START_ON_CLIENT=true' system
property.
[17:40:55] Performance suggestions for grid 'ignite-test-client' (fix if
possible)
[17:40:55] To disable, set
-DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[17:40:55]   ^-- Enable G1 Garbage Collector (add '-XX:+UseG1GC' to JVM
options)
[17:40:55]   ^-- Specify JVM heap max size (add
'-Xmx[g|G|m|M|k|K]' to JVM options)
[17:40:55]   ^-- Set max direct memory size if getting 'OOME: Direct
buffer memory' (add '-XX:MaxDirectMemorySize=[g|G|m|M|k|K]' to JVM
options)
[17:40:55]   ^-- Disable processing of calls to System.gc() (add
'-XX:+DisableExplicitGC' to JVM options)
[17:40:55]   ^-- Disable assertions (remove '-ea' from JVM options)
[17:40:55] Refer to this page for more performance suggestions:
https://apacheignite.readme.io/docs/jvm-and-system-tuning
[17:40:55]
[17:40:55] To start Console Management & Monitoring run
ignitevisorcmd.{sh|bat}
[17:40:55]
[17:40:55] Ignite node started OK (id=18d876dd, instance
name=ignite-test-client)
[17:40:55] Topology snapshot [ver=8, servers=5, clients=1, CPUs=10,
heap=3.8GB]

nl.donna.ignite.workshop.sql.SqlDataGridTest > ordered03_mapDataGridTest
STANDARD_OUT
*** node:sqlNode2 ***
  cache:passant-sectie
passant-1[A], items:3
passant-11[A], items:4
passant-2[A], items:3
passant-8[A], items:4
passant-14[A], items:3
passant-12[A], items:3
total:20
  cache:sectie-passage
sectie-1[A], items:345
sectie-2[A], items:288
sectie-6[A], items:320
total:953
*** node:sqlNode1 ***
  cache:passant-sectie
passant-0[A], items:3
passant-4[A], items:3
passant-13[A], items:3
total:9
  cache:sectie-passage
sectie-5[A], items:336
sectie-7[A], items:306
total:642
*** node:sqlNode4 ***
  cache:passant-sectie
passant-5[A], items:3
passant-3[A], items:3
passant-7[A], items:3
total:9
  cache:sectie-passage
sectie-4[A], items:314
sectie-8[A], items:311
sectie-10[A], items:355
total:980
*** node:sqlNode3 ***
  cache:passant-sectie
passant-6[A], items:3
total:3
  cache:sectie-passage
sectie-14[A], items:338
sectie-13[A], items:332
sectie-0[A], items:332
sectie-3[A], items:335
sectie-12[A], items:355
total:1692
*** node:sqlNode5 ***
  cache:passant-sectie
passant-10[A], items:3
passant-9[A], items:3
total:6
  cache:sectie-passage
sectie-11[A], items:363
sectie-9[A], items:370
total:733
total:5047


nl.donna.ignite.workshop.sql.SqlDataGridTest >
ordered04_zoekPassantSectiePassages_AlleNodes_Test STANDARD_OUT
4 items gevonden op node 'sqlNode2'
9 items gevonden op node 'sqlNode4'
0 items gevonden op node 'sqlNode3'
283 items gevonden op node 'sqlNode1'
0 items gevonden op node 'sqlNode5'
*296 *gevonden passages van 'passant-7' met ComputeTask (Map-Reduce)
(zoektijd: ca. 417 msec):

nl.donna.ignite.workshop.sql.SqlDataGridTest >
ordered05_zoekPassantSectiePassages_AffinityNodes_Test STANDARD_OUT
3 secties hebben affiniteit met 'passant-7'
sqlNode2: [sectie-6]
sqlNode4: [sectie-8]
sqlNode1: [sectie-7]
*296* gevonden passages van 'passant-7' met Callables en Affinity Keys
(zoektijd: ca. 377 msec):

nl.donna.ignite.workshop.sql.SqlDataGridTest >
ordered06_zoekPassantSectiePassages_SqlQuery_Test STANDARD_OUT
*53 *gevonden passages van 'passant-7' met SQL
(zoektijd: ca. 357 msec)

As you can see from this output the test searches the sectie-passage cache
for all SectiePassage where passantId equals passant-7. Each test verifies
that the actual results match the expectation, thus a 

Re: SqlQuery results missing

2017-10-05 Thread Pim D
The data is generated during start-up of the test.
Data has a non expiration policy



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


Re: SqlQuery results missing

2017-10-05 Thread Pim D
Hi,

Yes, in fact I also have a map task to search each cache on each node.
That task does find all items.



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


Ignite Web Console login?

2017-10-04 Thread Pim D
Hi,

I have the standalone version of the web console running in Docker
(apacheignite/web-console-standalone:2.1.0) together with some ignite nodes
(network=host).
When I go to http://localhost/ (port 9000 has no listeners) a login page is
presented.

The documentation and online webinars do not show this login page nor what
account should be used.
Does anybody know what user account should be used to login to the web
console?

Many thanx




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


SqlQuery results missing

2017-10-04 Thread Pim D
Hi,

I have a partitioned cache distributed on 5 nodes without replication nor
persistence.
This cache contains 5000 items (id: [passage-0...4999]) of type:
public class SectiePassage implements Serializable {
@QuerySqlField(index = true)
public String id;
@QuerySqlField
public String sectieId;
@QuerySqlField(index = true)
public String passantId;
/* afgeleidde, hoeft niet te worden bewaard */
private transient AffinityKey key;

public SectiePassage(String id, String sectieId, String passantId) {
this.id = id;
this.sectieId = sectieId;
this.passantId = passantId;
}

public SectiePassage() {

}

public AffinityKey key() {
if (key == null)
key = new AffinityKey<>(id, sectieId);

return key;
}

public String toString() {
return this.getClass().getSimpleName() + "[" + id + "](" + key() +
")";
}
}

This entity is registered with my cache configuration when my client
(mode=true) connects with the cluster using:
setIndexedTypes(String.class,SectiePassage.class);

When the client is connected and executes a SqlQuery:
SqlQuery sql = new SqlQuery(SectiePassage.class,"id=?");
List error = new ArrayList<>();
int found = 0;
for(int i =0 ;i<5000;i++) {
if (passageCache.query(sql.setArgs("passage-" +
i)).getAll().size()==0) 
error.add("passage-" + i);
else 
found++;
}
System.out.println(error.size() + " not found");
System.out.println(found + " found");
System.out.println(passageCache.size(CachePeekMode.ALL) + " total");

The results would be:
4033 not found
967 found
5000 total

A) I expected 5000 found...
B) Also I expected SqlQuery to perform better as a map-reduce looping
through each and every item in the cache on each node locally (both take
approx. equal amount of time)

It seems SqlQuery only considers the data on the node my client is directly
connected with (thus query is not mapped to the other nodes).
What am I doing wrong here and is it normal the SqlQuery performance is not
faster than a simple map-reduce?



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