You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by "jinmeiliao (GitHub)" <gi...@apache.org> on 2018/12/12 17:24:01 UTC
[GitHub] [geode] jinmeiliao opened pull request #2991: GEODE-5971:
refactor expiration config objects
* maintain the xml structure
* ease of use when setting/getting expiration attributes
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/2991 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org
[GitHub] [geode] jinmeiliao commented on pull request #2991:
GEODE-5971: refactor expiration config objects
Posted by "jinmeiliao (GitHub)" <gi...@apache.org>.
No. I had a test in RegionConfigTest to make sure the xml stays the same.
[ Full content available at: https://github.com/apache/geode/pull/2991 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org
[GitHub] [geode] aditya87 commented on pull request #2991:
GEODE-5971: refactor expiration config objects
Posted by "aditya87 (GitHub)" <gi...@apache.org>.
Right -- but I'm wondering if it's worth just grouping all of them into one global `if (regionAttributes != null)` in order to be consistent.
[ Full content available at: https://github.com/apache/geode/pull/2991 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org
[GitHub] [geode] aditya87 commented on pull request #2991:
GEODE-5971: refactor expiration config objects
Posted by "aditya87 (GitHub)" <gi...@apache.org>.
👍 for this change. Assuming it doesn't affect the schema?
[ Full content available at: https://github.com/apache/geode/pull/2991 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org
[GitHub] [geode] aditya87 commented on pull request #2991:
GEODE-5971: refactor expiration config objects
Posted by "aditya87 (GitHub)" <gi...@apache.org>.
Okay.
[ Full content available at: https://github.com/apache/geode/pull/2991 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org
[GitHub] [geode] jinmeiliao closed pull request #2991: GEODE-5971:
refactor expiration config objects
Posted by "jinmeiliao (GitHub)" <gi...@apache.org>.
[ pull request closed by jinmeiliao ]
[ Full content available at: https://github.com/apache/geode/pull/2991 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org
[GitHub] [geode] jinmeiliao commented on issue #2991: GEODE-5971:
refactor expiration config objects
Posted by "jinmeiliao (GitHub)" <gi...@apache.org>.
@metatype yes, they are marked as @Experimental, and the change makes the usage of the API a lot easier to manage.
[ Full content available at: https://github.com/apache/geode/pull/2991 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org
[GitHub] [geode] aditya87 commented on pull request #2991:
GEODE-5971: refactor expiration config objects
Posted by "aditya87 (GitHub)" <gi...@apache.org>.
Maybe this is more stylistic, but you've probably noticed that coming from the Go-style I prefer ifs to be flat and not hierarchical, as much as possible. I'm ok with either way, but I've noticed that in this class we now have a dichotomy, i.e. we're doing both flat ifs and hierarchical ifs when it comes to `if (regionAttributes != null)`. Can we be consistent across this class? I.e. either flatten them all out or group them all into a global `if (regionAttributes != null)`?
[ Full content available at: https://github.com/apache/geode/pull/2991 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org
[GitHub] [geode] metatype commented on issue #2991: GEODE-5971:
refactor expiration config objects
Posted by "metatype (GitHub)" <gi...@apache.org>.
@jinmeiliao Looks like you're making a breaking change to the public API. Is that what you intended?
[ Full content available at: https://github.com/apache/geode/pull/2991 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org
[GitHub] [geode] jinmeiliao commented on issue #2991: GEODE-5971:
refactor expiration config objects
Posted by "jinmeiliao (GitHub)" <gi...@apache.org>.
@aditya87 @Petahhh
[ Full content available at: https://github.com/apache/geode/pull/2991 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org
[GitHub] [geode] jinmeiliao commented on pull request #2991:
GEODE-5971: refactor expiration config objects
Posted by "jinmeiliao (GitHub)" <gi...@apache.org>.
I think I grouped these four into one global `if (regionAttributes != null)` because they all deal with expiration attributes
[ Full content available at: https://github.com/apache/geode/pull/2991 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org
[GitHub] [geode] jinmeiliao commented on pull request #2991:
GEODE-5971: refactor expiration config objects
Posted by "jinmeiliao (GitHub)" <gi...@apache.org>.
this take CustomExpiry into consideration as well. ExpirationAttributes only has timeout and action.
[ Full content available at: https://github.com/apache/geode/pull/2991 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org
[GitHub] [geode] aditya87 commented on pull request #2991:
GEODE-5971: refactor expiration config objects
Posted by "aditya87 (GitHub)" <gi...@apache.org>.
I thought I added a helper function in ExpirationAttributes.java to do this? Should it not be under that domain?
[ Full content available at: https://github.com/apache/geode/pull/2991 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org