Re: KARAF 4.6/4.8.Snapshot IgniteAbstractOsgiContextActivator

2016-10-28 Thread devis76
Hi,
thank you for your update...

These are my step to work with Karaf, i found no alternative to work..

1) feature:install   ignite-core 
2) I don't understand because  index-osgi was not download (same issue in 3
different Karaf) .. i see your features it's ok mvn:org.apache.ignite/ignite-osgi/1.7.0 ... Then
i proceed to install via install manually with install
mvn:org.apache.ignite/ignite-osgi/1.7.0.
3)With feature:install ignite-indexing everything was download as written in
your features.xml.

Problem that i have founds.
1)My Activator("org.flexvalley.ecosystem.cluster-service) extends
IgniteAbstractOsgiContextActivator.
2)"mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene"
not contains "Fieldable.class" than ignite-indexing throws classnotFound.
The only way that i have found was been to download lucene-core-3.5.0.jar
and via bnd i created osgi bundle. My bnd file i also added  "Fragment -->
ignite-core."
3)When my Bundle(1) try to run a simple query on my cache i receive no
exception only that i missed "Use setIndexedTypes or setTypeMetadata"... 
4)Then i modify manfiest for H2 Database Engine ""Fragment --> ignite-core."

And now i can works with SQLQuery/SQLFieldQuery without problem

I'm working on Raspberry PI3 and Centos 6.5 
Devis




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/KARAF-4-6-4-8-Snapshot-IgniteAbstractOsgiContextActivator-tp8552p8607.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Service Singleton Callback

2016-10-28 Thread devis76
Thank you for your help



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Service-Singleton-Callback-tp8583p8606.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Using OFF_HEAP_TIERED and Replicated Heap continously grows eventually heap crash

2016-10-28 Thread styriver
I should add we need to run in Replicated mode but as a test I switched to
local mode and we did not see the heap increasing as we ran repeated load
tests.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Using-OFF-HEAP-TIERED-and-Replicated-Heap-continously-grows-eventually-heap-crash-tp8604p8605.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Using OFF_HEAP_TIERED and Replicated Heap continously grows eventually heap crash

2016-10-28 Thread styriver
We have a cache configured as Replicated OFF_HEAP_TIERED and when we execute
our load test we watch Heap space grow in JConsole to the point where the
application becomes unresponsive when it reaches heap limit. We see no signs
in JConsole or Cache Metrics that off heap is growing?

Here is our test configuration. 

public class TestLoadIgniteCacheServiceImpl
{

   private static final String keystoreValue = "";
   private static final String seed = "xxx";
   private Ignite ignite;

   public TestLoadIgniteCacheServiceImpl (String foo)
   {
  CacheConfiguration cacheConfig = new CacheConfiguration();
  cacheConfig.setCacheMode(CacheMode.REPLICATED);
  cacheConfig.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
  cacheConfig.setSwapEnabled(false);
  cacheConfig.setIndexedTypes(java.util.UUID.class,
com.xxx.documentviewer.imaging.cache.beans.TiffPage.class);
  cacheConfig.setOffHeapMaxMemory(0);
  cacheConfig.setSqlOnheapRowCacheSize(10);
  cacheConfig.setStatisticsEnabled(true);
  cacheConfig.setName("Foo");

  TcpCommunicationSpi tcpCommunicationSpi = new TcpCommunicationSpi();
  tcpCommunicationSpi.setSocketWriteTimeout(4000);

  TcpDiscoverySpi tcpDiscoverySpi = new TcpDiscoverySpi();
  TcpDiscoveryMulticastIpFinder tcpDiscoveryMulticastIpFinder = new
TcpDiscoveryMulticastIpFinder();
  tcpDiscoveryMulticastIpFinder.setMulticastGroup("000.00.00.1");
  tcpDiscoverySpi.setIpFinder(tcpDiscoveryMulticastIpFinder);

  IgniteConfiguration igniteConfig = new IgniteConfiguration();
  igniteConfig.setCommunicationSpi(tcpCommunicationSpi);
  igniteConfig.setDiscoverySpi(tcpDiscoverySpi);
  igniteConfig.setPeerClassLoadingEnabled(false);
  igniteConfig.setSslContextFactory(initializeSecurity());
  igniteConfig.setCacheConfiguration(cacheConfig);

  Ignition.setClientMode(true);
  ignite = Ignition.start(igniteConfig);

  ignite.getOrCreateCache(cacheConfig);

  String nodeId = ignite.cluster().localNode().id().toString();
  System.out.println("Cache Configuration loaded for " +
"ignite-config-" + Environment.RUN_MODE + ". Ignite Node started with Node
Id-" + nodeId);
   }


   private SslContextFactory initializeSecurity ()
   {
  SslContextFactory sslFactory = new SslContextFactory();
  EncryptionHelper helper = new EncryptionHelper(seed);
  char[] decrypted = helper.decrypt(keystoreValue).toCharArray();
 
sslFactory.setKeyStoreFilePath("/home2/cachemanager/xxx-ignite-client.jks");
  sslFactory.setKeyStorePassword(decrypted);
 
sslFactory.setTrustManagers(SslContextFactory.getDisabledTrustManager());
  sslFactory.setProtocol("TLSv1.2");

  return sslFactory;
   }

This is how we are running our load test.

public String loadCache (int numberOfDocuments,
int numberOfpages,
TestLoadIgniteCacheServiceImpl
igniteServerCache)
   {
  StrBuilder builder = new StrBuilder();
  try {
 String imageFilePath = System.getProperty("imagePath",
"/home2/cachemanager/testImage.png");
 byte[] image = FileUtils.readFileToByteArray(new
File(imageFilePath));

 IgniteCache imageCache =
igniteServerCache.getCache("Foo");
 IgniteDataStreamer streamer =
igniteServerCache.getStreamer(IgniteCaches.VIEWER_IMAGE_CACHE_NAME.getName());
 int offHeapSize = imageCache.size(CachePeekMode.OFFHEAP);
 int onHeapSize = imageCache.size(CachePeekMode.ONHEAP);
 builder.appendln("Starting On Heap Size \"" + onHeapSize + "\"");
 builder.appendln("Starting Off Heap Size \"" + offHeapSize + "\"");

 // loop for documents
 for (int i = 1; i <= numberOfDocuments; i++) {
int documentId = i * -1;
// loop pages
for (int p = 1; p <= numberOfpages; p++) {
   TiffPage tiffPage = new
TiffPage(Integer.toString(documentId), image, "png", p);
   //streamer.addData(tiffPage.getId(), tiffPage);
   imageCache.put(tiffPage.getId(), tiffPage);
}
builder.appendln("Added document \"" + documentId + "\"");
 }

 offHeapSize = imageCache.size(CachePeekMode.OFFHEAP);
 onHeapSize = imageCache.size(CachePeekMode.ONHEAP);
 builder.appendln("Finish  On Heap Size \"" + onHeapSize + "\"");
 builder.appendln("Finish Off Heap Size \"" + offHeapSize + "\"");

  } catch (Throwable throwable) {
 throwable.printStackTrace();
  }

  return builder.toString();
   }



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Using-OFF-HEAP-TIERED-and-Replicated-Heap-continously-grows-eventually-heap-crash-tp8604.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Affinity Collocation

2016-10-28 Thread ght230
If Organization cache mode is Partitioned, 
We all know that it can save all the Person data with the same
OrganizationID in the same node.
For example: All Person data with OrganizationID(3) is save in Node(2).

But I still want to know, can it ensure the Organization data with the same
OrganizationID(3) also save to the same node(2)?



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


Cache hit rate for Ignite not adding up

2016-10-28 Thread Himetic
I've got a process running ignite with 5 nodes, and a partitioned cache.

Checking jconsole for the hit rates and stuff, I see the following:

CacheGets: 912287
CacheHits: 142473
CacheMisses: 769814
Size: 27539
CacheRemovals: 0
CacheEvictions: 0

The other hosts have very similar stats.  The largest is 30K, and there's 5,
so we're looking at under 150K elements in the cache.  If there's been 770K
cache misses, and no evictions, how is that possible?  Shouldn't we either
have 770K elements in the cache, or cache removals/evictions from the cache
filling up?  Are the stats inaccurate?  Is there a more reliable way to get
stats?

I could be wrong, but it seems like something is off about the misses
number.  Checking the logs I don't think we're making that many requests to
any single node, but the rest of the stats (size, for example) seem to be
specific to the node I'm looking at.  Is it possible it's comparing the hits
on only itself to misses for all requests or something?



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Cache-hit-rate-for-Ignite-not-adding-up-tp8602.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: What happens when backup is set as 1 and cache mode as LOCAL

2016-10-28 Thread vkulichenko
Hi,

Please properly subscribe to the mailing list so that the community can
receive email notifications for your messages. To subscribe, send empty
email to user-subscr...@ignite.apache.org and follow simple instructions in
the reply.


pmazumdar wrote
> I was wondering if we can configure Ignite to have local cache mode and
> backup copies. How does that work because if I am not wrong in local cache
> mode, all the data is present as primary. If the node goes down, how does
> we get backup version?

Local cache stores all data on node, so it can't have backup copies. You
should use partitioned or replicated cache for this.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/What-happens-when-backup-is-set-as-1-and-cache-mode-as-LOCAL-tp8599p8601.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: BinaryObject pros/cons

2016-10-28 Thread Valentin Kulichenko
Vova,

Why do we need to write zeros and nulls in the first place? What's the
value of having them in the byte array?

-Val

On Fri, Oct 28, 2016 at 1:18 AM, Vladimir Ozerov 
wrote:

> Valya,
>
> Currently null value is written as one byte, while zero value of long type
> is written as 9 bytes. I want to improve that and write zeros as one byte
> as well.
>
> As per var-length encoding, I am strongly against it. It saves IO and
> memory at the cost of CPU. If we encode numbers in this way we will
> slowdown SQL (which is already not very fast, to be honest). Because
> instead of a single read memory read, we will have to perform multiple
> reads and then apply some mechanics to restore original value. We already
> have such problem with Strings - Java stores them as UTF-16, but we encode
> them as UTF-8. As a result every read of a string field in SQL results in
> decoding overhead.
>
> Vladimir.
>
> On Fri, Oct 28, 2016 at 6:07 AM, Valentin Kulichenko <
> valentin.kuliche...@gmail.com> wrote:
>
>> Cross-posting this to dev list.
>>
>> Vladimir,
>>
>> To be honest, I don't see much difference between null values for objects
>> and zero values for primitives. From BinaryObject semantics standpoint,
>> both are default values for corresponding types. These values will be
>> returned from the BinaryObject.field() method regardless of whether we
>> actually save then in the byte array or not. Having said that, why don't we
>> just skip them during write?
>>
>> You optimization will be still useful though, because there are often a
>> lot of ints and longs that are not zeros, but still small and can fit 1-2
>> bytes. We already added such compaction in direct message marshaling and it
>> reduced overall traffic by around 30%.
>>
>> -Val
>>
>>
>> On Thu, Oct 27, 2016 at 2:21 PM, Vladimir Ozerov 
>> wrote:
>>
>>> Hi,
>>>
>>> I am not very concerned with null fields overhead, because usually it
>>> won't be significant. However, there is a problem with zeros. User object
>>> might have lots of int/long zeros, this is not uncommon. And each zero will
>>> consume 4-8 additional bytes. We probably will implement special
>>> optimization which will write such fields in special compact format.
>>>
>>> Vladimir.
>>>
>>> On Thu, Oct 27, 2016 at 10:55 PM, vkulichenko <
>>> valentin.kuliche...@gmail.com> wrote:
>>>
 Hi,

 Yes, null values consume memory. I believe this can be optimized, but I
 haven't seen issues with this so far. Unless you have hundreds of fields
 most of which are nulls (very rare case), the overhead is minimal.

 -Val



 --
 View this message in context: http://apache-ignite-users.705
 18.x6.nabble.com/BinaryObject-pros-cons-tp8541p8563.html
 Sent from the Apache Ignite Users mailing list archive at Nabble.com.

>>>
>>>
>>
>


Re: aiex webSocket error

2016-10-28 Thread vkulichenko
Hi,

Default REST port in Ignite is 8080. Did you change it to 8090 in the
configuration? Also you should make sure that ignite-rest-http module is
enabled on server nodes. Move IGNITE_HOME/libs/optional/ignite-rest-http
folder to IGNITE_HOME/libs prior to startup.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/aiex-webSocket-error-tp8451p8598.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: How to run Apache Ignite on localhost only?

2016-10-28 Thread vkulichenko
Hi, 

Please properly subscribe to the mailing list so that the community can
receive email notifications for your messages. To subscribe, send empty
email to user-subscr...@ignite.apache.org and follow simple instructions in
the reply.


landon9720 wrote
> In a development environment (multiple nodes running on a laptop), how do
> I prevent Ignite from connecting to other nodes it finds on the network?
> Basically the problem is that me and my coworkers' machines keep
> discovering each other, forming clusters, and causing interference and
> unwanted havoc.

You can use static IP finder with loopback address only. It will force to
connect only to nodes that are running on the same physical box.







127.0.0.1:47500..47509







-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/How-to-run-Apache-Ignite-on-localhost-only-tp8591p8597.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Service Singleton Callback

2016-10-28 Thread vkulichenko
Hi,

There is no callback out of the box. However, you can probably utilize
custom events [1] for this. Use IgniteEvents.recordLocal(..) method to fire
an event that will indicate that service is started, and then subscribe for
this event as described in documentation. The listener will be your
callback.

[1] https://apacheignite.readme.io/docs/events

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Service-Singleton-Callback-tp8583p8596.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: dynamic data structure with binaryobject

2016-10-28 Thread vkulichenko
Hi Shawn,

Yes, binary format provides direct support for this. You can change the
class definition on the client and transparently use the new version.
Another option is to use builder [1] to modify the object.

[1]
https://apacheignite.readme.io/docs/binary-marshaller#modifying-binary-objects-using-binaryobjectbuilder

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/dynamic-data-structure-with-binaryobject-tp8581p8595.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Re: SqlFieldsQuery error when I update ignite version to 1.7.0(it works with 1.6.0)

2016-10-28 Thread vkulichenko
Ignite depends 1.4.191 not 192. You should use 1.4.191 for Ignite queries.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/SqlFieldsQuery-error-when-I-update-ignite-version-to-1-7-0-it-works-with-1-6-0-tp8577p8594.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Explicit lock whithin a transaction

2016-10-28 Thread vkulichenko
Hi,

You should use PESSIMISTIC, REPEATABLE_READ transaction in this case. It
will lock the entry on read.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Explicit-lock-whithin-a-transaction-tp8586p8593.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Does read-through work with replicated caches ?

2016-10-28 Thread vkulichenko
Kristian,

Nodes actually become non-functional after segmentation, it's not only about
read-through. Having two clusters sharing the same store is also risky -
what if they update the same entry with different values, for example? In
general case, split-brain is very bad from consistency standpoint, and this
is how Ignite handles it.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Does-read-through-work-with-replicated-caches-tp8547p8592.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: KARAF 4.6/4.8.Snapshot IgniteAbstractOsgiContextActivator

2016-10-28 Thread Sergej Sidorov
Hi!

As I know, "Resolved" is right state for fragment bundle.
You should not change MANIFEST files in ignite-* libraries. You should build
correct MANIFEST.MF in your own bundle.

Thanks,
Sergej



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/KARAF-4-6-4-8-Snapshot-IgniteAbstractOsgiContextActivator-tp8552p8590.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Does read-through work with replicated caches ?

2016-10-28 Thread Kristian Rosenvold
Ok, I understand the bit about the split. So instead of a cluster I now
have a bunch of individual nodes all thinking they are the center of the
known universe. But why don't they read-through to the database for
non-existing data ?  (I can understand that the node would avoid
read-through for data it already believes to be in-memory)


Kristian


2016-10-27 22:27 GMT+02:00 vkulichenko :

> Ignite doesn't do merge, see my explanation here:
> http://apache-ignite-users.70518.x6.nabble.com/Cluster-
> breaks-down-on-network-failure-td8549.html
>
> -Val
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Does-read-through-work-with-replicated-
> caches-tp8547p8567.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>


Re: Any plan for a book on Apache Ignite

2016-10-28 Thread Manuel Núñez
Good point!!

El 28 oct 2016, a las 2:08, Denis Magda 
mailto:dma...@gridgain.com>> escribió:

Prachi,

Would you add a reference to this book [1] under "Community"->"Resources" 
section? It contains useful and valuable information a lot of guys who will 
start working with Ignite will benefit from.

[1] https://leanpub.com/ignite

-
Denis

On Sep 18, 2016, at 4:28 AM, srecon mailto:sre...@yandex.ru>> 
wrote:

The book "High performance in-memory computing with Apache Ignite" has been
released last night. The book is available from the Lean pub in three
different formats by the following  URL 

https://leanpub.com/ignite.

Kind regards,
 Shamim Ahmed.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Any-plan-for-a-book-on-Apache-Ignite-tp357p7821.html
Sent from the Apache Ignite Users mailing list archive at 
Nabble.com.



Re: [EXTERNAL] Re: SLF4J AND LOG4J delegation exception with ignite dependency

2016-10-28 Thread Vladislav Pyatkov
Hi,
I will not recommend to use spring boot together with Ignite-rest-http,
because these both dependencies will start Jetty themselves, as soon Jetty
hits on classpath.
You need to exclude spring boot or use matching variant for Jetty 9.3.

On Thu, Oct 27, 2016 at 10:02 AM, chevy  wrote:

> Attached gradle file. Please help me out to resolve exception caused by
> ignite-http-rest as I need to use rest services.
>
>
>
> --
>
> Regards,
>
> Chetan.
>
>
>
> *From: *"vdpyatkov [via Apache Ignite Users]"  >
> *Date: *Wednesday, October 26, 2016 at 8:24 PM
> *To: *"Chetan.V.Yadav" <[hidden email]
> >
> *Subject: *Re: [EXTERNAL] Re: SLF4J AND LOG4J delegation exception with
> ignite dependency
>
>
>
> Hi,
>
>
>
> Could you please, provide your gradle file?
>
>
>
> On Mon, Oct 24, 2016 at 9:13 PM, chevy <[hidden email]> wrote:
>
> *My current dependency looks like below [1](I am getting error pop up in
> eclipse when I use name in exclude as you have suggested). But I still get
> the same exception [2] mentioned below -*
>
>
>
> 1.  dependencies {
>
>
>
>   compile ("org.apache.ignite:ignite-rest-*http*:1.7.0") {
>
> exclude group: "org.slf4j"}
>
>
>
> //compile 'org.slf4j:slf4j-*api*:1.7.21'
>
>  compile("org.springframework.boot:spring-boot-starter-web")
>
>   compile("org.springframework.boot:spring-boot-starter-*jdbc*")
>
>  compile("org.springframework.boot:spring-boot-starter-data-*jpa*")
>
>   compile("mysql:mysql-connector-java:5.1.34")
>
>
>
>   // *Ignite* dependencies
>
>  compile group: 'org.apache.ignite', name: '*ignite*-core', version:
> '1.7.0'
>
>  compile group: 'org.apache.ignite', name: '*ignite*-spring',
> version: '1.7.0'
>
>  compile group: 'org.apache.ignite', name: '*ignite*-indexing',
> version: '1.7.0'
>
>   compile group: 'org.apache.ignite', name: '*ignite*-rest-*http*',
> version: '1.7.0'
>
>
>
>   configurations {
>
> runtime.exclude group: 'org.slf4j'
>
>   }
>
> }
>
>
>
>
>
> *2.*   *Exception:*
>
> java.lang.NoSuchMethodError: org.eclipse.jetty.util.log.
> StdErrLog.setProperties(Ljava/util/Properties;)V
>
> at org.apache.ignite.internal.processors.rest.protocols.
> http.jetty.GridJettyRestProtocol.(GridJettyRestProtocol.java:72)
>
> at java.lang.Class.forName0(Native Method)
>
> at java.lang.Class.forName(Class.java:264)
>
> at org.apache.ignite.internal.processors.rest.
> GridRestProcessor.startHttpProtocol(GridRestProcessor.java:831)
>
> at org.apache.ignite.internal.processors.rest.
> GridRestProcessor.start(GridRestProcessor.java:451)
>
> at org.apache.ignite.internal.IgniteKernal.startProcessor(
> IgniteKernal.java:1589)
>
> at org.apache.ignite.internal.IgniteKernal.start(
> IgniteKernal.java:880)
>
> at org.apache.ignite.internal.IgnitionEx$
> IgniteNamedInstance.start0(IgnitionEx.java:1739)
>
> at org.apache.ignite.internal.IgnitionEx$
> IgniteNamedInstance.start(IgnitionEx.java:1589)
>
> at org.apache.ignite.internal.
> IgnitionEx.start0(IgnitionEx.java:1042)
>
> at org.apache.ignite.internal.IgnitionEx.
> startConfigurations(IgnitionEx.java:964)
>
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.
> java:850)
>
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.
> java:749)
>
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.
> java:619)
>
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.
> java:589)
>
> at org.apache.ignite.Ignition.start(Ignition.java:347)
>
> at com.boot.NodeStartup.main(NodeStartup.java:21)
>
>
>
> --
>
> Regards,
>
> Chetan.
>
>
>
> *From: *"vdpyatkov [via Apache Ignite Users]"  >
> *Date: *Monday, October 24, 2016 at 9:07 PM
> *To: *"Chetan.V.Yadav" <[hidden email]
> >
> *Subject: *[EXTERNAL] Re: SLF4J AND LOG4J delegation exception with
> ignite dependency
>
>
>
> Hi,
>
>
>
> 1) You can exclude slf4j-log4j12 dependency from ignite-rest-http.
>
> Like this:
>
> compile ('org.apache.ignite:ignite-rest-http:1.6.0') {
>
> exclude group: "org.slf4j", name: "slf4j-log4j12"
>
>   }
>
>
>
> 2) Ignite 1.6 supports h2 1.3 version. You need to use last version 1.7 of
> Ignite, with support h2 1.4.
>
>
>
> On Sat, Oct 22, 2016 at 11:58 AM, chevy <[hidden email]> wrote:
>
> 1. Now I am getting below exception. Saw in one of the threads that
> removing
> ignite-rest-http will solve the issue which it does. But I need to include
> rest-api as I will be using ignite rest services. Please help me fix this.
>
> java.lang.NoSuchMethodError:
> org.eclipse.jetty.util.log.St

Explicit lock whithin a transaction

2016-10-28 Thread akaptsan
Hi
According to https://apacheignite.readme.io/docs/distributed-locks explicit
locks are not transactional and cannot not be used from within transactions 
We use PESSIMISTIC, READ_COMMITTED transactions. Sometimes it's necessary to
read an object and explicitly lock it. In SQL database we do it by: select *
from table where id=? *FOR UPDATE* 
How can I do something similar with Ignite?





--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Explicit-lock-whithin-a-transaction-tp8586.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: IN Query

2016-10-28 Thread Anil
Any inputs please ?

On 28 October 2016 at 09:27, Anil  wrote:

> Hi Val,
>
> the below one is multiple IN queries with AND but not OR. correct ?
>
> SqlQuery with join table worked for IN Query and the following prepared
> statement is not working.
>
> List inParameter = new ArrayList<>();
> inParameter.add("8446ddce-5b40-11e6-85f9-005056a90879");
> inParameter.add("f5822409-5b40-11e6-ae7c-005056a91276");
> inParameter.add("9f445a19-5b40-11e6-ab1a-005056a95c7a");
> inParameter.add("fd12c96f-5b40-11e6-83f6-005056a947e8");
> PreparedStatement statement = conn.prepareStatement("SELECT  p.name FROM
> Person p join table(joinId VARCHAR(25) = ?) k on p.id = k.joinId");
> statement.setObject(1, inParameter.toArray());
> ResultSet rs = statement.executeQuery();
>
> Thanks for your help.
>


Re: PeerClassLoading for Cache Load

2016-10-28 Thread Labard
Thank you for detailed info



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/PeerClassLoading-for-Cache-Load-tp8545p8584.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Service Singleton Callback

2016-10-28 Thread devis76
Hi,
i have a OSGI Activator that deploy a service on cluster.
What is the best approach to receive a callback when service was execute?  I
need callback to node that publish Singleton service.




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Service-Singleton-Callback-tp8583.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: BinaryObject pros/cons

2016-10-28 Thread Vladimir Ozerov
Valya,

Currently null value is written as one byte, while zero value of long type
is written as 9 bytes. I want to improve that and write zeros as one byte
as well.

As per var-length encoding, I am strongly against it. It saves IO and
memory at the cost of CPU. If we encode numbers in this way we will
slowdown SQL (which is already not very fast, to be honest). Because
instead of a single read memory read, we will have to perform multiple
reads and then apply some mechanics to restore original value. We already
have such problem with Strings - Java stores them as UTF-16, but we encode
them as UTF-8. As a result every read of a string field in SQL results in
decoding overhead.

Vladimir.

On Fri, Oct 28, 2016 at 6:07 AM, Valentin Kulichenko <
valentin.kuliche...@gmail.com> wrote:

> Cross-posting this to dev list.
>
> Vladimir,
>
> To be honest, I don't see much difference between null values for objects
> and zero values for primitives. From BinaryObject semantics standpoint,
> both are default values for corresponding types. These values will be
> returned from the BinaryObject.field() method regardless of whether we
> actually save then in the byte array or not. Having said that, why don't we
> just skip them during write?
>
> You optimization will be still useful though, because there are often a
> lot of ints and longs that are not zeros, but still small and can fit 1-2
> bytes. We already added such compaction in direct message marshaling and it
> reduced overall traffic by around 30%.
>
> -Val
>
>
> On Thu, Oct 27, 2016 at 2:21 PM, Vladimir Ozerov 
> wrote:
>
>> Hi,
>>
>> I am not very concerned with null fields overhead, because usually it
>> won't be significant. However, there is a problem with zeros. User object
>> might have lots of int/long zeros, this is not uncommon. And each zero will
>> consume 4-8 additional bytes. We probably will implement special
>> optimization which will write such fields in special compact format.
>>
>> Vladimir.
>>
>> On Thu, Oct 27, 2016 at 10:55 PM, vkulichenko <
>> valentin.kuliche...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> Yes, null values consume memory. I believe this can be optimized, but I
>>> haven't seen issues with this so far. Unless you have hundreds of fields
>>> most of which are nulls (very rare case), the overhead is minimal.
>>>
>>> -Val
>>>
>>>
>>>
>>> --
>>> View this message in context: http://apache-ignite-users.705
>>> 18.x6.nabble.com/BinaryObject-pros-cons-tp8541p8563.html
>>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>>
>>
>>
>


dynamic data structure with binaryobject

2016-10-28 Thread Shawn Du
Hi experts,

 

I wonder to know the blew scenario is possible in ignite with binaryobject?

 

At first, cache is empty.

I put a cache entry with key1 and value with field A.

After a while,

I put a cache entry with the same key key1 and value with field B, note
field A keep the old value.

Again, I can add field X dynamically. 

 

How to implement this with BinaryObject?

 

If possible, how its performance?

 

Thanks

Shawn

 



Re: SqlFieldsQuery error when I update ignite version to 1.7.0(it works with 1.6.0)

2016-10-28 Thread vdpyatkov
Also, yes, Ignite 1.7 depends of h2 1.4, but Ignite 1.6 depends of h2 1.3.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/SqlFieldsQuery-error-when-I-update-ignite-version-to-1-7-0-it-works-with-1-6-0-tp8577p8579.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: SqlFieldsQuery error when I update ignite version to 1.7.0(it works with 1.6.0)

2016-10-28 Thread vdpyatkov
Hi,

Please properly subscribe to the user list so that we can see your questions
as soon as possible and provide answers on them quicker. All you need to do
is send an email to ì user-subscr...@ignite.apache.orgî and follow simple
instructions in the reply.

Could you please provide full stack of the exception?


navy.chi wrote
> query code:
> String sql = "select id from CacheTransactionIn";
> SqlFieldsQuery fieldsQuery = new SqlFieldsQuery(sql);
> try (QueryCursor> cursor =
> CacheConstant.STL_TRANSACTION_IN.query(fieldsQuery)) {
> for (List row : cursor) {
> System.out.println(row);
> }
> }
> error message:
> java.lang.AbstractMethodError:
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.registerCache(Lorg/apache/ignite/configuration/CacheConfiguration;)V
> 
> this problem was caused by the version of h2database dependence by
> ignite-indexing?





--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/SqlFieldsQuery-error-when-I-update-ignite-version-to-1-7-0-it-works-with-1-6-0-tp8577p8578.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.