You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/07/06 13:17:00 UTC

[jira] [Commented] (DRILL-7922) Add the profile import function

    [ https://issues.apache.org/jira/browse/DRILL-7922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17375715#comment-17375715 ] 

ASF GitHub Bot commented on DRILL-7922:
---------------------------------------

Leon-WTF commented on pull request #2225:
URL: https://github.com/apache/drill/pull/2225#issuecomment-874750796


   Thanks cong,just if we use queryId as the cache key, it may conflict when two users upload different profile jsons with same query id at the same time(Though this may be a rare condition). What do you think?
   
   > @Leon-WTF Hi. I think we made things complicated. There is a suggestion to revise :
   > 
   > 1. Define the cache above the `getProfileJSON(@PathParam("queryid") String queryId)`
   > 
   > ```java
   >   // provide cache for view the profile
   >   private static final Cache<String, String> PROFILE_CACHE =
   >       CacheBuilder
   >         .newBuilder()
   >           .expireAfterAccess(1, TimeUnit.MINUTES)
   >             .build();
   > ```
   > 
   > 1. Add the if-else in the `getProfileJSON(@PathParam("queryid") String queryId)`
   > 
   > ```java
   > String content = PROFILE_CACHE.getIfPresent(queryId);
   > if (content == null) {
   >  // return the new
   > } else {
   >   PROFILE_CACHE.invalidate(queryId);
   >   // then, return the cache
   > }
   > ```
   > 
   > 1. Cache the data in the `viewProfile(@FormDataParam(PROFILE_DATA) String content)`
   > 
   > ```java
   > PROFILE_CACHE.put(profile.getQueryId(), content);
   > ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Add the profile import function
> -------------------------------
>
>                 Key: DRILL-7922
>                 URL: https://issues.apache.org/jira/browse/DRILL-7922
>             Project: Apache Drill
>          Issue Type: New Feature
>            Reporter: Cong Luo
>            Assignee: wtf
>            Priority: Major
>
> We can easy to read the profile metrics on the web console, but hard to review the profile of  other cluster (specified the users. although they can provide the profile json, but the file is not easy to readable).
> Since we can export the profile json via the console, So, We can also add the import function to quickly review the new cluster metrics.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)