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/


Re: Comparing Strings in SQL statements

2017-09-14 Thread Dmitriy Setrakyan
On Thu, Sep 14, 2017 at 7:10 PM, iostream  wrote:

>
> 1. Whether Ignite does not TRIM strings internally when doing comparisons?
>

I don't think Ignite trims strings for comparison. You should use TRIM()
function explicitly when inserting or comparing strings.


> 2. Is there a way to configure my cluster to enforce TRIM whenever there
> are SQL statements with String comparisons?
>

I do not think you can enforce trimming without actually using the TRIM()
function.

Do you know other databases that provide the behavior you are asking for?
If yes, please give us a link to this feature and we will consider adding
it to Ignite.


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


Re: Indexing collection fields

2017-09-14 Thread Andrey Kornev
Hey Val! Thanks for your reply!

Unfortunately, I didn't quite get it what you're suggesting. Could you please 
explain how it can be done given this cache value class?

class Pojo {
long id;
Collection stringCollection;
Collection intCollection;
}

Thanks again!
Andrey


From: vkulichenko 
Sent: Thursday, September 14, 2017 4:45 PM
To: user@ignite.apache.org
Subject: Re: Indexing collection fields

Hi Andrey,

No, you can't index data that is inside a collection. To achieve that, you
should create a separate entry for each element of this transaction and save
them in a cache separately.

-Val



--
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/


Re:Re: Re: Re: Fetched result set too large

2017-09-14 Thread Lucky
Yes,It work.
Thank you.






At 2017-09-14 00:26:07, "Alexey Kuznetsov"  wrote:

Hi Lucky,



You can build Ignite from sources. Will this work for you?


On Wed, Sep 13, 2017 at 9:07 PM, Lucky  wrote:

Oh,No!
This is the worst news today.
I have to try  another way to resolve it.


Anyway,Thanks a lot.





At 2017-09-13 14:46:00, "Вячеслав Коптилин"  wrote:

Hi Lucky,


Unfortunately, there is no release date on Apache Ignite releases page [1].
Usually, new Ignite release become available twice a year.


[1] 
https://issues.apache.org/jira/projects/IGNITE?selectedItem=com.atlassian.jira.jira-projects-plugin:release-page


Thanks.


2017-09-13 5:27 GMT+03:00 Lucky :

Thanks.
When will the 2.3 be released?





At 2017-09-12 22:58:34, "slava.koptilin"  wrote:
>Hi Lucky,
>
>It seems that this issue was resolved
>https://issues.apache.org/jira/browse/IGNITE-5991
>The fix will be available in Apache Ignite 2.3
>
>Thanks!
>
>
>
>
>--
>Sent from: http://apache-ignite-users.70518.x6.nabble.com/




 







 






--

Alexey Kuznetsov


Re: Indexing collection fields

2017-09-14 Thread vkulichenko
Hi Andrey,

No, you can't index data that is inside a collection. To achieve that, you
should create a separate entry for each element of this transaction and save
them in a cache separately.

-Val



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


Re: A quick question on WAL and Transaction

2017-09-14 Thread vkulichenko
Yes, in this mode fsync for this mode is applied for every update. LOG_ONLY
mode writes update to FS buffers, but not necessary to disk itself, so it's
obviously faster. However, in this mode there is a chance to lose some of
the updates in case of power loss (but not in case of node process failure).

-Val



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


Re: [Announcement] Talk: Real-time Data Analysis with Apache Ignite High-Performance In-memory Platform

2017-09-14 Thread Tom Diederich
Great news, Roman! Please share some photos and give us a short report of the 
conference afterward if you get a chance. 

Tom







> On Sep 14, 2017, at 5:24 PM, Denis Magda  wrote:
> 
> Good luck, Roman!
> 
> Community please help to spread the word!
> 
> —
> Denis
> 
>> On Sep 13, 2017, at 6:11 PM, Roman Shtykh  wrote:
>> 
>> Hi,
>> 
>> I will be making a short presentation at Data Platform Conference Tokyo 2017 
>> on Apache Ignite with emphasis on IoT.
>> Attending is free. Please come if you are in Tokyo.
>> 
>> https://ignite.apache.org/events.html#dataplatform-jp
>> Best regards,Roman
> 



A quick question on WAL and Transaction

2017-09-14 Thread John Wilson
Hi,

Is an Ignite transaction, *with a recovery guarantee of power loss
(WALMode.DEFAULT),* considered committed only after its WAL log file has
been successfully *full-sync* written to disk? If so, doesn't this incur a
major slow down?

Thanks,

WALMode:
https://github.com/apache/ignite/blob/15613e2af5e0a4a0014bb5c6d6f6915038b1be1a/modules/core/src/main/java/org/apache/ignite/configuration/WALMode.java


Re: [Announcement] Talk: Real-time Data Analysis with Apache Ignite High-Performance In-memory Platform

2017-09-14 Thread Denis Magda
Good luck, Roman!

Community please help to spread the word!

—
Denis

> On Sep 13, 2017, at 6:11 PM, Roman Shtykh  wrote:
> 
> Hi,
> 
> I will be making a short presentation at Data Platform Conference Tokyo 2017 
> on Apache Ignite with emphasis on IoT.
> Attending is free. Please come if you are in Tokyo.
> 
> https://ignite.apache.org/events.html#dataplatform-jp
> Best regards,Roman



Indexing collection fields

2017-09-14 Thread Andrey Kornev
Hello,

My POJO has a collection field (e.g. a list of strings). Is indexing such 
fields supported? If not, what are my options in terms of being able to look up 
data by any element in the collection?

Thanks
Andrey




Re: UPDATE query with JOIN

2017-09-14 Thread Alexander Paschenko
Hello Sidds,

UPDATE with JOINs is not supported in Ignite as long as H2 database
grammar Ignite relies on does not support it too [1]. AFAIK, they are
not part of ANSI SQL 99 either, and thus different DB engines have
different syntax and capabilities to support it. However, I believe I
understand what you're trying to do and would like to give you a good
workaround.

Could you please explain what are you trying to achieve? It looks like
by this join you're trying to additionally limit some range of status
codes that you want to be affected, is that right? If it is, I'd
recommend you to use IN instead of JOIN, here's what your query would
look like in this case:

update fulfill_order fo

set fo.fulfill_order_status_code =?, fo.last_update_userid =?,
fo.order_due_ts =?, fo.last_update_ts =?

where fo.fulfill_order_id=?

AND fo.fulfill_order_status_code IN ( SELECT TABLE.STATUS FROM TABLE(STATUS=?) )

Note that last line written in caps after AND - it introduces a fake
subselect query. Thus, you'll need to supply your array of filtering
args as the LAST parameter of this query. (You call corresponding
variable "list" in your code.)

Regards,
Alex

[1] http://www.h2database.com/html/grammar.html#update

2017-09-12 13:41 GMT+03:00 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: Cannot start/stop cache within lock or transaction

2017-09-14 Thread rajivgandhi
The issue cannot be reproduced in 1.4.0. It seems the bug was introduced in
1.5.0




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


Re: Error : Commit produced a runtime exception

2017-09-14 Thread colinc
My configuration is as follows:   









java.lang.Longcom.bfm.meetup.Portfolio  




 
127.0.0.1:47500..47502  
  



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

Re: Error : Commit produced a runtime exception

2017-09-14 Thread colinc
I am experiencing the same problem with Ignite 2.1 when I have persistence
configured. I can start a single node successfully (I have 1M entries
persisted) but a second identical node fails with the error.

SEVERE: Failed to reinitialize local partitions (preloading will be
stopped): GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
[topVer=2, minorTopVer=0], nodeId=424cc634, evt=NODE_JOINED]
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:80)
at
org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl.start(PageMemoryImpl.java:276)

I have tried configuring a MemoryConfiguration with a DefaultRegion. I have
plenty of RAM for the data - and indeed the first node starts without
problem.

Regards,
Colin.



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


Re: Existing queue can't be accessed on client node

2017-09-14 Thread Mikhail
Hi Edward,

Thank you for the code snippet, I was able to reproduce the issue.
I need time to investigate it, if there's no problem with the code, I'll
file the issue to Ignite's jira to fix it.

Thanks,
Mike.



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


Re: Cannot start/stop cache within lock or transaction

2017-09-14 Thread rajivgandhi
Hi Yakov,
This is pretty easy to repro. Please find attached the source code project
which reproduces this 100% of the time. 

If you could please suggest a workaround or time line for the fix.

thanks and Regards,
Rajeev
ignite-deadlock.zip
 
 



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


Re: Cannot start/stop cache within lock or transaction

2017-09-14 Thread Yakov Zhdanov
Naresh,

The case you described should work. Can you please create a reproducer that
I can run locally?

I also filed this to make best effort to avoid deadlocks -
https://issues.apache.org/jira/browse/IGNITE-6380

--Yakov