Cache Join

2019-03-27 Thread Skollur
Hello

I am using apache ignite 2.7 version and trying to join three tables and My
query looks as below. All tables are configured as PARTIONED and also set
"distributedjoin=true" 
==
SELECT 
CAS.Group_Customer_ID as groupCustomerId,
CAS.Account_Number as accountNumber,
'Custody Account' as productTitle,
CAS.Investment_Model as investmentModel,
sum(CAS.Market_Value) AS marketValue,
CSS.Category_Sequence as sequenceNumber,
sum(ASM.Prev_Month_Bal)  as preMonthBal,
sum(ASM.Prev_Year_Bal) as preYearBal  
 FROM
"VwCustodyAccountPositionCpsCache".VW_CUSTODY_ACCOUNT_POSITION_CPS CAS 
INNER JOIN "IdbCpsSequenceCache".IDB_CPS_SEQUENCE CSS ON 
CAS.Account_Type = CSS.Account_Type  
AND CAS.As_Of_Date BETWEEN '2018-12-31' AND '2018-12-31' 
AND CAS.Group_Customer_ID = 61 
 INNER JOIN "InvestmentSummaryMonthlyCache".ASSET_SUMMARY_MONTHLY ASM ON
CAS.Group_Customer_ID = ASM.Group_Customer_ID  
AND CAS.Account_Number = ASM.Account_Number   
AND CAS.As_of_Date = ASM.Effective_Date 
AND CAS.Account_Type = ASM.Account_Type  
AND CAS.Product = ASM.Product 
AND CAS.Asset_Class_Allocation = ASM.Asset_Class
group by  
CAS.Group_Customer_ID,
CAS.Account_Number,
CAS.Investment_Model,
CSS.Category_Sequence
=
I have added index for each fields which are used in each cache table as
below. Example in InvestmentSummaryMonthlyCache:-

   ArrayList indexes = new ArrayList<>();
QueryIndex index = new QueryIndex();
index.setName("NonClustered_Index_Summary_Monthly");
index.setIndexType(QueryIndexType.SORTED);
LinkedHashMap indFlds = new LinkedHashMap<>();
indFlds.put("dwId", true);
indFlds.put("groupCustomerId", true);
indFlds.put("accountNumber", true);
indFlds.put("accountType", true);
indFlds.put("product", true);
indFlds.put("productType", true);
indFlds.put("subProduct", true);
indFlds.put("assetClass", true);
indFlds.put("effectiveDate", true);
index.setFields(indFlds);
indexes.add(index);
qryEntity.setIndexes(indexes);
qryEntities.add(qryEntity);
=
When I tried to execute query(I have all fields defined in index as above),
getting an error -> SQL Error [5]: javax.cache.CacheException: Failed to
prepare distributed join query: join condition does not use index
[joinedCache=InvestmentSummaryMonthlyCache, What am I missing here?


plan=SELECT
CAS__Z0.GROUP_CUSTOMER_ID AS __C0_0,
CAS__Z0.ACCOUNT_NUMBER AS __C0_1,
'Custody Account' AS __C0_2,
CAS__Z0.INVESTMENT_MODEL AS __C0_3,
SUM(CAS__Z0.MARKET_VALUE) AS __C0_4,
CSS__Z1.CATEGORY_SEQUENCE AS __C0_5,
SUM(ASM__Z2.PREV_MONTH_BAL) AS __C0_6,
SUM(ASM__Z2.PREV_YEAR_BAL) AS __C0_7
FROM "VwCustodyAccountPositionCpsCache".VW_CUSTODY_ACCOUNT_POSITION_CPS
CAS__Z0
/*
"VwCustodyAccountPositionCpsCache".VW_CUSTODY_ACCOUNT_POSITION_CPS.__SCAN_
*/
/* WHERE (CAS__Z0.AS_OF_DATE <= DATE '2018-12-31')
AND ((CAS__Z0.GROUP_CUSTOMER_ID = 80061)
AND (CAS__Z0.AS_OF_DATE >= DATE '2018-12-31'))
*/
INNER JOIN "InvestmentSummaryMonthlyCache".ASSET_SUMMARY_MONTHLY ASM__Z2
/* batched:broadcast
"InvestmentSummaryMonthlyCache".ASSET_SUMMARY_MONTHLY.__SCAN_ */
ON 1=1
/* WHERE (CAS__Z0.ACCOUNT_NUMBER = ASM__Z2.ACCOUNT_NUMBER)
AND ((CAS__Z0.GROUP_CUSTOMER_ID = ASM__Z2.GROUP_CUSTOMER_ID)
AND ((CAS__Z0.AS_OF_DATE = ASM__Z2.EFFECTIVE_DATE)
AND ((CAS__Z0.ACCOUNT_TYPE = ASM__Z2.ACCOUNT_TYPE)
AND ((CAS__Z0.ASSET_CLASS_ALLOCATION = ASM__Z2.ASSET_CLASS)
AND (CAS__Z0.PRODUCT = ASM__Z2.PRODUCT)
*/
INNER JOIN "IdbCpsSequenceCache".IDB_CPS_SEQUENCE CSS__Z1
/* batched:broadcast "IdbCpsSequenceCache".NONCLUSTERED_INDEX_LC:
ACCOUNT_TYPE = CAS__Z0.ACCOUNT_TYPE */
ON 1=1
WHERE ((CAS__Z0.GROUP_CUSTOMER_ID = 80061)
AND ((CAS__Z0.ACCOUNT_TYPE = CSS__Z1.ACCOUNT_TYPE)
AND ((CAS__Z0.AS_OF_DATE >= DATE '2018-12-31')
AND (CAS__Z0.AS_OF_DATE <= DATE '2018-12-31'
AND ((CAS__Z0.ASSET_CLASS_ALLOCATION = ASM__Z2.ASSET_CLASS)
AND ((CAS__Z0.PRODUCT = ASM__Z2.PRODUCT)
AND ((CAS__Z0.ACCOUNT_TYPE = ASM__Z2.ACCOUNT_TYPE)
AND ((CAS__Z0.AS_OF_DATE = ASM__Z2.EFFECTIVE_DATE)
AND ((CAS__Z0.GROUP_CUSTOMER_ID = ASM__Z2.GROUP_CUSTOMER_ID)
AND (CAS__Z0.ACCOUNT_NUMBER = ASM__Z2.ACCOUNT_NUMBER))
GROUP BY CAS__Z0.GROUP_CUSTOMER_ID, CAS__Z0.ACCOUNT_NUMBER,
CAS__Z0.INVESTMENT_MODEL, CSS__Z1.CATEGORY_SEQUENCE]
  SQL Error [5]: javax.cache.CacheException: Failed to prepare
distributed join query: join condition does not use index
[joinedCache=InvestmentSummaryMonthlyCache, plan=SELECT
CAS__Z0.GROUP_CUSTOMER_ID AS __C0_0,
CAS__Z0.ACCOUNT_NUMBER AS __C0_1,
   

RE: xa transaction manager and ignite

2019-03-27 Thread Scott Cote
Yes I did.  It is in fact the basis for my solution 😃

Right now, I’m doing some fakery ….

Taking the Spring JTATransactionManager (which extends 
AbstractTransactionManager which implements javax…TransactionManager) and 
wrapping it with an implementation of TransactionManager where the 
implementation stubs delegate to JTATransactionManager.

The WrappedTransactionManager is then added to the ignite configuration.

I hate this solution.

Please tell me there is a better way.

SCott

From: Ilya Kasnacheev 
Sent: Wednesday, March 27, 2019 8:19 AM
To: user@ignite.apache.org
Subject: Re: xa transaction manager and ignite

Hello!

Never done that, but did you go through 
https://apacheignite.readme.io/docs/transactions#section-integration-with-jta ?

Regards,
--
Ilya Kasnacheev


пн, 25 мар. 2019 г. в 21:49, Scott Cote mailto:sc...@etcc.com>>:
Igniters:

I’m unsuccessfully establishing an XA transaction manager to associate with my 
ignite configuration.

I don’t know the JNDI name location of my java transaction manager (not to be 
confused with the spring transaction manager which implements 
TransactionManagerPlatform).

Here is a snippet of my code (with pieces omitted for brevity):

…

import javax.cache.configuration.Factory;
import javax.transaction.TransactionManager;

import org.apache.ignite.configuration.TransactionConfiguration;

import org.apache.ignite.cache.jta.jndi.CacheJndiTmFactory;
…

@Autowired(required = false)
TransactionManager transactionManager;

…

private TransactionConfiguration doTransactionConfiguration() {
TransactionConfiguration configuration = new TransactionConfiguration();

if (null == transactionManager) {
CacheJndiTmFactory txManagerFactory = new CacheJndiTmFactory();
// see 
https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-jta.html
 for these names
String[] jndiNames = 
{"java:comp/UserTransaction","java:comp/TransactionManager","java:/TransactionManager"};
txManagerFactory.setJndiNames(jndiNames);
configuration.setTxManagerFactory(txManagerFactory);
} else {

Factory txManagerFactory = new 
Factory() {
@Override
public TransactionManager create() {
return jtaTransactionManager();
}
};

configuration.setTxManagerFactory(txManagerFactory);

}
return configuration;
}

private TransactionManager jtaTransactionManager() {
return transactionManager;
}





public IgniteConfiguration doit() {

IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setTransactionConfiguration(doTransactionConfiguration());

return cfg;

}

Here is a snippet of my code (with pieces omitted for brevity):
When I execute the public method “do it”, the autowire fails to load (I do not 
require it) and none of the jndi locations that I listed seem to have the “java 
TransactionManager” (again – not to be confused with the bean named 
“TransactionManager” that does not implement TransactionManager, but instead 
implements TransactionManagerPlatform).

What is the right way to associate the xa manager that is setup with spring – 
which I don’t know in advance, with ignite?

Thanks,

SCott


Re: Java Thin Client TCP Connections

2019-03-27 Thread Brent Williams
Igor,

Thanks for responding.

I have 2 java singletons that I use. The first is the CacheManager which
starts the instance. The second is another Singleton that caches the
repository Name + CacheClient so
we can reuse them through out the process.

/**
 * This is a singleton for Apache Ingite, it starts the client instance.
 */
public class IgniteCacheManager {
private static IgniteCacheManager instance;
private IgniteClient igniteClient;
private ClientConfiguration cfg;

public static IgniteCacheManager getInstance(YamlConfig cacheConfig) {
if (instance == null) instance = new
IgniteCacheManager(cacheConfig);
return instance;
}

private IgniteCacheManager(YamlConfig cacheConfig) {
String hostsMap = cacheConfig.getString("hosts");
String[] hosts = null;
if (hostsMap != null) {
hosts = hostsMap.split(",");
} else {
hosts = new String[] { "localhost:10800" };
}
cfg = new ClientConfiguration().setAddresses(hosts)
.setTimeout(cacheConfig.getInteger("cache.timeout"));
igniteClient = Ignition.startClient(cfg);
}

public IgniteClient getClient() {
return this.igniteClient;
}

public void reconnect() {
igniteClient = Ignition.startClient(cfg);
}
}


public class CacheFactory {
private static CacheFactory instance;
private YamlConfig cacheConfig;
private Map> clientCache = new
ConcurrentHashMap<>();

public static CacheFactory getInstance(YamlConfig cacheConfig) {
if (instance == null) instance = new CacheFactory(cacheConfig);
return instance;
}

/**
 * This is the main factory method for pulling a Cache Instance to
begin Caching.
 */
public  CacheClient getCacheProvider(Class t, String
repository) {
CacheClient client = null;
if (clientCache.containsKey(repository)) {
client = (CacheClient) clientCache.get(repository);
} else {
try {
client = new IgniteCacheClientWrapper(cacheConfig,
repository);
clientCache.put(repository, client);
} catch (Exception ex) {
/**
 * If we encounter any errors return null and let the
caller decide how to act on the null response.
 */
 LOG.error(ex);
}
}
return client;
}
}

To call this we use this method inside all of our request threads.

public  someMethod() {

}

public  CacheClient getCacheClient(Class t, String key) {
   factory = CacheFactory.getInstance(cacheConfig);
   return factory.getCacheProvider(t, key);
 }

...
getCacheClient(StorageContainer.class, partner).get(id);.
...


The spikes are unpredictable, we see normal load on all 3 nodes, however we
do see a huge spike in these errors around the time the hosts lock up.

Mar 25 06:25:04 prd-cache001 service.sh[10538]: java.io.IOException:
Connection reset by peer
Mar 25 06:25:04 prd-cache001 service.sh[10538]: #011at
sun.nio.ch.FileDispatcherImpl.read0(Native Method)
Mar 25 06:25:04 prd-cache001 service.sh[10538]: #011at
sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
Mar 25 06:25:04 prd-cache001 service.sh[10538]: #011at
sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
Mar 25 06:25:04 prd-cache001 service.sh[10538]: #011at
sun.nio.ch.IOUtil.read(IOUtil.java:197)
Mar 25 06:25:04 prd-cache001 service.sh[10538]: #011at
sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
Mar 25 06:25:04 prd-cache001 service.sh[10538]: #011at
org.apache.ignite.internal.util.nio.GridNioServer$ByteBufferNioClientWorker.processRead(GridNioServer.java:1104)
Mar 25 06:25:04 prd-cache001 service.sh[10538]: #011at
org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelectedKeysOptimized(GridNioServer.java:2389)
Mar 25 06:25:04 prd-cache001 service.sh[10538]: #011at
org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2156)
Mar 25 06:25:04 prd-cache001 service.sh[10538]: #011at
org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1797)
Mar 25 06:25:04 prd-cache001 service.sh[10538]: #011at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
Mar 25 06:25:04 prd-cache001 service.sh[10538]: #011at
java.lang.Thread.run(Thread.java:748)
Mar 25 06:25:04 prd-cache001 service.sh[10538]:
[06:25:04,742][SEVERE][grid-nio-worker-client-listener-1-#30][ClientListenerProcessor]
Failed to process selector key [ses=GridSelectorNioSessionImpl
[worker=ByteBufferNioClientWorker [readBuf=java.nio.HeapByteBuffer[pos=0
lim=8192 cap=8192], super=AbstractNioClientWorker [idx=1, bytesRcvd=0,
bytesSent=0, bytesRcvd0=0, bytesSent0=0, select=true, super=GridWorker
[name=grid-nio-worker-client-listener-1, igniteInstanceName=null,
finished=false, heartbeatTs=155352

ComputeTask with JSON POST data

2019-03-27 Thread kellan
How do I create a ComputeTask that accepts JSON POST data from a REST API
endpoint?



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


Re: When to use REPLICATED vs PARTITIONED?

2019-03-27 Thread Vladimir Pligin
Hi again!

I'm sorry for being absent for so long. 
Maybe the reason here that you data is collocated somehow using id of a
city.
Replicated cache suits well if you need to join to some static dictionary
and it's impossible or difficult to distribute other data in manner
corresponding to that dictionary. My assumption here is that Ignite joins
only subsets (about 1/2) of city cache in partitioned case. But when you
have replicated one the Ignite should join entire dataset. What do you think
does it make sense here?




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


Re: Blog post "Introduction to the Apache(R) Ignite™ community structure"

2019-03-27 Thread Ilya Kasnacheev
Hello!

There's an English version of Habr now, did you consider reposting there?

Regards,
-- 
Ilya Kasnacheev


чт, 21 мар. 2019 г. в 15:35, Dmitriy Pavlov :

> Sorry for the late reply. Contributors are not ranked so weight is not
> measured. The community always prefer to build consensus. If consensus is
> not reached (this happens time-to-time), then feature or change should not
> appear in the product.
>
> By the way, Apache PMCs may veto changes with a technical justification
> explaining why change is bad.
>
> A final word in project development has PMC (it is a committee consisting
> of all its members). Practically Apache Ignite Community prefers wider
> consensus - from all contributors.
>
> In case something is going wrong, there is our last resort:
> https://www.apache.org/board/escalation  But I don't remember any
> escalations.
>
> Priority of implementing features is solved in another way: if someone
> wants to implement something and the community does not reject it, so why
> not? There is no single priority for all contributors.
>
> ср, 17 окт. 2018 г. в 12:09, zaleslaw :
>
>> [For discussion] It's interesting to know more about possible conflicts:
>> when
>> a few persons are involved in contribution as a commiters, for example,
>> and
>> they have different opinions about next steps in roadmap implementation or
>> about certain feature. How to measure correctly their weights? One of them
>> doing small bug fixes, another does large features. They are not ranked,
>> except amount of commits or code lines in github. Who can say last word?
>>
>> Imagine, only they are both understand something in this feature and its
>> priority. Votes couldn't help, right? How they should solve their
>> conflict?
>> Does you have any cases in your experience?
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>


Re: Stream continuous Data from Sql Server to ignite

2019-03-27 Thread Ilya Kasnacheev
Hello!

Why not use regular *writeThrough* for that?

Regards,
-- 
Ilya Kasnacheev


пн, 25 мар. 2019 г. в 16:46, austin solomon :

> Hi,
>
> Here updates means updates in underlying 3rd party DB.
>
> Regards,
> Austin
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Finding collocated data in ignite nodes

2019-03-27 Thread Nilesh K
Hello Ilya Kasnacheev,

Sure. Here is complete script : 


CREATE TABLE Country ( 
country_id INT(10), 
country_name CHAR(30), 
Continent  CHAR(30),
PRIMARY KEY (country_id)
) WITH "template=partitioned, backups=1"; 


CREATE TABLE City ( 
city_id INT(15),
country_id INT(10), 
city_name CHAR(50), 
Dist CHAR(20), 
PRIMARY KEY (city_id,country_id) 
) WITH "template=partitioned, backups=1, affinityKey=country_id"; 


insert into Country values('101','Russia','Russia'); 
insert into Country values('102','India','Asia'); 
insert into Country values('103','United States','America');


insert into City values('12554105',101,'CITY_012554105','SNZa'); 
insert into City values('20467',101,'CITY_0003720467','SN'); 
insert into City values('10498',101,'CITY_0003710498','SNZa'); 
insert into City values('13617',101,'CITY_0003713617','SNZb'); 
insert into City values('13628',101,'CITY_0003713628','SNZd'); 
insert into City values('10502',101,'CITY_0004610502','SN'); 
insert into City values('703166',101,'CITY_00046703166','1'); 
insert into City values('13656',101,'CITY_0007313656','SN'); 
insert into City values('10507',101,'CITY_0007310507','SNZa'); 
insert into City values('13620',101,'CITY_0007313620','SNZc'); 
insert into City values('13629',101,'CITY_0007313629','SNZe'); 
insert into City values('10508',101,'CITY_0009110508','SN'); 
insert into City values('47403',101,'CITY_0009147403','1'); 
insert into City values('16774',101,'CITY_0011616774','SN'); 
insert into City values('16773',101,'CITY_0012516773','SN'); 
insert into City values('16778',101,'CITY_0014316778','SN'); 
insert into City values('16779',101,'CITY_0016116779','SN'); 
insert into City values('734192',101,'CITY_00161734192','1'); 
insert into City values('699080',101,'CITY_00161699080','01Za'); 
insert into City values('16781',101,'CITY_0017016781','SN'); 
insert into City values('16780',101,'CITY_0018916780','SN'); 
insert into City values('16802',101,'CITY_0019816802','SN'); 
insert into City values('16803',101,'CITY_0020416803','SN'); 
insert into City values('457688',101,'CITY_00204457688','1'); 
insert into City values('16806',101,'CITY_0021316806','SN'); 
insert into City values('16809',101,'CITY_0023116809','SN'); 
insert into City values('16815',101,'CITY_0024016815','SN'); 
insert into City values('6957',101,'CITY_053886957','SN'); 
insert into City values('6747',101,'CITY_053886747','SNZa'); 
insert into City values('21048',101,'CITY_0538821048','SNZj'); 
insert into City values('21058',101,'CITY_0538821058','01Za'); 
insert into City values('21068',101,'CITY_0545821068','SN'); 
insert into City values('6749',101,'CITY_054586749','SNZa'); 
insert into City values('6780',101,'CITY_054586780','SNZb'); 
insert into City values('113520',101,'CITY_05467113520','SN'); 
insert into City values('6750',101,'CITY_054676750','SNZa'); 
insert into City values('6820',101,'CITY_054676820','SNZb'); 
insert into City values('21066',101,'CITY_0546721066','SNZc'); 
insert into City values('6751',101,'CITY_054766751','SNZa'); 
insert into City values('6821',101,'CITY_054766821','SNAb'); 
insert into City values('113679',101,'CITY_05485113679','SN'); 
insert into City values('6822',101,'CITY_054856822','SNAb'); 
insert into City values('6916',101,'CITY_054856916','SNAc'); 
insert into City values('21064',101,'CITY_0548521064','SNAd'); 
insert into City values('23992',101,'CITY_0548523992','SNAe'); 
insert into City values('223623',101,'CITY_05485223623','1'); 
insert into City values('113562',101,'CITY_05494113562','SN'); 
insert into City values('6823',101,'CITY_054946823','SNAb'); 
insert into City values('6840',101,'CITY_054946840','SNAc'); 
insert into City values('21070',101,'CITY_0549421070','SNAd'); 
insert into City values('21859',101,'CITY_0549421859','SNAe'); 
insert into City values('50388',101,'CITY_0549450388','SNAf'); 
insert into City values('122190',101,'CITY_05494122190','1'); 
insert into City values('114520',101,'CITY_05494114520','01Aa'); 
insert into City values('118632',101,'CITY_05494118632','01Ab'); 
insert into City values('121228',101,'CITY_05494121228','01Ac'); 
insert into City values('125075',101,'CITY_05494125075','2'); 
insert into City values('7774147',101,'CITY_054947774147','3'); 
insert into City values('7764624',101,'CITY_054947764624','03Aa'); 
insert into City values('8002672',101,'CITY_054948002672','4'); 
insert into City values('8153942',101,'CITY_054948153942','5'); 
insert into City values('21857',101,'CITY_0576821857','SN'); 
insert into City values('6837',101,'CITY_057686837','SNAc'); 
insert into City values('21071',101,'CITY_0576821071','SNAd'); 
insert into City values('8153946',101,'CITY_057688153946','1'); 
insert into City values('8153949',101,'CIT

Re: xa transaction manager and ignite

2019-03-27 Thread Ilya Kasnacheev
Hello!

Never done that, but did you go through
https://apacheignite.readme.io/docs/transactions#section-integration-with-jta
?

Regards,
-- 
Ilya Kasnacheev


пн, 25 мар. 2019 г. в 21:49, Scott Cote :

> Igniters:
>
>
>
> I’m unsuccessfully establishing an XA transaction manager to associate
> with my ignite configuration.
>
>
>
> I don’t know the JNDI name location of my java transaction manager (not to
> be confused with the spring transaction manager which implements
> TransactionManagerPlatform).
>
>
>
> Here is a snippet of my code (with pieces omitted for brevity):
>
>
>
> …
>
> *import *javax.cache.configuration.Factory;
>
> *import *javax.transaction.TransactionManager;
>
> *import *org.apache.ignite.configuration.TransactionConfiguration;
>
> *import *org.apache.ignite.cache.jta.jndi.CacheJndiTmFactory;
>
> …
>
> @Autowired(required = *false*)
> TransactionManager *transactionManager*;
>
>
>
> …
>
> *private *TransactionConfiguration doTransactionConfiguration() {
> TransactionConfiguration configuration = *new *TransactionConfiguration();
>
> *if *(*null *== *transactionManager*) {
> CacheJndiTmFactory txManagerFactory = *new *CacheJndiTmFactory();
>
> *// see 
> https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-jta.html
>  
> 
>  for these names*String[] jndiNames = 
> {*"java:comp/UserTransaction"*,*"java:comp/TransactionManager"*,*"java:/TransactionManager"*};
> txManagerFactory.setJndiNames(jndiNames);
> configuration.setTxManagerFactory(txManagerFactory);
> } *else *{
>
> Factory txManagerFactory = *new 
> *Factory() {
> @Override
> *public *TransactionManager create() {
> *return *jtaTransactionManager();
> }
> };
>
> configuration.setTxManagerFactory(txManagerFactory);
>
> }
> *return *configuration;
> }
>
> *private *TransactionManager jtaTransactionManager() {
> *return **transactionManager*;
> }
>
>
>
>
>
> *public *IgniteConfiguration doit() {
>
> IgniteConfiguration cfg = *new *IgniteConfiguration();
> cfg.setTransactionConfiguration(doTransactionConfiguration());
>
> *return *cfg;
>
> }
>
>
>
> Here is a snippet of my code (with pieces omitted for brevity):
>
> When I execute the public method “do it”, the autowire fails to load (I do
> not require it) and none of the jndi locations that I listed seem to have
> the “java TransactionManager” (again – not to be confused with the bean
> named “TransactionManager” that does not implement TransactionManager, but
> instead implements TransactionManagerPlatform).
>
>
>
> What is the right way to associate the xa manager that is setup with
> spring – which I don’t know in advance, with ignite?
>
>
>
> Thanks,
>
>
>
> SCott
>


Re: Finding collocated data in ignite nodes

2019-03-27 Thread Ilya Kasnacheev
Hello!

It's hard to say what happens here. Can you share SQL script to populate
your DB?

Regards,
-- 
Ilya Kasnacheev


пн, 25 мар. 2019 г. в 17:31, NileshKhaire :

> Hello Ilya Kasnacheev,
>
> I am agree with your comments.
>
> But when I enabled distributedJoins,  I should see result of query
>
> select count(*) from City c join Country cc on cc.country_id !=
> c.country_id;
>
> ==> 2000 , but unfortunately, it is still showing me count = 800 for both
> distributed and non distributed joins.
>
> Can you please explain the reason ?
>
> I test with DBeaver as well as SQLine , result is same.
>
> Thanks,
> Nilesh
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Ignite node goes down often

2019-03-27 Thread Ilya Kasnacheev
Hello!

I imagine that you have large heap and it is close to being full.

Consider how do decrease heap requirements as well as heap size to decrease
length of GC pauses.

Regards,
-- 
Ilya Kasnacheev


вт, 26 мар. 2019 г. в 20:46, newigniter :

> Tnx Ilya.
>
> And what could be possible causes of long GC pauses?
>
> Tnx
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Java Thin Client TCP Connections

2019-03-27 Thread Igor Sapego
That's really weird. There should not be so much connections. Normally thin
client will open one TCP connection per node at max. In many cases, there
going to be only one connection.

Do you create IgniteClient in your application once, or do you start them
several
times? Could it be that your code are leaking IgniteClient instances?

Can you provide some minimal reproducer to us, so we can debug the issue?

Best Regards,
Igor


On Mon, Mar 25, 2019 at 11:19 PM Brent Williams 
wrote:

> All,
>
> I am running Apache Ingite 2.7.0. I have 3 nodes in my cluster, CPU,
> memory, GC all tuned properly. I have even adjusted file limit to 65k open
> connections. I have 8 client nodes that are connecting to the 3 node
> cluster and for the most part working fine, however, we see spikes in
> connections and we start to blow out the file limit and we get too many
> files open and all client nodes hang.
>
> When I check the connections per client on one of the server nodes, I am
> seeing 5500+ TCP connections established per host.  This is roughly 44,
> + . My question is what should the file limits be? Why so many TCP
> connections per host? How do we control this as it is causing our
> production cluster to hang.
>
> --Brent
>
>
>


RE: GridGain perfomance

2019-03-27 Thread Stanislav Lukyanov
First, this is a mailing list for Apache Ignite, although the results would be 
more or less equal as GridGian is based on Ignite.

Second, the question is too broad.
You shouldn’t really think about running on 1 core as Ignite is for scaling to 
many cores and machines.
The performance will vary greatly between different data schemes and use cases.

Stan

From: Илья Ширенин
Sent: 7 февраля 2019 г. 9:27
To: user@ignite.apache.org
Subject: GridGain perfomance

Hi! Could you please tell me about grigain perfomace such as
1) Count of operations per second(on 1 core)
2) RAM capacity needed for single GG operation
Thanks!



Re: Ignite Client getting OOM, GridAffinityProcessor grows in size

2019-03-27 Thread Stanislav Lukyanov
The memory leak looks very much like
https://issues.apache.org/jira/browse/IGNITE-7918.
Can you check on 2.7?

Stan



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


Re: Triggering Rebalancing Programmatically get error while requesting

2019-03-27 Thread luongbd.hust
Yes
I spent a lot of time trying to understand the cause of the error.
Including my company's time working so I don't want to waste it without
solving the problem.
So I decided to ask the community for help.
Because of my own ability, it is difficult to understand an open source
project like this.
I only understand the level of application for the product.
Sorry for the trouble.
I still hope someone can help me solve this problem.
Currently I have no way to solve this problem



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


Re: Triggering Rebalancing Programmatically get error while requesting

2019-03-27 Thread Yakov Zhdanov
Ilya, have you had a chance to look into threaddumps?

--Yakov


ср, 27 мар. 2019 г. в 06:18, luongbd.hust :

> Thank you for your enthusiasm
>
> I attached the logs for a longer time after the error occurred.
>
> logs.rar
> 
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


RE: Event listeners on servers only

2019-03-27 Thread maros.urbanec
Thank you, both solutions verified!



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