You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by "aditya87 (GitHub)" <gi...@apache.org> on 2018/11/02 17:37:10 UTC

[GitHub] [geode] aditya87 opened pull request #2769: GEODE-5971: Refactor gateway receiver/gateway sender commands to extend SingleGfshCommand base type

Signed-off-by: Jens Deppe <jd...@pivotal.io>

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:
- [X] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

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

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

- [X] Does `gradlew build` run cleanly?

- [X] 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/2769 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] jdeppe-pivotal closed pull request #2769: GEODE-5971: Refactor gateway receiver/gateway sender commands to extend SingleGfshCommand base type

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

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

[GitHub] [geode] jdeppe-pivotal commented on pull request #2769: GEODE-5971: Refactor gateway receiver/gateway sender commands to extend SingleGfshCommand base type

Posted by "jdeppe-pivotal (GitHub)" <gi...@apache.org>.
We're trying to limit potential inconsistencies of result output; the data returned here (Member, Result, Message) can generally be applied to almost all commands. The typical call would be to `ResultModel.createMemberStatusResult(List<CliFunctionResult>)` but, in this case, the results are not produced by a function call but rather by interaction with MBeans.

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

[GitHub] [geode] jinmeiliao commented on pull request #2769: GEODE-5971: Refactor gateway receiver/gateway sender commands to extend SingleGfshCommand base type

Posted by "jinmeiliao (GitHub)" <gi...@apache.org>.
this boolean would never be null, so it's better to have it remain as primitive.

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

[GitHub] [geode] jinmeiliao commented on pull request #2769: GEODE-5971: Refactor gateway receiver/gateway sender commands to extend SingleGfshCommand base type

Posted by "jinmeiliao (GitHub)" <gi...@apache.org>.
other commands do something like: config.getGatewaySender().add(xxx)

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

[GitHub] [geode] jinmeiliao commented on pull request #2769: GEODE-5971: Refactor gateway receiver/gateway sender commands to extend SingleGfshCommand base type

Posted by "jinmeiliao (GitHub)" <gi...@apache.org>.
I am kind of concerned of moving this method here. The headers are so specific to each command though. 

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

[GitHub] [geode] jinmeiliao commented on pull request #2769: GEODE-5971: Refactor gateway receiver/gateway sender commands to extend SingleGfshCommand base type

Posted by "jinmeiliao (GitHub)" <gi...@apache.org>.
do not use the static method here, add a getManagementService in GfshCommand to expose this to SingleGfshCommand.  this is for better mock junit test in the future.

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

[GitHub] [geode] jinmeiliao commented on pull request #2769: GEODE-5971: Refactor gateway receiver/gateway sender commands to extend SingleGfshCommand base type

Posted by "jinmeiliao (GitHub)" <gi...@apache.org>.
same here.

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

[GitHub] [geode] jinmeiliao commented on pull request #2769: GEODE-5971: Refactor gateway receiver/gateway sender commands to extend SingleGfshCommand base type

Posted by "jinmeiliao (GitHub)" <gi...@apache.org>.
use CacheElement.removeElement(config.getGatewaySenders(), id);

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

[GitHub] [geode] jinmeiliao commented on pull request #2769: GEODE-5971: Refactor gateway receiver/gateway sender commands to extend SingleGfshCommand base type

Posted by "jinmeiliao (GitHub)" <gi...@apache.org>.
any reason we can't do things like this:
// to this once in the beginning
resultData.setColumnHeaders ("Member", "Result", "Message")

// then based on the conditions, do this multiple times 
result.addRow(memberName, result, message);

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

[GitHub] [geode] jinmeiliao commented on pull request #2769: GEODE-5971: Refactor gateway receiver/gateway sender commands to extend SingleGfshCommand base type

Posted by "jinmeiliao (GitHub)" <gi...@apache.org>.
I would avoid adding on to these kind of Utilities. Our goal is to get rid of this class eventually.

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

[GitHub] [geode] jinmeiliao commented on pull request #2769: GEODE-5971: Refactor gateway receiver/gateway sender commands to extend SingleGfshCommand base type

Posted by "jinmeiliao (GitHub)" <gi...@apache.org>.
same here

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

[GitHub] [geode] jinmeiliao commented on pull request #2769: GEODE-5971: Refactor gateway receiver/gateway sender commands to extend SingleGfshCommand base type

Posted by "jinmeiliao (GitHub)" <gi...@apache.org>.
A better way to build TabularResultModel is to use its setColumnHeader and addRow methods. It gives the code a lot more readability and avoid using the utility class.

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

[GitHub] [geode] jinmeiliao commented on pull request #2769: GEODE-5971: Refactor gateway receiver/gateway sender commands to extend SingleGfshCommand base type

Posted by "jinmeiliao (GitHub)" <gi...@apache.org>.
same here

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