You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by jaredjstewart <gi...@git.apache.org> on 2016/09/30 16:37:05 UTC

[GitHub] incubator-geode pull request #249: GEODE-1907: QueryDataFunction now adds LI...

GitHub user jaredjstewart opened a pull request:

    https://github.com/apache/incubator-geode/pull/249

    GEODE-1907: QueryDataFunction now adds LIMIT clause if space is missi\u2026

    \u2026ng after FROM clause

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jaredjstewart/incubator-geode feature/GEODE-1907

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-geode/pull/249.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #249
    
----
commit 6fb64a7b671af3054a38610c245f51ab9c30c342
Author: Jared Stewart <js...@pivotal.io>
Date:   2016-09-29T19:47:15Z

    GEODE-1907: QueryDataFunction now adds LIMIT clause if space is missing after FROM clause

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-geode issue #249: GEODE-1907: QueryDataFunction now adds LIMIT cla...

Posted by kirklund <gi...@git.apache.org>.
Github user kirklund commented on the issue:

    https://github.com/apache/incubator-geode/pull/249
  
    +1 pulling in now


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-geode pull request #249: GEODE-1907: QueryDataFunction now adds LI...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-geode/pull/249


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-geode pull request #249: GEODE-1907: QueryDataFunction now adds LI...

Posted by kirklund <gi...@git.apache.org>.
Github user kirklund commented on a diff in the pull request:

    https://github.com/apache/incubator-geode/pull/249#discussion_r81404596
  
    --- Diff: geode-core/src/main/java/org/apache/geode/management/internal/beans/QueryDataFunction.java ---
    @@ -360,31 +373,36 @@ public static Object queryData(final String query,
             for (String regionPath : regionsInQuery) {
               DistributedRegionMXBean regionMBean = service.getDistributedRegionMXBean(regionPath);
               if (regionMBean == null) {
    -            return new JsonisedErroMessage(ManagementStrings.QUERY__MSG__REGIONS_NOT_FOUND.toLocalizedString(regionPath)).toString();
    +            return new JsonisedErroMessage(ManagementStrings.QUERY__MSG__REGIONS_NOT_FOUND.toLocalizedString(regionPath))
    +              .toString();
               } else {
                 Set<DistributedMember> associatedMembers = DataCommands.getRegionAssociatedMembers(regionPath, cache, true);
     
                 if (inputMembers != null && inputMembers.size() > 0) {
                   if (!associatedMembers.containsAll(inputMembers)) {
    -                return new JsonisedErroMessage(ManagementStrings.QUERY__MSG__REGIONS_NOT_FOUND_ON_MEMBERS.toLocalizedString(regionPath))
    -                  .toString();
    +                return new JsonisedErroMessage(ManagementStrings.QUERY__MSG__REGIONS_NOT_FOUND_ON_MEMBERS
    +                  .toLocalizedString(regionPath)).toString();
                   }
                 }
               }
     
             }
           } else {
    -        return new JsonisedErroMessage(ManagementStrings.QUERY__MSG__INVALID_QUERY.toLocalizedString("Region mentioned in query probably missing /")).toString();
    +        return new JsonisedErroMessage(ManagementStrings.QUERY__MSG__INVALID_QUERY.toLocalizedString("Region mentioned in query probably missing /"))
    +          .toString();
           }
     
           // Validate
           if (regionsInQuery.size() > 1 && inputMembers == null) {
             for (String regionPath : regionsInQuery) {
               DistributedRegionMXBean regionMBean = service.getDistributedRegionMXBean(regionPath);
     
    -          if (regionMBean.getRegionType().equals(DataPolicy.PARTITION.toString()) || 
    -              regionMBean.getRegionType().equals(DataPolicy.PERSISTENT_PARTITION.toString())) {
    -            return new JsonisedErroMessage(ManagementStrings.QUERY__MSG__JOIN_OP_EX.toLocalizedString()).toString();
    +          if (regionMBean.getRegionType()
    --- End diff --
    
    I updated the formatters in etc/ including etc/intellijIdeaCodeStyle.xml to prevent these whacky linefeeds. Please update and rerun the formatter. The changes look good and I'll pull it in as soon as you've reformatted. Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-geode pull request #249: GEODE-1907: QueryDataFunction now adds LI...

Posted by jaredjstewart <gi...@git.apache.org>.
Github user jaredjstewart commented on a diff in the pull request:

    https://github.com/apache/incubator-geode/pull/249#discussion_r81409434
  
    --- Diff: geode-core/src/main/java/org/apache/geode/management/internal/beans/QueryDataFunction.java ---
    @@ -360,31 +373,36 @@ public static Object queryData(final String query,
             for (String regionPath : regionsInQuery) {
               DistributedRegionMXBean regionMBean = service.getDistributedRegionMXBean(regionPath);
               if (regionMBean == null) {
    -            return new JsonisedErroMessage(ManagementStrings.QUERY__MSG__REGIONS_NOT_FOUND.toLocalizedString(regionPath)).toString();
    +            return new JsonisedErroMessage(ManagementStrings.QUERY__MSG__REGIONS_NOT_FOUND.toLocalizedString(regionPath))
    +              .toString();
               } else {
                 Set<DistributedMember> associatedMembers = DataCommands.getRegionAssociatedMembers(regionPath, cache, true);
     
                 if (inputMembers != null && inputMembers.size() > 0) {
                   if (!associatedMembers.containsAll(inputMembers)) {
    -                return new JsonisedErroMessage(ManagementStrings.QUERY__MSG__REGIONS_NOT_FOUND_ON_MEMBERS.toLocalizedString(regionPath))
    -                  .toString();
    +                return new JsonisedErroMessage(ManagementStrings.QUERY__MSG__REGIONS_NOT_FOUND_ON_MEMBERS
    +                  .toLocalizedString(regionPath)).toString();
                   }
                 }
               }
     
             }
           } else {
    -        return new JsonisedErroMessage(ManagementStrings.QUERY__MSG__INVALID_QUERY.toLocalizedString("Region mentioned in query probably missing /")).toString();
    +        return new JsonisedErroMessage(ManagementStrings.QUERY__MSG__INVALID_QUERY.toLocalizedString("Region mentioned in query probably missing /"))
    +          .toString();
           }
     
           // Validate
           if (regionsInQuery.size() > 1 && inputMembers == null) {
             for (String regionPath : regionsInQuery) {
               DistributedRegionMXBean regionMBean = service.getDistributedRegionMXBean(regionPath);
     
    -          if (regionMBean.getRegionType().equals(DataPolicy.PARTITION.toString()) || 
    -              regionMBean.getRegionType().equals(DataPolicy.PERSISTENT_PARTITION.toString())) {
    -            return new JsonisedErroMessage(ManagementStrings.QUERY__MSG__JOIN_OP_EX.toLocalizedString()).toString();
    +          if (regionMBean.getRegionType()
    --- End diff --
    
    I reformatted with the updated code style and pushed again.  Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---