[jira] [Comment Edited] (IGNITE-2693) withKeepBinary and non-binary marshallers
[ https://issues.apache.org/jira/browse/IGNITE-2693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15182357#comment-15182357 ] Oddo edited comment on IGNITE-2693 at 3/6/16 9:57 PM: -- Vlad, I introduced the tests and they pass. However, there are two tests that fail (unrelated to my tests) but they both use withKeepBinary() in the following way: grid().cache(null).withKeepBinary() It appears that when you create a cache with a null config, it does NOT assume a binary marshaller :-) Should I just fix the tests and document that assumption or is this a deeper issue that needs to be addressed? You can look at the tests results on TC here: http://204.14.53.151/viewLog.html?buildTypeId=IgniteTests_IgniteDataGrid&buildId=205766 Let me know what you think. was (Author: maketo): Vlad, I introduced the tests and they pass. However, there are two tests that fail (unrelated to my tests) but they both use withKeepBinary() in the following way: grid().cache(null). It appears that when you create a cache with a null config, it does NOT assume a binary marshaller :-) Should I just fix the tests and document that assumption or is this a deeper issue that needs to be addressed? You can look at the tests results on TC here: http://204.14.53.151/viewLog.html?buildTypeId=IgniteTests_IgniteDataGrid&buildId=205766 Let me know what you think. > withKeepBinary and non-binary marshallers > - > > Key: IGNITE-2693 > URL: https://issues.apache.org/jira/browse/IGNITE-2693 > Project: Ignite > Issue Type: Bug > Components: general >Reporter: Sergey Kozlov >Assignee: Oddo > Labels: newbie > Fix For: 1.6 > > > Currently the user is able to set {{.withKeepBinary()}} for any used > marshaller. But it obviously causes ClassCastException for non-binary > marshallers and should be available only for binary marshaller. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (IGNITE-2693) withKeepBinary and non-binary marshallers
[ https://issues.apache.org/jira/browse/IGNITE-2693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15179554#comment-15179554 ] Vladimir Ozerov edited comment on IGNITE-2693 at 3/4/16 8:27 AM: - Anton, Oddo, I suppose {{ctx.kernalContext().config().getMarshaller()}} can never be {{null}} in started grid. See {{IgnitionEx.initializeConfiguration}} method - it sets default marshaller if it is not set by user. As such, there is no need to check {{ctx.kernalContext().config().getMarshaller() == null}} as it always will be {{false}}. Next, I do not quite understand what kind of class-casts should be tested. If user calls "keepBinary()" then he expects binary objects. But without BinaryMarshaller we cannot produce them. Therefore, an *exception* should be thrown in this case to indicate user that we cannot server his intent. If we do so, there is no need to check for any class-casts. Instead, we should simply wrote a test which will ensure that proper exception is thrown. Thoughts? was (Author: vozerov): Anton, Oddo, I suppose {{ctx.kernalContext().config().getMarshaller()}} can never be null in started grid. See {{IgnitionEx.initializeConfiguration}} method - it set's default marshaller if it is not set by user. As such, there is no need to check {{ctx.kernalContext().config().getMarshaller() == null}} as it always will be {{false}}. Next, I do not quite understand what kind of class-casts should be tested. If user calls "keepBinary()" then he expects binary objects. But without BinaryMarshaller we cannot produce them. Therefore, an *exception* should be thrown in this case to indicate user that we cannot server his intent. If we do so, there is no need to check for any class-casts. Instead, we should simply wrote a test which will ensure that proper exception is thrown. Thoughts? > withKeepBinary and non-binary marshallers > - > > Key: IGNITE-2693 > URL: https://issues.apache.org/jira/browse/IGNITE-2693 > Project: Ignite > Issue Type: Bug > Components: general >Reporter: Sergey Kozlov >Assignee: Oddo > Labels: newbie > Fix For: 1.6 > > > Currently the user is able to set {{.withKeepBinary()}} for any used > marshaller. But it obviously causes ClassCastException for non-binary > marshallers and should be available only for binary marshaller. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (IGNITE-2693) withKeepBinary and non-binary marshallers
[ https://issues.apache.org/jira/browse/IGNITE-2693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15179554#comment-15179554 ] Vladimir Ozerov edited comment on IGNITE-2693 at 3/4/16 8:27 AM: - Anton, Oddo, I suppose {{ctx.kernalContext().config().getMarshaller()}} can never be {{null}} in started grid. See {{IgnitionEx.initializeConfiguration}} method - it sets default marshaller if it is not set by user. As such, there is no need to check {{ctx.kernalContext().config().getMarshaller() == null}} as it always will be {{false}}. Next, I do not quite understand what kind of class-casts should be tested. If user calls {{keepBinary()}} then he expects binary objects. But without {{BinaryMarshaller}} we cannot produce them. Therefore, an *exception* should be thrown in this case to indicate user that we cannot server his intent. If we do so, there is no need to check for any class-casts. Instead, we should simply wrote a test which will ensure that proper exception is thrown. Thoughts? was (Author: vozerov): Anton, Oddo, I suppose {{ctx.kernalContext().config().getMarshaller()}} can never be {{null}} in started grid. See {{IgnitionEx.initializeConfiguration}} method - it sets default marshaller if it is not set by user. As such, there is no need to check {{ctx.kernalContext().config().getMarshaller() == null}} as it always will be {{false}}. Next, I do not quite understand what kind of class-casts should be tested. If user calls "keepBinary()" then he expects binary objects. But without BinaryMarshaller we cannot produce them. Therefore, an *exception* should be thrown in this case to indicate user that we cannot server his intent. If we do so, there is no need to check for any class-casts. Instead, we should simply wrote a test which will ensure that proper exception is thrown. Thoughts? > withKeepBinary and non-binary marshallers > - > > Key: IGNITE-2693 > URL: https://issues.apache.org/jira/browse/IGNITE-2693 > Project: Ignite > Issue Type: Bug > Components: general >Reporter: Sergey Kozlov >Assignee: Oddo > Labels: newbie > Fix For: 1.6 > > > Currently the user is able to set {{.withKeepBinary()}} for any used > marshaller. But it obviously causes ClassCastException for non-binary > marshallers and should be available only for binary marshaller. -- This message was sent by Atlassian JIRA (v6.3.4#6332)