drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkhatua <...@git.apache.org>
Subject [GitHub] drill pull request #751: DRILL-5259: Allow listing a user-defined number of ...
Date Sun, 19 Feb 2017 06:51:03 GMT
Github user kkhatua commented on a diff in the pull request:

    https://github.com/apache/drill/pull/751#discussion_r101910137
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileResources.java
---
    @@ -220,7 +225,21 @@ public QProfiles getProfilesJSON() {
     
           final List<ProfileInfo> finishedQueries = Lists.newArrayList();
     
    -      final Iterator<Map.Entry<String, QueryProfile>> range = completed.getRange(0,
MAX_PROFILES);
    +      //Defining #Profiles to load
    +      int maxProfilesToLoad;
    +      if (MaxProfiles == null) {
    +        MaxProfiles = work.getContext().getConfig().getInt(ExecConstants.HTTP_MAX_PROFILES);
    +      }
    +
    +      String maxProfilesParams = uriInfo.getQueryParameters().getFirst(MAX_QPROFILES_PARAM);
    +      if (maxProfilesParams != null && !maxProfilesParams.isEmpty()) {
    +        maxProfilesToLoad = Integer.valueOf(maxProfilesParams);
    +      } else {
    +        maxProfilesToLoad = MaxProfiles;
    +      }
    --- End diff --
    
    Agreed. Got rid of the MaxProfiles altogether. We'll read the config value and load the
appropriate value accordingly. 


---
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.
---

Mime
View raw message