Re: Can the cache key and affinity key be different

2017-12-10 Thread Sumanta Ghosh
Hi
Thanks, i checked the link.
Small issue with that is that the entities below are also jpa entities with
primary keys defined to be same as current cache key. We have a framework
which takes care of caching and jpa persistence together.. 
Is there any other way we can achieve the same w/o redefining cache key?

Thanks a lot for the help
Sumanta



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


Can the cache key and affinity key be different

2017-12-03 Thread Sumanta Ghosh
Hi,
I have two caches, A and B. They have their own pk as cache key. However,
both of these caches are related to cache C by C's id. Is it possible to
collocate them in same node by C's id? Please note, I will have to use their
individual cache keys while doing get or put operation. C's id will be
populated all time in A and B.



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


Re: Ignite SpringTransactionManager not rolling back cache changes

2017-11-28 Thread Sumanta Ghosh
hi Nikolai,
Thanks a lot. It worked after TRANSACTIONAL  setting.

Thanks once again
Sumanta



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


Ignite SpringTransactionManager not rolling back cache changes

2017-11-24 Thread Sumanta Ghosh
Hi, 
I am using Ignite's SpringTransactionManager in my spring boot application
along with spring-data-jpa. I am using ignite's SpringTransactionManager
class for transaction along with spring's JpaTransactionManager using spring
data's ChainedTransactionManager class. Following is my configuration:-

@Bean
@Primary
public PlatformTransactionManager
transactionManager(@Qualifier("igniteSpringTxnManager")
SpringTransactionManager igniteSpringTxnManager, 
EntityManagerFactory factory) throws Exception {
return new ChainedTransactionManager(igniteSpringTxnManager, new
JpaTransactionManager(factory));
//return igniteSpringTxnManager;
}

This works fine for successsful DB transactions; however, whenever there is
an error (e.g. DB error for column length mismatch), I am seeing the cache
entry is not rolled back even if ignite's SpringTransactionManager displays
the following in the log 

2017-11-25 11:46:57.780 DEBUG 3556 --- [nio-8443-exec-4]
o.a.i.t.spring.SpringTransactionManager  : Initiating transaction rollback

SO, it seems even if log says rolling back, the rolling back is not
happening actually.
Can you please help me identifying the issue?




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


AffinityKey by java configuration

2017-11-16 Thread Sumanta Ghosh
Hi,
Can you tell me how to specify a different attribute (other than key) can be
specified as affinity key? I cannot use the annotation in my entity class.
Is there a way to do it using CacheConfiguration and related class? Can I
just not set the attribute name as string which will be used as affinity
key?

Thanks
Sumanta



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


Ignite 2.3.0 Console logging handler is not configured error in start-up

2017-11-15 Thread Sumanta Ghosh
Hi,
I am using ignite with spring boot 1.5.8, which has Slf4j configured (with
logback implementation as default). Starting from 2.3 (most probably any
version after 2.0, as with 2.0 I am not getting this error) I am getting
following in the log

2017-11-16 09:45:11.591 ERROR 8636 --- [   main]
 
: Failed to resolve default logging config file:
config/java.util.logging.properties
Console logging handler is not configured.

However, I have the node setup like below
IgniteConfiguration igniteConfig = new
IgniteConfiguration();
igniteConfig.setGridLogger(new Slf4jLogger(log));
and pom.xml entry for Slf4j logger as below
 
org.apache.ignite
ignite-slf4j
${ignite.version}

 
As can be seen above, the Slf4jLogger is passed with an slf4j logger
configured by spring boot. However, whereas the spring boot and application
logs are coming up fine in console, the ignite logs stopped appearing with
the error above.
Can you please help me resolving this?



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


Re: Best way to configure a single node embedded ignite 2.3

2017-11-15 Thread Sumanta Ghosh
Thanks. Will look for the page you mentioned.



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


Re: Ignite 2.3.0 hangs in startup

2017-11-15 Thread Sumanta Ghosh
Hi,
Got the reason now. Ignite 2.3.0 hangs because of a regression bug wherein
the cachestores use @SpringResource annotation and ignite starts up with
SpringCacheManager class.
Thanks for the help extended. 



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


Best way to configure a single node embedded ignite 2.3

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

Thanks
Sumanta



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


Re: Ignite 2.3.0 hangs in startup

2017-11-13 Thread Sumanta Ghosh
Hi,
After enabling debug mode on ignite logging, the log shows ignite
continuously getting timeout in the following: -

2017-11-13 21:33:00.770 DEBUG 11232 --- [r-#23%bfs-grid%]
o.a.i.i.p.timeout.GridTimeoutProcessor   : Timeout has occurred
[obj=CancelableTask [id=2ea6e16bf51-d6f29d66-da45-4fe6-afda-81d6f43452a1,
endTime=1510588980769, period=5000, cancel=false,
task=org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager$BackupCleaner@650053ad],
process=true]
2017-11-13 21:33:02.067 DEBUG 11232 --- [r-#23%bfs-grid%]
o.a.i.i.p.timeout.GridTimeoutProcessor   : Timeout has occurred
[obj=CancelableTask [id=bda6e16bf51-d6f29d66-da45-4fe6-afda-81d6f43452a1,
endTime=1510588982062, period=3000, cancel=false,
task=org.apache.ignite.internal.processors.query.GridQueryProcessor$2@ff3c744],
process=true]
2017-11-13 21:33:02.493 DEBUG 11232 --- [r-#23%bfs-grid%]
o.a.i.i.p.timeout.GridTimeoutProcessor   : Timeout has occurred
[obj=CancelableTask [id=dda6e16bf51-d6f29d66-da45-4fe6-afda-81d6f43452a1,
endTime=1510588982486, period=3000, cancel=false, task=MetricsUpdater
[prevGcTime=67, prevCpuTime=5183,
super=org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$MetricsUpdater@62b4cff]],
process=true]
2017-11-13 21:33:03.581 DEBUG 11232 --- [r-#24%bfs-grid%]
o.a.i.s.c.tcp.TcpCommunicationSpi: Balancing data [min0=0, minIdx=0,
max0=-1, maxIdx=-1]
2017-11-13 21:33:04.115 DEBUG 11232 --- [r-#29%bfs-grid%]
o.a.i.i.p.odbc.ClientListenerProcessor   : Balancing data [min0=0, minIdx=0,
max0=-1, maxIdx=-1]
2017-11-13 21:33:04.193 DEBUG 11232 --- [r-#35%bfs-grid%]
o.a.i.i.p.r.p.tcp.GridTcpRestProtocol: Balancing data [min0=0, minIdx=0,
max0=-1, maxIdx=-1]   

The above is getting printed continuously in the log. Can anyone please help
me understand what I am missing here?



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


Re: Ignite 2.3.0 hangs in startup

2017-11-10 Thread Sumanta Ghosh
Hi Evgenii,
I checked further, I am using logback with Slf4j (default setting in spring
boot). Can this be an issue? 



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


Re: Ignite 2.3.0 hangs in startup

2017-11-10 Thread Sumanta Ghosh
Hi Evgenii,
I have now the following set-up
IgniteConfiguration igniteConfig = new IgniteConfiguration();
igniteConfig.setGridLogger(new Slf4jLogger(log));
where log is my Slf4j logger. However, the server still hangs at startup
giving the same message. 



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


Re: Ignite 2.3.0 hangs in startup

2017-11-10 Thread Sumanta Ghosh
Hi All, Evgenii,
Can you please help me here? We are kind of clue-less on this one and as a
result not able to upgrade to 2.3.0. Can you please let me know how to
enable verbose logging in embedded mode (i.e. running from within Spring
Boot application)?




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


Re: Ignite 2.3.0 hangs in startup

2017-11-06 Thread Sumanta Ghosh
Hi Evgenii,
 I have ignite-slf4j module included in my pom. Also has the following
settings done in java 
IgniteConfiguration igniteConfig = new
IgniteConfiguration();
igniteConfig.setGridLogger(new Slf4jLogger());
Do I have to do anything else? From documentation, these seems to be the
only steps to do to configure slf4j.

Thanks
Sumanta
 



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


Ignite 2.3.0 hangs in startup

2017-11-04 Thread Sumanta Ghosh
Hi,
I have the following settings which works fine in ignite 2.0.0; however,
when I upgraded to 2.3.0, the ignite hangs during start. I am using a single
node setup in a laptop, no cluster.

IgniteConfiguration igniteConfig = new
IgniteConfiguration();
igniteConfig.setGridLogger(new Slf4jLogger(log));
// igniteConfig.setGridName(GRID_NAME);
igniteConfig.setIgniteInstanceName(GRID_NAME);
igniteConfig.setPeerClassLoadingEnabled(false);
// For a stand-alone single node cluster
igniteConfig.setDiscoverySpi(new 
TcpDiscoverySpi().setIpFinder(new
TcpDiscoveryVmIpFinder(true)));

List> cacheConfigs = new
ArrayList>();
addCacheConfigForCommon(cacheConfigs);
addCacheConfigForAuth(cacheConfigs);
addCacheConfigForUpstreamParty(cacheConfigs);
addCacheConfigForBFSParty(cacheConfigs);
addCacheConfigForBFSLoan(cacheConfigs);
igniteConfig.setCacheConfiguration(cacheConfigs.toArray(new
CacheConfiguration[cacheConfigs.size()]));

In the log (console log in eclipse) following is printed

**Ignite starting
2017-11-05 10:39:02.035  INFO 3392 --- [   main]
trationDelegate$BeanPostProcessorChecker : Bean 'igniteConfig' of type
[org.apache.ignite.configuration.IgniteConfiguration] is not eligible for
getting processed by all BeanPostProcessors (for example: not eligible for
auto-proxying)
[10:39:02]__   
[10:39:02]   /  _/ ___/ |/ /  _/_  __/ __/ 
[10:39:02]  _/ // (7 7// /  / / / _/   
[10:39:02] /___/\___/_/|_/___/ /_/ /___/  
[10:39:02] 
[10:39:02] ver. 2.3.0#20171028-sha1:8add7fd5
[10:39:02] 2017 Copyright(C) Apache Software Foundation
[10:39:02] 
[10:39:02] Ignite documentation: http://ignite.apache.org
[10:39:02] 
[10:39:02] Quiet mode.
[10:39:02]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false
or "-v" to ignite.{sh|bat}
[10:39:02] 
[10:39:02] OS: Windows 8.1 6.3 amd64
[10:39:02] VM information: Java(TM) SE Runtime Environment 1.8.0_92-b14
Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.92-b14
[10:39:02] Configured plugins:
[10:39:02]   ^-- None
[10:39:02] 
[10:39:06] 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.
[10:39:06] Security status [authentication=off, tls/ssl=off]
2017-11-05 10:39:07.213 ERROR 3392 --- [   main]
 
: Failed to resolve default logging config file:
config/java.util.logging.properties
Console logging handler is not configured.

Thanks
Sumanta




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


Google cloud deployment in embedded mode

2017-06-29 Thread Sumanta Ghosh
Hi,
We are planning to deploy our application in google cloud. Our application
runs ignite server in embedded mode (i.e. ignite starts as part of spring
application start up). Was wondering - in this scenario, will ignite still
be able to figure out newly added members in the cluster automatically? if
so, can you please give a hint at how it will do that?

Thanks
Sumanta



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Google-cloud-deployment-in-embedded-mode-tp14161.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: CacheStore.loadCache loading data for 1024 partitions for a single node

2017-03-07 Thread Sumanta Ghosh
It is not causing problems so to say; however I am concerned then we have
1024 queries executed per cache during startup; in case there is any
configuration to set up the total number of partitions, that would give us
more control I believe.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/CacheStore-loadCache-loading-data-for-1024-partitions-for-a-single-node-tp11028p11059.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Best way to update the partition id in database after rebalancing

2017-03-06 Thread Sumanta Ghosh
Hi Val,
Thanks a lot. I was thinking of data streamer - data loader is good enough
for now it seems :).



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Best-way-to-update-the-partition-id-in-database-after-rebalancing-tp11026p11042.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: CacheStore.loadCache loading data for 1024 partitions for a single node

2017-03-06 Thread Sumanta Ghosh
Hi Val,
Thanks. In that case, how can I reduce the number of partitions - for a
single node development environment, 1024 is too high.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/CacheStore-loadCache-loading-data-for-1024-partitions-for-a-single-node-tp11028p11041.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


CacheStore.loadCache loading data for 1024 partitions for a single node

2017-03-03 Thread Sumanta Ghosh
Hi,
It seems the primaryPartitions method of Affinity class returns 1024
partitions for the local node, even if it is a single node only application.
Should it not only return only those partition ids relevant? following is my
configuration, have I missed anything?
CacheConfiguration
queryableOrgProfileConfig = new
CacheConfiguration<>("QueryableOrganizationProfiles");

queryableOrgProfileConfig.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);

queryableOrgProfileConfig.setCacheStoreFactory(FactoryBuilder.factoryOf(QueryableOrgCacheStore.class));



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/CacheStore-loadCache-loading-data-for-1024-partitions-for-a-single-node-tp11028.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Best way to update the partition id in database after rebalancing

2017-03-03 Thread Sumanta Ghosh
Hi,
In the documentation, it is mentioned that in order to ensure that a
particular node only loads the data relevant for the partitions it has, it
is advisable to store the partition id in the database. In that case, what
would be the best practice to update the partition id when new node is added
and the data gets re-balanced.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Best-way-to-update-the-partition-id-in-database-after-rebalancing-tp11026.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Data streamers: How to ensure loading data for the current partition only

2017-03-02 Thread Sumanta Ghosh
Yes - so taking CacheLoader route then. Thanks a lot for clearing this up.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Data-streamers-How-to-ensure-loading-data-for-the-current-partition-only-tp10949p10996.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Data streamers: How to ensure loading data for the current partition only

2017-02-28 Thread Sumanta Ghosh
Hi Val,
Thanks a lot - yes, the problem I mentioned does not exist if the data
streamer run on a single node. However, this raises another question though.
How to ensure that data streamers run on a single node only? Is it done by
ignite automatically? If not, can you suggest any best practice for that?
I am running a single sprint boot application which also starts ignite. In
order to keep the deployment simple, I was trying to avoid a dedicated node
for ignite only. 



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Data-streamers-How-to-ensure-loading-data-for-the-current-partition-only-tp10949p10960.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Data streamers: How to ensure loading data for the current partition only

2017-02-28 Thread Sumanta Ghosh
Hi,
Want to ensure that data streamer in each node only loads the relevant data
for that node (I am assuming that data streamers are running in all nodes
that are up).
In the documentation - in the Cache loader, it mentions about storing
affinity key in DB and then retrieve the data based on affinity key. Will
the same apply for data streamers as well? If yes, what is the good way to
update the affinity key in case there is addition of node in the cluster?



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Data-streamers-How-to-ensure-loading-data-for-the-current-partition-only-tp10949.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: SpringTransactionManager - Participating in existing transactions is not supported

2017-02-28 Thread Sumanta Ghosh
Hi Val,
Thanks for the reply. Basically its a very small fix (below); however, I am
new to Ignite and hence not sure if this covers all the scenarios. Also,
this is the first time I would be contributing anything to ignite community,
so please let me know the process as well (in case the below code make
sense).

@Override
protected void doSetRollbackOnly(DefaultTransactionStatus status) throws
TransactionException {
Transaction txn = 
((Ignite)this.getResourceFactory()).transactions().tx();
if (txn!=null) txn.setRollbackOnly();
}



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/SpringTransactionManager-Participating-in-existing-transactions-is-not-supported-tp7305p10947.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.