Re: BufferUnderflowException on GridRedisProtocolParser

2018-10-24 Thread Michael Fong
Hi Stan,

Thanks for the suggestion.

I have tried to patch it, which would work 95% of the case, but would run
into another random issue. I have mailed dev list for suggestions.


Regards,

Michael

On Thu, Oct 11, 2018 at 7:10 PM Stanislav Lukyanov 
wrote:

> Well, you need to wait for the IGNITE-7153 fix then.
>
> Or contribute it! :)
>
> I checked the code, and it seems to be a relatively easy fix. One needs to
> alter the GridRedisProtocolParser
>
> to use ParserState in the way GridTcpRestParser::parseMemcachePacker does.
>
>
>
> Stan
>
>
>
> *From: *Michael Fong 
> *Sent: *11 октября 2018 г. 7:15
> *To: *user@ignite.apache.org
> *Subject: *Re: BufferUnderflowException on GridRedisProtocolParser
>
>
>
> Hi,
>
>
>
> The symptom seems very likely to IGNITE-7153, where the default tcp send
> buffer on that environment happens to be 4096
>
> [root]# cat /proc/sys/net/ipv4/tcp_wmem
>
> 4096
>
>
>
> Regards,
>
>
>
> On Thu, Oct 11, 2018 at 10:56 AM Michael Fong 
> wrote:
>
> Hi,
>
>
>
> Thank you for your response. Not to every request; we only see this for
> some specific ones - when elCnt (4270) > buf.limit (4096).  We are trying
> to narrowing down the data set to find the root cause.
>
>
>
> Thanks.
>
>
>
> Regards,
>
>
>
> On Thu, Oct 11, 2018 at 12:08 AM Ilya Kasnacheev <
> ilya.kasnach...@gmail.com> wrote:
>
> Hello!
>
>
>
> Do you see this error on every request, or on some specific ones?
>
>
>
> Regards,
>
> --
>
> Ilya Kasnacheev
>
>
>
>
>
> вт, 9 окт. 2018 г. в 15:54, Michael Fong :
>
> Hi, all
>
>
>
> We are evaluating Ignite compatibility with Redis protocol, and we hit an
> issue as the following:
>
> Does the stacktrace look a bit like IGNITE-7153?
>
>
>
> java.nio.BufferUnderflowException
>
> at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:151)
>
> at
> org.apache.ignite.internal.processors.rest.protocols.tcp.redis.GridRedisProtocolParser.readBulkStr(GridRedisProtocolParser.java:111)
>
> at
> org.apache.ignite.internal.processors.rest.protocols.tcp.redis.GridRedisProtocolParser.readArray(GridRedisProtocolParser.java:86)
>
> at
> org.apache.ignite.internal.processors.rest.protocols.tcp.GridTcpRestParser.decode(GridTcpRestParser.java:165)
>
> at
> org.apache.ignite.internal.processors.rest.protocols.tcp.GridTcpRestParser.decode(GridTcpRestParser.java:72)
>
> at
> org.apache.ignite.internal.util.nio.GridNioCodecFilter.onMessageReceived(GridNioCodecFilter.java:114)
>
> at
> org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
>
> at
> org.apache.ignite.internal.util.nio.GridNioServer$HeadFilter.onMessageReceived(GridNioServer.java:3490)
>
> at
> org.apache.ignite.internal.util.nio.GridNioFilterChain.onMessageReceived(GridNioFilterChain.java:175)
>
> at
> org.apache.ignite.internal.util.nio.GridNioServer$ByteBufferNioClientWorker.processRead(GridNioServer.java:1113)
>
> at
> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelectedKeysOptimized(GridNioServer.java:2339)
>
> at
> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2110)
>
> at
> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1764)
>
> at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>
> at java.lang.Thread.run(Thread.java:745)
>
> [2018-10-09
> 12:45:49,946][ERROR][grid-nio-worker-tcp-rest-1-#37][GridTcpRestProtocol]
> Closing NIO session because of unhandled exception.
>
> class org.apache.ignite.internal.util.nio.GridNioException: null
>
> at
> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelectedKeysOptimized(GridNioServer.java:2365)
>
> at
> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2110)
>
> at
> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1764)
>
> at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>
> at java.lang.Thread.run(Thread.java:745)
>
>
>
>
>


Re: Writing binary [] to ignite via memcache binary protocol

2018-10-20 Thread Michael Fong
Hi,

Thanks for pointing that out!

I checked the code where BYTE_ARR_FLAG = (8 << 8)
so I set flags = 2048 in my C client program - linking libmemcached
library; so that Apache Ignite would recognize the SET value as byte array
successfully.
i.e.

rc = memcached_set(connection, key2, strlen(key2), value2,
strlen(value2), (time_t)0, (uint32_t)2048);


Regards,



On Thu, Oct 18, 2018 at 6:12 PM Ilya Kasnacheev 
wrote:

> Hello!
>
> It will just take two first bytes from extras and turn them into a numeric
> variable.
>
> Later on, if flags & 0xff00 == 0x100b, then it is byte array, else it
> is string.
>
> You should find a way to make your implementation send '-128' as fourth
> byte (If I understand endianness correctly). You could look it up in
> tcpdump.
>
> Regards,
>
> --
> Ilya Kasnacheev
>
>
> чт, 18 окт. 2018 г. в 10:33, Michael Fong :
>
>> Hi,
>>
>> Thanks for pointing out the mistake about the string data type. I used
>> python3 which supports bytes type and run the test case. Ignite would seems
>> still treat the received value as String type and would decode the data
>> correctly. I would like to try with a some simple C client program and see
>> how It works.
>>
>> In addition, I checked the source code, and it seems the data type of key
>> or value is
>> 1. computed via U.bytesToShort() method @
>> https://github.com/apache/ignite/blob/ignite-2.6/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestParser.java#L664
>> 2. retrieved the type flag via masking bits off @
>> https://github.com/apache/ignite/blob/ignite-2.6/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestParser.java#L749
>>
>> Could someone share some insight of what  U.bytesToShort() does ?
>>
>> Thanks.
>>
>>
>> On Wed, Oct 17, 2018 at 8:29 PM Павлухин Иван 
>> wrote:
>>
>>> Hi Michael,
>>>
>>> The troubles could be related to Python library. It seems in Python 2.7
>>> there is no such thing as "byte array". And value passed to the client is
>>> string in this case.
>>> I checked that Ignite recognizes bytes array type and stores in as byte
>>> array internally. I did following experiment with Spymemcached [1].
>>> public class Memcached {
>>> public static void main(String[] args) throws IOException {
>>> MemcachedClient client = new MemcachedClient(
>>> new BinaryConnectionFactory(),
>>> AddrUtil.getAddresses("127.0.0.1:11211"));
>>>
>>> client.add("a", Integer.MAX_VALUE, new byte[]{1, 2, 3});
>>> client.add("b", Integer.MAX_VALUE, "123");
>>>
>>> System.out.println(Arrays.toString((byte[])client.get("a")));
>>> System.out.println(client.get("b"));
>>>
>>> System.exit(0);
>>> }
>>> }
>>>
>>> And I see expected output:
>>> [1, 2, 3]
>>> 123
>>>
>>> [1] https://mvnrepository.com/artifact/net.spy/spymemcached/2.12.3
>>>
>>> ср, 17 окт. 2018 г. в 10:25, Павлухин Иван :
>>>
>>>> Hi Michael,
>>>>
>>>> Answering one of your questions.
>>>> > Does ignite internally have a way to store the data type when cache
>>>> entry is stored?
>>>> Yes, internally Ignite maintains data types for stored keys and values.
>>>>
>>>> Could you confirm that for real memcached your example works as
>>>> expected? I will try reproduce your Python example. It should not be hard
>>>> to check what exactly is stored inside Ignite.
>>>>
>>>> ср, 17 окт. 2018 г. в 5:25, Michael Fong :
>>>>
>>>>> bump :)
>>>>>
>>>>> Could anyone please help to answer a newbie question? Thanks in
>>>>> advance!
>>>>>
>>>>> On Mon, Oct 15, 2018 at 4:22 PM Michael Fong 
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I kind of able to reproduce it with a small python script
>>>>>>
>>>>>> import pylibmc
>>>>>>
>>>>>> client = pylibmc.Client (["127.0.0.1:11211"], binary=True)
>>>>>>
>>>>>>
>>>>>> ##abc
>>>>>> val = "abcd".decode("hex")
>>>>>> client.set("pyBin1", val)
>>>>>>
>>>>>> print "val decode w/ iso-8859-1: %s" % val.encode("hex")
>>>>>>
>>>>>> get_val = client.get("pyBin1")
>>>>>>
>>>>>> print "Value for 'pyBin1': %s" % get_val.encode("hex")
>>>>>>
>>>>>>
>>>>>> where the the program intends to insert a byte[] into ignite using
>>>>>> memcache binary protocol.
>>>>>> The output is
>>>>>>
>>>>>> val decode w/ iso-8859-1: abcd
>>>>>> Value for 'pyBin1': *efbfbdefbfbd*
>>>>>>
>>>>>> where, 'ef bf bd' are the replacement character for UTF-8 String.
>>>>>> Therefore, the value field seems to be treated as String in Ignite.
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Michael
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Oct 4, 2018 at 9:38 PM Maxim.Pudov 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi, it looks strange to me. Do you have a reproducer?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>>>>>>
>>>>>>
>>>>
>>>> --
>>>> Best regards,
>>>> Ivan Pavlukhin
>>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Ivan Pavlukhin
>>>
>>


Re: Writing binary [] to ignite via memcache binary protocol

2018-10-18 Thread Michael Fong
Hi,

Thanks for pointing out the mistake about the string data type. I used
python3 which supports bytes type and run the test case. Ignite would seems
still treat the received value as String type and would decode the data
correctly. I would like to try with a some simple C client program and see
how It works.

In addition, I checked the source code, and it seems the data type of key
or value is
1. computed via U.bytesToShort() method @
https://github.com/apache/ignite/blob/ignite-2.6/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestParser.java#L664
2. retrieved the type flag via masking bits off @
https://github.com/apache/ignite/blob/ignite-2.6/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestParser.java#L749

Could someone share some insight of what  U.bytesToShort() does ?

Thanks.


On Wed, Oct 17, 2018 at 8:29 PM Павлухин Иван  wrote:

> Hi Michael,
>
> The troubles could be related to Python library. It seems in Python 2.7
> there is no such thing as "byte array". And value passed to the client is
> string in this case.
> I checked that Ignite recognizes bytes array type and stores in as byte
> array internally. I did following experiment with Spymemcached [1].
> public class Memcached {
> public static void main(String[] args) throws IOException {
> MemcachedClient client = new MemcachedClient(
> new BinaryConnectionFactory(),
> AddrUtil.getAddresses("127.0.0.1:11211"));
>
> client.add("a", Integer.MAX_VALUE, new byte[]{1, 2, 3});
> client.add("b", Integer.MAX_VALUE, "123");
>
> System.out.println(Arrays.toString((byte[])client.get("a")));
> System.out.println(client.get("b"));
>
> System.exit(0);
> }
> }
>
> And I see expected output:
> [1, 2, 3]
> 123
>
> [1] https://mvnrepository.com/artifact/net.spy/spymemcached/2.12.3
>
> ср, 17 окт. 2018 г. в 10:25, Павлухин Иван :
>
>> Hi Michael,
>>
>> Answering one of your questions.
>> > Does ignite internally have a way to store the data type when cache
>> entry is stored?
>> Yes, internally Ignite maintains data types for stored keys and values.
>>
>> Could you confirm that for real memcached your example works as expected?
>> I will try reproduce your Python example. It should not be hard to check
>> what exactly is stored inside Ignite.
>>
>> ср, 17 окт. 2018 г. в 5:25, Michael Fong :
>>
>>> bump :)
>>>
>>> Could anyone please help to answer a newbie question? Thanks in advance!
>>>
>>> On Mon, Oct 15, 2018 at 4:22 PM Michael Fong 
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I kind of able to reproduce it with a small python script
>>>>
>>>> import pylibmc
>>>>
>>>> client = pylibmc.Client (["127.0.0.1:11211"], binary=True)
>>>>
>>>>
>>>> ##abc
>>>> val = "abcd".decode("hex")
>>>> client.set("pyBin1", val)
>>>>
>>>> print "val decode w/ iso-8859-1: %s" % val.encode("hex")
>>>>
>>>> get_val = client.get("pyBin1")
>>>>
>>>> print "Value for 'pyBin1': %s" % get_val.encode("hex")
>>>>
>>>>
>>>> where the the program intends to insert a byte[] into ignite using
>>>> memcache binary protocol.
>>>> The output is
>>>>
>>>> val decode w/ iso-8859-1: abcd
>>>> Value for 'pyBin1': *efbfbdefbfbd*
>>>>
>>>> where, 'ef bf bd' are the replacement character for UTF-8 String.
>>>> Therefore, the value field seems to be treated as String in Ignite.
>>>>
>>>> Regards,
>>>>
>>>> Michael
>>>>
>>>>
>>>>
>>>> On Thu, Oct 4, 2018 at 9:38 PM Maxim.Pudov  wrote:
>>>>
>>>>> Hi, it looks strange to me. Do you have a reproducer?
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>>>>
>>>>
>>
>> --
>> Best regards,
>> Ivan Pavlukhin
>>
>
>
> --
> Best regards,
> Ivan Pavlukhin
>


Re: Writing binary [] to ignite via memcache binary protocol

2018-10-16 Thread Michael Fong
bump :)

Could anyone please help to answer a newbie question? Thanks in advance!

On Mon, Oct 15, 2018 at 4:22 PM Michael Fong  wrote:

> Hi,
>
> I kind of able to reproduce it with a small python script
>
> import pylibmc
>
> client = pylibmc.Client (["127.0.0.1:11211"], binary=True)
>
>
> ##abc
> val = "abcd".decode("hex")
> client.set("pyBin1", val)
>
> print "val decode w/ iso-8859-1: %s" % val.encode("hex")
>
> get_val = client.get("pyBin1")
>
> print "Value for 'pyBin1': %s" % get_val.encode("hex")
>
>
> where the the program intends to insert a byte[] into ignite using
> memcache binary protocol.
> The output is
>
> val decode w/ iso-8859-1: abcd
> Value for 'pyBin1': *efbfbdefbfbd*
>
> where, 'ef bf bd' are the replacement character for UTF-8 String.
> Therefore, the value field seems to be treated as String in Ignite.
>
> Regards,
>
> Michael
>
>
>
> On Thu, Oct 4, 2018 at 9:38 PM Maxim.Pudov  wrote:
>
>> Hi, it looks strange to me. Do you have a reproducer?
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>


Re: Writing binary [] to ignite via memcache binary protocol

2018-10-15 Thread Michael Fong
Hi,

I kind of able to reproduce it with a small python script

import pylibmc

client = pylibmc.Client (["127.0.0.1:11211"], binary=True)


##abc
val = "abcd".decode("hex")
client.set("pyBin1", val)

print "val decode w/ iso-8859-1: %s" % val.encode("hex")

get_val = client.get("pyBin1")

print "Value for 'pyBin1': %s" % get_val.encode("hex")


where the the program intends to insert a byte[] into ignite using memcache
binary protocol.
The output is

val decode w/ iso-8859-1: abcd
Value for 'pyBin1': *efbfbdefbfbd*

where, 'ef bf bd' are the replacement character for UTF-8 String.
Therefore, the value field seems to be treated as String in Ignite.

Regards,

Michael



On Thu, Oct 4, 2018 at 9:38 PM Maxim.Pudov  wrote:

> Hi, it looks strange to me. Do you have a reproducer?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: BufferUnderflowException on GridRedisProtocolParser

2018-10-10 Thread Michael Fong
Hi,

The symptom seems very likely to IGNITE-7153, where the default tcp send
buffer on that environment happens to be 4096
[root]# cat /proc/sys/net/ipv4/tcp_wmem
4096

Regards,

On Thu, Oct 11, 2018 at 10:56 AM Michael Fong  wrote:

> Hi,
>
> Thank you for your response. Not to every request; we only see this for
> some specific ones - when elCnt (4270) > buf.limit (4096).  We are trying
> to narrowing down the data set to find the root cause.
>
> Thanks.
>
> Regards,
>
> On Thu, Oct 11, 2018 at 12:08 AM Ilya Kasnacheev <
> ilya.kasnach...@gmail.com> wrote:
>
>> Hello!
>>
>> Do you see this error on every request, or on some specific ones?
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> вт, 9 окт. 2018 г. в 15:54, Michael Fong :
>>
>>> Hi, all
>>>
>>> We are evaluating Ignite compatibility with Redis protocol, and we hit
>>> an issue as the following:
>>> Does the stacktrace look a bit like IGNITE-7153?
>>>
>>> java.nio.BufferUnderflowException
>>> at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:151)
>>> at
>>> org.apache.ignite.internal.processors.rest.protocols.tcp.redis.GridRedisProtocolParser.readBulkStr(GridRedisProtocolParser.java:111)
>>> at
>>> org.apache.ignite.internal.processors.rest.protocols.tcp.redis.GridRedisProtocolParser.readArray(GridRedisProtocolParser.java:86)
>>> at
>>> org.apache.ignite.internal.processors.rest.protocols.tcp.GridTcpRestParser.decode(GridTcpRestParser.java:165)
>>> at
>>> org.apache.ignite.internal.processors.rest.protocols.tcp.GridTcpRestParser.decode(GridTcpRestParser.java:72)
>>> at
>>> org.apache.ignite.internal.util.nio.GridNioCodecFilter.onMessageReceived(GridNioCodecFilter.java:114)
>>> at
>>> org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
>>> at
>>> org.apache.ignite.internal.util.nio.GridNioServer$HeadFilter.onMessageReceived(GridNioServer.java:3490)
>>> at
>>> org.apache.ignite.internal.util.nio.GridNioFilterChain.onMessageReceived(GridNioFilterChain.java:175)
>>> at
>>> org.apache.ignite.internal.util.nio.GridNioServer$ByteBufferNioClientWorker.processRead(GridNioServer.java:1113)
>>> at
>>> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelectedKeysOptimized(GridNioServer.java:2339)
>>> at
>>> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2110)
>>> at
>>> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1764)
>>> at
>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>> at java.lang.Thread.run(Thread.java:745)
>>> [2018-10-09
>>> 12:45:49,946][ERROR][grid-nio-worker-tcp-rest-1-#37][GridTcpRestProtocol]
>>> Closing NIO session because of unhandled exception.
>>> class org.apache.ignite.internal.util.nio.GridNioException: null
>>> at
>>> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelectedKeysOptimized(GridNioServer.java:2365)
>>> at
>>> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2110)
>>> at
>>> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1764)
>>> at
>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>> at java.lang.Thread.run(Thread.java:745)
>>>
>>>


Re: Writing binary [] to ignite via memcache binary protocol

2018-10-10 Thread Michael Fong
Hi,

We have a libmemcached (C) client to write pure binary[]  to Ignite and
another Java client to read from it.  We suspect Ignite stores it as
String(UTF-8), perhaps related IGNITE-7028 - even from the packet dump, the
data type is raw bytes (0)
 As the workaround, we modified the code a bit to return raw byte[] for
value field as shown in
https://github.com/mcfongtw/ignite/blob/a112bc53febd3903817b3837f7fd90b3257fa18b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestParser.java

Thanks and Regards,


On Thu, Oct 4, 2018 at 9:38 PM Maxim.Pudov  wrote:

> Hi, it looks strange to me. Do you have a reproducer?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Does Ignite support GPB serialized data

2018-10-10 Thread Michael Fong
Very clear answer. Thank you.

On Mon, Oct 8, 2018 at 4:18 PM Ilya Kasnacheev 
wrote:

> Hello!
>
> Ignite does not have special support for protocol buffers.
>
> You are welcome to implement Binarylizable or Externalizable interfaces on
> your objects to specify serialization for them.
>
> You can also specify BinarySerializer for types that you do not control by
> putting them into BinaryConfiguration.setTypeConfigurations() and using
> that one with IgniteConfiguration:
>
> https://apacheignite.readme.io/docs/binary-marshaller#section-configuring-binary-objects
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> ср, 3 окт. 2018 г. в 18:24, Michael Fong :
>
>> Hi, all
>>
>> We have protocol buffer serialized binary data that would like to stored
>> into ignite, and wonder if Ignite supports gpb serialization out of the
>> box?
>>
>> If not, which serialization interface do we need to implement to
>> customize and override in the xml?
>>
>> Thanks in advance
>>
>


Re: BufferUnderflowException on GridRedisProtocolParser

2018-10-10 Thread Michael Fong
Hi,

Thank you for your response. Not to every request; we only see this for
some specific ones - when elCnt (4270) > buf.limit (4096).  We are trying
to narrowing down the data set to find the root cause.

Thanks.

Regards,

On Thu, Oct 11, 2018 at 12:08 AM Ilya Kasnacheev 
wrote:

> Hello!
>
> Do you see this error on every request, or on some specific ones?
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> вт, 9 окт. 2018 г. в 15:54, Michael Fong :
>
>> Hi, all
>>
>> We are evaluating Ignite compatibility with Redis protocol, and we hit an
>> issue as the following:
>> Does the stacktrace look a bit like IGNITE-7153?
>>
>> java.nio.BufferUnderflowException
>> at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:151)
>> at
>> org.apache.ignite.internal.processors.rest.protocols.tcp.redis.GridRedisProtocolParser.readBulkStr(GridRedisProtocolParser.java:111)
>> at
>> org.apache.ignite.internal.processors.rest.protocols.tcp.redis.GridRedisProtocolParser.readArray(GridRedisProtocolParser.java:86)
>> at
>> org.apache.ignite.internal.processors.rest.protocols.tcp.GridTcpRestParser.decode(GridTcpRestParser.java:165)
>> at
>> org.apache.ignite.internal.processors.rest.protocols.tcp.GridTcpRestParser.decode(GridTcpRestParser.java:72)
>> at
>> org.apache.ignite.internal.util.nio.GridNioCodecFilter.onMessageReceived(GridNioCodecFilter.java:114)
>> at
>> org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
>> at
>> org.apache.ignite.internal.util.nio.GridNioServer$HeadFilter.onMessageReceived(GridNioServer.java:3490)
>> at
>> org.apache.ignite.internal.util.nio.GridNioFilterChain.onMessageReceived(GridNioFilterChain.java:175)
>> at
>> org.apache.ignite.internal.util.nio.GridNioServer$ByteBufferNioClientWorker.processRead(GridNioServer.java:1113)
>> at
>> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelectedKeysOptimized(GridNioServer.java:2339)
>> at
>> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2110)
>> at
>> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1764)
>> at
>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>> at java.lang.Thread.run(Thread.java:745)
>> [2018-10-09
>> 12:45:49,946][ERROR][grid-nio-worker-tcp-rest-1-#37][GridTcpRestProtocol]
>> Closing NIO session because of unhandled exception.
>> class org.apache.ignite.internal.util.nio.GridNioException: null
>> at
>> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelectedKeysOptimized(GridNioServer.java:2365)
>> at
>> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2110)
>> at
>> org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1764)
>> at
>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>> at java.lang.Thread.run(Thread.java:745)
>>
>>


BufferUnderflowException on GridRedisProtocolParser

2018-10-09 Thread Michael Fong
Hi, all

We are evaluating Ignite compatibility with Redis protocol, and we hit an
issue as the following:
Does the stacktrace look a bit like IGNITE-7153?

java.nio.BufferUnderflowException
at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:151)
at
org.apache.ignite.internal.processors.rest.protocols.tcp.redis.GridRedisProtocolParser.readBulkStr(GridRedisProtocolParser.java:111)
at
org.apache.ignite.internal.processors.rest.protocols.tcp.redis.GridRedisProtocolParser.readArray(GridRedisProtocolParser.java:86)
at
org.apache.ignite.internal.processors.rest.protocols.tcp.GridTcpRestParser.decode(GridTcpRestParser.java:165)
at
org.apache.ignite.internal.processors.rest.protocols.tcp.GridTcpRestParser.decode(GridTcpRestParser.java:72)
at
org.apache.ignite.internal.util.nio.GridNioCodecFilter.onMessageReceived(GridNioCodecFilter.java:114)
at
org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
at
org.apache.ignite.internal.util.nio.GridNioServer$HeadFilter.onMessageReceived(GridNioServer.java:3490)
at
org.apache.ignite.internal.util.nio.GridNioFilterChain.onMessageReceived(GridNioFilterChain.java:175)
at
org.apache.ignite.internal.util.nio.GridNioServer$ByteBufferNioClientWorker.processRead(GridNioServer.java:1113)
at
org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelectedKeysOptimized(GridNioServer.java:2339)
at
org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2110)
at
org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1764)
at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at java.lang.Thread.run(Thread.java:745)
[2018-10-09
12:45:49,946][ERROR][grid-nio-worker-tcp-rest-1-#37][GridTcpRestProtocol]
Closing NIO session because of unhandled exception.
class org.apache.ignite.internal.util.nio.GridNioException: null
at
org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelectedKeysOptimized(GridNioServer.java:2365)
at
org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2110)
at
org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1764)
at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at java.lang.Thread.run(Thread.java:745)


Does Ignite support GPB serialized data

2018-10-03 Thread Michael Fong
Hi, all

We have protocol buffer serialized binary data that would like to stored
into ignite, and wonder if Ignite supports gpb serialization out of the
box?

If not, which serialization interface do we need to implement to customize
and override in the xml?

Thanks in advance


Writing binary [] to ignite via memcache binary protocol

2018-10-03 Thread Michael Fong
Hi, all,


New user to Ignite here.

We are evaluating the possibility to replace memcached w/ Apache Ignite
(v2.6). We notice recently that when we set a byte[] using
net.spy.memcached client, and it seems sometimes the type of cache Object
in Ignite is somehow set as String. Thus, when we get the value of the
entry, it could not always convert back to binary[] properly, unless we
specifically specified a byte[] transcoder when client performs get(key,
transcoder) operation.

Does ignite internally have a way to store the data type when cache entry
is stored? This would help a lot, since we might be working with driver of
different languages as well.

Thanks in advance!