You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by "dschneider-pivotal (GitHub)" <gi...@apache.org> on 2019/01/15 01:21:21 UTC

[GitHub] [geode] dschneider-pivotal opened pull request #3076: GEODE-6272: change jdbc to use pdx as keys instead of json

New external APIs have been added. They are all marked with "@since Geode 1.9".
You can now create a PdxInstance that will never deserialize to a domain class.
Instead it will remain a PdxInstance. The apis call these "stable" pdx instances.

The JDBC connection now uses these stable pdx instances instead of json strings for keys that represent multiple columns.

Some internal classes were directly accessing methods on PdxInstanceImpl. 
Those have been changed to use the InternalPdxInstance interface instead.
One method, used by the query system, was on PdxInstanceImpl but did not
use any of its state. So this method is now in the query system instead of PdxInstanceImpl.

Co-authored-by: @gesterzhou 

Thank you for submitting a contribution to Apache Geode.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

### For all changes:
- [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

- [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?

- [ ] Is your initial contribution a single, squashed commit?

- [ ] Does `gradlew build` run cleanly?

- [ ] Have you written or updated unit tests to verify your changes?

- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?

### Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to dev@geode.apache.org.


[ Full content available at: https://github.com/apache/geode/pull/3076 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] dschneider-pivotal commented on pull request #3076: GEODE-6272: change jdbc to use pdx as keys instead of json

Posted by "dschneider-pivotal (GitHub)" <gi...@apache.org>.
Okay, so I'll change to "neverDeserialize()" on the factory and "isDeserializable()" on the PdxInstance. Thanks for the help on naming.


[ Full content available at: https://github.com/apache/geode/pull/3076 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] dschneider-pivotal closed pull request #3076: GEODE-6272: change jdbc to use pdx as keys instead of json

Posted by "dschneider-pivotal (GitHub)" <gi...@apache.org>.
[ pull request closed by dschneider-pivotal ]

[ Full content available at: https://github.com/apache/geode/pull/3076 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] pivotal-jbarrett commented on issue #3076: GEODE-6272: change jdbc to use pdx as keys instead of json

Posted by "pivotal-jbarrett (GitHub)" <gi...@apache.org>.
I wonder if there is a more clear term.

[ Full content available at: https://github.com/apache/geode/pull/3076 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] agingade commented on pull request #3076: GEODE-6272: change jdbc to use pdx as keys instead of json

Posted by "agingade (GitHub)" <gi...@apache.org>.
+ 1 for Kirk's suggestion. Having method "keepSerialized()" or notDeserializable() on PdxInstanceFactory and method "isDeserializable()" on PdxInstance.

[ Full content available at: https://github.com/apache/geode/pull/3076 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] dschneider-pivotal commented on pull request #3076: GEODE-6272: change jdbc to use pdx as keys instead of json

Posted by "dschneider-pivotal (GitHub)" <gi...@apache.org>.
I think "neverDeserialize" is better because it does not take a boolean argument. I like that it is more "opinionated".

[ Full content available at: https://github.com/apache/geode/pull/3076 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] pivotal-jbarrett commented on issue #3076: GEODE-6272: change jdbc to use pdx as keys instead of json

Posted by "pivotal-jbarrett (GitHub)" <gi...@apache.org>.
Why the world "stable"? To me it implies the others are unstable. What do you mean by stable?

[ Full content available at: https://github.com/apache/geode/pull/3076 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] charliemblack commented on issue #3076: GEODE-6272: change jdbc to use pdx as keys instead of json

Posted by "charliemblack (GitHub)" <gi...@apache.org>.
I was wondering about the "stable" method as well.   Maybe this will cause someone to come up with a better name. 

`createSerializedOnlyPDXInstanceFactory()`

Note: I am not crazy about `createSerializedOnlyPDXInstanceFactory()` either.   Just adding it to the conversation to possibly spur a constructive discussion.   

Please don't view this comment as a blocker to the new API.    At the end of the day as a developer I understand what the API does.

[ Full content available at: https://github.com/apache/geode/pull/3076 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] dschneider-pivotal commented on issue #3076: GEODE-6272: change jdbc to use pdx as keys instead of json

Posted by "dschneider-pivotal (GitHub)" <gi...@apache.org>.
@pivotal-jbarrett  "stable", in this context, means that the PdxInstance does not change form; it will always be a PdxInstance; it will never deserialize to a domain class. 

[ Full content available at: https://github.com/apache/geode/pull/3076 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] kirklund commented on pull request #3076: GEODE-6272: change jdbc to use pdx as keys instead of json

Posted by "kirklund (GitHub)" <gi...@apache.org>.
I agree with others that "stable" is kind of a weird term. Maybe try something more specific like "keepInSerializedForm", "keepSerialized" and consider moving it to PdxInstanceFactory instead of a new factory method:
```
PdxInstanceFactory factory = cache.createPdxInstanceFactory(class).keepSerialized(true);
```

[ Full content available at: https://github.com/apache/geode/pull/3076 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] pivotal-jbarrett commented on pull request #3076: GEODE-6272: change jdbc to use pdx as keys instead of json

Posted by "pivotal-jbarrett (GitHub)" <gi...@apache.org>.
My preference would be to keep with less negative statements. I feel like `.setDeserializable(false)` corresponds better with `isDeserializable`. 

[ Full content available at: https://github.com/apache/geode/pull/3076 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org