[jira] [Comment Edited] (IGNITE-9532) Binary mode for Ignite Queue
[ https://issues.apache.org/jira/browse/IGNITE-9532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16720058#comment-16720058 ] Anton Vinogradov edited comment on IGNITE-9532 at 12/13/18 11:27 AM: - [~uday] , Could you please merge actual master into your branch? Then I'll check TeamCity and merge the solution. was (Author: avinogradov): [~uday] , Could you please merge actual master into your branch? Then I'll check TeamCity and merge the solution. > Binary mode for Ignite Queue > > > Key: IGNITE-9532 > URL: https://issues.apache.org/jira/browse/IGNITE-9532 > Project: Ignite > Issue Type: New Feature > Components: binary, data structures >Reporter: Uday Kale >Assignee: Uday Kale >Priority: Major > Fix For: 2.8 > > > Add binary mode (withKeepBinary) to Data Structures Queue. > This will allow retrieving values in binary format when needed or when class > is not available, and will allow implementing the structures in other > platforms (.NET, C++). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (IGNITE-9532) Binary mode for Ignite Queue
[ https://issues.apache.org/jira/browse/IGNITE-9532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16642099#comment-16642099 ] Uday Kale edited comment on IGNITE-9532 at 10/8/18 4:27 PM: [~avinogradov], I have updated the changes based on the last review. I forgot to mark it as 'patch submit' was (Author: uday): [~avinogradov], I have updated the changes based on the last review. > Binary mode for Ignite Queue > > > Key: IGNITE-9532 > URL: https://issues.apache.org/jira/browse/IGNITE-9532 > Project: Ignite > Issue Type: New Feature > Components: binary, data structures >Reporter: Uday Kale >Assignee: Uday Kale >Priority: Major > Fix For: 2.8 > > > Add binary mode (withKeepBinary) to Data Structures Queue. > This will allow retrieving values in binary format when needed or when class > is not available, and will allow implementing the structures in other > platforms (.NET, C++). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (IGNITE-9532) Binary mode for Ignite Queue
[ https://issues.apache.org/jira/browse/IGNITE-9532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16630572#comment-16630572 ] Anton Vinogradov edited comment on IGNITE-9532 at 9/27/18 3:02 PM: --- [~uday] 1) Can we avoid copy-paste at {{withKeepBinary}} javadoc? Let's make it smaller and simpler :) 2) rollback changes not related to the issue. I see formatting changes at {{testPutGetMultithreadUnbounded}} method and at {{testIsolation}} javadoc. 3) I see code duplication between {{testCollectionMethods}} and {{testCollectionMethodsBin}}. was (Author: avinogradov): [~uday] 1) Can we avoid copy-paste at {{withKeepBinary}} javadoc? Let's make it smaller and simpler :) 2) rollback changes to related to the issue. I see formatting changes at {{testPutGetMultithreadUnbounded}} method and at {{testIsolation}} javadoc. 3) I see code duplication between {{testCollectionMethods}} and {{testCollectionMethodsBin}}. > Binary mode for Ignite Queue > > > Key: IGNITE-9532 > URL: https://issues.apache.org/jira/browse/IGNITE-9532 > Project: Ignite > Issue Type: New Feature > Components: binary, data structures >Reporter: Uday Kale >Assignee: Uday Kale >Priority: Major > Fix For: 2.8 > > > Add binary mode (withKeepBinary) to Data Structures Queue. > This will allow retrieving values in binary format when needed or when class > is not available, and will allow implementing the structures in other > platforms (.NET, C++). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (IGNITE-9532) Binary mode for Ignite Queue
[ https://issues.apache.org/jira/browse/IGNITE-9532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16618631#comment-16618631 ] Uday Kale edited comment on IGNITE-9532 at 9/18/18 8:02 AM: [~avinogradov] The code in my PR at GridCacheQueueProxy:484 is changing the operating context for the queue objects already initialised in the thread. It can be confirmed since the unit test below works but the unit test in the comments above does not: {code:java} public void testContains() throws Exception { IgniteQueue queue = grid(0).queue("q1", 0, config(false)); queue.add(new SameHashItem(Integer.toString(14))); assertTrue(queue.contains(new SameHashItem(Integer.toString(14; // Succeeds IgniteQueue queueBin = grid(0).queue("q1", 0, config(false)).withKeepBinary(); queueBin.add(sameHashBinObj(grid(0), 14)); assertTrue(queueBin.contains(sameHashBinObj(grid(0), 14))); // Succeeds } private static BinaryObject sameHashBinObj(Ignite ignite, int i) { return ignite.binary().toBinary(new SameHashItem(Integer.toString(i))); } {code} Is this acceptable? was (Author: uday): [~avinogradov] The code in my PR at GridCacheQueueProxy:484 is changing the operating context for the queue objects already initialised in the thread. It can be confirmed since the unit test below works but the unit test in the comments above does not: {code:java} public void testContains() throws Exception { IgniteQueue queue = grid(0).queue("q1", 0, config(false)); queue.add(new SameHashItem(Integer.toString(14))); assertTrue(queue.contains(new SameHashItem(Integer.toString(14; // Fails IgniteQueue queueBin = grid(0).queue("q1", 0, config(false)).withKeepBinary(); queueBin.add(sameHashBinObj(grid(0), 14)); assertTrue(queueBin.contains(sameHashBinObj(grid(0), 14))); // Succeeds } private static BinaryObject sameHashBinObj(Ignite ignite, int i) { return ignite.binary().toBinary(new SameHashItem(Integer.toString(i))); } {code} Is this acceptable? > Binary mode for Ignite Queue > > > Key: IGNITE-9532 > URL: https://issues.apache.org/jira/browse/IGNITE-9532 > Project: Ignite > Issue Type: New Feature > Components: binary, data structures >Reporter: Uday Kale >Assignee: Uday Kale >Priority: Major > Fix For: 2.8 > > > Add binary mode (withKeepBinary) to Data Structures Queue. > This will allow retrieving values in binary format when needed or when class > is not available, and will allow implementing the structures in other > platforms (.NET, C++). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (IGNITE-9532) Binary mode for Ignite Queue
[ https://issues.apache.org/jira/browse/IGNITE-9532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16618631#comment-16618631 ] Uday Kale edited comment on IGNITE-9532 at 9/18/18 8:00 AM: [~avinogradov] The code in my PR at GridCacheQueueProxy:484 is changing the operating context for the queue objects already initialised in the thread. It can be confirmed since the unit test below works but the unit test in the comments above does not: {code:java} public void testContains() throws Exception { IgniteQueue queue = grid(0).queue("q1", 0, config(false)); queue.add(new SameHashItem(Integer.toString(14))); assertTrue(queue.contains(new SameHashItem(Integer.toString(14; // Fails IgniteQueue queueBin = grid(0).queue("q1", 0, config(false)).withKeepBinary(); queueBin.add(sameHashBinObj(grid(0), 14)); assertTrue(queueBin.contains(sameHashBinObj(grid(0), 14))); // Succeeds } private static BinaryObject sameHashBinObj(Ignite ignite, int i) { return ignite.binary().toBinary(new SameHashItem(Integer.toString(i))); } {code} Is this acceptable? was (Author: uday): [~avinogradov] The code in my PR at GridCacheQueueProxy:484 is changing the operating context for the queue objects already initialised in the thread. It can be confirmed since the unit test below works but the unit test in the comments above does not: public void testContains() throws Exception { IgniteQueue queue = grid(0).queue("q1", 0, config(false)); queue.add(new SameHashItem(Integer.toString(14))); assertTrue(queue.contains(new SameHashItem(Integer.toString(14; // Fails IgniteQueue queueBin = grid(0).queue("q1", 0, config(false)).withKeepBinary(); queueBin.add(sameHashBinObj(grid(0), 14)); assertTrue(queueBin.contains(sameHashBinObj(grid(0), 14))); // Succeeds }private static BinaryObject sameHashBinObj(Ignite ignite, int i) { return ignite.binary().toBinary(new SameHashItem(Integer.toString(i))); } Is this acceptable? > Binary mode for Ignite Queue > > > Key: IGNITE-9532 > URL: https://issues.apache.org/jira/browse/IGNITE-9532 > Project: Ignite > Issue Type: New Feature > Components: binary, data structures >Reporter: Uday Kale >Assignee: Uday Kale >Priority: Major > Fix For: 2.8 > > > Add binary mode (withKeepBinary) to Data Structures Queue. > This will allow retrieving values in binary format when needed or when class > is not available, and will allow implementing the structures in other > platforms (.NET, C++). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (IGNITE-9532) Binary mode for Ignite Queue
[ https://issues.apache.org/jira/browse/IGNITE-9532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617354#comment-16617354 ] Uday Kale edited comment on IGNITE-9532 at 9/18/18 8:00 AM: I am trying to check if the SameHash object exists in the queue 'q1' after adding both Binary Object and SameHash Object to it. Currently this is failing. It is successful only if the object is converted to Binary Object. Below is a simplified test. {code:java} public void testContains() throws Exception { IgniteQueue queue = grid(0).queue("q1", 0, config(false)); IgniteQueue queueBin = grid(0).queue("q1", 0, config(false)).withKeepBinary(); queue.add(new SameHashItem(Integer.toString(14))); queueBin.add(sameHashBinObj(grid(0), 14)); assertTrue(queue.contains(new SameHashItem(Integer.toString(14; // Fails assertTrue(queueBin.contains(sameHashBinObj(grid(0), 14))); // Succeeds } private static BinaryObject sameHashBinObj(Ignite ignite, int i) { return ignite.binary().toBinary(new SameHashItem(Integer.toString(i))); } {code} Is this the expected behaviour? was (Author: uday): I am trying to check if the SameHash object exists in the queue 'q1' after adding both Binary Object and SameHash Object to it. Currently this is failing. It is successful only if the object is converted to Binary Object. Below is a simplified test. {code:java} public void testContains() throws Exception { IgniteQueue queue = grid(0).queue("q1", 0, config(false)); IgniteQueue queueBin = grid(0).queue("q1", 0, config(false)).withKeepBinary(); queue.add(new SameHashItem(Integer.toString(14))); queueBin.add(sameHashBinObj(grid(0), 14)); assertTrue(queue.contains(new SameHashItem(Integer.toString(14; // Fails assertTrue(queueBin.contains(sameHashBinObj(grid(0), 14))); // Succeeds } private static BinaryObject sameHashBinObj(Ignite ignite, int i) { return ignite.binary().toBinary(new SameHashItem(Integer.toString(i))); } {code} Is this the expected behaviour? > Binary mode for Ignite Queue > > > Key: IGNITE-9532 > URL: https://issues.apache.org/jira/browse/IGNITE-9532 > Project: Ignite > Issue Type: New Feature > Components: binary, data structures >Reporter: Uday Kale >Assignee: Uday Kale >Priority: Major > Fix For: 2.8 > > > Add binary mode (withKeepBinary) to Data Structures Queue. > This will allow retrieving values in binary format when needed or when class > is not available, and will allow implementing the structures in other > platforms (.NET, C++). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (IGNITE-9532) Binary mode for Ignite Queue
[ https://issues.apache.org/jira/browse/IGNITE-9532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617470#comment-16617470 ] Uday Kale edited comment on IGNITE-9532 at 9/17/18 12:57 PM: - [~avinogradov], The asserts in your code snippets are working. Do you want me to debug your snippet or mine? In case I wasn't clear, I just want to know whether the unit test I shared should succeed or not. was (Author: uday): [~avinogradov], The asserts in your code snippets are working. Do you want me to debug your snippet or mine? > Binary mode for Ignite Queue > > > Key: IGNITE-9532 > URL: https://issues.apache.org/jira/browse/IGNITE-9532 > Project: Ignite > Issue Type: New Feature > Components: binary, data structures >Reporter: Uday Kale >Assignee: Uday Kale >Priority: Major > Fix For: 2.8 > > > Add binary mode (withKeepBinary) to Data Structures Queue. > This will allow retrieving values in binary format when needed or when class > is not available, and will allow implementing the structures in other > platforms (.NET, C++). -- This message was sent by Atlassian JIRA (v7.6.3#76005)