You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by kvipin <vi...@yahoo.com> on 2016/09/02 10:01:53 UTC

Couchbase as persistent store

Hi folks,

I want to integrated couchbase as persistent store with apache-ignite as per
instructions given in
http://apacheignite.gridgain.org/v1.6/docs/persistent-store. But I'm getting
error while compiling my TestTableStore.java which extends
CacheStoreAdapter<Long, TestTable>.

*Following is the output from compile command:*

 src]$ javac -cp
$IGNITE_HOME/libs/ignite-core-1.6.0.jar:$IGNITE_HOME/libs/cache-api-1.0.0.jar:$IGNITE_HOME/libs/ignite-spring:.
TestTableStore.java -Xlint:deprecation
TestTableStore.java:14: error: TestTableStore is not abstract and does not
override abstract method write(Entry<? extends Long,? extends TestTable>) in
CacheWriter
public class TestTableStore extends CacheStoreAdapter<Long, TestTable> {
       ^
TestTableStore.java:54: error: name clash: write(Entry<Long,TestTable>) in
TestTableStore and write(Entry<? extends K,? extends V>) in CacheWriter have
the same erasure, yet neither overrides the other
        @Override public void write(Cache.Entry<Long, TestTable> entry) {
                              ^
  where K,V are type-variables:
    K extends Object declared in interface CacheWriter
    V extends Object declared in interface CacheWriter
TestTableStore.java:54: error: method does not override or implement a
method from a supertype
        @Override public void write(Cache.Entry<Long, TestTable> entry) {
        ^
TestTableStore.java:151: error: name clash: loadAll(Iterable<Long>) in
TestTableStore and loadAll(Iterable<? extends K>) in CacheStoreAdapter have
the same erasure, yet neither overrides the other
        @Override public Map<Long, TestTable> loadAll(Iterable<Long> keys) {
                                              ^
  where K,V are type-variables:
    K extends Object declared in class CacheStoreAdapter
    V extends Object declared in class CacheStoreAdapter
TestTableStore.java:151: error: method does not override or implement a
method from a supertype
        @Override public Map<Long, TestTable> loadAll(Iterable<Long> keys) {
        ^
TestTableStore.java:176: error: name clash:
writeAll(Collection<Entry&lt;Long,TestTable>>) in TestTableStore and
writeAll(Collection<Entry&lt;? extends K,? extends V>>) in CacheStoreAdapter
have the same erasure, yet neither overrides the other
        @Override public void writeAll(Collection<Cache.Entry&lt;Long,
TestTable>> entries) {
                              ^
  where K,V are type-variables:
    K extends Object declared in class CacheStoreAdapter
    V extends Object declared in class CacheStoreAdapter
TestTableStore.java:176: error: method does not override or implement a
method from a supertype
        @Override public void writeAll(Collection<Cache.Entry&lt;Long,
TestTable>> entries) {
        ^
TestTableStore.java:201: error: name clash: deleteAll(Collection<Long>) in
TestTableStore and deleteAll(Collection<?>) in CacheStoreAdapter have the
same erasure, yet neither overrides the other
        @Override public void deleteAll(Collection<Long> keys) {
                              ^
TestTableStore.java:201: error: method does not override or implement a
method from a supertype
        @Override public void deleteAll(Collection<Long> keys) {
        ^
9 errors



*Following is the relevant portion of source code:*

src]$ cat TestTableStore.java

import org.apache.ignite.cache.store.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.resources.*;
import java.sql.*;
import java.util.*;
import javax.cache.*;
import javax.cache.integration.*;

public class TestTableStore extends CacheStoreAdapter<Long, TestTable> {

         ...

        // This mehtod is called whenever "put(...)" methods are called on
IgniteCache.
        @Override public void write(Cache.Entry<Long, TestTable> entry) {
                try (Connection conn = connection()) {
                        // Syntax of MERGE statement is database specific
and should be adopted for your database.
                        // If your database does not support MERGE statement
then use sequentially update, insert statements.
                        try (PreparedStatement st = conn.prepareStatement(
                                                "merge into TestTable (id,
firstName, lastName) key (id) VALUES (?, ?, ?)")) {
                                //st.setLong(1, entry.getKey());
                                //st.setString(2, val.getFirstName());
                                //st.setString(3, val.getLastName());

                                //st.executeUpdate();
                        }
                }
                catch (SQLException e) {
                        throw new CacheWriterException("Failed to write
[key= , val=");
                        //throw new CacheWriterException("Failed to write
[key=" + key + ", val=" + val + ']', e);
                }
        }


        // This mehtod is called whenever "getAll(...)" methods are called
on IgniteCache.
        @Override public Map<Long, TestTable> loadAll(Iterable<Long> keys) {
                try (Connection conn = connection()) {
                        try (PreparedStatement st = conn.prepareStatement(
                                "select firstName, lastName from TestTable
where id=?")) {
                                Map<Long, TestTable> loaded = new
HashMap<>();

                                for (Long key : keys) {
                                        st.setLong(1, key);

                                        try(ResultSet rs =
st.executeQuery()) {
                                                if (rs.next())
                                                        loaded.put(key, new
TestTable());
                                                        //loaded.put(key,
new TestTable(key, rs.getString(1), rs.getString(2)));
                                        }
                                }

                                return loaded;
                        }
                }
                catch (SQLException e) {
                        throw new CacheLoaderException("Failed to loadAll: "
+ keys, e);
                }
        }

        // This mehtod is called whenever "putAll(...)" methods are called
on IgniteCache.
        @Override public void writeAll(Collection<Cache.Entry&lt;Long,
TestTable>> entries) {
                try (Connection conn = connection()) {
                        // Syntax of MERGE statement is database specific
and should be adopted for your database.
                        // If your database does not support MERGE statement
then use sequentially update, insert statements.
                        try (PreparedStatement st = conn.prepareStatement(
                                "merge into TestTable (id, firstName,
lastName) key (id) VALUES (?, ?, ?)")) {
                                for (Cache.Entry<Long, TestTable> entry :
entries) {
                                        TestTable val = entry.getValue();

                                        //st.setLong(1, entry.getKey());
                                        //st.setString(2,
val.getFirstName());
                                        //st.setString(3,
val.getLastName());

                                        st.addBatch();
                                }

                                st.executeBatch();
                        }
                }
                catch (SQLException e) {
                        throw new CacheWriterException("Failed to writeAll:
" + entries, e);
                }
        }

        // This mehtod is called whenever "removeAll(...)" methods are
called on IgniteCache.
        @Override public void deleteAll(Collection<Long> keys) {
                try (Connection conn = connection()) {
                        try (PreparedStatement st =
conn.prepareStatement("delete from TestTable where id=?")) {
                                for (Long key : keys) {
                                        st.setLong(1, key);

                                        st.addBatch();
                                }

                                st.executeBatch();
                        }
                }
                catch (SQLException e) {
                        throw new CacheWriterException("Failed to deleteAll:
" + keys, e);
                }
        }
}

Please let me know what I'm missing here.

thanks.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Couchbase-as-persistent-store-tp7476.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Couchbase as persistent store

Posted by Igor Sapego <is...@gridgain.com>.
You are welcome )

Best Regards,
Igor

On Fri, Oct 21, 2016 at 10:39 AM, kvipin <vi...@yahoo.com> wrote:

> Igor, thanks a lot for confirming that everything is working fine from
> Apache-Ignite side. That helped me focus into my code only, which was
> really
> a problematic piece.
>
> The biggest problem was that I didn't have exception handling in my code
> hence I was not getting any clue. Once I added exception handling,
> everything was out in open.
>
> First problem was that I had "storeKeepBinary" property enabled through my
> configuration file, which was creating problem while typecasting record
> back
> to TestTable object before constructing json document from it. Second
> problem was that bytes and timestamp java datatypes couldn't directly be
> stored in json object, hence I stored them as string data.
>
> Following is the relevant portion of working code:
>
> ...
>         // This mehtod is called whenever "putAll(...)" methods are called
> on IgniteCache.
>         @Override public void writeAll(Collection<Cache.Entry<? extends
> Long, ? extends TestTable>> entries) throws CacheWriterException {
>                 Bucket conn = connection();
>                 // Syntax of MERGE statement is database specific and
> should
> be adopted for your database.
>                 // If your database does not support MERGE statement then
> use sequentially update, insert statements.
>                 for (Cache.Entry<? extends Long, ? extends TestTable> entry
> : entries) {
>                         try {
>                                 *TestTable val = entry.getValue();* // type
> casting error if "storeKeepBinary" property enabled.
>
> conn.insert(JsonDocument.create(entry.getKey().toString(),
> JsonObject.create().put("tid", val.getTid()).put("idint",
> val.getIdint()).put("idbigint", val.getIdbigint()).put("idchar",
> val.getIdchar()).put("idbinary",
> *val.getIdbinary()*.toString()).put("idvarbinary",
> *val.getIdvarbinary()*.toString()).put("idvarchar",
> val.getIdvarchar()).put("idts", val.getIdts().toString()))); // bytes
> couldn't be stored in json object. applied toString on them to make it work
>                         } catch (Exception e) {
>                                 System.out.println("There was an error
> inserting record: " + e.getMessage());
>                         }
>                 }
>         }
> ...
>
> Now things work fine for me.
>
> Special thanks to Igor and Val for giving your precious time, things
> would've been much more difficult without your kind support.
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Couchbase-as-persistent-store-tp7476p8396.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: Couchbase as persistent store

Posted by kvipin <vi...@yahoo.com>.
Igor, thanks a lot for confirming that everything is working fine from
Apache-Ignite side. That helped me focus into my code only, which was really
a problematic piece.

The biggest problem was that I didn't have exception handling in my code
hence I was not getting any clue. Once I added exception handling,
everything was out in open.

First problem was that I had "storeKeepBinary" property enabled through my
configuration file, which was creating problem while typecasting record back
to TestTable object before constructing json document from it. Second
problem was that bytes and timestamp java datatypes couldn't directly be
stored in json object, hence I stored them as string data.

Following is the relevant portion of working code:

...
        // This mehtod is called whenever "putAll(...)" methods are called
on IgniteCache.
        @Override public void writeAll(Collection<Cache.Entry&lt;? extends
Long, ? extends TestTable>> entries) throws CacheWriterException {
                Bucket conn = connection();
                // Syntax of MERGE statement is database specific and should
be adopted for your database.
                // If your database does not support MERGE statement then
use sequentially update, insert statements.
                for (Cache.Entry<? extends Long, ? extends TestTable> entry
: entries) {
                        try {
                                *TestTable val = entry.getValue();* // type
casting error if "storeKeepBinary" property enabled.
                               
conn.insert(JsonDocument.create(entry.getKey().toString(),
JsonObject.create().put("tid", val.getTid()).put("idint",
val.getIdint()).put("idbigint", val.getIdbigint()).put("idchar",
val.getIdchar()).put("idbinary",
*val.getIdbinary()*.toString()).put("idvarbinary",
*val.getIdvarbinary()*.toString()).put("idvarchar",
val.getIdvarchar()).put("idts", val.getIdts().toString()))); // bytes
couldn't be stored in json object. applied toString on them to make it work
                        } catch (Exception e) {
                                System.out.println("There was an error
inserting record: " + e.getMessage());
                        }
                }
        }
...

Now things work fine for me.

Special thanks to Igor and Val for giving your precious time, things
would've been much more difficult without your kind support.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Couchbase-as-persistent-store-tp7476p8396.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Couchbase as persistent store

Posted by Igor Sapego <is...@gridgain.com>.
I've checked the command you provided.

It works, though it really does not add any objects to DB. However,
I've added some prints to TestTableStore#writeAll() and I can see that
all 100 entires are passed to it to be written. It seems that there is
some issue with your implementation of this function or with my
DB configuration -  by some reason it does not write any records to
database. Anyway, Ignite seems to be working just fine in my case.

Best Regards,
Igor

On Thu, Oct 20, 2016 at 10:21 AM, kvipin <vi...@yahoo.com> wrote:

> Hi Igor,
>
> does write-through works for you? following is the sample command line:
>
> $ ./tester -c config/test-tool-client.xml -o 1 -l 1 -i 1 -n 100  // insert
> (-o 1) 100 records(-n 100) with tid 1 (-i 1) once(-l 1).
>
> above command line will insert records into ignite server node successfully
> which I'm expecting them to persist to couchbase node.
>
> read-through is working for me but write-through is not working.
>
> I will check about "8080 TCP port is already in use" and come back.
>
> thanks,
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Couchbase-as-persistent-store-tp7476p8368.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: Couchbase as persistent store

Posted by kvipin <vi...@yahoo.com>.
Hi Igor,

does write-through works for you? following is the sample command line:

$ ./tester -c config/test-tool-client.xml -o 1 -l 1 -i 1 -n 100  // insert
(-o 1) 100 records(-n 100) with tid 1 (-i 1) once(-l 1).

above command line will insert records into ignite server node successfully
which I'm expecting them to persist to couchbase node.

read-through is working for me but write-through is not working.

I will check about "8080 TCP port is already in use" and come back.

thanks,



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Couchbase-as-persistent-store-tp7476p8368.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Couchbase as persistent store

Posted by Igor Sapego <is...@gridgain.com>.
Could it be that your 8080 TCP port is already in use?

Best Regards,
Igor

On Wed, Oct 19, 2016 at 4:33 PM, Igor Sapego <is...@gridgain.com> wrote:

> Hi,
>
> I tried your example and it works for me. Could it be that there is an
> issue with you network configuration?
>
> Best Regards,
> Igor
>
> On Tue, Oct 18, 2016 at 9:48 PM, kvipin <vi...@yahoo.com> wrote:
>
>> Hi Val,
>>
>> Please find the attached sample code tarball.
>> apache-ignite-tester-cs-5.xz
>> <http://apache-ignite-users.70518.x6.nabble.com/file/n8350/
>> apache-ignite-tester-cs-5.xz>
>>
>>
>> build:
>> $ tar -xvf apache-ignite-tester-cs-5.xz
>> $ cd apache-ignite-tester-cs-5
>> apache-ignite-tester-cs-5]$ ./configure
>> apache-ignite-tester-cs-5]$ make   // build nodemgr (server node) and
>> tester
>> (client node) program;
>> apache-ignite-tester-cs-5]$ cd src
>> src]$ make pstorecb   // package TestTableStore implementation. uses
>> couchbase java client sdk.
>>
>> run:
>> src]$ ./nodemgr -c config/test-tool-server.xml   // server node
>> src]$ ./tester -c config/test-tool-client.xml -o 11 -l 1 -i 100 -n 10   //
>> Select all(-o 11),  10 entries(-n 10) with tid between 90 (value for
>> option
>> i - value for option n) and 100 (-i 100) one iteration(-l 1)
>>
>> src]$ ./tester -h       // for more options
>>
>> thanks & regards,
>>
>>
>>
>> --
>> View this message in context: http://apache-ignite-users.705
>> 18.x6.nabble.com/Couchbase-as-persistent-store-tp7476p8350.html
>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>
>
>

Re: Couchbase as persistent store

Posted by Igor Sapego <is...@gridgain.com>.
Hi,

I tried your example and it works for me. Could it be that there is an
issue with you network configuration?

Best Regards,
Igor

On Tue, Oct 18, 2016 at 9:48 PM, kvipin <vi...@yahoo.com> wrote:

> Hi Val,
>
> Please find the attached sample code tarball.
> apache-ignite-tester-cs-5.xz
> <http://apache-ignite-users.70518.x6.nabble.com/file/
> n8350/apache-ignite-tester-cs-5.xz>
>
>
> build:
> $ tar -xvf apache-ignite-tester-cs-5.xz
> $ cd apache-ignite-tester-cs-5
> apache-ignite-tester-cs-5]$ ./configure
> apache-ignite-tester-cs-5]$ make   // build nodemgr (server node) and
> tester
> (client node) program;
> apache-ignite-tester-cs-5]$ cd src
> src]$ make pstorecb   // package TestTableStore implementation. uses
> couchbase java client sdk.
>
> run:
> src]$ ./nodemgr -c config/test-tool-server.xml   // server node
> src]$ ./tester -c config/test-tool-client.xml -o 11 -l 1 -i 100 -n 10   //
> Select all(-o 11),  10 entries(-n 10) with tid between 90 (value for option
> i - value for option n) and 100 (-i 100) one iteration(-l 1)
>
> src]$ ./tester -h       // for more options
>
> thanks & regards,
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Couchbase-as-persistent-store-tp7476p8350.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: Couchbase as persistent store

Posted by kvipin <vi...@yahoo.com>.
Hi Val,

Please find the attached sample code tarball.
apache-ignite-tester-cs-5.xz
<http://apache-ignite-users.70518.x6.nabble.com/file/n8350/apache-ignite-tester-cs-5.xz>  


build:
$ tar -xvf apache-ignite-tester-cs-5.xz
$ cd apache-ignite-tester-cs-5
apache-ignite-tester-cs-5]$ ./configure
apache-ignite-tester-cs-5]$ make   // build nodemgr (server node) and tester
(client node) program;
apache-ignite-tester-cs-5]$ cd src
src]$ make pstorecb   // package TestTableStore implementation. uses
couchbase java client sdk.

run:
src]$ ./nodemgr -c config/test-tool-server.xml   // server node
src]$ ./tester -c config/test-tool-client.xml -o 11 -l 1 -i 100 -n 10   //
Select all(-o 11),  10 entries(-n 10) with tid between 90 (value for option
i - value for option n) and 100 (-i 100) one iteration(-l 1)

src]$ ./tester -h       // for more options

thanks & regards,



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Couchbase-as-persistent-store-tp7476p8350.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Couchbase as persistent store

Posted by vkulichenko <va...@gmail.com>.
Hi,

Can you provide a small project that will reproduce the issue?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Couchbase-as-persistent-store-tp7476p8280.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Couchbase as persistent store

Posted by kvipin <vi...@yahoo.com>.
any clue guys?


thanks,



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Couchbase-as-persistent-store-tp7476p8267.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Couchbase as persistent store

Posted by kvipin <vi...@yahoo.com>.
No Val, in fact it doesn't even seem to open the bucket/connection also.
Following is the *output of server node:*

$ ./nodemgr -c config/test-tool-server.xml
log4j:WARN No appenders could be found for logger
(org.springframework.core.env.StandardEnvironment).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more info.
[12:34:48]    __________  ________________ 
[12:34:48]   /  _/ ___/ |/ /  _/_  __/ __/ 
[12:34:48]  _/ // (7 7    // /  / / / _/   
[12:34:48] /___/\___/_/|_/___/ /_/ /___/  
[12:34:48] 
[12:34:48] ver. 1.6.0#20160518-sha1:0b22c45b
[12:34:48] 2016 Copyright(C) Apache Software Foundation
[12:34:48] 
[12:34:48] Ignite documentation: http://ignite.apache.org
[12:34:48] 
[12:34:48] Quiet mode.
[12:34:48]   ^-- Logging to file
'/home/ignite1/project/apacheIgnite/apache-ignite-fabric-1.6.0-bin/work/log/ignite-f5b19499.0.log'
[12:34:48]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false
or "-v" to ignite.{sh|bat}
[12:34:48] 
[12:34:48] OS: Linux 3.10.0-327.28.2.el7.x86_64 amd64
[12:34:48] VM information: Java(TM) SE Runtime Environment 1.8.0_92-b14
Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.92-b14
[12:34:53] Configured plugins:
[12:34:53]   ^-- None
[12:34:53] 
[12:34:53] Security status [authentication=off, tls/ssl=off]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in
[jar:file:/home/ignite1/project/apacheIgnite/apache-ignite-fabric-1.6.0-bin/libs/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[jar:file:/home/ignite1/project/apacheIgnite/apache-ignite-fabric-1.6.0-bin/libs/ignite-rest-http/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
[main] INFO org.eclipse.jetty.util.log - Logging initialized @6684ms
[main] INFO org.eclipse.jetty.server.Server - jetty-9.2.11.v20150529
[main] INFO org.eclipse.jetty.server.ServerConnector - Started
ServerConnector@2e5624e2{HTTP/1.1}{0.0.0.0:8080}
[main] INFO org.eclipse.jetty.server.Server - Started @6745ms
[12:34:55] Performance suggestions for grid  (fix if possible)
[12:34:55] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[12:34:55]   ^-- Disable peer class loading (set 'peerClassLoadingEnabled'
to false)
[12:34:55]   ^-- Enable ATOMIC mode if not using transactions (set
'atomicityMode' to ATOMIC)
[12:34:55]   ^-- Disable fully synchronous writes (set
'writeSynchronizationMode' to PRIMARY_SYNC or FULL_ASYNC)
[12:34:55]   ^-- Enable write-behind to persistent store (set
'writeBehindEnabled' to true)
[12:34:55] 
[12:34:55] To start Console Management & Monitoring run
ignitevisorcmd.{sh|bat}
[12:34:55] 
[12:34:55] Ignite node started OK (id=f5b19499)
[12:34:55] Topology snapshot [ver=1, servers=1, clients=0, CPUs=32,
heap=0.5GB]
[12:35:05] New version is available at ignite.apache.org: 1.7.0
[12:35:10] Topology snapshot [ver=2, servers=1, clients=1, CPUs=32,
heap=1.0GB]
[12:36:57] Topology snapshot [ver=3, servers=1, clients=0, CPUs=32,
heap=0.5GB]


Data has been successfully sent to ignite server node from client node, but
it hasn't been written to persistent-store. Following is the *output from
client node which queries the server node for data and it gets it
successfully*:

$ ./tester -c config/test-tool-client.xml -o 11 -l 3 -s 1 -i 992 -n 2
log4j:WARN No appenders could be found for logger
(org.springframework.core.env.StandardEnvironment).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more info.
[12:44:11]    __________  ________________ 
[12:44:11]   /  _/ ___/ |/ /  _/_  __/ __/ 
[12:44:11]  _/ // (7 7    // /  / / / _/   
[12:44:11] /___/\___/_/|_/___/ /_/ /___/  
[12:44:11] 
[12:44:11] ver. 1.6.0#20160518-sha1:0b22c45b
[12:44:11] 2016 Copyright(C) Apache Software Foundation
[12:44:11] 
[12:44:11] Ignite documentation: http://ignite.apache.org
[12:44:11] 
[12:44:11] Quiet mode.
[12:44:11]   ^-- Logging to file
'/home/ignite1/project/apacheIgnite/apache-ignite-fabric-1.6.0-bin/work/log/ignite-11ad75b2.0.log'
[12:44:11]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false
or "-v" to ignite.{sh|bat}
[12:44:11] 
[12:44:11] OS: Linux 3.10.0-327.28.2.el7.x86_64 amd64
[12:44:11] VM information: Java(TM) SE Runtime Environment 1.8.0_92-b14
Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.92-b14
[12:44:16] Configured plugins:
[12:44:16]   ^-- None
[12:44:16] 
[12:44:17] Security status [authentication=off, tls/ssl=off]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in
[jar:file:/home/ignite1/project/apacheIgnite/apache-ignite-fabric-1.6.0-bin/libs/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[jar:file:/home/ignite1/project/apacheIgnite/apache-ignite-fabric-1.6.0-bin/libs/ignite-rest-http/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
[main] INFO org.eclipse.jetty.util.log - Logging initialized @6743ms
[main] INFO org.eclipse.jetty.server.Server - jetty-9.2.11.v20150529
[main] WARN org.eclipse.jetty.util.component.AbstractLifeCycle - FAILED
ServerConnector@9ef8eb7{HTTP/1.1}{0.0.0.0:8080}: java.net.BindException:
Address already in use
java.net.BindException: Address already in use
	at sun.nio.ch.Net.bind0(Native Method)
	at sun.nio.ch.Net.bind(Net.java:433)
	at sun.nio.ch.Net.bind(Net.java:425)
	at
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
	at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321)
	at
org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
	at
org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:236)
	at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.server.Server.doStart(Server.java:366)
	at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at
org.apache.ignite.internal.processors.rest.protocols.http.jetty.GridJettyRestProtocol.startJetty(GridJettyRestProtocol.java:220)
	at
org.apache.ignite.internal.processors.rest.protocols.http.jetty.GridJettyRestProtocol.start(GridJettyRestProtocol.java:177)
	at
org.apache.ignite.internal.processors.rest.GridRestProcessor.startProtocol(GridRestProcessor.java:866)
	at
org.apache.ignite.internal.processors.rest.GridRestProcessor.startHttpProtocol(GridRestProcessor.java:837)
	at
org.apache.ignite.internal.processors.rest.GridRestProcessor.start(GridRestProcessor.java:451)
	at
org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1549)
	at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:876)
	at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1736)
	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.start(IgnitionEx.java:549)
	at
org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java:43)
	at
org.apache.ignite.internal.processors.platform.PlatformIgnition.start(PlatformIgnition.java:73)
[main] WARN org.eclipse.jetty.util.component.AbstractLifeCycle - FAILED
org.eclipse.jetty.server.Server@6ee660fb: java.net.BindException: Address
already in use
java.net.BindException: Address already in use
	at sun.nio.ch.Net.bind0(Native Method)
	at sun.nio.ch.Net.bind(Net.java:433)
	at sun.nio.ch.Net.bind(Net.java:425)
	at
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
	at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321)
	at
org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
	at
org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:236)
	at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.server.Server.doStart(Server.java:366)
	at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at
org.apache.ignite.internal.processors.rest.protocols.http.jetty.GridJettyRestProtocol.startJetty(GridJettyRestProtocol.java:220)
	at
org.apache.ignite.internal.processors.rest.protocols.http.jetty.GridJettyRestProtocol.start(GridJettyRestProtocol.java:177)
	at
org.apache.ignite.internal.processors.rest.GridRestProcessor.startProtocol(GridRestProcessor.java:866)
	at
org.apache.ignite.internal.processors.rest.GridRestProcessor.startHttpProtocol(GridRestProcessor.java:837)
	at
org.apache.ignite.internal.processors.rest.GridRestProcessor.start(GridRestProcessor.java:451)
	at
org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1549)
	at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:876)
	at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1736)
	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.start(IgnitionEx.java:549)
	at
org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java:43)
	at
org.apache.ignite.internal.processors.platform.PlatformIgnition.start(PlatformIgnition.java:73)
[main] INFO org.eclipse.jetty.server.ServerConnector - Stopped
ServerConnector@9ef8eb7{HTTP/1.1}{0.0.0.0:8080}
[main] INFO org.eclipse.jetty.server.Server - jetty-9.2.11.v20150529
[main] INFO org.eclipse.jetty.server.ServerConnector - Started
ServerConnector@9ef8eb7{HTTP/1.1}{0.0.0.0:8081}
[main] INFO org.eclipse.jetty.server.Server - Started @6797ms
[12:44:28] Performance suggestions for grid  (fix if possible)
[12:44:28] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[12:44:28]   ^-- Disable peer class loading (set 'peerClassLoadingEnabled'
to false)
[12:44:28]   ^-- Enable ATOMIC mode if not using transactions (set
'atomicityMode' to ATOMIC)
[12:44:28]   ^-- Disable fully synchronous writes (set
'writeSynchronizationMode' to PRIMARY_SYNC or FULL_ASYNC)
[12:44:28] 
[12:44:28] To start Console Management & Monitoring run
ignitevisorcmd.{sh|bat}
[12:44:28] 
[12:44:28] Ignite node started OK (id=11ad75b2)
[12:44:28] Topology snapshot [ver=6, servers=1, clients=1, CPUs=32,
heap=1.0GB]
SelectAll called.
990: TestTable [tid=0, idint=990, idbigint=333334444445434, idchar=Name_0,
idbinary=binary data for testing 0HI, idvarbinary=Getting Started contains
a list of tasks you might want to perform when you set up your computer.
Tasks in Getting Started include:Transferring files from another computer.
Adding new users to your computer. Adding new users to your computer_0,
idvarchar=Getting Started contains a list of tasks you might want to perform
when you set up your computer. Tasks in Getting Started include:Transferring
files from another computer. Adding new users to your computer. Adding new
users to your computer_0, idts=1475771816]
991: TestTable [tid=0, idint=991, idbigint=333334444445435, idchar=Name_0,
idbinary=binary data for testing 0HI, idvarbinary=Getting Started contains
a list of tasks you might want to perform when you set up your computer.
Tasks in Getting Started include:Transferring files from another computer.
Adding new users to your computer. Adding new users to your computer_0,
idvarchar=Getting Started contains a list of tasks you might want to perform
when you set up your computer. Tasks in Getting Started include:Transferring
files from another computer. Adding new users to your computer. Adding new
users to your computer_0, idts=1475771816]



thanks & regards,



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Couchbase-as-persistent-store-tp7476p8119.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Couchbase as persistent store

Posted by vkulichenko <va...@gmail.com>.
You have write behind enabled. This means that the data will be flushed
eventually. Does it work if you disable write behind (in this case the store
will be updated synchronously with the cache update)?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Couchbase-as-persistent-store-tp7476p8089.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Couchbase as persistent store

Posted by kvipin <vi...@yahoo.com>.
Val,

I'm not getting any error or exception that's what makes it difficult to
figure out whats going on. But I do see Apache Ignite opening couchbase
bucket successfully, which is equivalent to connection establishment. But
after that no activity server side and client side every thing seems to be
working fine.

Following is the output from Server node:

$ ./nodemgr -c config/test-tool-server.xml
log4j:WARN No appenders could be found for logger
(org.springframework.core.env.StandardEnvironment).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more info.
[07:04:36]    __________  ________________ 
[07:04:36]   /  _/ ___/ |/ /  _/_  __/ __/ 
[07:04:36]  _/ // (7 7    // /  / / / _/   
[07:04:36] /___/\___/_/|_/___/ /_/ /___/  
[07:04:36] 
[07:04:36] ver. 1.6.0#20160518-sha1:0b22c45b
[07:04:36] 2016 Copyright(C) Apache Software Foundation
[07:04:36] 
[07:04:36] Ignite documentation: http://ignite.apache.org
[07:04:36] 
[07:04:36] Quiet mode.
[07:04:36]   ^-- Logging to file
'/home/ignite1/project/apacheIgnite/apache-ignite-fabric-1.6.0-bin/work/log/ignite-a5293357.0.log'
[07:04:36]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false
or "-v" to ignite.{sh|bat}
[07:04:36] 
[07:04:36] OS: Linux 3.10.0-327.28.2.el7.x86_64 amd64
[07:04:36] VM information: Java(TM) SE Runtime Environment 1.8.0_92-b14
Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.92-b14
[07:04:41] Configured plugins:
[07:04:41]   ^-- None
[07:04:41] 
[07:04:42] Security status [authentication=off, tls/ssl=off]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in
[jar:file:/home/ignite1/project/apacheIgnite/apache-ignite-fabric-1.6.0-bin/libs/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[jar:file:/home/ignite1/project/apacheIgnite/apache-ignite-fabric-1.6.0-bin/libs/ignite-rest-http/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
[main] INFO org.eclipse.jetty.util.log - Logging initialized @6767ms
[main] INFO org.eclipse.jetty.server.Server - jetty-9.2.11.v20150529
[main] INFO org.eclipse.jetty.server.ServerConnector - Started
ServerConnector@24d09c1{HTTP/1.1}{0.0.0.0:8080}
[main] INFO org.eclipse.jetty.server.Server - Started @6818ms
[07:04:44] Performance suggestions for grid  (fix if possible)
[07:04:44] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[07:04:44]   ^-- Disable peer class loading (set 'peerClassLoadingEnabled'
to false)
[07:04:44]   ^-- Enable ATOMIC mode if not using transactions (set
'atomicityMode' to ATOMIC)
[07:04:44]   ^-- Disable fully synchronous writes (set
'writeSynchronizationMode' to PRIMARY_SYNC or FULL_ASYNC)
[07:04:44] 
[07:04:44] To start Console Management & Monitoring run
ignitevisorcmd.{sh|bat}
[07:04:44] 
[07:04:44] Ignite node started OK (id=a5293357)
[07:04:44] Topology snapshot [ver=1, servers=1, clients=0, CPUs=32,
heap=0.5GB]
[07:04:55] New version is available at ignite.apache.org: 1.7.0
[07:05:46] Topology snapshot [ver=2, servers=1, clients=1, CPUs=32,
heap=1.0GB]
[flusher-0-#148%null%] INFO com.couchbase.client.core.CouchbaseCore -
CouchbaseEnvironment: {sslEnabled=false, sslKeystoreFile='null',
sslKeystorePassword=false, sslKeystore=null, bootstrapHttpEnabled=true,
bootstrapCarrierEnabled=true, bootstrapHttpDirectPort=8091,
bootstrapHttpSslPort=18091, bootstrapCarrierDirectPort=11210,
bootstrapCarrierSslPort=11207, ioPoolSize=32, computationPoolSize=32,
responseBufferSize=16384, requestBufferSize=16384, kvServiceEndpoints=1,
viewServiceEndpoints=1, queryServiceEndpoints=1, searchServiceEndpoints=1,
ioPool=NioEventLoopGroup, coreScheduler=CoreScheduler,
eventBus=DefaultEventBus, packageNameAndVersion=couchbase-java-client/2.3.3
(git: 2.3.3, core: 1.3.3), dcpEnabled=false, retryStrategy=BestEffort,
maxRequestLifetime=75000, retryDelay=ExponentialDelay{growBy 1.0
MICROSECONDS, powers of 2; lower=100, upper=100000},
reconnectDelay=ExponentialDelay{growBy 1.0 MILLISECONDS, powers of 2;
lower=32, upper=4096}, observeIntervalDelay=ExponentialDelay{growBy 1.0
MICROSECONDS, powers of 2; lower=10, upper=100000}, keepAliveInterval=30000,
autoreleaseAfter=2000, bufferPoolingEnabled=true, tcpNodelayEnabled=true,
mutationTokensEnabled=false, socketConnectTimeout=1000,
dcpConnectionBufferSize=20971520, dcpConnectionBufferAckThreshold=0.2,
dcpConnectionName=dcp/core-io, callbacksOnIoPool=false,
disconnectTimeout=25000,
requestBufferWaitStrategy=com.couchbase.client.core.env.DefaultCoreEnvironment$2@6ec6ddb4,
queryTimeout=75000, viewTimeout=75000, kvTimeout=2500, connectTimeout=5000,
dnsSrvEnabled=false}
[cb-io-1-1] INFO com.couchbase.client.core.node.Node - Connected to Node
localhost
[cb-computations-9] INFO
com.couchbase.client.core.config.ConfigurationProvider - Opened bucket
TestTable


thanks & regards,



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Couchbase-as-persistent-store-tp7476p8080.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Couchbase as persistent store

Posted by vkulichenko <va...@gmail.com>.
What is the exception now?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Couchbase-as-persistent-store-tp7476p8065.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Couchbase as persistent store

Posted by kvipin <vi...@yahoo.com>.
Guys,

read-through is working fine for me but write-through is not working. I'm
not getting error/exception either. Following is my configuration file and
relevant code blocks,

*Sever node configuration file:*

$ cat test-tool-server.xml
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/util
        http://www.springframework.org/schema/util/spring-util.xsd">

    <bean id="grid.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
        
        <property name="peerClassLoadingEnabled" value="true"/>

<property name="binaryConfiguration">
<bean class="org.apache.ignite.configuration.BinaryConfiguration">
<property name="compactFooter" value="false" />
<property name="idMapper">
<bean class="org.apache.ignite.binary.BinaryBasicIdMapper">
<constructor-arg name="isLowerCase" value="true" />
</bean>
</property>
<property name="nameMapper">
<bean class="org.apache.ignite.binary.BinaryBasicNameMapper">
<constructor-arg name="isSimpleName" value="true" />
</bean>
</property>
</bean>
</property>

        <property name="cacheConfiguration">
            <list>
                <bean
class="org.apache.ignite.configuration.CacheConfiguration">
                
                <property name="readThrough" value="true"></property>
                <property name="writeThrough" value="true"></property>
                <property name="writeBehindEnabled" value="true"></property>
                <property name="storeKeepBinary" value="true"></property>
                
                    <property name="cacheStoreFactory">
                      <bean
class="javax.cache.configuration.FactoryBuilder.ClassFactory">
			<constructor-arg value="TestTableStore"/>
                      </bean>
                    </property>

                    <property name="name" value="TestTable"/>
                    <property name="cacheMode" value="PARTITIONED"/>
                    <property name="atomicityMode" value="TRANSACTIONAL"/>
                    <property name="writeSynchronizationMode"
value="FULL_SYNC"/>

                    
                    <property name="queryEntities">
                        <list>
                            <bean
class="org.apache.ignite.cache.QueryEntity">
                                <property name="keyType"
value="java.lang.Long"/>
                                <property name="valueType"
value="TestTable"/>

                                <property name="fields">
                                    <map>
                                        <entry key="tid"
value="java.lang.Short"/>
                                        <entry key="idint"
value="java.lang.Int"/>
                                        <entry key="idbigint"
value="java.lang.Long"/>
                                        <entry key="idchar"
value="java.lang.String"/>
                                        <entry key="idbinary"
value="java.lang.byte[]"/>
                                        <entry key="idvarbinary"
value="java.lang.byte[]"/>
                                        <entry key="idvarchar"
value="java.lang.String"/>
                                        <entry key="idts"
value="java.lang.Timestamp"/>
                                    </map>
                                </property>
                                <property name="indexes">
				    <list>
					<bean class="org.apache.ignite.cache.QueryIndex">
					    <constructor-arg value="tid"/>
					    <constructor-arg value="SORTED"/>
					</bean>
					
					<bean class="org.apache.ignite.cache.QueryIndex">
					    <constructor-arg>
						<list>
						    <value>tid</value>
						    <value>idint</value>
						</list>
					    </constructor-arg>
					    <constructor-arg value="SORTED"/>
					</bean>
				    </list>
                                </property>
                            </bean>
                        </list>
                    </property>
                </bean>

                <bean
class="org.apache.ignite.configuration.CacheConfiguration">
                <property name="readThrough" value="true"></property>
                <property name="writeThrough" value="true"></property>
                <property name="writeBehindEnabled" value="true"></property>
                <property name="storeKeepBinary" value="true"></property>
                    <property name="cacheStoreFactory">
                      <bean
class="javax.cache.configuration.FactoryBuilder.ClassFactory">
			<constructor-arg value="TestTableStore"/>
                      </bean>
                    </property>

                    <property name="name" value="TestTable1"/>
                    <property name="cacheMode" value="PARTITIONED"/>
                    <property name="atomicityMode" value="TRANSACTIONAL"/>
                    <property name="writeSynchronizationMode"
value="FULL_SYNC"/>

                    
                    <property name="queryEntities">
                        <list>
                            <bean
class="org.apache.ignite.cache.QueryEntity">
                                <property name="keyType"
value="java.lang.Long"/>
                                <property name="valueType"
value="TestTable"/>

                                <property name="fields">
                                    <map>
                                        <entry key="tid"
value="java.lang.Short"/>
                                        <entry key="idint"
value="java.lang.Int"/>
                                        <entry key="idbigint"
value="java.lang.Long"/>
                                        <entry key="idchar"
value="java.lang.String"/>
                                        <entry key="idbinary"
value="java.lang.byte[]"/>
                                        <entry key="idvarbinary"
value="java.lang.byte[]"/>
                                        <entry key="idvarchar"
value="java.lang.String"/>
                                        <entry key="idts"
value="java.lang.Timestamp"/>
                                    </map>
                                </property>
                                <property name="indexes">
                                    <list>
                                        <bean
class="org.apache.ignite.cache.QueryIndex">
                                            <constructor-arg value="tid"/>
					    <constructor-arg value="SORTED"/>
                                        </bean>
                                        
                                        <bean
class="org.apache.ignite.cache.QueryIndex">
                                            <constructor-arg>
                                                <list>
                                                    <value>tid</value>
                                                    <value>idint</value>
                                                </list>
                                            </constructor-arg>
                                            <constructor-arg
value="SORTED"/>
                                        </bean>
                                    </list>
                                </property>
                            </bean>
                        </list>
                    </property>
                </bean>
            </list>
        </property>

        
        <property name="discoverySpi">
            <bean
class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                <property name="ipFinder">
                    
                    
                    
                    <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
                        <property name="addresses">
                            <list>
                                
                                <value>127.0.0.1:47550..47551</value>
                            </list>
                        </property>
                    </bean>
                </property>
            </bean>
        </property>
    </bean>
</beans>

*C++ test program which talks to Apache Ignite*

$ cat main.cc
...
void* Insert_i(void* arg, const std::string& cname) {
	std::clog << __func__ << " called." << std::endl;
	Cache<int64_t, TestTable> ttcache = Ignition::Get().GetCache<
				int64_t, TestTable>(cname.c_str());
	// Clear cache before running the example.
	//ttcache.Clear();

	GenTestTableRec recgen;
	std::map<int64_t, TestTable> ttrecords;
	//TestTable rec = recgen();
	std::string tmpstr("Getting Started contains a list of tasks you might want
to perform when you set up your computer. Tasks in Getting Started
include:Transferring files from another computer. Adding new users to your
computer. Adding new users to your computer");
	std::vector<int>* targ = static_cast<std::vector&lt;int>* >(arg);
	int16_t tid = targ->operator[](1);
	TestTable rec(tid, tid, idbigint, std::string("Name_") +
std::to_string(tid), tmpstr + "_" + std::to_string(tid), time(0));
	sprintf((char*)rec.idbinary, "binary data for testing %d", tid);
	sprintf((char*)rec.idvarbinary, "%s_%d", tmpstr.c_str(), tid);
	rec.idbinlen = strlen((char*)rec.idbinary);
	rec.idvarbinlen = strlen((char*)rec.idvarbinary);
	int nentries = targ->operator[](0);
	for(int i = 0; i < nentries; i++) {
		rec.idts = ignite::Timestamp(time(0)*1000);
		rec.idint = idint++;
		rec.idbigint = idbigint++;
		ttrecords[key++] = rec;
	}
	std::clog << "Inserting " << ttrecords.size() << " records to " <<
				cname << ":" << std::endl;
	//for(auto itr = ttrecords.begin(); itr != ttrecords.end(); ++itr)
	//	std::clog << itr->first << ": " << itr->second.ToString()
	//			<< std::endl;
 	struct timeval t0;
	gettimeofday(&t0, 0);
	ttcache.PutAll(ttrecords);
 	struct timeval t1;
	gettimeofday(&t1, 0);
	ofs << time(0) << "," << ttrecords.size() << "," << t1.tv_sec * 1000000 +
t1.tv_usec
				- t0.tv_sec * 1000000 - t0.tv_usec << ",+,";
	std::clog << "last inserted record key: " << key - 1 << "." << std::endl;

	return (void*)0;
}


*CacheStoreAdapter implementation*

$ cat TestTableStore.java 
...
public class TestTableStore extends CacheStoreAdapter<Long, TestTable>
implements Serializable {

	/** Auto-injected store session. */
	@CacheStoreSessionResource
	private CacheStoreSession ses;
	private Cluster cluster;

	public TestTableStore create() {
		return new TestTableStore();
	}
	// Complete transaction or simply close connection if there is no
transaction.
	@Override public void sessionEnd(boolean commit) {
		Bucket conn = ses.attachment();
		if (conn != null && ses.isWithinTransaction()) {
			//if (commit)
			//	conn.commit();
			//else
			//	conn.rollback();
		}
	}

	// This mehtod is called whenever "get(...)" methods are called on
IgniteCache.
	@Override public TestTable load(Long key) {
		Bucket conn = connection();
		JsonDocument jd = conn.get(key.toString());
		if(jd != null) {
			JsonObject jo = jd.content();
			TestTable tt = new TestTable(((Integer)jo.get("tid")).shortValue(),
(Integer)jo.get("idint"), (Long)jo.get("idbigint"),
(String)jo.get("idchar"), (String)jo.get("idvarchar"), new
Timestamp((Integer)jo.get("idts")));
			tt.setIdbinary(SerializationUtils.serialize((String)jo.get("idbinary")));
		
tt.setIdvarbinary(SerializationUtils.serialize((String)jo.get("idvarbinary")));
			return tt;
		}
		return null;
	}

	// This mehtod is called whenever "put(...)" methods are called on
IgniteCache.
	@Override public void write(Cache.Entry<? extends Long, ? extends
TestTable> entry) throws CacheWriterException {
		Bucket conn = connection();
		TestTable val = entry.getValue();
		conn.insert(JsonDocument.create(entry.getKey().toString(),
JsonObject.create().put("tid", val.getTid()).put("idint",
val.getIdint()).put("idbigint", val.getIdbigint()).put("idchar",
val.getIdchar()).put("idbinary", val.getIdbinary()).put("idvarbinary",
val.getIdvarbinary()).put("idvarchar", val.getIdvarchar()).put("idts",
val.getIdts())));
	}

	// This mehtod is called whenever "remove(...)" methods are called on
IgniteCache.
	@Override public void delete(Object key) {
		Bucket conn = connection();
		conn.remove((String)key);
	}

	// This mehtod is called whenever "loadCache()" and "localLoadCache()"
	// methods are called on IgniteCache. It is used for bulk-loading the
cache.
	// If you don't need to bulk-load the cache, skip this method.
	@Override public void loadCache(IgniteBiInClosure<Long, TestTable> clo,
Object... args) {
		if (args == null || args.length == 0 || args[0] == null)
			throw new CacheLoaderException("Expected entry count parameter is not
provided.");

		final int entryCnt = (Integer)args[0];

		Bucket conn = connection();
		/*try (PreparedStatement st = conn.prepareStatement(
			"select tid, idint, idbigint, idchar, idvarchar"
                        + ", idbinary, idvarbinary, idts from TestTable"
                        + " where tid = ?")) {
			try (ResultSet rs = st.executeQuery()) {
				int cnt = 0;

				while (cnt < entryCnt && rs.next()) {
					TestTable tt = new TestTable(rs.getShort(1), rs.getInt(2),
rs.getLong(3), rs.getString(4), rs.getString(5), rs.getTimestamp(8));
					tt.setIdbinary(rs.getObject(6));
					tt.setIdvarbinary(rs.getObject(7));

					//clo.apply(tt.getTid(), tt);
					clo.apply(tt.getIdbigint(), tt);

					cnt++;
				}
			}
		}*/
	}

	// Opens JDBC connection and attaches it to the ongoing
	// session if within a transaction.
	//private Bucket connection() throws SQLException {
	private Bucket connection() {
		if (ses.isWithinTransaction()) {
			Bucket conn = ses.attachment();

			if (conn == null) {
				conn = openConnection(false);

				// Store connection in the session, so it can be accessed
				// for other operations within the same transaction.
				ses.attach(conn);
			}

			return conn;
		}
		// Transaction can be null in case of simple load or put operation.
		else
			return openConnection(true);
	}

	// Opens JDBC connection.
	//private Bucket openConnection(boolean autocommit) throws SQLException {
	private Bucket openConnection(boolean autocommit) {
		// Open connection to your RDBMS systems (Oracle, MySQL, Postgres, DB2,
Microsoft SQL, etc.)
		// In this example we use H2 Database for simplification.
		//Bucket conn =
DriverManager.getConnection("jdbc:h2:mem:example;DB_CLOSE_DELAY=-1");
		if (this.cluster == null)
			this.cluster = CouchbaseCluster.create();
		Bucket conn = cluster.openBucket("TestTable");

		//conn.setAutoCommit(autocommit);

		return conn;
	}

	// This mehtod is called whenever "getAll(...)" methods are called on
IgniteCache.
	@Override public Map<Long, TestTable> loadAll(Iterable<? extends Long>
keys) throws CacheLoaderException {
		Bucket conn = connection();
		Map<Long, TestTable> loaded = new HashMap<Long, TestTable>();

		for (Long key : keys) {
			JsonDocument jd = conn.get(key.toString());
			if(jd != null) {
				JsonObject jo = jd.content();
				TestTable tt = new TestTable(((Integer)jo.get("tid")).shortValue(),
(Integer)jo.get("idint"), (Long)jo.get("idbigint"),
(String)jo.get("idchar"), (String)jo.get("idvarchar"), new
Timestamp((Integer)jo.get("idts")));
			
tt.setIdbinary(SerializationUtils.serialize((String)jo.get("idbinary")));
			
tt.setIdvarbinary(SerializationUtils.serialize((String)jo.get("idvarbinary")));
				loaded.put(key, tt);
			}
		}
		return loaded;
	}

	// This mehtod is called whenever "putAll(...)" methods are called on
IgniteCache.
	@Override public void writeAll(Collection<Cache.Entry&lt;? extends Long, ?
extends TestTable>> entries) throws CacheWriterException {
		Bucket conn = connection();
		// Syntax of MERGE statement is database specific and should be adopted
for your database.
		// If your database does not support MERGE statement then use sequentially
update, insert statements.
		for (Cache.Entry<? extends Long, ? extends TestTable> entry : entries) {
			TestTable val = entry.getValue();
			conn.upsert(JsonDocument.create(entry.getKey().toString(),
JsonObject.create().put("tid", val.getTid()).put("idint",
val.getIdint()).put("idbigint", val.getIdbigint()).put("idchar",
val.getIdchar()).put("idbinary", val.getIdbinary()).put("idvarbinary",
val.getIdvarbinary()).put("idvarchar", val.getIdvarchar()).put("idts",
val.getIdts())));
			System.out.println(conn.get(entry.getKey().toString()));
		}
	}
 
	// This mehtod is called whenever "removeAll(...)" methods are called on
IgniteCache.
	@Override public void deleteAll(Collection<?> keys) throws
CacheWriterException {
		Bucket conn = connection();
		for (Object key : keys)
			conn.remove((String)key);
	}

	@Override public String toString() {
		return "TestTableStore [ses=" + ses + ", cluster=" + cluster + ']';
	}
}


What can be the possible issue?

thanks & regards,



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Couchbase-as-persistent-store-tp7476p8033.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Couchbase as persistent store

Posted by kvipin <vi...@yahoo.com>.
Thanks a ton Val, it solved my problem.

regards,



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Couchbase-as-persistent-store-tp7476p7762.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Couchbase as persistent store

Posted by vkulichenko <va...@gmail.com>.
Hi Kevin,

It looks like you serialize the instance of the CacheStore, most likely due
to the fact that you use SingletonFactory. Please try to use ClassFactory or
your own factory that will not encapsulate the instance, but will create a
new one in the 'create()' method.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Couchbase-as-persistent-store-tp7476p7689.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Couchbase as persistent store

Posted by kvipin <vi...@yahoo.com>.
Thanks val, I've fixed it. Now I'm getting following *exception while running
my test program:
*
[06:00:01] Security status [authentication=off, tls/ssl=off]
[06:00:03] Performance suggestions for grid  (fix if possible)
[06:00:03] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[06:00:03]   ^-- Disable peer class loading (set 'peerClassLoadingEnabled'
to false)
[06:00:03]   ^-- Enable ATOMIC mode if not using transactions (set
'atomicityMode' to ATOMIC)
[06:00:03]   ^-- Disable fully synchronous writes (set
'writeSynchronizationMode' to PRIMARY_SYNC or FULL_ASYNC)
[06:00:03]
[06:00:03] To start Console Management & Monitoring run
ignitevisorcmd.{sh|bat}
[06:00:03]
[06:00:03] Ignite node started OK (id=587c3c96)
[06:00:03] Topology snapshot [ver=1, servers=1, clients=0, CPUs=32,
heap=0.5GB]
[06:00:13] New version is available at ignite.apache.org: 1.7.0
[06:00:15,057][SEVERE][tcp-disco-msg-worker-#2%null%][TcpDiscoverySpi]
Failed to marshal discovery data [comp=1, data=DynamicCacheChangeBatch
[reqs=[DynamicCacheChangeRequest
[deploymentId=fe50a831751-4bc0a4f8-b6d8-40c8-ab49-ae4411be6b5e,
startCfg=CacheConfiguration [name=ignite-sys-cache,
storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
rebalanceTimeout=10000, evictPlc=null, evictSync=false,
evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=FULL_SYNC,
storeFactory=null, storeKeepBinary=false, loadPrevVal=false,
aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@12299890,
cacheMode=REPLICATED, atomicityMode=TRANSACTIONAL,
atomicWriteOrderMode=null, backups=2147483647, invalidate=false,
tmLookupClsName=null, rebalanceMode=SYNC, rebalanceOrder=-2,
rebalanceBatchSize=524288, rebalanceBatchesPrefetchCount=2,
offHeapMaxMem=-1, swapEnabled=false, maxConcurrentAsyncOps=500,
writeBehindEnabled=false, writeBehindFlushSize=10240,
writeBehindFlushFreq=5000, writeBehindFlushThreadCnt=1,
writeBehindBatchSize=512, memMode=ONHEAP_TIERED,
affMapper=o.a.i.i.processors.cache.GridCacheDefaultAffinityKeyMapper@5c18016b,
rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
longQryWarnTimeout=3000, readFromBackup=true,
nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@2a7ed1f,
sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=UTILITY,
initiatingNodeId=null, nearCacheCfg=null, clientStartOnly=false, stop=false,
close=false, failIfExists=false, template=false,
rcvdFrom=587c3c96-0254-44bf-94d7-7abfaee0ba30, exchangeNeeded=false,
cacheFutTopVer=null, cacheName=ignite-sys-cache], DynamicCacheChangeRequest
[deploymentId=0f50a831751-4bc0a4f8-b6d8-40c8-ab49-ae4411be6b5e,
startCfg=CacheConfiguration [name=ignite-atomics-sys-cache,
storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
rebalanceTimeout=10000, evictPlc=null, evictSync=false,
evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=FULL_SYNC,
storeFactory=null, storeKeepBinary=false, loadPrevVal=false,
aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@1522d8a0,
cacheMode=PARTITIONED, atomicityMode=TRANSACTIONAL,
atomicWriteOrderMode=null, backups=0, invalidate=false,
tmLookupClsName=null, rebalanceMode=SYNC, rebalanceOrder=-1,
rebalanceBatchSize=524288, rebalanceBatchesPrefetchCount=2,
offHeapMaxMem=-1, swapEnabled=false, maxConcurrentAsyncOps=500,
writeBehindEnabled=false, writeBehindFlushSize=10240,
writeBehindFlushFreq=5000, writeBehindFlushThreadCnt=1,
writeBehindBatchSize=512, memMode=ONHEAP_TIERED,
affMapper=o.a.i.i.processors.cache.GridCacheDefaultAffinityKeyMapper@5644dc81,
rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
longQryWarnTimeout=3000, readFromBackup=true,
nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@2a7ed1f,
sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
snapshotableIdx=false, cpOnRead=true, topValidator=null],
cacheType=INTERNAL, initiatingNodeId=null, nearCacheCfg=null,
clientStartOnly=false, stop=false, close=false, failIfExists=false,
template=false, rcvdFrom=587c3c96-0254-44bf-94d7-7abfaee0ba30,
exchangeNeeded=false, cacheFutTopVer=null,
cacheName=ignite-atomics-sys-cache], DynamicCacheChangeRequest
[deploymentId=2f50a831751-4bc0a4f8-b6d8-40c8-ab49-ae4411be6b5e,
startCfg=CacheConfiguration [name=TestTable1,
storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
rebalanceTimeout=10000, evictPlc=null, evictSync=false,
evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=FULL_SYNC,
storeFactory=javax.cache.configuration.FactoryBuilder$SingletonFactory@2a3888c1,
storeKeepBinary=false, loadPrevVal=false,
aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@774698ab,
cacheMode=PARTITIONED, atomicityMode=TRANSACTIONAL,
atomicWriteOrderMode=null, backups=0, invalidate=false,
tmLookupClsName=null, rebalanceMode=ASYNC, rebalanceOrder=0,
rebalanceBatchSize=524288, rebalanceBatchesPrefetchCount=2,
offHeapMaxMem=-1, swapEnabled=false, maxConcurrentAsyncOps=500,
writeBehindEnabled=true, writeBehindFlushSize=10240,
writeBehindFlushFreq=5000, writeBehindFlushThreadCnt=1,
writeBehindBatchSize=512, memMode=ONHEAP_TIERED,
affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@a4ca3f6,
rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
longQryWarnTimeout=3000, readFromBackup=true,
nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@2a7ed1f,
sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
initiatingNodeId=null, nearCacheCfg=null, clientStartOnly=false, stop=false,
close=false, failIfExists=false, template=false,
rcvdFrom=587c3c96-0254-44bf-94d7-7abfaee0ba30, exchangeNeeded=false,
cacheFutTopVer=null, cacheName=TestTable1], DynamicCacheChangeRequest
[deploymentId=ee50a831751-4bc0a4f8-b6d8-40c8-ab49-ae4411be6b5e,
startCfg=CacheConfiguration [name=ignite-marshaller-sys-cache,
storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
rebalanceTimeout=10000, evictPlc=null, evictSync=false,
evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
dfltLockTimeout=0, startSize=300, nearCfg=null, writeSync=FULL_SYNC,
storeFactory=null, storeKeepBinary=false, loadPrevVal=false,
aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@51a9ad5e,
cacheMode=REPLICATED, atomicityMode=ATOMIC, atomicWriteOrderMode=CLOCK,
backups=2147483647, invalidate=false, tmLookupClsName=null,
rebalanceMode=SYNC, rebalanceOrder=-2, rebalanceBatchSize=524288,
rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
maxConcurrentAsyncOps=500, writeBehindEnabled=false,
writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
memMode=ONHEAP_TIERED,
affMapper=o.a.i.i.processors.cache.GridCacheDefaultAffinityKeyMapper@476b0ae6,
rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
longQryWarnTimeout=3000, readFromBackup=true,
nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@2a7ed1f,
sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
snapshotableIdx=false, cpOnRead=true, topValidator=null],
cacheType=MARSHALLER, initiatingNodeId=null, nearCacheCfg=null,
clientStartOnly=false, stop=false, close=false, failIfExists=false,
template=false, rcvdFrom=587c3c96-0254-44bf-94d7-7abfaee0ba30,
exchangeNeeded=false, cacheFutTopVer=null,
cacheName=ignite-marshaller-sys-cache], DynamicCacheChangeRequest
[deploymentId=1f50a831751-4bc0a4f8-b6d8-40c8-ab49-ae4411be6b5e,
startCfg=CacheConfiguration [name=TestTable,
storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
rebalanceTimeout=10000, evictPlc=null, evictSync=false,
evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=FULL_SYNC,
storeFactory=javax.cache.configuration.FactoryBuilder$SingletonFactory@51c693d,
storeKeepBinary=false, loadPrevVal=false,
aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@18025ced,
cacheMode=PARTITIONED, atomicityMode=TRANSACTIONAL,
atomicWriteOrderMode=null, backups=0, invalidate=false,
tmLookupClsName=null, rebalanceMode=ASYNC, rebalanceOrder=0,
rebalanceBatchSize=524288, rebalanceBatchesPrefetchCount=2,
offHeapMaxMem=-1, swapEnabled=false, maxConcurrentAsyncOps=500,
writeBehindEnabled=true, writeBehindFlushSize=10240,
writeBehindFlushFreq=5000, writeBehindFlushThreadCnt=1,
writeBehindBatchSize=512, memMode=ONHEAP_TIERED,
affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@3a3e4aff,
rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
longQryWarnTimeout=3000, readFromBackup=true,
nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@2a7ed1f,
sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
initiatingNodeId=null, nearCacheCfg=null, clientStartOnly=false, stop=false,
close=false, failIfExists=false, template=false,
rcvdFrom=587c3c96-0254-44bf-94d7-7abfaee0ba30, exchangeNeeded=false,
cacheFutTopVer=null, cacheName=TestTable]],
clientNodes={TestTable1={587c3c96-0254-44bf-94d7-7abfaee0ba30=false,
d352bef5-875e-4f3c-bfb4-91786f286258=false},
ignite-marshaller-sys-cache={587c3c96-0254-44bf-94d7-7abfaee0ba30=false,
d352bef5-875e-4f3c-bfb4-91786f286258=false},
TestTable={587c3c96-0254-44bf-94d7-7abfaee0ba30=false,
d352bef5-875e-4f3c-bfb4-91786f286258=false},
ignite-sys-cache={587c3c96-0254-44bf-94d7-7abfaee0ba30=false,
d352bef5-875e-4f3c-bfb4-91786f286258=false},
ignite-atomics-sys-cache={587c3c96-0254-44bf-94d7-7abfaee0ba30=false,
d352bef5-875e-4f3c-bfb4-91786f286258=false}},
id=3160a831751-4bc0a4f8-b6d8-40c8-ab49-ae4411be6b5e, clientReconnect=false]]
class org.apache.ignite.IgniteCheckedException: Failed to serialize object:
DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
[deploymentId=fe50a831751-4bc0a4f8-b6d8-40c8-ab49-ae4411be6b5e,
startCfg=CacheConfiguration [name=ignite-sys-cache,
storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
rebalanceTimeout=10000, evictPlc=null, evictSync=false,
evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=FULL_SYNC,
storeFactory=null, storeKeepBinary=false, loadPrevVal=false,
aff=org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction@12299890,
cacheMode=REPLICATED, atomicityMode=TRANSACTIONAL,
atomicWriteOrderMode=null, backups=2147483647, invalidate=false,
tmLookupClsName=null, rebalanceMode=SYNC, rebalanceOrder=-2,
rebalanceBatchSize=524288, rebalanceBatchesPrefetchCount=2,
offHeapMaxMem=-1, swapEnabled=false, maxConcurrentAsyncOps=500,
writeBehindEnabled=false, writeBehindFlushSize=10240,
writeBehindFlushFreq=5000, writeBehindFlushThreadCnt=1,
writeBehindBatchSize=512, memMode=ONHEAP_TIERED,
affMapper=org.apache.ignite.internal.processors.cache.GridCacheDefaultAffinityKeyMapper@5c18016b,
rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
longQryWarnTimeout=3000, readFromBackup=true,
nodeFilter=org.apache.ignite.configuration.CacheConfiguration$IgniteAllNodesPredicate@2a7ed1f,
sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=UTILITY,
initiatingNodeId=null, nearCacheCfg=null, clientStartOnly=false, stop=false,
close=false, failIfExists=false, template=false,
rcvdFrom=587c3c96-0254-44bf-94d7-7abfaee0ba30, exchangeNeeded=false,
cacheFutTopVer=null, cacheName=ignite-sys-cache], DynamicCacheChangeRequest
[deploymentId=0f50a831751-4bc0a4f8-b6d8-40c8-ab49-ae4411be6b5e,
startCfg=CacheConfiguration [name=ignite-atomics-sys-cache,
storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
rebalanceTimeout=10000, evictPlc=null, evictSync=false,
evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=FULL_SYNC,
storeFactory=null, storeKeepBinary=false, loadPrevVal=false,
aff=org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction@1522d8a0,
cacheMode=PARTITIONED, atomicityMode=TRANSACTIONAL,
atomicWriteOrderMode=null, backups=0, invalidate=false,
tmLookupClsName=null, rebalanceMode=SYNC, rebalanceOrder=-1,
rebalanceBatchSize=524288, rebalanceBatchesPrefetchCount=2,
offHeapMaxMem=-1, swapEnabled=false, maxConcurrentAsyncOps=500,
writeBehindEnabled=false, writeBehindFlushSize=10240,
writeBehindFlushFreq=5000, writeBehindFlushThreadCnt=1,
writeBehindBatchSize=512, memMode=ONHEAP_TIERED,
affMapper=org.apache.ignite.internal.processors.cache.GridCacheDefaultAffinityKeyMapper@5644dc81,
rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
longQryWarnTimeout=3000, readFromBackup=true,
nodeFilter=org.apache.ignite.configuration.CacheConfiguration$IgniteAllNodesPredicate@2a7ed1f,
sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
snapshotableIdx=false, cpOnRead=true, topValidator=null],
cacheType=INTERNAL, initiatingNodeId=null, nearCacheCfg=null,
clientStartOnly=false, stop=false, close=false, failIfExists=false,
template=false, rcvdFrom=587c3c96-0254-44bf-94d7-7abfaee0ba30,
exchangeNeeded=false, cacheFutTopVer=null,
cacheName=ignite-atomics-sys-cache], DynamicCacheChangeRequest
[deploymentId=2f50a831751-4bc0a4f8-b6d8-40c8-ab49-ae4411be6b5e,
startCfg=CacheConfiguration [name=TestTable1,
storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
rebalanceTimeout=10000, evictPlc=null, evictSync=false,
evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=FULL_SYNC,
storeFactory=javax.cache.configuration.FactoryBuilder$SingletonFactory@2a3888c1,
storeKeepBinary=false, loadPrevVal=false,
aff=org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction@774698ab,
cacheMode=PARTITIONED, atomicityMode=TRANSACTIONAL,
atomicWriteOrderMode=null, backups=0, invalidate=false,
tmLookupClsName=null, rebalanceMode=ASYNC, rebalanceOrder=0,
rebalanceBatchSize=524288, rebalanceBatchesPrefetchCount=2,
offHeapMaxMem=-1, swapEnabled=false, maxConcurrentAsyncOps=500,
writeBehindEnabled=true, writeBehindFlushSize=10240,
writeBehindFlushFreq=5000, writeBehindFlushThreadCnt=1,
writeBehindBatchSize=512, memMode=ONHEAP_TIERED,
affMapper=org.apache.ignite.internal.processors.cache.CacheDefaultBinaryAffinityKeyMapper@a4ca3f6,
rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
longQryWarnTimeout=3000, readFromBackup=true,
nodeFilter=org.apache.ignite.configuration.CacheConfiguration$IgniteAllNodesPredicate@2a7ed1f,
sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
initiatingNodeId=null, nearCacheCfg=null, clientStartOnly=false, stop=false,
close=false, failIfExists=false, template=false,
rcvdFrom=587c3c96-0254-44bf-94d7-7abfaee0ba30, exchangeNeeded=false,
cacheFutTopVer=null, cacheName=TestTable1], DynamicCacheChangeRequest
[deploymentId=ee50a831751-4bc0a4f8-b6d8-40c8-ab49-ae4411be6b5e,
startCfg=CacheConfiguration [name=ignite-marshaller-sys-cache,
storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
rebalanceTimeout=10000, evictPlc=null, evictSync=false,
evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
dfltLockTimeout=0, startSize=300, nearCfg=null, writeSync=FULL_SYNC,
storeFactory=null, storeKeepBinary=false, loadPrevVal=false,
aff=org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction@51a9ad5e,
cacheMode=REPLICATED, atomicityMode=ATOMIC, atomicWriteOrderMode=CLOCK,
backups=2147483647, invalidate=false, tmLookupClsName=null,
rebalanceMode=SYNC, rebalanceOrder=-2, rebalanceBatchSize=524288,
rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
maxConcurrentAsyncOps=500, writeBehindEnabled=false,
writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
memMode=ONHEAP_TIERED,
affMapper=org.apache.ignite.internal.processors.cache.GridCacheDefaultAffinityKeyMapper@476b0ae6,
rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
longQryWarnTimeout=3000, readFromBackup=true,
nodeFilter=org.apache.ignite.configuration.CacheConfiguration$IgniteAllNodesPredicate@2a7ed1f,
sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
snapshotableIdx=false, cpOnRead=true, topValidator=null],
cacheType=MARSHALLER, initiatingNodeId=null, nearCacheCfg=null,
clientStartOnly=false, stop=false, close=false, failIfExists=false,
template=false, rcvdFrom=587c3c96-0254-44bf-94d7-7abfaee0ba30,
exchangeNeeded=false, cacheFutTopVer=null,
cacheName=ignite-marshaller-sys-cache], DynamicCacheChangeRequest
[deploymentId=1f50a831751-4bc0a4f8-b6d8-40c8-ab49-ae4411be6b5e,
startCfg=CacheConfiguration [name=TestTable,
storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
rebalanceTimeout=10000, evictPlc=null, evictSync=false,
evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=FULL_SYNC,
storeFactory=javax.cache.configuration.FactoryBuilder$SingletonFactory@51c693d,
storeKeepBinary=false, loadPrevVal=false,
aff=org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction@18025ced,
cacheMode=PARTITIONED, atomicityMode=TRANSACTIONAL,
atomicWriteOrderMode=null, backups=0, invalidate=false,
tmLookupClsName=null, rebalanceMode=ASYNC, rebalanceOrder=0,
rebalanceBatchSize=524288, rebalanceBatchesPrefetchCount=2,
offHeapMaxMem=-1, swapEnabled=false, maxConcurrentAsyncOps=500,
writeBehindEnabled=true, writeBehindFlushSize=10240,
writeBehindFlushFreq=5000, writeBehindFlushThreadCnt=1,
writeBehindBatchSize=512, memMode=ONHEAP_TIERED,
affMapper=org.apache.ignite.internal.processors.cache.CacheDefaultBinaryAffinityKeyMapper@3a3e4aff,
rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
longQryWarnTimeout=3000, readFromBackup=true,
nodeFilter=org.apache.ignite.configuration.CacheConfiguration$IgniteAllNodesPredicate@2a7ed1f,
sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
initiatingNodeId=null, nearCacheCfg=null, clientStartOnly=false, stop=false,
close=false, failIfExists=false, template=false,
rcvdFrom=587c3c96-0254-44bf-94d7-7abfaee0ba30, exchangeNeeded=false,
cacheFutTopVer=null, cacheName=TestTable]],
clientNodes={TestTable1={587c3c96-0254-44bf-94d7-7abfaee0ba30=false,
d352bef5-875e-4f3c-bfb4-91786f286258=false},
ignite-marshaller-sys-cache={587c3c96-0254-44bf-94d7-7abfaee0ba30=false,
d352bef5-875e-4f3c-bfb4-91786f286258=false},
TestTable={587c3c96-0254-44bf-94d7-7abfaee0ba30=false,
d352bef5-875e-4f3c-bfb4-91786f286258=false},
ignite-sys-cache={587c3c96-0254-44bf-94d7-7abfaee0ba30=false,
d352bef5-875e-4f3c-bfb4-91786f286258=false},
ignite-atomics-sys-cache={587c3c96-0254-44bf-94d7-7abfaee0ba30=false,
d352bef5-875e-4f3c-bfb4-91786f286258=false}},
id=3160a831751-4bc0a4f8-b6d8-40c8-ab49-ae4411be6b5e, clientReconnect=false]
        at
org.apache.ignite.marshaller.jdk.JdkMarshaller.marshal(JdkMarshaller.java:82)
        at
org.apache.ignite.marshaller.AbstractMarshaller.marshal(AbstractMarshaller.java:62)
        at
org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.collectExchangeData(TcpDiscoverySpi.java:1683)
        at
org.apache.ignite.spi.discovery.tcp.ServerImpl$RingMessageWorker.processNodeAddedMessage(ServerImpl.java:3779)
        at
org.apache.ignite.spi.discovery.tcp.ServerImpl$RingMessageWorker.processJoinRequestMessage(ServerImpl.java:3427)
        at
org.apache.ignite.spi.discovery.tcp.ServerImpl$RingMessageWorker.processMessage(ServerImpl.java:2293)
        at
org.apache.ignite.spi.discovery.tcp.ServerImpl$RingMessageWorker.processMessage(ServerImpl.java:2121)
        at
org.apache.ignite.spi.discovery.tcp.ServerImpl$MessageWorkerAdapter.body(ServerImpl.java:6007)
        at
org.apache.ignite.spi.discovery.tcp.ServerImpl$RingMessageWorker.body(ServerImpl.java:2208)
        at
org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
Caused by: java.io.NotSerializableException:
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter$ThreadLocalSession
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
        at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
        at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
        at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
        at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
        at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
        at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
        at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
        at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
        at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
        at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
        at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
        at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
        at java.util.ArrayList.writeObject(ArrayList.java:762)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028)
        at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
        at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
        at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
        at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
        at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
        at
org.apache.ignite.marshaller.jdk.JdkMarshaller.marshal(JdkMarshaller.java:77)
        ... 9 more
[06:00:15] Topology snapshot [ver=2, servers=1, clients=1, CPUs=32,
heap=1.0GB]
[06:00:20,580][SEVERE][sys-#66%null%][GridDhtTxLocal] Failed to prepare
transaction: GridDhtTxLocal
[nearNodeId=d352bef5-875e-4f3c-bfb4-91786f286258,
nearFutId=d573a831751-f33b8075-e18d-4c70-ae8e-3811e9fae8e1,
nearMiniId=e573a831751-f33b8075-e18d-4c70-ae8e-3811e9fae8e1,
nearFinFutId=null, nearFinMiniId=null, nearXidVer=GridCacheVersion
[topVer=84981604, time=1473501620566, order=1473501614120, nodeOrder=2],
super=GridDhtTxLocalAdapter [nearOnOriginatingNode=false, nearNodes=[],
dhtNodes=[], explicitLock=false, super=IgniteTxLocalAdapter
[completedBase=null, sndTransformedVals=false, depEnabled=false,
txState=IgniteTxImplicitSingleStateImpl [init=true], super=IgniteTxAdapter
[xidVer=GridCacheVersion [topVer=84981604, time=1473501620571,
order=1473501614121, nodeOrder=1], writeVer=GridCacheVersion
[topVer=84981604, time=1473501620572, order=1473501614123, nodeOrder=1],
implicit=true, loc=true, threadId=1, startTime=1473501620566,
nodeId=587c3c96-0254-44bf-94d7-7abfaee0ba30, startVer=GridCacheVersion
[topVer=84981604, time=1473501620571, order=1473501614121, nodeOrder=1],
endVer=null, isolation=READ_COMMITTED, concurrency=OPTIMISTIC, timeout=0,
sysInvalidate=false, sys=false, plc=2, commitVer=null,
finalizing=USER_FINISH, preparing=false, invalidParts=null,
state=MARKED_ROLLBACK, timedOut=false, topVer=AffinityTopologyVersion
[topVer=2, minorTopVer=0], duration=10ms, onePhaseCommit=true], size=1]]]
class org.apache.ignite.IgniteCheckedException: Failed to commit transaction
to database: GridDhtTxLocal
[nearNodeId=d352bef5-875e-4f3c-bfb4-91786f286258,
nearFutId=d573a831751-f33b8075-e18d-4c70-ae8e-3811e9fae8e1,
nearMiniId=e573a831751-f33b8075-e18d-4c70-ae8e-3811e9fae8e1,
nearFinFutId=null, nearFinMiniId=null, nearXidVer=GridCacheVersion
[topVer=84981604, time=1473501620566, order=1473501614120, nodeOrder=2],
super=GridDhtTxLocalAdapter [nearOnOriginatingNode=false, nearNodes=[],
dhtNodes=[], explicitLock=false, super=IgniteTxLocalAdapter
[completedBase=null, sndTransformedVals=false, depEnabled=false,
txState=IgniteTxImplicitSingleStateImpl [init=true], super=IgniteTxAdapter
[xidVer=GridCacheVersion [topVer=84981604, time=1473501620571,
order=1473501614121, nodeOrder=1], writeVer=GridCacheVersion
[topVer=84981604, time=1473501620572, order=1473501614123, nodeOrder=1],
implicit=true, loc=true, threadId=1, startTime=1473501620566,
nodeId=587c3c96-0254-44bf-94d7-7abfaee0ba30, startVer=GridCacheVersion
[topVer=84981604, time=1473501620571, order=1473501614121, nodeOrder=1],
endVer=null, isolation=READ_COMMITTED, concurrency=OPTIMISTIC, timeout=0,
sysInvalidate=false, sys=false, plc=2, commitVer=null,
finalizing=USER_FINISH, preparing=false, invalidParts=null,
state=MARKED_ROLLBACK, timedOut=false, topVer=AffinityTopologyVersion
[topVer=2, minorTopVer=0], duration=10ms, onePhaseCommit=true], size=1]]]
        at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxAdapter.batchStoreCommit(IgniteTxAdapter.java:1452)
        at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter.userCommit(IgniteTxLocalAdapter.java:654)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocalAdapter.finish(GridDhtTxLocalAdapter.java:776)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocal.finish(GridDhtTxLocal.java:657)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocal.finishCommit(GridDhtTxLocal.java:504)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocal.commitAsync(GridDhtTxLocal.java:566)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture.onDone(GridDhtTxPrepareFuture.java:666)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture.onDone(GridDhtTxPrepareFuture.java:96)
        at
org.apache.ignite.internal.util.future.GridFutureAdapter.onDone(GridFutureAdapter.java:324)
        at
org.apache.ignite.internal.util.future.GridCompoundFuture.checkComplete(GridCompoundFuture.java:241)
        at
org.apache.ignite.internal.util.future.GridCompoundFuture.markInitialized(GridCompoundFuture.java:232)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture.prepare0(GridDhtTxPrepareFuture.java:1266)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture.mapIfLocked(GridDhtTxPrepareFuture.java:600)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture.prepare(GridDhtTxPrepareFuture.java:934)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocal.prepareAsync(GridDhtTxLocal.java:464)
        at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler.prepareNearTx(IgniteTxHandler.java:411)
        at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler.prepareTx(IgniteTxHandler.java:204)
        at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler.processNearTxPrepareRequest(IgniteTxHandler.java:105)
        at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler$1.apply(IgniteTxHandler.java:118)
        at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler$1.apply(IgniteTxHandler.java:116)
        at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.processMessage(GridCacheIoManager.java:622)
        at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:320)
        at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:244)
        at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.access$000(GridCacheIoManager.java:81)
        at
org.apache.ignite.internal.processors.cache.GridCacheIoManager$1.onMessage(GridCacheIoManager.java:203)
        at
org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1219)
        at
org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:847)
        at
org.apache.ignite.internal.managers.communication.GridIoManager.access$1700(GridIoManager.java:105)
        at
org.apache.ignite.internal.managers.communication.GridIoManager$5.run(GridIoManager.java:810)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: class org.apache.ignite.binary.BinaryObjectException: Failed
resolve class for ID: -1161297284
        at
org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:615)
        at
org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1474)
        at
org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(BinaryObjectImpl.java:572)
        at
org.apache.ignite.internal.binary.BinaryObjectImpl.value(BinaryObjectImpl.java:131)
        at
org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinary(CacheObjectContext.java:257)
        at
org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinaryIfNeeded(CacheObjectContext.java:148)
        at
org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinaryIfNeeded(CacheObjectContext.java:135)
        at
org.apache.ignite.internal.processors.cache.GridCacheContext.unwrapBinaryIfNeeded(GridCacheContext.java:1732)
        at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.put(GridCacheStoreManagerAdapter.java:565)
        at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.putAll(GridCacheStoreManagerAdapter.java:610)
        at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxAdapter.batchStoreCommit(IgniteTxAdapter.java:1416)
        ... 31 more
Caused by: class org.apache.ignite.IgniteCheckedException: Class definition
was not found at marshaller cache and local file. [id=-1161297284,
file=/home/ignite1/project/apacheIgnite/apache-ignite-fabric-1.6.0-bin/work/marshaller/-1161297284.classname]
        at
org.apache.ignite.internal.MarshallerContextImpl.className(MarshallerContextImpl.java:176)
        at
org.apache.ignite.internal.MarshallerContextAdapter.getClass(MarshallerContextAdapter.java:174)
        at
org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:599)
        ... 41 more

*And here is my config file for server node:*

$ cat config/test-tool-server.xml
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/util
        http://www.springframework.org/schema/util/spring-util.xsd">

    <bean id="grid.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
        
        <property name="peerClassLoadingEnabled" value="true"/>

<property name="binaryConfiguration">
<bean class="org.apache.ignite.configuration.BinaryConfiguration">
<property name="compactFooter" value="false" />
<property name="idMapper">
<bean class="org.apache.ignite.binary.BinaryBasicIdMapper">
<constructor-arg name="isLowerCase" value="true" />
</bean>
</property>
<property name="nameMapper">
<bean class="org.apache.ignite.binary.BinaryBasicNameMapper">
<constructor-arg name="isSimpleName" value="true" />
</bean>
</property>
</bean>
</property>

        <property name="cacheConfiguration">
            <list>
                <bean
class="org.apache.ignite.configuration.CacheConfiguration">
                
                <property name="readThrough" value="true"></property>
                <property name="writeThrough" value="true"></property>
                <property name="writeBehindEnabled" value="true"></property>
                
                    <property name="cacheStoreFactory">
                      <bean
class="javax.cache.configuration.FactoryBuilder$SingletonFactory">
                        <constructor-arg>
                          <bean class="TestTableStore">
                          </bean>
                        </constructor-arg>
                      </bean>
                    </property>

                    <property name="name" value="TestTable"/>
                    <property name="cacheMode" value="PARTITIONED"/>
                    <property name="atomicityMode" value="TRANSACTIONAL"/>
                    <property name="writeSynchronizationMode"
value="FULL_SYNC"/>

                    
                    <property name="queryEntities">
                        <list>
                            <bean
class="org.apache.ignite.cache.QueryEntity">
                                <property name="keyType"
value="java.lang.Long"/>
                                <property name="valueType"
value="TestTable"/>

                                <property name="fields">
                                    <map>
                                        <entry key="tid"
value="java.lang.Short"/>
                                        <entry key="idint"
value="java.lang.Int"/>
                                        <entry key="idbigint"
value="java.lang.Long"/>
                                        <entry key="idchar"
value="java.lang.String"/>
                                        <entry key="idbinary"
value="java.lang.byte[]"/>
                                        <entry key="idvarbinary"
value="java.lang.byte[]"/>
                                        <entry key="idvarchar"
value="java.lang.String"/>
                                        <entry key="idts"
value="java.lang.Timestamp"/>
                                    </map>
                                </property>
                                <property name="indexes">
                                    <list>
                                        <bean
class="org.apache.ignite.cache.QueryIndex">
                                            <constructor-arg value="tid"/>
                                            <constructor-arg
value="SORTED"/>
                                        </bean>
                                        
                                        <bean
class="org.apache.ignite.cache.QueryIndex">
                                            <constructor-arg>
                                                <list>
                                                    <value>tid</value>
                                                    <value>idint</value>
                                                </list>
                                            </constructor-arg>
                                            <constructor-arg
value="SORTED"/>
                                        </bean>
                                    </list>
                                </property>
                            </bean>
                        </list>
                    </property>
                </bean>

                <bean
class="org.apache.ignite.configuration.CacheConfiguration">
                <property name="readThrough" value="true"></property>
                <property name="writeThrough" value="true"></property>
                <property name="writeBehindEnabled" value="true"></property>
                    <property name="cacheStoreFactory">
                      <bean
class="javax.cache.configuration.FactoryBuilder$SingletonFactory">
                        <constructor-arg>
                          <bean class="TestTableStore">
                          </bean>
                        </constructor-arg>
                      </bean>
                    </property>

                    <property name="name" value="TestTable1"/>
                    <property name="cacheMode" value="PARTITIONED"/>
                    <property name="atomicityMode" value="TRANSACTIONAL"/>
                    <property name="writeSynchronizationMode"
value="FULL_SYNC"/>

                    
                    <property name="queryEntities">
                        <list>
                            <bean
class="org.apache.ignite.cache.QueryEntity">
                                <property name="keyType"
value="java.lang.Long"/>
                                <property name="valueType"
value="TestTable"/>

                                <property name="fields">
                                    <map>
                                        <entry key="tid"
value="java.lang.Short"/>
                                        <entry key="idint"
value="java.lang.Int"/>
                                        <entry key="idbigint"
value="java.lang.Long"/>
                                        <entry key="idchar"
value="java.lang.String"/>
                                        <entry key="idbinary"
value="java.lang.byte[]"/>
                                        <entry key="idvarbinary"
value="java.lang.byte[]"/>
                                        <entry key="idvarchar"
value="java.lang.String"/>
                                        <entry key="idts"
value="java.lang.Timestamp"/>
                                    </map>
                                </property>
                                <property name="indexes">
                                    <list>
                                        <bean
class="org.apache.ignite.cache.QueryIndex">
                                            <constructor-arg value="tid"/>
                                            <constructor-arg
value="SORTED"/>
                                        </bean>
                                        
                                        <bean
class="org.apache.ignite.cache.QueryIndex">
                                            <constructor-arg>
                                                <list>
                                                    <value>tid</value>
                                                    <value>idint</value>
                                                </list>
                                            </constructor-arg>
                                            <constructor-arg
value="SORTED"/>
                                        </bean>
                                    </list>
                                </property>
                            </bean>
                        </list>
                    </property>
                </bean>
            </list>
        </property>

        
        <property name="discoverySpi">
            <bean
class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                <property name="ipFinder">
                    
                    
                    
                    <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
                        <property name="addresses">
                            <list>
                                
                                <value>127.0.0.1:47550..47551</value>
                            </list>
                        </property>
                    </bean>
                </property>
            </bean>
        </property>
    </bean>
</beans>

I'm unable to figure out whats going wrong here.

Both classes TestTable and TestTableStore implements serializable interface.

thanks & regards,



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Couchbase-as-persistent-store-tp7476p7652.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Couchbase as persistent store

Posted by vkulichenko <va...@gmail.com>.
Method signatures in your implementations are incorrect. Please pay attention
to generics. The write method, for example, should look like this:

@Override public void write(Cache.Entry<? extends Long, ? extends TestTable>
entry) throws CacheWriterException

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Couchbase-as-persistent-store-tp7476p7500.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.