Re: JDBC Thin Client with Transactions

2017-10-30 Thread iostream
So the transactional guarantees apply only to cache.get() and cache.put()
category of APIs? 

What about SqlFieldsQuery? Does it also support transactional
commits/rollbacks?



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


Re: JDBC Thin Client with Transactions

2017-10-28 Thread iostream
Found a ticket for this feature. Are there alternate ways to achieve
TRANSACTIONAL sql using JDBC Thin Driver? 



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


JDBC Thin Client with Transactions

2017-10-27 Thread iostream
Hi,

Is it possible to perform Transactional SQL INSERT, UPDATE, DELETE
statements with IgniteJdbcThinDriver?



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


Re: Failed to query ignite

2017-10-26 Thread iostream
One more thing to add - when I remove "affinityKey" from ID, I am able to
query successfully. The error occurs when I set "ID" as my affinityKey. Is
it a known bug?



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


Re: Failed to query ignite

2017-10-25 Thread iostream
Reproducer code-

ResultSet rs = null;
try {
Class.forName("org.apache.ignite.IgniteJdbcThinDriver");
Connection conn = DriverManager

.getConnection("jdbc:ignite:thin://127.0.0.1/");

// create table
PreparedStatement stmt = conn.prepareStatement(
"CREATE TABLE test9 (id BIGINT,name 
VARCHAR,PRIMARY KEY (id))WITH
\"backups=1,affinityKey=id\"");
stmt.executeUpdate();

// Try to query
PreparedStatement stmt2 = conn.prepareStatement("select 
* from test8
where id = ?");
stmt2.setObject(1, 1L);
rs = stmt2.executeQuery();
System.out.println(rs);
conn.close();

} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}




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


Re: Failed to query ignite

2017-10-25 Thread iostream
I think i have found the problem here. When I query my cache on the PRIMARY
KEY, the query throws exception. When I removed PRIMARY KEY from "id", query
is working fine. How do I query on the PRIMARY KEY ?



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


Re: Failed to query ignite

2017-10-25 Thread iostream
Hi Andrew,

I created a table with BIGINT instead of LONG data type in cache. I am still
getting the same error when I try to query using java.Lang.Long

DDL-

CREATE TABLE test4 
(
  id /BIGINT/,
  name   VARCHAR,
  PRIMARY KEY (id)
  
)
WITH "backups=1,affinityKey=id";




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


Re: Failed to query ignite

2017-10-24 Thread iostream
Hi Andrew,

The result set was /null/ because the query failed in ignite. This is the
only stack trace printed. 

The problem occurs only when I query on LONG column "id". When I query on
VARCHAR column "name" (/eg. select * from test where name = "abc"/), I am
able to get the result set. 

What is the correct way to set argument to query on a field whose data type
is LONG?



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


Failed to query ignite

2017-10-24 Thread iostream
*Hi,

I have created a table in my ignite cluster (v2.1) using the following DDL
-*

CREATE TABLE test 
(
  id LONG,
  name   VARCHAR,
  PRIMARY KEY (id)
  
)
WITH "backups=1,affinityKey=id";

*I am trying to query the table using IgniteJdbcThinDriver. The code to
query is as follows -*

String sql = "/select * from test where id = ?/";
List params = new ArrayList();
params.add(1L);
ResultSet rs = null;
Class.forName("org.apache.ignite.IgniteJdbcThinDriver");
Connection conn =
DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1/");
PreparedStatement stmt = conn.prepareStatement(sql);
if (null != params) {
int i = 1;
for (Object param : params) {
stmt.setObject(i, param);
i++;
}
}
rs = stmt.executeQuery();
conn.close();

*I am getting the following error -*

java.sql.SQLException: Failed to query Ignite.
at
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:123)
at
org.apache.ignite.internal.jdbc.thin.JdbcThinPreparedStatement.executeWithArguments(JdbcThinPreparedStatement.java:221)
at
org.apache.ignite.internal.jdbc.thin.JdbcThinPreparedStatement.executeQuery(JdbcThinPreparedStatement.java:68)
at
com.walmart.ecommerce.fulfillment.node.commons.manager.dlr.work.Tester.main(Tester.java:34)
Caused by: class org.apache.ignite.IgniteCheckedException: Error server
response: [req=JdbcQueryExecuteRequest [schemaName=null, pageSize=1024,
maxRows=0, sqlQry=select * from test where id = ?, args=[1]],
resp=JdbcResponse [res=null, status=1, err=javax.cache.CacheException: class
org.apache.ignite.IgniteCheckedException: null]]
at
org.apache.ignite.internal.jdbc.thin.JdbcThinTcpIo.sendRequest(JdbcThinTcpIo.java:253)
at
org.apache.ignite.internal.jdbc.thin.JdbcThinTcpIo.queryExecute(JdbcThinTcpIo.java:227)
at
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:109)
... 3 more



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


Re: Cache Indexes not getting created Ignite v2.1

2017-10-02 Thread iostream
Hi, any update on this?



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


Re: Cache Indexes not getting created Ignite v2.1

2017-09-29 Thread iostream
Hi,

I have marked all my fields with @QuerySqlField annotation because I want to
expose all my fields to SQL Query. I do not want to create an index on
"name".

I use the same setup across all my environments. In my lower environments, I
am able to retrieve data using both SQL query on DBeaver and SQLFieldsQuery
in my Java Application as follows -

IgniteCache cache = Ignition.ignite()
.cache("PersonCache");
SqlFieldsQuery query = new SqlFieldsQuery("SELECT * from
"PersonCache".Person where name = ?")
.setArgs("ABC");

In my PROD env, SQL query on DBeaver and SQLFieldsQuery are not returning
any data.



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


Re: Cache Indexes not getting created Ignite v2.1

2017-09-29 Thread iostream
*I get metadata using REST API -*

http://localhost:8080/ignite?cmd=metadata

*SQL Query -*

Select * from "PersonCache".Person where name = "ABC";

As I already mentioned, I am able to retrieve records using Key, but SQL
query is not able to get any data.



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


Cache Indexes not getting created Ignite v2.1

2017-09-28 Thread iostream
*Hi,

I have a setup with 20 ignite cache servers (v2.1). I create my cache using
a client, steps are as follows -

1. Client connects to the ignite cluster during startup.
2. During startup, client checks if my cache is already created (cache name
- "Person")
3. If cache is already created, client does nothing. If cache is not already
created, the client creates the cache.*

*My Cache value object looks like this -*

public class Person implements Serializable {

@QuerySqlField(index = true, orderedGroups = {
@QuerySqlField.Group(name = "personGroup", order = 3, 
descending = true)
})
@QueryTextField
private String name;
@QuerySqlField(index = true, orderedGroups = {
@QuerySqlField.Group(name = "personGroup", order = 4, 
descending = true)
})
private String id;
@QuerySqlField(index = true, orderedGroups = {
@QuerySqlField.Group(name = "personGroup", order = 0, 
descending = false)
})
private String country;
@QuerySqlField(index = true, orderedGroups = {
@QuerySqlField.Group(name = "personGroup", order = 2, 
descending = false)
})
private String department;
@QuerySqlField(index = true, orderedGroups = {
@QuerySqlField.Group(name = "personGroup", order = 1, 
descending = false)
})
private Integer stateCode;
@QuerySqlField
private Integer activityStatus;

}

*As can be seen, I have created a group index - personGroup.

The cache creation code in the client looks as follows -*

if (cacheManager.getCache("PersonCache") == null) {
CacheConfiguration cacheConfig = new
CacheConfiguration<>();
cacheConfig.setAtomicityMode(TRANSACTIONAL);
cacheConfig.setCacheMode(PARTITIONED);
cacheConfig.setBackups(1);
cacheConfig.setCopyOnRead(TRUE);
cacheConfig.setPartitionLossPolicy(IGNITE);
cacheConfig.setQueryParallelism(2);
cacheConfig.setReadFromBackup(TRUE);
cacheConfig.setRebalanceBatchSize(524288);
cacheConfig.setRebalanceThrottle(100);
cacheConfig.setIndexedTypes(person_key.class, Person.class);
cacheConfig.setOnheapCacheEnabled(FALSE);
cacheConfig.setStatisticsEnabled(TRUE);
cacheManager.createCache("PersonCache", cacheConfig);

*Now, after creating the cache and adding data to it, I was able to see
cache size and I am able to retrieve data from my cache using the key.
However, my SQL query is not returning any data. Upon checking the cache
metadata, I found that indexes (both individual and group) were not created
correctly. The metadata looks as follows -*

{
"cacheName": "PersonCache",
"types": [
"Person"
],
"keyClasses": {
"person_key": "java.lang.Object"
},
"valClasses": {
"Person": "java.lang.Object"
},
"fields": {
"Person": {
"name": "java.lang.String",
"id": "java.lang.String",
"country": "java.lang.String",
"department": "java.lang.String",
"stateCode": "java.lang.Integer",
"activityStatus": "java.lang.Integer",
}
},
"indexes": {
"Person": [
{
"name": "PERSON_NAME_IDX",
"fields": [
"NAME"
],
"descendings": [],
"unique": false
}
]
}
}

Can someone help me understand why I am not able to retrieve data using SQL
query and why indexes have not been created appropriately?

Thanks!




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


Re: Comparing Strings in SQL statements

2017-09-14 Thread iostream
I have used Informix DB before. In Informix string comparisons such as - 

SELECT * from Person where fName = "ABC";

return rows even if the column value has trailing spaces. The Informix
engine internally trims strings before comparison. It would be great if a
similar feature could be added to Ignite because performing TRIM() in every
create or update scenario will be expensive from an application point of
view.



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


Comparing Strings in SQL statements

2017-09-14 Thread iostream
Hi,

I am trying to fetch records from my cache based on the value of a column
which is a STRING datatype.
My string column has a few trailing spaces as such - "ABC". 
When I use the below SQL statement -

SELECT * from Person where fNmae = "ABC";

I find no matches. However, when I use the below query -

SELECT * from Person where fName = "ABC"

I am able to find the row. So my questions are -

1. Whether Ignite does not TRIM strings internally when doing comparisons?
2. Is there a way to configure my cluster to enforce TRIM whenever there are
SQL statements with String comparisons?

Thanks!



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


Re: UPDATE query with JOIN

2017-09-14 Thread iostream
Hi Alexander,

I will try what you have suggested. Thanks for the suggestions!





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


UPDATE query with JOIN

2017-09-12 Thread iostream
Hi,

Does ignite v2.1 support UPDATE queries with JOINS?

I tried a SELECT query as follows and it worked fine -

select count(*) from fulfill_order fo join table(id bigint = ?) t on
fo.fulfill_order_status_code = t.id";
SqlFieldsQuery enhanceQuery = new SqlFieldsQuery(cacheQuery);
ArrayList list = new ArrayList<>();
list.add(7);
list.add(1);
list.add(9);
Integer [] arr = list.toArray(new Integer[list.size()]);
Object [] obj = new Object[]{arr};
enhanceQuery.setArgs(obj);
IgniteCache fulfillOrderCache =
Ignition.ignite()
   
.cache(CacheNameConstants.FULFILL_ORDER_CACHE_NAME);
QueryCursor> cursor = fulfillOrderCache.query(enhanceQuery);

However, I tried running UPDATE query as follows but none of the queries
worked.

1. String updateQuery = "UPDATE fo SET fo.fulfill_order_status_code =? "
+ "FROM fulfill_order fo join table(id bigint = ?) t
on fo.fulfill_order_status_code = t.id "
+ "where fo.fulfill_order_id=?";
SqlFieldsQuery enhanceQuery = new SqlFieldsQuery(updateQuery);
ArrayList list = new ArrayList<>();
list.add(7);
list.add(1);
list.add(9);
Integer [] arr = list.toArray(new Integer[list.size()]);
Object [] obj = new Object[]{arr};
enhanceQuery.setArgs(3,obj, 347427284695L);
IgniteCache fulfillOrderCache =
Ignition.ignite()
   
.cache(CacheNameConstants.FULFILL_ORDER_CACHE_NAME);
fulfillOrderCache.query(enhanceQuery);   

2. update fulfill_order fo join table(id bigint = ?) t on
fo.fulfill_order_status_code = t.id
set fo.fulfill_order_status_code =?, fo.last_update_userid =?,
fo.order_due_ts =?,
fo.last_update_ts =? where fo.fulfill_order_id=?

Can someone help with the correct way of running UPDATE query with JOIN?

Thanks!



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


Re: SqlFieldsQuery NPE on my schema

2017-08-24 Thread iostream
Changing the query to include setParitions solved the problem with SELECT
query. However, SQL statements with DELETE and UPDATE are still not working.

Change made -

SqlFieldsQuery folquery = new SqlFieldsQuery("UPDATE A set b = 111 where c =
?").setArgs(someArg);
folquery.setDistributedJoins(false);
folquery.setSchema("PUBLIC");
Affinity aff =
Ignition.ignite().affinity(CacheNameConstants.FULFILL_ORDER_CACHE_NAME);
int parts = aff.partition(fulfillOrderId);
int[] parts = aff.primaryPartitions(locNode);
folquery.setPartitions(parts);
focache.query(folquery);



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/SqlFieldsQuery-NPE-on-my-schema-tp16409p16416.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


SqlFieldsQuery NPE on my schema

2017-08-24 Thread iostream
My cache configuration is as follows - 

CacheConfiguration cacheConfig = new
CacheConfiguration<>();
cacheConfig.setAtomicityMode(TRANSACTIONAL);
cacheConfig.setCacheMode(PARTITIONED);
cacheConfig.setBackups(1);
cacheConfig.setCopyOnRead(TRUE);
cacheConfig.setPartitionLossPolicy(IGNORE);
cacheConfig.setQueryParallelism(2);
cacheConfig.setReadFromBackup(TRUE);
cacheConfig.setRebalanceBatchSize(524288);
cacheConfig.setRebalanceThrottle(100);
cacheConfig.setRebalanceTimeout(1);
cacheConfig.setIndexedTypes(A.class, B.class);
cacheConfig.setOnheapCacheEnabled(FALSE);
cacheConfig.setStatisticsEnabled(true);
cacheConfig.setSqlSchema("PUBLIC");
cacheConfig.setName(cache1);
Ignition.ignite().createCache(cacheConfig);

When I try to run the following SqlFieldsQuery, i get a NPE when executing
the query.

IgniteCache folcache = Ignition.ignite().cache(cache1);
SqlFieldsQuery folquery = new SqlFieldsQuery("SELECT * from B");
folquery.setDistributedJoins(false);
QueryCursor> folcursor = folcache.query(folquery);

Error -

Apache Tomcat/9.0.0.M17 - Error
report 
HTTP Status 500 - NodeCommonsException [errorCode=1001, description=Error
while accessing DB]
*type* Exception report*message*
NodeCommonsException [errorCode=1001, description=Error while accessing
DB]*description* The server encountered an internal error that
prevented it from fulfilling this
request.*exception*javax.servlet.ServletException:
NodeCommonsException [errorCode=1001, description=Error while accessing DB]
org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:392)

org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:382)

org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:345)

org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:220)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
*root cause*NodeCommonsException [errorCode=1001,
description=Error while accessing DB]

com.walmart.ecommerce.fulfillment.node.commons.manager.dao.aop.DataAccesAspect.catchDataAccessException(DataAccesAspect.java:36)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)

org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)

org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:603)

org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62)

org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)

org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653)

com.walmart.ecommerce.fulfillment.node.commons.manager.dao.impl.FulfillOrderDAOImpl$$EnhancerBySpringCGLIB$$74f64cb6.getOrderIgnite(generated)

com.walmart.ecommerce.fulfillment.node.commons.manager.business.impl.OrderManagerImpl.getOrderIgnite(OrderManagerImpl.java:93)

com.walmart.ecommerce.fulfillment.node.commons.manager.ws.FulfillmentOrdersWebService.getFulfillOrderIgnite(FulfillmentOrdersWebService.java:298)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)

org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)

org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151)

org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171)

org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)

org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)

org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:402)

org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:349)

org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:106)
org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:259)

Re: Activation: slow and: Ignite node crashed in the middle of checkpoint.

2017-08-21 Thread iostream
Hi Roger,

I have experienced a similar issue during cluster activation in my setup as
well. I had shared my logs here -
http://apache-ignite-users.70518.x6.nabble.com/Activating-Cluster-taking-too-long-td16093.html

Eagerly seeking a root cause and resolution for this.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Activation-slow-and-Ignite-node-crashed-in-the-middle-of-checkpoint-tp16144p16318.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Activating Cluster taking too long

2017-08-10 Thread iostream
Hi!

I am experimenting with v2.1 persistence store enabled.

1. Created 8 caches and pumped data into them.
2. Restarted the ignite cluster.
3. Waited for all server nodes to join the cluster.
4. called Ignite.active(true);

I observed the cluster activation time is more than 1 hour with the
following configuration after restarting my Ignite cluster. Is this an
expected behaviour? Please advice what can be configured to reduce the
activation time. Thanks!

*Number of clients* - 8
*Number of ignite servers* - 8
*Number of caches* - 8
*Disk usage for persistence store per server node* = around 50 GB

*Cache configuration* -

cacheConfig.setAtomicityMode(TRANSACTIONAL);
cacheConfig.setCacheMode(PARTITIONED);
cacheConfig.setBackups(1);
cacheConfig.setCopyOnRead(TRUE);
cacheConfig.setPartitionLossPolicy(IGNORE);
cacheConfig.setQueryParallelism(2);
cacheConfig.setReadFromBackup(TRUE);
cacheConfig.setRebalanceBatchSize(524288);
cacheConfig.setRebalanceThrottle(100);
cacheConfig.setRebalanceTimeout(1);
cacheConfig.setIndexedTypes(A.class, B.class);
cacheConfig.setOnheapCacheEnabled(FALSE);

*Client and Server Configuration* -


http://www.springframework.org/schema/beans;
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.xsd;>




































*What I found in logs* -

  ^-- CPU [cur=0.1%, avg=0.98%, GC=0%]
^-- PageMemory [pages=2268513]
^-- Heap [used=409MB, free=59.99%, comm=1023MB]
^-- Non heap [used=69MB, free=95.43%, comm=71MB]
^-- Public thread pool [active=0, idle=0, qSize=0]
^-- System thread pool [active=0, idle=7, qSize=0]
^-- Outbound messages queue [size=0]
[07:32:26,656][WARNING][exchange-worker-#50%null%][diagnostic] Failed to
wait for partition map exchange [topVer=AffinityTopologyVersion [topVer=16,
minorTopVer=1], node=dcb07329-c5d6-404c-b4b1-3c0225e99a62]. Dumping pending
objects that might be the cause: 
[07:32:35,344][INFO][tcp-disco-ip-finder-cleaner-#4%null%][TcpDiscoveryZookeeperIpFinder]
ZooKeeper IP Finder resolved addresses: [/10.120.201.127:47500,
/10.120.132.193:47500, /10.120.204.163:47500, /10.120.199.162:47500,
/10.120.201.180:47500, /10.120.199.166:47500, /127.0.0.1:47500,
/10.120.194.122:47500, /10.120.190.154:47500]
[07:32:36,657][WARNING][exchange-worker-#50%null%][diagnostic] Failed to
wait for partition map exchange [topVer=AffinityTopologyVersion [topVer=16,
minorTopVer=1], node=dcb07329-c5d6-404c-b4b1-3c0225e99a62]. Dumping pending
objects that might be the cause: 
[07:32:46,658][WARNING][exchange-worker-#50%null%][diagnostic] Failed to
wait for partition map exchange [topVer=AffinityTopologyVersion [topVer=16,
minorTopVer=1], node=dcb07329-c5d6-404c-b4b1-3c0225e99a62]. Dumping pending
objects that might be the cause: 
[07:32:56,659][WARNING][exchange-worker-#50%null%][diagnostic] Failed to
wait for partition map exchange [topVer=AffinityTopologyVersion [topVer=16,
minorTopVer=1], node=dcb07329-c5d6-404c-b4b1-3c0225e99a62]. Dumping pending
objects that might be the cause: 








--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Activating-Cluster-taking-too-long-tp16093.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Warming up RAM from durable memory

2017-08-06 Thread iostream
Hi,

Is there a way to warm-up the RAM with a subset of data from the durable
memory after cluster deployment?

Thanks!



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Warming-up-RAM-from-durable-memory-tp16017.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Cache.get does not move entry from disk to RAM

2017-08-05 Thread iostream
Hi,

I am using v2.1 with persistence store enabled. I observed that cache.get()
does not move requested entry from the disk to the RAM. Is this an expected
behaviour?

Is there any best practice to warm-up RAM with a subset of data from the
durable memory when I restart my cluster.

Thanks!



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Cache-get-does-not-move-entry-from-disk-to-RAM-tp16016.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Query about running SQL with durable memory

2017-08-05 Thread iostream
Hi,

I want to understand how SQL queries work when persistence store is enabled
in v2.1.

Suppose I have 10 Person entries in the disk, out of which only 5 are
in-memory. Now if I run a SQL query which is expected to count the number of
entries in Person cache, will the query run only on the disk or RAM or will
it run on both? 

If the query will run on both the disk and RAM, will the count be 10 or 15
(10 on disk + 5 in RAM)? Does the SQL processor know which entries are
present in-memory to resolve duplicates?

Thanks!





--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Query-about-running-SQL-with-durable-memory-tp16015.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Error : Commit produced a runtime exception

2017-07-31 Thread iostream
No I have not set any memory configuration



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Error-Commit-produced-a-runtime-exception-tp15768p15824.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Error : Commit produced a runtime exception

2017-07-30 Thread iostream
*Server configuration*





http://www.springframework.org/schema/beans;
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.xsd;>






















host1:47500..47509

host2:47500..47509








 
 



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Error-Commit-produced-a-runtime-exception-tp15768p15801.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Error : Commit produced a runtime exception

2017-07-28 Thread iostream
Attaching the complete error log file ignite_error_log.log

  



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Error-Commit-produced-a-runtime-exception-tp15768p15780.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Error : Commit produced a runtime exception

2017-07-28 Thread iostream
Ignite logs show the following heap statistics before the failure. Shows
79.94% free heap memory.

[09:57:38,964][INFO][grid-timeout-worker-#19%null%][IgniteKernal] FreeList
[name=null, buckets=256, dataPages=1208250, reusePages=0] 
[09:58:38,963][INFO][grid-timeout-worker-#19%null%][IgniteKernal] 
Metrics for local node (to disable set 'metricsLogFrequency' to 0) 
^-- Node [id=635920a1, name=null, uptime=27:24:08:084] 
^-- H/N/C [hosts=16, nodes=16, CPUs=60] 
^-- CPU [cur=0.17%, avg=0.66%, GC=0%] 
^-- PageMemory [pages=19546713] 
^-- Heap [used=1437MB, free=79.94%, comm=4095MB] 
^-- Non heap [used=74MB, free=95.07%, comm=76MB] 
^-- Public thread pool [active=0, idle=0, qSize=0] 
^-- System thread pool [active=0, idle=6, qSize=0] 
^-- Outbound messages queue [size=0] 




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Error-Commit-produced-a-runtime-exception-tp15768p15771.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Error : Commit produced a runtime exception

2017-07-28 Thread iostream
Hi,

My ignite cluster hung producing the following error trace. Can someone help
me identify the reason for the failure and cluster hang?

[09:57:38,964][INFO][grid-timeout-worker-#19%null%][IgniteKernal] FreeList
[name=null, buckets=256, dataPages=1208250, reusePages=0]
[09:58:38,963][INFO][grid-timeout-worker-#19%null%][IgniteKernal]
Metrics for local node (to disable set 'metricsLogFrequency' to 0)
^-- Node [id=635920a1, name=null, uptime=27:24:08:084]
^-- H/N/C [hosts=16, nodes=16, CPUs=60]
^-- CPU [cur=0.17%, avg=0.66%, GC=0%]
^-- PageMemory [pages=19546713]
^-- Heap [used=1437MB, free=79.94%, comm=4095MB]
^-- Non heap [used=74MB, free=95.07%, comm=76MB]
^-- Public thread pool [active=0, idle=0, qSize=0]
^-- System thread pool [active=0, idle=6, qSize=0]
^-- Outbound messages queue [size=0]
[09:58:38,964][INFO][grid-timeout-worker-#19%null%][IgniteKernal] FreeList
[name=null, buckets=256, dataPages=1208250, reusePages=0]
[09:58:57,610][INFO][grid-nio-worker-tcp-comm-0-#21%null%][TcpCommunicationSpi]
Accepted incoming communication connection [locAddr=/10.65.97.216:47100,
rmtAddr=/10.247.193.243:46910]
[09:59:08,242][INFO][grid-nio-worker-tcp-comm-1-#22%null%][TcpCommunicationSpi]
Accepted incoming communication connection [locAddr=/10.65.97.216:47100,
rmtAddr=/10.117.234.100:49012]
[09:59:08,273][INFO][grid-nio-worker-tcp-comm-2-#23%null%][TcpCommunicationSpi]
Established outgoing communication connection [locAddr=/10.65.97.216:40504,
rmtAddr=/10.247.197.103:47100]
[09:59:08,474][INFO][grid-nio-worker-tcp-comm-3-#24%null%][TcpCommunicationSpi]
Accepted incoming communication connection [locAddr=/10.65.97.216:47100,
rmtAddr=/10.65.100.14:47386]
[09:59:08,563][INFO][grid-nio-worker-tcp-comm-0-#21%null%][TcpCommunicationSpi]
Accepted incoming communication connection [locAddr=/10.65.97.216:47100,
rmtAddr=/10.117.234.32:58504]
[09:59:26,270][SEVERE][sys-stripe-6-#7%null%][GridDhtTxRemote] Commit
failed.
class
org.apache.ignite.internal.transactions.IgniteTxHeuristicCheckedException:
Commit produced a runtime exception (all transaction entries will be
invalidated):
GridDhtTxRemote[id=45c108f7d51--06b5-15d4--0010,
concurrency=PESSIMISTIC, isolation=REPEATABLE_READ, state=COMMITTING,
invalidate=false, rollbackOnly=false,
nodeId=04540138-5619-4184-863c-2df07914ab02, duration=0]
at
org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxRemoteAdapter.commitIfLocked(GridDistributedTxRemoteAdapter.java:719)
at
org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxRemoteAdapter.commitRemoteTx(GridDistributedTxRemoteAdapter.java:789)
at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler.finish(IgniteTxHandler.java:1238)
at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler.processDhtTxPrepareRequest(IgniteTxHandler.java:965)
at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler.access$400(IgniteTxHandler.java:95)
at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler$5.apply(IgniteTxHandler.java:165)
at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler$5.apply(IgniteTxHandler.java:163)
at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.processMessage(GridCacheIoManager.java:863)
at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:386)
at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:308)
at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.access$000(GridCacheIoManager.java:100)
at
org.apache.ignite.internal.processors.cache.GridCacheIoManager$1.onMessage(GridCacheIoManager.java:253)
at
org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1257)
at
org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:885)
at
org.apache.ignite.internal.managers.communication.GridIoManager.access$2100(GridIoManager.java:114)
at
org.apache.ignite.internal.managers.communication.GridIoManager$7.run(GridIoManager.java:802)
at
org.apache.ignite.internal.util.StripedExecutor$Stripe.run(StripedExecutor.java:483)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.OutOfMemoryError
at sun.misc.Unsafe.allocateMemory(Native Method)
at
org.apache.ignite.internal.util.GridUnsafe.allocateMemory(GridUnsafe.java:1054)
at
org.apache.ignite.internal.mem.unsafe.UnsafeMemoryProvider.nextRegion(UnsafeMemoryProvider.java:76)
at
org.apache.ignite.internal.pagemem.impl.PageMemoryNoStoreImpl.addSegment(PageMemoryNoStoreImpl.java:616)
at
org.apache.ignite.internal.pagemem.impl.PageMemoryNoStoreImpl.allocatePage(PageMemoryNoStoreImpl.java:279)

Pagination with TextQuery

2017-07-20 Thread iostream
Hi,

How to implement pagination with TextQuery? I want to fetch only the first
10 matches for my text query on the first page and the next 10 (from 11 to
20) on the second page.

Thanks!



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


Re: Question about QueryTextField

2017-07-20 Thread iostream
I corrected the problem. Like you suggested, using capital "A" does not work.
I have to use exact name of my attribute (which is small "a").

Thanks!



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


Re: Question about QueryTextField

2017-07-20 Thread iostream
When I use search as -> "A:123" it does not give me any result even though
there is a cache entry with A = 123. Can somebody please help me?



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


Re: Question about QueryTextField

2017-07-19 Thread iostream
I know how to use @QueryTextField (as can be seen in my example).

When I perform a TextQuery it scans on all fields that I have used the
annotation on. I want the TextQuery to run only on one field and not on all
fields in my cache object.

Is my question clear?



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


Question about QueryTextField

2017-07-19 Thread iostream
Hi,

Instead of performing a text query on the entire cache object as mentioned
here (https://apacheignite.readme.io/v2.0/docs/cache-queries#text-queries),
can I perform a text query on a single attribute in my cache value object?

Example -

public class my_object {
@QuerySqlField(index = true)
@QueryTextField
private String a;
@QuerySqlField
@QueryTextField
private String b;
@QuerySqlField
private String c;
}

I want to perform a text query only on "a" on not on the "my_object"

Thanks!



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


Re: Poor cross cache join SQL performance (v2.0.0)

2017-07-12 Thread iostream
Hi,

Apologies for the delayed response.

Implementing appropriate group indexes solved the problem for me.

One question - can I create a group index across caches? Or group index can
be created only within one cache?

Thanks! :)



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Poor-cross-cache-join-SQL-performance-v2-0-0-tp14373p14719.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Poor cross cache join SQL performance (v2.0.0)

2017-07-06 Thread iostream
Hi Alex,

Yes Value2.class was already added to indextypes.

I am only reading the value which is why copyOnRead is set to "false".



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Poor-cross-cache-join-SQL-performance-v2-0-0-tp14373p14382.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.