Re: Continuous query setPageSize and setTimeInterval question

2020-04-28 Thread crypto_ricklee
Thanks Alex,

But I still not quite understand the expected behaviour. If I set the page
size to 100 and interval to 0, should the local query be triggered for every
100 updates?

Regards,
Rick



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


Presentation - Real World Architectural Patterns with Apache Pulsar and Ignite

2020-04-28 Thread Devin Bost
If anyone missed my presentation today on Real-World Architectural Patterns
with Apache Pulsar that focuses on *Ignite* use cases and high-performance
caching, you can access the recording here: https://youtu.be/pmaCG1SHAW8

Devin G. Bost


[Webinar] Architects' Guide for Apache Ignite ACID Transactions and Consistency

2020-04-28 Thread Ivan Rakov
Hi,

Tomorrow (Apr 29) I'll present a webinar [1] on basic data safety /
consistency guarantees that can be provided by Ignite. We'll discuss data
replication modes, atomic / TX caches, write sync modes and disk
consistency guarantees. Possible configuration options and their impact on
the system will be explained.

Complexity level: easy.
If you recently started using Ignite or are still thinking about it, I hope
that content will be helpful to you. If you are experienced with Ignite,
you may not find anything new, but I'll be glad to answer your tricky
questions during the Q session.

[1]:
https://www.gridgain.com/resources/webinars/architects-guide-for-apache-ignite-acid-transactions-and-consistency


-- 
Best Regards,
Ivan Rakov


Re: Continuous query setPageSize and setTimeInterval question

2020-04-28 Thread akorensh
Hi,
   setTimeInterval limits the time Ignite will wait for an internal buffer
to fill up before sending.

   It is not a time delay setting.

   From the doc:
https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/cache/query/ContinuousQuery.html#setTimeInterval-long-
 When a cache update happens, entry is first put into a buffer. Entries
from buffer will be sent to the 
 master node only if the buffer is full (its size can be provided via
Query.setPageSize(int) method) or time 
 provided via this method is exceeded.

 Default time interval is 0 which means that time check is disabled and
entries will be sent only when 
buffer is full.
   
Thanks, Alex



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


Re: Ignite Data loss

2020-04-28 Thread akorensh
You are using PARTITIONED caches, and some nodes might have left the grid
causing data loss
look for this message:  Topology snapshot [ .. servers=1, clients=0]
see if you are seeing servers appear or disappear?

Try changing your cache config to REPLICATED to see whether this issue
re-occurs?



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


Re: Ignite Data loss

2020-04-28 Thread krkumar24061...@gmail.com
Hi Alex - Here is the cache configuration for the cache
CacheConfiguration cacheConfig = new
CacheConfiguration<>();
cacheConfig.setCacheMode(CacheMode.PARTITIONED);
cacheConfig.setRebalanceMode(CacheRebalanceMode.ASYNC);
cacheConfig.setRebalanceDelay(rebalanceDelay);
cacheConfig.setName("eventCache-" + tenantRunId + "-" + 
tenantId);
cacheConfig.setBackups(1);
cacheConfig.setAtomicityMode(CacheAtomicityMode.ATOMIC);

cacheConfig.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
IgniteCache cache =
IgniteContextWrapper.getInstance().getEngine()
.getOrCreateCache(cacheConfig);

Here is how i am looking at the size

logger.info("Events already persisted into store for Tenant :  " + tenantId
+ " are "
+ 
cache.sizeLong(CachePeekMode.PRIMARY));

Thanx and Regards,
KR Kumar




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


Re: Ignite Data loss

2020-04-28 Thread akorensh
Hi,
  Are you using expiry policies? 
  https://apacheignite.readme.io/docs/expiry-policies
  Share your config?

  How are you measuring the #  of entries?
Thanks, Alex



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


Re: Xgboost inference on regression task.

2020-04-28 Thread zaleslaw
Dear akorensh, thank you for the support, please, next time provide the
correct link to Apache Ignite documentation, not to GridGain site (there
could be outdated documentation).

The actual documentation is here for release 2.8.0
https://apacheignite.readme.io/docs/machine-learning

https://apacheignite.readme.io/docs/gradient-boosting
https://apacheignite.readme.io/docs/random-forest





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


Re: Xgboost inference on regression task.

2020-04-28 Thread zaleslaw
Hi, askelejboelle!

Could you please share the model, snippet of data (if it's not secret) and
full code sample to reproduce problem. It looks like a bug and I'll try to
fix it.



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


Ignite Data loss

2020-04-28 Thread krkumar24061...@gmail.com
Hi Guys - I have ignite cache with persistence enabled. Three days back I was
having 11 billion events in the cache and yesterday it became around 10
billion and now its around 8.9 billion. Ignite data is constantly going down
on its own. Am I doing something wrong with my config or have you guys faced
similar problem ever??

Thanx and Regards,
KR Kumar



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


Continuous query setPageSize and setTimeInterval question

2020-04-28 Thread crypto_ricklee
Dear all,

I tried to play around with the setPageSize and setTimeInterval on
Continuous Query, but it doesn't seem to have any effect. My code is like:

  private void configOrderListener(Ignite ignite) {
IgniteCache cache =
ignite.cache(StoreHelper.getCacheName(OrderStore.class));

ContinuousQuery qry = new ContinuousQuery<>();

//qry.setPageSize(20);
qry.setLocal(true);
qry.setTimeInterval(2000L);
qry.setLocalListener(createOrderHandler());

cache.query(qry);
  }

  private CacheEntryUpdatedListener createOrderHandler() {
return (evts) -> {
  log.info("batch size: {}", Iterables.size(evts));

  evts.forEach(
  e -> {
if (e.getEventType().equals(EventType.CREATED) ||
e.getEventType().equals(EventType.UPDATED)) {
  log.info("{}", e);
  redisService.publish("user.order." +
e.getValue().getSymbol() + "." + e.getValue().getKey().getAccountUuid(),
e.getValue()).block();
}
  });
};
  }


What I expect is I will be receiving event every 2000ms, but the result was
I received each event immediately without any batching. I've tried to set
the page size, but no effect as well. Am I doing sth wrong? Please kindly
advise. 

Thanks,
Rick



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


Re: EPOCH seconds in future!

2020-04-28 Thread Ilya Kasnacheev
Hello!

Yes, you are right, according to
https://issues.apache.org/jira/browse/IGNITE-11472 TIMESTAMP WITH TIME ZONE
not supported by Ignite.

I think you will have to work around this quirky behavior. I have left a
comment about this issue specifically.

Regards,
-- 
Ilya Kasnacheev


пн, 27 апр. 2020 г. в 15:15, dbutkovic :

> Hi Ilya,
>
> thnx for replay, I think that Ignite CURRENT_TIMESTAMP() is NOT TIMESTAMP
> WITH TIME ZONE.
>
> Below it test with inserting CURRENT_TIMESTAMP in two tables, one with data
> type TIMESTAMP and second with TIMESTAMP WITH TIME ZONE.
>
> First of all,
> in Ignite documentation I can't find that CURRENT_TIMESTAMP() returns
> TIMESTAMP WITH TIME ZONE.
>
> In H2 documentation we can see that H2 have two data types:
> TIMESTAMP and TIMESTAMP WITH TIME ZONE
> http://www.h2database.com/html/datatypes.html#timestamp_with_time_zone_type
>
> In H2 CURRENT_TIMESTAMP returns the current timestamp with time zone.
>
> I think that in Ignite CURRENT_TIMESTAMP is ONLY CURRENT_TIMESTAMP without
> TIME ZONE.
>
> https://apacheignite-sql.readme.io/docs/current_timestamp
>
>
> 0: jdbc:ignite:thin://192.168.50.95/> SELECT CURRENT_TIMESTAMP();
> ++
> |  CURRENT_TIMESTAMP()   |
> ++
> | 2020-04-27 13:59:39.814|
> ++
>
> In first table insert of CURRENT_TIMESTAMP() in data type timestamp is OK.
>
> CREATE TABLE TEST1
> (
> id  varchar(10),
> time1   timestamp,
> PRIMARY KEY (id)
> ) WITH "CACHE_NAME=TEST1, DATA_REGION=PersistDataRegion,
> TEMPLATE=REPLICATED, BACKUPS=1";
>
> 0: jdbc:ignite:thin://192.168.50.95/> INSERT INTO TEST1 (id, time1) values
> ('a', CURRENT_TIMESTAMP());
> 1 row affected (0.051 seconds)
>
>
> In second table insert of CURRENT_TIMESTAMP() in data type timestamp with
> time zone is NOT OK.
>
> CREATE TABLE TEST2
> (
> id  varchar(10),
> time1   timestamp with time zone,
> PRIMARY KEY (id)
> ) WITH "CACHE_NAME
>
>
> 0: jdbc:ignite:thin://192.168.50.95/> INSERT INTO TEST2 (id, time1) values
> ('a', CURRENT_TIMESTAMP());
> Error: class org.apache.ignite.IgniteException: Failed to execute SQL
> query.
> Hexadecimal string with odd number of characters: "2020-04-27
> 13:59:00.599";
> SQL statement:
> SELECT
> TABLE.ID,
> TABLE.TIME1
> FROM TABLE(ID VARCHAR(10)=('a',), TIME1 OTHER=(CURRENT_TIMESTAMP(),))
> [90003-197] (state=5,code=1)
> java.sql.SQLException: class org.apache.ignite.IgniteException: Failed to
> execute SQL query. Hexadecimal string with odd number of characters:
> "2020-04-27 13:59:00.599"; SQL statement:
> SELECT
> TABLE.ID,
> TABLE.TIME1
> FROM TABLE(ID VARCHAR(10)=('a',), TIME1 OTHER=(CURRENT_TIMESTAMP(),))
> [90003-197]
> at
>
> org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:750)
> at
>
> org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:212)
> at
>
> org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute(JdbcThinStatement.java:475)
> at sqlline.Commands.execute(Commands.java:823)
> at sqlline.Commands.sql(Commands.java:733)
> at sqlline.SqlLine.dispatch(SqlLine.java:795)
> at sqlline.SqlLine.begin(SqlLine.java:668)
> at sqlline.SqlLine.start(SqlLine.java:373)
> at sqlline.SqlLine.main(SqlLine.java:265)
>
>
> Please, do you know why I can't insert CURRENT_TIMESTAMP() in data type
> timestamp with time zone.
>
>
> Best regards
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Random2LruPageEvictionTracker causing hanging in our integration tests

2020-04-28 Thread akurbanov
Hello,

I have not seen this exact stacktrace before, is it possible to provide a
minimal reproducer to this, since it seems you are able to reproduce this
easily?

Also please make sure to provide the full thread dump from the JVM that
hangs and the data region configuration as well.

What is your use-case for using eviction policy?

Is it eviction for in-memory cluster, eviction for cluster with 3rd party
persistence, on-heap or near cache?

Best regards,
Anton



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


Apache Ignite 2.8.0: Node Metrics System View doesn't exist

2020-04-28 Thread ivan.fedorenkov
Hello!

According to documentation
https://apacheignite.readme.io/docs/system-views ignite should expose the
Node Metrics System View. However there is no such view in the code (
org.apache.ignite.spi.systemview.view package). Is it a peace of
not-implemented-yet feature or is it a bug in the documentation?

Reference to SO question:
https://stackoverflow.com/questions/61410519/apache-ignite-2-8-0-node-metrics-system-view-doesnt-exist/61461243


Best regards,
Ivan Fedorenkov  




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