Re: BinaryMarshaller (micro) Benchmark shows that keepBinary is a bit slower than systematically unmarshall the object

2018-08-29 Thread steve.hostettler
Hello all,

I actually found what the problem was.

I accessed the fields of the BinaryObject in that way:


IgniteCache cacheAsBinary =
cache.withNoRetries().withSkipStore().withKeepBinary();

///Do a million times
BinaryObject bo = cacheAsBinary .get(key);
Long field1 = o.field("field1");

but I should have done

IgniteCache cacheAsBinary =
cache.withNoRetries().withSkipStore().withKeepBinary();
BinaryType type = instance.binary().type(ValueObject.class);
BinaryField field = type.field("field1");
///Do a million times
BinaryObject bo = cacheAsBinary .get(key);
Long field1 = field.value(bo);


Of course resolving field1 is costly. This is similar to what you do when
looking up a field using reflection.
For the record, now on the micro benchmark, get a field as binary takes half
the time of doing a full unmarsharling.





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


RE: Drop table taking more time for execution

2018-08-29 Thread Sriveena Mattaparthi
Hi Denis,

We thought it would have the same performance impact as DROP TABLE. Hence we 
didn’t used it.
May be we will try that option and get back to you.

Thanks & Regards,
Sriveena

From: Denis Magda [mailto:dma...@apache.org]
Sent: Thursday, August 30, 2018 11:06 AM
To: user@ignite.apache.org
Subject: Re: Drop table taking more time for execution

Next time if there is change in the data from the data source in terms of 
addition of new column or delete column...Then we drop the table in ignite and 
recreate it.

Is there any reason why you can't use ALTER TABLE command for the addition or 
remove of columns in runtime? It will be more efficient.

--
Denis

On Tue, Aug 28, 2018 at 9:49 AM Sriveena Mattaparthi 
mailto:sriveena.mattapar...@ekaplus.com>> 
wrote:
Hi Ilya..
We load data from various data sources to ignite as tables and run data join 
queries on ignite and sends the response back.

Next time if there is change in the data from the data source in terms of 
addition of new column or delete column...Then we drop the table in ignite and 
recreate it.

Thanks,
Sriveena

From: Ilya Kasnacheev 
mailto:ilya.kasnach...@gmail.com>>
Sent: 28 August 2018 20:21:20
To: user@ignite.apache.org
Subject: Re: Drop table taking more time for execution

Hello!

First of all, what is the problem that you are facing? Why DROP TABLE taking 
15s while being ran infrequently is a cause for concern?

Regards,
--
Ilya Kasnacheev


вт, 28 авг. 2018 г. в 17:42, Sriveena Mattaparthi 
mailto:sriveena.mattapar...@ekaplus.com>>>:
Thanks Ilya for the quick reply..

We have to drop the table in few cases where the table columns and datatypes 
changes ...
I guess alter table to add/ drop columns may take same longer time.

Any other alternative to drop table?

Regards,
Sriveena

From: Ilya Kasnacheev 
mailto:ilya.kasnach...@gmail.com>>>
Sent: 28 August 2018 20:04:09
To: 
user@ignite.apache.org>
Subject: Re: Drop table taking more time for execution

Hello!

As far as my understanding goes, DROP TABLE will usually destroy a cache, and 
that will require partition map exchange, which in turn will wait for all 
operations to finish. With increase of load and cluster size 15s does not seem 
excessive.

The suggestion is to avoid dropping/creating tables often, and especially as 
the course of normal operation.

Regards,
--
Ilya Kasnacheev


вт, 28 авг. 2018 г. в 17:24, Sriveena Mattaparthi 
mailto:sriveena.mattapar...@ekaplus.com>>>:
Hi,

Execution of drop table command is taking 15 sec on client node.Any suggestions 
to spewed up the execution.

Thanks & Regards,
Sriveena “Confidentiality Notice: The contents of this email message and any 
attachments are intended solely for the addressee(s) and may contain 
confidential and/or privileged information and may be legally protected from 
disclosure. If you are not the intended recipient of this message or their 
agent, or if this message has been addressed to you in error, please 
immediately alert the sender by reply email and then delete this message and 
any attachments. If you are not the intended recipient, you are hereby notified 
that any use, dissemination, copying, or storage of this message or its 
attachments is strictly prohibited.”
“Confidentiality Notice: The contents of this email message and any attachments 
are intended solely for the addressee(s) and may contain confidential and/or 
privileged information and may be legally protected from disclosure. If you are 
not the intended recipient of this message or their agent, or if this message 
has been addressed to you in error, please immediately alert the sender by 
reply email and then delete this message and any attachments. If you are not 
the intended recipient, you are hereby notified that any use, dissemination, 
copying, or storage of this message or its attachments is strictly prohibited.”
“Confidentiality Notice: The contents of this email message and any attachments 
are intended solely for the addressee(s) and may contain confidential and/or 
privileged information and may be legally protected from disclosure. If you are 
not the intended recipient of this message or their agent, or if this message 
has been addressed to you in error, please immediately alert the sender by 
reply email and then delete this message and any attachments. If you are not 
the intended recipient, you are hereby notified that any use, dissemination, 
copying, or storage of this message or its attachments is strictly prohibited.”
“Confidentiality Notice: The contents of this email message and any attachments 
are intended 

Re: Gemfire replacement to Apache Ignite | Guidance Require

2018-08-29 Thread Denis Magda
Yes, Ignite is an excellent alternative to GemFire. I personally came
across many replacements in various organizations.

--
Denis

On Mon, Aug 27, 2018 at 2:26 AM Nilesh 
wrote:

> Hello,
>
> We are looking for Apache Ignite for Gemfire replacement. Current we are
> facing following issues in Gemfire.
>
> 1. Disk store corruption.
>
> 2. Service suddenly stopped working.
>
> 3. Service takes more time to start and stop.
>
> 4. Data recovery time is more when node down in the cluster.
>
> 5. Wan replication is manual between cluster.
>
> 6. Session replication is not available.
>
>
> To overcome these current issues faced in our organization, Is Apache
> Ignite
> correct solution?
> Will appreciate any replies, suggestions.
>
> Current gemfire setup of our organization.
>
> 1.Gemfire version8
>
> 2.Two clusters in two regions.
>
> 3. Each cluster has 4 locators and 8 cache servers
>
>
>
> -
> Thank you,
> Nilesh
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Drop table taking more time for execution

2018-08-29 Thread Denis Magda
>
> Next time if there is change in the data from the data source in terms of
> addition of new column or delete column...Then we drop the table in ignite
> and recreate it.


Is there any reason why you can't use ALTER TABLE command for the addition
or remove of columns in runtime? It will be more efficient.

--
Denis

On Tue, Aug 28, 2018 at 9:49 AM Sriveena Mattaparthi <
sriveena.mattapar...@ekaplus.com> wrote:

> Hi Ilya..
> We load data from various data sources to ignite as tables and run data
> join queries on ignite and sends the response back.
>
> Next time if there is change in the data from the data source in terms of
> addition of new column or delete column...Then we drop the table in ignite
> and recreate it.
>
> Thanks,
> Sriveena
> 
> From: Ilya Kasnacheev 
> Sent: 28 August 2018 20:21:20
> To: user@ignite.apache.org
> Subject: Re: Drop table taking more time for execution
>
> Hello!
>
> First of all, what is the problem that you are facing? Why DROP TABLE
> taking 15s while being ran infrequently is a cause for concern?
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> вт, 28 авг. 2018 г. в 17:42, Sriveena Mattaparthi <
> sriveena.mattapar...@ekaplus.com >>:
> Thanks Ilya for the quick reply..
>
> We have to drop the table in few cases where the table columns and
> datatypes changes ...
> I guess alter table to add/ drop columns may take same longer time.
>
> Any other alternative to drop table?
>
> Regards,
> Sriveena
> 
> From: Ilya Kasnacheev  ilya.kasnach...@gmail.com>>
> Sent: 28 August 2018 20:04:09
> To: user@ignite.apache.org
> Subject: Re: Drop table taking more time for execution
>
> Hello!
>
> As far as my understanding goes, DROP TABLE will usually destroy a cache,
> and that will require partition map exchange, which in turn will wait for
> all operations to finish. With increase of load and cluster size 15s does
> not seem excessive.
>
> The suggestion is to avoid dropping/creating tables often, and especially
> as the course of normal operation.
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> вт, 28 авг. 2018 г. в 17:24, Sriveena Mattaparthi <
> sriveena.mattapar...@ekaplus.com >>:
> Hi,
>
> Execution of drop table command is taking 15 sec on client node.Any
> suggestions to spewed up the execution.
>
> Thanks & Regards,
> Sriveena “Confidentiality Notice: The contents of this email message and
> any attachments are intended solely for the addressee(s) and may contain
> confidential and/or privileged information and may be legally protected
> from disclosure. If you are not the intended recipient of this message or
> their agent, or if this message has been addressed to you in error, please
> immediately alert the sender by reply email and then delete this message
> and any attachments. If you are not the intended recipient, you are hereby
> notified that any use, dissemination, copying, or storage of this message
> or its attachments is strictly prohibited.”
> “Confidentiality Notice: The contents of this email message and any
> attachments are intended solely for the addressee(s) and may contain
> confidential and/or privileged information and may be legally protected
> from disclosure. If you are not the intended recipient of this message or
> their agent, or if this message has been addressed to you in error, please
> immediately alert the sender by reply email and then delete this message
> and any attachments. If you are not the intended recipient, you are hereby
> notified that any use, dissemination, copying, or storage of this message
> or its attachments is strictly prohibited.”
> “Confidentiality Notice: The contents of this email message and any
> attachments are intended solely for the addressee(s) and may contain
> confidential and/or privileged information and may be legally protected
> from disclosure. If you are not the intended recipient of this message or
> their agent, or if this message has been addressed to you in error, please
> immediately alert the sender by reply email and then delete this message
> and any attachments. If you are not the intended recipient, you are hereby
> notified that any use, dissemination, copying, or storage of this message
> or its attachments is strictly prohibited.”
>


Re: How much heap to allocate

2018-08-29 Thread Denis Magda
Eugene,

Just want to be sure you know about the existence of the following pages
which elaborate on Ignite memory architecture in details:

   -
   
https://cwiki.apache.org/confluence/display/IGNITE/Ignite+Durable+Memory+-+under+the+hood#IgniteDurableMemory-underthehood-Entriesandpagesindurablememory
   -
   
https://cwiki.apache.org/confluence/display/IGNITE/Ignite+Persistent+Store+-+under+the+hood



> 1) Are indexs loaded into heap (when used)?
>

Something might be copied to disk but in most of the cases we perform
comparisons and other operations directly off-heap.
See org.apache.ignite.internal.processors.query.h2.database.InlineIndexHelper
and related classes.

2) Are full pages loaded into heap, or only the matching records?
>

Matching records (result set) are presently loaded. The pages are not.


> 3) When the query needs more processing than the exisiting index
> (non-indexed columns, groupBy, aggreag) where/how does it happen?
>

We will be doing a full scan. Grouping and aggregations are finalized on
the query coordinator which needs to get a full result set.

4) How is the query coordinator chosen? Is it the client node? How about
> when using the web console?
>

That's your application. Web Console uses Ignite SQL APIs as well.


> 5) What paralalism settings would your recomend, we were thinking to set
> parallelJobsNumber  to 1  and task parallelism to number of cores * 2 -
> this way we can make sure that each job gets al the heap memory instead of
> all jobs fighting each other. Not sure if it makes sense, and it will also
> prevent us from making real time transactional transactional queries.(we
> are hoping to use ignite for both olap and simple real time queries)


I would start a separate discussion for this bringing this question to the
attention of our SQL experts. I'm not the one of them.

--
Denis

On Mon, Aug 27, 2018 at 8:54 PM eugene miretsky 
wrote:

> Denis, thanks for the detailed response.
>
> A few more follow up questions
> 1) Are indexs loaded into heap (when used)?
> 2) Are full pages loaded into heap, or only the matching records?
> 3) When the query needs more processing than the exisiting index
> (non-indexed columns, groupBy, aggreag) where/how does it happen?
> 4) How is the query coordinator chosen? Is it the client node? How about
> when using the web console?
> 5) What paralalism settings would your recomend, we were thinking to set
> parallelJobsNumber  to 1  and task parallelism to number of cores * 2 -
> this way we can make sure that each job gets al the heap memory instead of
> all jobs fighting each other. Not sure if it makes sense, and it will also
> prevent us from making real time transactional transactional queries.(we
> are hoping to use ignite for both olap and simple real time queries)
>
> Cheers,
> Eugene
>
>
> On Sat, Aug 25, 2018 at 3:25 AM Denis Magda  wrote:
>
>> Hello Eugene,
>>
>> 1) In what format is data stored off heap?
>>
>>
>> Data is always stored in the binary format let it be on-heap, off-heap or
>> Ignite persistence.
>> https://apacheignite.readme.io/docs/binary-marshaller
>>
>> 2) What happens when a SQL query is executed, in particular
>>
>>>
>>>- How is H2 used? How is data loaded in H2? What if some of the
>>>data is on disk?
>>>
>>> H2 is used to build execution plans for SELECTs. H2 calls Ignite's
>> B+Tree based indexing implementation to see which indexes are set. All the
>> data and indexes are always stored in Ignite (off-heap + disk).
>>
>>>
>>>- When is data loaded into heap, and how much? Is only the output of
>>>H2 loaded, or everything?
>>>
>>> Queries results are stored in Java heap temporarily. Once the result set
>> is read by your application, it will be garbage collected.
>>
>>>
>>>- How is the reduce stage performed? Is it performed only on one
>>>node (hence that node needs to load all the data into memory)
>>>
>>> Correct, the final result set is reduced on a query coordinator - your
>> application that executed a SELECT.
>>
>> 3) What happens when Ingite runs out of memory during execution? Is data
>>> evictied to disk (if persistence is enabled)?
>>
>>
>> I guess you mean what happens if a result set doesn't fit in RAM during
>> the execution, right? If so, then OOM will occur. We're working on an
>> improvement that will offload the result set to disk to avoid OOM for all
>> the scenarious:
>> https://issues.apache.org/jira/browse/IGNITE-7526
>>
>>
>>
>>> 4) Based on the code, it looks like I need to set my data region size to
>>> at most 50% of available memory (to avoid the warning), this seems a bit
>>> wastefull.
>>
>>
>> There is no such a requirement. I know many deployments use cases when
>> one data region is given 20% of RAM, the other is given 40% and everything
>> else is persisted to disk.
>>
>> 5) Do you have any general advice on benchmarking the memory
>>> requirpement? So far I have not been able to find a way to check how much
>>> memory each table takes on and 

Grid state check before it's completely caught up

2018-08-29 Thread Anirudha Jadhav
Ignite 2.5

Is there a way to ensure grid nodes don't serve any requests until they are
caught up with the replicated state in the cluster?

Thanks
-- 
Anirudha P. Jadhav


Load balancing ignite get requests

2018-08-29 Thread Anirudha Jadhav
Ignite 2.5 - fully replicated 8 node cluster

When running load tests with 1 unique key, only one of the servers gets all
the requests.

Is there something to be enabled in configuration for balancing load
between all machines.


Thanks
-- 
Anirudha P. Jadhav


Re: keep old cache value than new value

2018-08-29 Thread luqmanahmad
Thanks Denis for getting back to me much appreciated.

The use case we have is we have millions of data points which is updated by
the other teams in separate databases. Whenever this happens we receive a
message upon update and it triggers the load cache process in ignite. 

Until now we did not have any problem but now we have certain requirements
in which we have to do some calculation based on some fields from cache
value and decide whether to update the value inside the cache or not. Maybe
I am not thinking straight over here, but is there something I am missing
from ignite which can be used to overcome this problem.

Thanks,
Luqman



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


Re: What happens during network failure?

2018-08-29 Thread luqmanahmad
Lokesh, looking at the javadocs of [1] you can subscribe for EVT_NODE_FAILED
and EVT_NODE_SEGMENTED events.

>From my personal experience SegmentationPolicy.NOOP is required in very rare
cases. My approach would be to STOP the node in most of the cases when the
segment happens or you can RESTART depending on your use case.

[1]  EVT_NODE_FAILED

  



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


Re: How check if the grid is stopped

2018-08-29 Thread Alex Plehanov
Method ignite.cluster().active() shows whether or not a cluster was
activated.
To check started/stopped state you can use method
Ignition.state(igniteInstanceName).

ср, 29 авг. 2018 г. в 19:36, Paolo Di Tommaso :

> Hi Igniters,
>
> What's the suggested way to check if the grid is stopped. I'm trying
>
> ignite.cluster().active()
>
> but it's throwing the following exception.
>
>
>  java.lang.IllegalStateException: Grid is in invalid state to perform this
> operation. It either not started yet or has already being or have stopped
> [igniteInstanceName=nextflow, state=STOPPED]
>
>
> p
>


ClassNotFoundException when remotely calling cache.withKeepBinary().get(key)

2018-08-29 Thread smurphy
(Full logs and test class should be attached at the bottom..)

I am running ver. 2.5.0 in client/server mode and am calling
ignite.compute().call(..) on an IgniteCallable.
Server node does not have any of my code on its classpath, but peer class
loading it set to true on both the server and the client node.

I am getting java.lang.ClassNotFoundException when executing the following
line in my IgniteCallable:
BinaryObject binaryObject = _binaryCache.get(id);

I expected a binary object. I debugged into GridCacheAdapter (line 1345):
boolean keepBinary = ctx.keepBinary();

This method is returning false (I would expect this value to be true.?)
If I manually set the value to true, then the test will pass. 

The callable will run successfully if I run it locally, as in not putting it
in the ignite.compute.call(..) method. 
Also, the TestObject is successfully put into the cache (as a binary
object).
It is the get that is deserializing to the custom java object.

PeerClassLoadingTest.java

  

ignite.logs
  




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


Re: SEVERE: Failed to resolve default logging config file: config/java.util.logging.properties

2018-08-29 Thread Paolo Di Tommaso
For the ones having the same problem, I've managed to switch this message
off adding the following line just before initialising ignite

Logger.getLogger('').setLevel( Level.OFF )


Cheers, p



On Mon, Aug 13, 2018 at 10:09 AM Evgenii Zhuravlev 
wrote:

> It's a class loading problem for all-in-one jar again. In any case, you
> don't need includeEventTypes at all right now, so, just delete it. To
> avoid this problem you can just use your project jar separately and
> configure proper classpath with all needed jars
>
> 2018-08-13 10:53 GMT+03:00 monstereo :
>
>> Does not work again.
>> Maven is really interesting thing
>>
>> Here i the pom.xml, after your suggestion  pom.xml
>> 
>>
>>
>> Same error was given
>>
>> (Note that: there was no error when I convert to jar with one-jar plugin)
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>
>


How check if the grid is stopped

2018-08-29 Thread Paolo Di Tommaso
Hi Igniters,

What's the suggested way to check if the grid is stopped. I'm trying

ignite.cluster().active()

but it's throwing the following exception.


 java.lang.IllegalStateException: Grid is in invalid state to perform this
operation. It either not started yet or has already being or have stopped
[igniteInstanceName=nextflow, state=STOPPED]


p


Re: How to check if key exists in DataStreamer buffer so that it can be flushed?

2018-08-29 Thread Вячеслав Коптилин
Hi Dave,

> The DataStreamer is unordered
Yes, that is absolutely correct.

If I understand correctly, the initial use case is the following:
- there is an initial payload that is streamed into the cluster via
data streamer.
- during that operation, new updates arrive and corresponding keys
should be updated.

So, it seems you can just do cache.put(key, newValue) (I assume, that
`allowOverwrite` == false).

> What we do is have a version # that we store in the value, and the
StreamReceiver ignores earlier versions.
In any way, your approach looks reasonable to me.

Thanks,
S.

ср, 29 авг. 2018 г. в 16:30, Dave Harvey :

> The DataStreamer is unordered.   If you have  duplicate keys with
> different values, and you don't flush or take other action, then you will
> get an arbitrary result.   AllowOverwrite is not a solution.
>
> Adding to the streamer returns a Future, and all of those futures are
> notified when the buffer is committed.,
>
> You can keep a map by key of those futures if the source is a single
> client, and delay subsequent updates until the first completes.   You could
> discard more than one duplicate.
>
> What we do is have a version # that we store in the value, and the
> StreamReceiver ignores earlier versions.
> -DH
>
> On Wed, Aug 29, 2018 at 8:08 AM, Вячеслав Коптилин <
> slava.kopti...@gmail.com> wrote:
>
>> Hello,
>>
>> I don't think there is a way to do that check. Moreover, it seems to me
>> that is useless in any case.
>> The thing that allows you to achieve the desired behavior is
>> `allowOverwrite` flag [1].
>> By default, the data streamer will not overwrite existing data, which
>> means that if it will encounter an entry that is already in cache, it will
>> skip it.
>> So, you can just set `allowOverride` to `false` (which is the default
>> value) and put updated values into a cache.
>>
>> [1]
>> https://apacheignite.readme.io/docs/data-streamers#section-allow-overwrite
>>
>> Thanks,
>> S.
>>
>> ср, 29 авг. 2018 г. в 8:32, the_palakkaran :
>>
>>> Hi,
>>>
>>> I have a data streamer to load data into a cache. While loading I might
>>> need
>>> to update value of a particular key in cache, so I need to check if it is
>>> already there in the streamer buffer. If so, either I need to update
>>> value
>>> against that key in the buffer or I need to flush the data in the
>>> streamer
>>> and then update. Is there a way to do this?
>>>
>>>
>>>
>>> --
>>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>>
>>
>
>
> *Disclaimer*
>
> The information contained in this communication from the sender is
> confidential. It is intended solely for use by the recipient and others
> authorized to receive it. If you are not the recipient, you are hereby
> notified that any disclosure, copying, distribution or taking action in
> relation of the contents of this information is strictly prohibited and may
> be unlawful.
>
> This email has been scanned for viruses and malware, and may have been
> automatically archived by *Mimecast Ltd*, an innovator in Software as a
> Service (SaaS) for business. Providing a *safer* and *more useful* place
> for your human generated data. Specializing in; Security, archiving and
> compliance. To find out more Click Here
> .
>


TcpDiscoverySpi.setAuthenticator

2018-08-29 Thread wt
Where does this call for a custom plugin need to be done?

i.e

TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); 
discoSpi.setAuthenticator(new TokenAuthenticator()); 
igniteConfig.setDiscoverySpi(discoSpi); 



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


Re: NPE exception in KMeansTrainer

2018-08-29 Thread zaleslaw
Hi, try to play with current KMeans from master
I hope this bug was detected correctly and fixed in
https://issues.apache.org/jira/browse/IGNITE-9393

Could you post any results of your experiments here?



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


RE: Can Ignite.getOrCreateCache(CacheConfiguration) return null ?

2018-08-29 Thread HEWA WIDANA GAMAGE, SUBASH
Sorry, my bad. Here’s the method. Basically I am directly invoking the 
Ignition.ignite() with expiry policy.

public static  Cache getOrCreateCache(String name, Factory factory) 
{
CacheConfiguration cc = newCacheConfig(name);
cc.setExpiryPolicyFactory(factory);
cc.setStatisticsEnabled(true);
return Ignition.ignite().getOrCreateCache(cc);
}



From: Denis Mekhanikov [mailto:dmekhani...@gmail.com]
Sent: Wednesday, August 29, 2018 10:37 AM
To: user@ignite.apache.org
Subject: Re: Can Ignite.getOrCreateCache(CacheConfiguration) return null ?

This email is from an external source - exercise caution regarding links and 
attachments. Please visit cybersecurity.fmr.com/phishing/ to learn more.

What does the getOrCreateCache method do internally?

Denis

ср, 29 авг. 2018 г. в 5:52, HEWA WIDANA GAMAGE, SUBASH 
mailto:subash.hewawidanagam...@fmr.com>>:
Hi all,
Is there any possibility for this to happen ? We’re using Ignite 1.9.0

Following is the code we use to obtain the cache. And we call this line for 
every cache operation(unintentionally), but wanted to know if following line 
can return a null cache instance under any circumstance.

Cache cache = 
getOrCreateCache(CACHE_NAME,CreatedExpiryPolicy.factoryOf(new 
Duration(TimeUnit.SECONDS, 300)));




Re: Can Ignite.getOrCreateCache(CacheConfiguration) return null ?

2018-08-29 Thread Denis Mekhanikov
What does the *getOrCreateCache* method do internally?

Denis

ср, 29 авг. 2018 г. в 5:52, HEWA WIDANA GAMAGE, SUBASH <
subash.hewawidanagam...@fmr.com>:

> Hi all,
>
> Is there any possibility for this to happen ? We’re using Ignite 1.9.0
>
>
>
> Following is the code we use to obtain the cache. And we call this line
> for every cache operation(unintentionally), but wanted to know if following
> line can return a null cache instance under any circumstance.
>
>
>
> Cache cache =
> getOrCreateCache(CACHE_NAME,CreatedExpiryPolicy.factoryOf(new
> Duration(TimeUnit.SECONDS, 300)));
>
>
>
>
>


Re: keep old cache value than new value

2018-08-29 Thread Denis Mekhanikov
If you use a cache store, and change values in the underlying database,
then they won't be propagated to Ignite, and old values will be used.
There is no mechanism, that can notify the cache about updates on the
3rd-party DB.
But if you didn't have this value in the cache, and read-through

is enabled, then it will be loaded on the next access.

Denis


ср, 29 авг. 2018 г. в 12:05, luqmanahmad :

> anyone from anyone would be highly appreciated
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: custom plugin question - jdbc client

2018-08-29 Thread wt
Hi Taras

I am slightly confused. You are mentioning sslcontext and looking at those
related classes it doesn't appear to offer authentication and authorization. 



Here is where i currently am with this project.

I have a white list plugin that i will apply to server nodes when they join.
I have yet to implement a check to see if the node is a client or a server
so my assumption at this point is all nodes (clients and servers) will be
validated against the white list. 

The next step is to add user authentication (not the ignite built-in
version) and also authorization to lock down what users can access and do. 

my current additional classes are:

WhiteListPluginConfiguration implements PluginConfiguration

WhiteListPluginProvider implements
PluginProvider

WhiteListSecurityProcessor
implements DiscoverySpiNodeAuthenticator,
GridSecurityProcessor,
IgnitePlugin


Can you please advise on my next steps such as:

1) what classes i need to override and implement for authentication and
authorization
2) do i need a new plugin or can i extend the one i have written
3) once i have implemented the new classes, where to i override to call into
them
4) do i need to change the code in the odbc and jdbc code base to include my
authentication and authorization

My goal here is to be able to 

1) prevent a vanilla client from connecting without implementing my security
2) enforce odbc and jdbc and java\.net clients authentication and
authorization


I really appreciate any guidance here as there is no documentation to
support doing this. 

Thanks
Wayne



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


Re: Cache Configuration Templates

2018-08-29 Thread Dave Harvey
The SQL interface does not allow you to configure details of the cache
except via templates.   The use case is I want to start with the cluster
specific defaults for a cache, and add some others.

I can create a empty real cache that has the defaults, and use its
configuration in the CacheConfiguration constructor,   but we already have
templates.

On Wed, Aug 29, 2018 at 4:55 AM, Ilya Kasnacheev 
wrote:

> Hello!
>
> Why don't you just use CREATE TABLE for that? I doubt there will be any
> significant overhead even if you never use any SQL and only use Cache API
> after that.
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> вт, 28 авг. 2018 г. в 17:37, Dave Harvey :
>
>> I did a suggested edit adding the Spring configuration of templates.
>> The rest of the current semantics seem a bit odd, so I was somewhat at a
>> loss as to what to write.
>>
>> The wildcard approach means that I have to know the structure of the
>> cache name a priori.   Seems like there should be a Java API that is
>> equivalent to CREATE TABLE with allows a cache to be created from an
>> arbitrary template name, as well as a way to retrieve a copy of the
>> CacheConfiguration from a template name, so that it can subsequently be
>> enhanced.  I would assume that Ignite.cache(templateName) would fail if
>> the template name has a "*" in it, and instantiate a cache otherwise.
>>
>> On Mon, Aug 27, 2018 at 7:31 AM, Ilya Kasnacheev <
>> ilya.kasnach...@gmail.com> wrote:
>>
>>> Hello!
>>>
>>> Unfortunately, cache templates are not documented that good. AFAIK they
>>> were mostly implemented to be able to reference to complex cache
>>> configurations with CREATE TABLE.
>>>
>>> As far as my understanding goes, caches from cacheConfigurations are
>>> actually started when grid starts.
>>>
>>> 1) I think that only the first one will be used to create a cache. Even
>>> if you join a node with distinct cacheConfigurations to the cluster, and it
>>> already has some caches started, those will just be re-used (by name).
>>> 2) Yes, you can have a cacheConfiguration with name "prefix*", which
>>> will lead to a) not starting this cache on grid start, and b) when you
>>> start a cache "prefix1" it will use configuration from template. There's a
>>> test for it named IgniteCacheConfigurationTemplateTest in code base.
>>> 3) Nothing will happen, it will return early if such cache already
>>> exists.
>>> 4) Yes.
>>> 5) Good question, I will have to check that. Still I won't rely on that
>>> and just always have this configuration around.
>>> 6) See above about the '*'.
>>>
>>> Regards,
>>> --
>>> Ilya Kasnacheev
>>>
>>>
>>> сб, 25 авг. 2018 г. в 0:55, Dave Harvey :
>>>
 I found what I've read in this area confusing, and here is my current
 understanding.

 When creating an IgniteConfiguration in Java or XML, I can specify the
 property cacheConfiguration, which is an array of
 CacheConfigurations.  This causes Ignite to preserve these configurations,
 but this will not cause Ignite to create a cache. If I call
 Ignite.getOrCreateCache(string), if there is an existing cache, I will
 get that, otherwise a new cache will be created using that configuration.

 It seems like creating a cache with a configuration will add to this
 list, because Ignite.configuration.getCacheConfiguration() returns all
 caches.

 I can later call Ignite.addCacheConfiguration(). This will add a
 template to that list.

 Questions:
 1)  what happens if there are entries with duplicate names on
 IgniteConfiguration.setCacheConfiguration()   when this is used to
 create a grid?
 2) There was mention in one e-mail talking about a convention where
 templates have "*" in their name?
 3) What happens if addCacheConfiguration() tries to add a duplicate
 name?
 4) Is a template simply a cache that not fully instantiated?
 5) What about template persistence?   Are they persisted if they
 specify a region that is persistent?
 6) My use case is that I want to create caches based some default for
 the cluster, so in Java I would like to construct the new configuration
 from the a template of a known name.   So far, I can only see that I can
 call Ignite.configuration.getCacheConfiguration() and then search the
 array for a matching name.   Is there a better way?


 *Disclaimer*

 The information contained in this communication from the sender is
 confidential. It is intended solely for use by the recipient and others
 authorized to receive it. If you are not the recipient, you are hereby
 notified that any disclosure, copying, distribution or taking action in
 relation of the contents of this information is strictly prohibited and may
 be unlawful.

 This email has been scanned for viruses and malware, and may have been
 automatically archived by *Mimecast Ltd*, an innovator in Software as
 a Service (SaaS) 

Re: What happens during network failure?

2018-08-29 Thread Lokesh Sharma
Thanks for the docs.

The docs says "EVT_NODE_SEGMENTED" is

Generated when node determines that it runs in invalid network segment.


But when I disconnected 1 node from a cluster of 2 nodes, none of the 2
nodes generated that event. They both released only "EVT_NODE_FAIL" event.

On Wed, Aug 29, 2018 at 5:38 PM luqmanahmad  wrote:

> Lokesh, see [1] how node will act when the segmentation will occur. You
> have
> to register for EVT_NODE_SEGMENTED events. Ignite plugins contains all this
> information as well.
>
> [1]  SegmentationPolicy
> <
> https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/plugin/segmentation/SegmentationPolicy.html>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: How to check if key exists in DataStreamer buffer so that it can be flushed?

2018-08-29 Thread Dave Harvey
The DataStreamer is unordered.   If you have  duplicate keys with different
values, and you don't flush or take other action, then you will get an
arbitrary result.   AllowOverwrite is not a solution.

Adding to the streamer returns a Future, and all of those futures are
notified when the buffer is committed.,

You can keep a map by key of those futures if the source is a single
client, and delay subsequent updates until the first completes.   You could
discard more than one duplicate.

What we do is have a version # that we store in the value, and the
StreamReceiver ignores earlier versions.
-DH

On Wed, Aug 29, 2018 at 8:08 AM, Вячеслав Коптилин  wrote:

> Hello,
>
> I don't think there is a way to do that check. Moreover, it seems to me
> that is useless in any case.
> The thing that allows you to achieve the desired behavior is
> `allowOverwrite` flag [1].
> By default, the data streamer will not overwrite existing data, which
> means that if it will encounter an entry that is already in cache, it will
> skip it.
> So, you can just set `allowOverride` to `false` (which is the default
> value) and put updated values into a cache.
>
> [1] https://apacheignite.readme.io/docs/data-streamers#
> section-allow-overwrite
>
> Thanks,
> S.
>
> ср, 29 авг. 2018 г. в 8:32, the_palakkaran :
>
>> Hi,
>>
>> I have a data streamer to load data into a cache. While loading I might
>> need
>> to update value of a particular key in cache, so I need to check if it is
>> already there in the streamer buffer. If so, either I need to update value
>> against that key in the buffer or I need to flush the data in the streamer
>> and then update. Is there a way to do this?
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>

Disclaimer

The information contained in this communication from the sender is 
confidential. It is intended solely for use by the recipient and others 
authorized to receive it. If you are not the recipient, you are hereby notified 
that any disclosure, copying, distribution or taking action in relation of the 
contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been 
automatically archived by Mimecast Ltd, an innovator in Software as a Service 
(SaaS) for business. Providing a safer and more useful place for your human 
generated data. Specializing in; Security, archiving and compliance. To find 
out more visit the Mimecast website.


Re: Difference between replicated and local cache mode regarding time execution of query

2018-08-29 Thread misraeli
Hey :)

Actually I use the java api in order to query the ignite DB and I managed to
reduce the query time by using setLocal(true).
But my real question is that according to documentation it should work the
same whether I use local or replicated, So why with replicated it takes so
much longer?

Thanks,
Moti



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


Re: apache ignite cassandra persistentStore for enum fields

2018-08-29 Thread michal23849
Ilya, 

Thank you for all clarifications!

Best regards
Michal



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


Re: What happens during network failure?

2018-08-29 Thread luqmanahmad
Lokesh, see [1] how node will act when the segmentation will occur. You have
to register for EVT_NODE_SEGMENTED events. Ignite plugins contains all this
information as well.

[1]  SegmentationPolicy

  




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


Re: How to check if key exists in DataStreamer buffer so that it can be flushed?

2018-08-29 Thread Вячеслав Коптилин
Hello,

I don't think there is a way to do that check. Moreover, it seems to me
that is useless in any case.
The thing that allows you to achieve the desired behavior is
`allowOverwrite` flag [1].
By default, the data streamer will not overwrite existing data, which means
that if it will encounter an entry that is already in cache, it will skip
it.
So, you can just set `allowOverride` to `false` (which is the default
value) and put updated values into a cache.

[1]
https://apacheignite.readme.io/docs/data-streamers#section-allow-overwrite

Thanks,
S.

ср, 29 авг. 2018 г. в 8:32, the_palakkaran :

> Hi,
>
> I have a data streamer to load data into a cache. While loading I might
> need
> to update value of a particular key in cache, so I need to check if it is
> already there in the streamer buffer. If so, either I need to update value
> against that key in the buffer or I need to flush the data in the streamer
> and then update. Is there a way to do this?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: What happens during network failure?

2018-08-29 Thread Lokesh Sharma
Thanks Luqman

This is what I'm looking for. I'm stuck on one thing though. What's the
difference between EVT_NODE_FAIL and EVT_NODE_SEGMENTED? I want to restart
the detached node. I created 2 nodes to experiment. I detached them and
both the nodes received EVT_NODE_FAIL but none of them received
EVT_NODE_SEGMENTED.

On Wed, Aug 29, 2018 at 2:34 PM luqmanahmad  wrote:

> Lokesh, this is a pure split brain scenarios see [1] how you can overcome
> this problem.
>
> [1]  Ignite plugins 
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: keep old cache value than new value

2018-08-29 Thread luqmanahmad
anyone from anyone would be highly appreciated 



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


RE: Example for server client configuration in ignite

2018-08-29 Thread Sriveena Mattaparthi
Thank you so much Evgenii for the pointer.
Will try this option and get back to you.

Regards,
Sriveena

From: Evgenii Zhuravlev [mailto:e.zhuravlev...@gmail.com]
Sent: Wednesday, August 29, 2018 2:03 PM
To: user@ignite.apache.org
Subject: Re: Example for server client configuration in ignite

Join performed on the server nodes where data placed. To reduce the overall 
size of the reduce set on the client you can use lazy flag for result set: 
https://apacheignite-sql.readme.io/docs/performance-and-debugging#section-result-set-lazy-load

Evgenii

пн, 27 авг. 2018 г. в 19:44, Sriveena Mattaparthi 
mailto:sriveena.mattapar...@ekaplus.com>>:
Thanks Evgenii..

Now the question is code for client ignite start is deployed in an application 
server.
Any data join performed on the client node cache is utilizing jvm heap memory 
assigned to the  application resulting in outofmemory on the application server.

Is there a way to limit the client node memory utilization of application 
server heap memory or run client node on separate ibn?

Please note that persistence is enabled on the ignite configuration.

From: Evgenii Zhuravlev 
mailto:e.zhuravlev...@gmail.com>>
Sent: 27 August 2018 21:41:41
To: user@ignite.apache.org
Subject: Re: Example for server client configuration in ignite

Yes, you start client node, not a server. I'd recommend you to read about 
differences between client and server nodes: 
https://apacheignite.readme.io/docs/clients-vs-servers

2018-08-27 19:06 GMT+03:00 Sriveena Mattaparthi 
mailto:sriveena.mattapar...@ekaplus.com>>:
Thanks Evgenii..

To reframe my question ..server is started on a separate host...client node is 
setup using java connecting to remote server as mentioned in the  below mail...

Does invoking ignition.start on client node means starting ignite once more?

Thanks & Regards,
Sriveena

From: Evgenii Zhuravlev 
mailto:e.zhuravlev...@gmail.com>>
Sent: 27 August 2018 19:54:16

To: user@ignite.apache.org
Subject: Re: Example for server client configuration in ignite


>1.Do we have to start Ignite again on client node as Ignition.start(cfg)? What 
>does this imply?
Sorry, I didn't get it, what do you mean by "start again"?
>2.Will the client node uses the JVM heap memory
Ignite runs inside JVM, so yes, it will use JVM heap. Could you specify your 
question?

Evgenii

пн, 27 авг. 2018 г. в 14:36, Sriveena Mattaparthi 
mailto:sriveena.mattapar...@ekaplus.com>>:

Thanks Evgenii



Started remote server, using the default configuration given as part of the 
ignite disctribution using

$ bin\ignite.bat examples\config\example-ignite.xml



And client node started in java  as pointed below using



Ignition.setClientMode(true);



TcpDiscoverySpi spi = new TcpDiscoverySpi();

TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();

ipFinder.setAddresses(Arrays.asList("1.2.3.4", "1.2.3.5:47500..47509"));

spi.setIpFinder(ipFinder);

IgniteConfiguration cfg = new IgniteConfiguration();

cfg.setDiscoverySpi(spi);

// Start Ignite node.

Ignition.start(cfg);



My question is

1.Do we have to start Ignite again on client node as Ignition.start(cfg)? What 
does this imply?



2.Will the client node uses the JVM heap memory



Thanks & Regards,

Sriveena



From: Evgenii Zhuravlev 
[mailto:e.zhuravlev...@gmail.com]
Sent: Monday, August 27, 2018 4:52 PM
To: user@ignite.apache.org
Subject: Re: Example for server client configuration in ignite



Hi,



The default configuration will work with the remote server, because it uses 
multicast. It will work if you want to check some examples, etc.



For production usage, I'd recommend using static Ip Finder instead of 
multicast, here is the simplest configuration that will work with remote server:


Re: Cache Configuration Templates

2018-08-29 Thread Ilya Kasnacheev
Hello!

Why don't you just use CREATE TABLE for that? I doubt there will be any
significant overhead even if you never use any SQL and only use Cache API
after that.

Regards,
-- 
Ilya Kasnacheev


вт, 28 авг. 2018 г. в 17:37, Dave Harvey :

> I did a suggested edit adding the Spring configuration of templates.
> The rest of the current semantics seem a bit odd, so I was somewhat at a
> loss as to what to write.
>
> The wildcard approach means that I have to know the structure of the cache
> name a priori.   Seems like there should be a Java API that is equivalent
> to CREATE TABLE with allows a cache to be created from an arbitrary
> template name, as well as a way to retrieve a copy of the
> CacheConfiguration from a template name, so that it can subsequently be
> enhanced.  I would assume that Ignite.cache(templateName) would fail if
> the template name has a "*" in it, and instantiate a cache otherwise.
>
> On Mon, Aug 27, 2018 at 7:31 AM, Ilya Kasnacheev <
> ilya.kasnach...@gmail.com> wrote:
>
>> Hello!
>>
>> Unfortunately, cache templates are not documented that good. AFAIK they
>> were mostly implemented to be able to reference to complex cache
>> configurations with CREATE TABLE.
>>
>> As far as my understanding goes, caches from cacheConfigurations are
>> actually started when grid starts.
>>
>> 1) I think that only the first one will be used to create a cache. Even
>> if you join a node with distinct cacheConfigurations to the cluster, and it
>> already has some caches started, those will just be re-used (by name).
>> 2) Yes, you can have a cacheConfiguration with name "prefix*", which will
>> lead to a) not starting this cache on grid start, and b) when you start a
>> cache "prefix1" it will use configuration from template. There's a test for
>> it named IgniteCacheConfigurationTemplateTest in code base.
>> 3) Nothing will happen, it will return early if such cache already exists.
>> 4) Yes.
>> 5) Good question, I will have to check that. Still I won't rely on that
>> and just always have this configuration around.
>> 6) See above about the '*'.
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> сб, 25 авг. 2018 г. в 0:55, Dave Harvey :
>>
>>> I found what I've read in this area confusing, and here is my current
>>> understanding.
>>>
>>> When creating an IgniteConfiguration in Java or XML, I can specify the
>>> property cacheConfiguration, which is an array of CacheConfigurations.
>>> This causes Ignite to preserve these configurations, but this will not
>>> cause Ignite to create a cache. If I call
>>> Ignite.getOrCreateCache(string), if there is an existing cache, I will get
>>> that, otherwise a new cache will be created using that configuration.
>>>
>>> It seems like creating a cache with a configuration will add to this
>>> list, because Ignite.configuration.getCacheConfiguration() returns all
>>> caches.
>>>
>>> I can later call Ignite.addCacheConfiguration(). This will add a
>>> template to that list.
>>>
>>> Questions:
>>> 1)  what happens if there are entries with duplicate names on
>>> IgniteConfiguration.setCacheConfiguration()   when this is used to create a
>>> grid?
>>> 2) There was mention in one e-mail talking about a convention where
>>> templates have "*" in their name?
>>> 3) What happens if addCacheConfiguration() tries to add a duplicate name?
>>> 4) Is a template simply a cache that not fully instantiated?
>>> 5) What about template persistence?   Are they persisted if they specify
>>> a region that is persistent?
>>> 6) My use case is that I want to create caches based some default for
>>> the cluster, so in Java I would like to construct the new configuration
>>> from the a template of a known name.   So far, I can only see that I can
>>> call Ignite.configuration.getCacheConfiguration() and then search the array
>>> for a matching name.   Is there a better way?
>>>
>>>
>>> *Disclaimer*
>>>
>>> The information contained in this communication from the sender is
>>> confidential. It is intended solely for use by the recipient and others
>>> authorized to receive it. If you are not the recipient, you are hereby
>>> notified that any disclosure, copying, distribution or taking action in
>>> relation of the contents of this information is strictly prohibited and may
>>> be unlawful.
>>>
>>> This email has been scanned for viruses and malware, and may have been
>>> automatically archived by *Mimecast Ltd*, an innovator in Software as a
>>> Service (SaaS) for business. Providing a *safer* and *more useful*
>>> place for your human generated data. Specializing in; Security, archiving
>>> and compliance. To find out more Click Here
>>> .
>>>
>>
>
>
> *Disclaimer*
>
> The information contained in this communication from the sender is
> confidential. It is intended solely for use by the recipient and others
> authorized to receive it. If you are not the recipient, you are hereby
> notified that any disclosure, copying, distribution or taking 

Re: Example for server client configuration in ignite

2018-08-29 Thread Evgenii Zhuravlev
Join performed on the server nodes where data placed. To reduce the overall
size of the reduce set on the client you can use lazy flag for result set:
https://apacheignite-sql.readme.io/docs/performance-and-debugging#section-result-set-lazy-load

Evgenii

пн, 27 авг. 2018 г. в 19:44, Sriveena Mattaparthi <
sriveena.mattapar...@ekaplus.com>:

> Thanks Evgenii..
>
> Now the question is code for client ignite start is deployed in an
> application server.
> Any data join performed on the client node cache is utilizing jvm heap
> memory assigned to the  application resulting in outofmemory on the
> application server.
>
> Is there a way to limit the client node memory utilization of application
> server heap memory or run client node on separate ibn?
>
> Please note that persistence is enabled on the ignite configuration.
>
> --
> *From:* Evgenii Zhuravlev 
> *Sent:* 27 August 2018 21:41:41
> *To:* user@ignite.apache.org
> *Subject:* Re: Example for server client configuration in ignite
>
> Yes, you start client node, not a server. I'd recommend you to read about
> differences between client and server nodes:
> https://apacheignite.readme.io/docs/clients-vs-servers
> 
>
> 2018-08-27 19:06 GMT+03:00 Sriveena Mattaparthi <
> sriveena.mattapar...@ekaplus.com>:
>
> Thanks Evgenii..
>
> To reframe my question ..server is started on a separate host...client
> node is setup using java connecting to remote server as mentioned in the
> below mail...
>
> Does invoking ignition.start on client node means starting ignite once
> more?
>
> Thanks & Regards,
> Sriveena
> --
> *From:* Evgenii Zhuravlev 
> *Sent:* 27 August 2018 19:54:16
>
> *To:* user@ignite.apache.org
> *Subject:* Re: Example for server client configuration in ignite
>
>
> >1.Do we have to start Ignite again on client node as Ignition.start(cfg)?
> What does this imply?
> Sorry, I didn't get it, what do you mean by "start again"?
> >2.Will the client node uses the JVM heap memory
> Ignite runs inside JVM, so yes, it will use JVM heap. Could you specify
> your question?
>
> Evgenii
>
> пн, 27 авг. 2018 г. в 14:36, Sriveena Mattaparthi <
> sriveena.mattapar...@ekaplus.com>:
>
> Thanks Evgenii
>
>
>
> Started remote server, using the default configuration given as part of
> the ignite disctribution using
>
> $ bin\ignite.bat examples\config\example-ignite.xml
>
>
>
> And client node started in java  as pointed below using
>
>
>
> Ignition.*setClientMode*(*true*);
>
>
>
> TcpDiscoverySpi spi = new TcpDiscoverySpi();
>
> TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
>
> ipFinder.setAddresses(Arrays.asList("1.2.3.4", "1.2.3.5:47500..47509"));
>
> spi.setIpFinder(ipFinder);
>
> IgniteConfiguration cfg = new IgniteConfiguration();
>
> cfg.setDiscoverySpi(spi);
>
> // Start Ignite node.
>
> Ignition.start(cfg);
>
>
>
> My question is
>
> 1.Do we have to start Ignite again on client node as Ignition.start(cfg)?
> What does this imply?
>
>
>
> 2.Will the client node uses the JVM heap memory
>
>
>
> Thanks & Regards,
>
> Sriveena
>
>
>
> *From:* Evgenii Zhuravlev [mailto:e.zhuravlev...@gmail.com]
> *Sent:* Monday, August 27, 2018 4:52 PM
> *To:* user@ignite.apache.org
> *Subject:* Re: Example for server client configuration in ignite
>
>
>
> Hi,
>
>
>
> The default configuration will work with the remote server, because it
> uses multicast. It will work if you want to check some examples, etc.
>
>
>
> For production usage, I'd recommend using static Ip Finder instead of
> multicast, here is the simplest configuration that will work with remote
> server:
>
>
> https://apacheignite.readme.io/docs/tcpip-discovery#section-static-ip-finder
> 
>
> There you will need just to replace address in IpFinder with the
> address of your remote server. You don't need to place client address there.
>
>
>
> Yo start client instead of the server node, you have to add
> clientMode=true property in this configuration.
>
>
>
> Evgenii
>
>
>
>
>
> пн, 27 авг. 2018 г. в 13:47, Sriveena Mattaparthi <
> sriveena.mattapar...@ekaplus.com>:
>
> Hi,
>
>
>
> What is the recommended configuration for remote Server and one client
> node setup?
>
> Can someone point to the relevant examples?
>
>
>
> Thanks & Regards,
>
> Sriveena
>
>
>
> “Confidentiality Notice: The 

Re: What happens during network failure?

2018-08-29 Thread Lokesh Sharma
>
> I mainly want to know whether the detached need would join the cluster
> automatically after the network is back or not?
>
*need = node

I tests such a situation, and found that the detached node is not joining
the cluster. Instead it produces following errors:

2018-08-29 12:35:25.625 ERROR 3129 --- [5%igniteserver%]
> .s.d.t.i.m.TcpDiscoveryMulticastIpFinder : Failed to request nodes
> addresses.


> java.net.SocketException: Cannot assign requested address (Error setting
> socket option)

at java.net.PlainDatagramSocketImpl.socketSetOption0(Native Method)
> ~[na:1.8.0_151]

at
> java.net.PlainDatagramSocketImpl.socketSetOption(PlainDatagramSocketImpl.java:74)
> ~[na:1.8.0_151]

at
> java.net.AbstractPlainDatagramSocketImpl.setOption(AbstractPlainDatagramSocketImpl.java:309)
> ~[na:1.8.0_151]

at java.net.MulticastSocket.setInterface(MulticastSocket.java:471)
> ~[na:1.8.0_151]

at
> org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.requestAddresses(TcpDiscoveryMulticastIpFinder.java:565)
> [ignite-core-2.7.0-SNAPSHOT.jar!/:2.7.0-SNAPSHOT]

at
> org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.access$700(TcpDiscoveryMulticastIpFinder.java:80)
> [ignite-core-2.7.0-SNAPSHOT.jar!/:2.7.0-SNAPSHOT]

at
> org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder$AddressReceiver.body(TcpDiscoveryMulticastIpFinder.java:780)
> [ignite-core-2.7.0-SNAPSHOT.jar!/:2.7.0-SNAPSHOT]

at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
> [ignite-core-2.7.0-SNAPSHOT.jar!/:2.7.0-SNAPSHOT]


> 2018-08-29 12:35:25.827 ERROR 3129 --- [5%igniteserver%]
> .s.d.t.i.m.TcpDiscoveryMulticastIpFinder : Failed to request nodes
> addresses.


> java.net.SocketException: Cannot assign requested address (Error setting
> socket option)

at java.net.PlainDatagramSocketImpl.socketSetOption0(Native Method)
> ~[na:1.8.0_151]

at
> java.net.PlainDatagramSocketImpl.socketSetOption(PlainDatagramSocketImpl.java:74)
> ~[na:1.8.0_151]

at
> java.net.AbstractPlainDatagramSocketImpl.setOption(AbstractPlainDatagramSocketImpl.java:309)
> ~[na:1.8.0_151]

at java.net.MulticastSocket.setInterface(MulticastSocket.java:471)
> ~[na:1.8.0_151]

at
> org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.requestAddresses(TcpDiscoveryMulticastIpFinder.java:565)
> [ignite-core-2.7.0-SNAPSHOT.jar!/:2.7.0-SNAPSHOT]

at
> org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.access$700(TcpDiscoveryMulticastIpFinder.java:80)
> [ignite-core-2.7.0-SNAPSHOT.jar!/:2.7.0-SNAPSHOT]

at
> org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder$AddressReceiver.body(TcpDiscoveryMulticastIpFinder.java:780)
> [ignite-core-2.7.0-SNAPSHOT.jar!/:2.7.0-SNAPSHOT]

at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
> [ignite-core-2.7.0-SNAPSHOT.jar!/:2.7.0-SNAPSHOT]


Any idea how to fix this? I also tried with the flag
"-Djava.net.preferIPv4Stack=true" but it didn't make a difference.

>


On Tue, Aug 28, 2018 at 9:04 PM Lokesh Sharma 
wrote:

> I mainly want to know whether the detached need would join the cluster
> automatically after the network is back or not?
>
> On Tue, Aug 28, 2018, 8:09 PM Lokesh Sharma 
> wrote:
>
>> What is the expected behaviour of Ignite when a node is unreachable from
>> other nodes of the cluster due to *network failure *(and not due to node
>> failure), and after a while the node is again accessible from the cluster?
>> In other words, one node gets dropped from the cluster due to network
>> failure and then again joins the cluster but it does not reboots.
>>
>