hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Varun Saxena (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-4446) Refactor reader API for better extensibility
Date Sat, 12 Dec 2015 13:31:46 GMT

    [ https://issues.apache.org/jira/browse/YARN-4446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15054318#comment-15054318

Varun Saxena commented on YARN-4446:

After YARN-3863, getEntities API would change to as under :
  Set<TimelineEntity> getEntities(String userId, String clusterId,
      String flowId, Long flowRunId, String appId, String entityType,
      Long limit, Long createdTimeBegin, Long createdTimeEnd,
      Long modifiedTimeBegin, Long modifiedTimeEnd,
      TimelineFilterList relatesTo, TimelineFilterList isRelatedTo,
      TimelineFilterList infoFilters, TimelineFilterList configFilters,
      TimelineFilterList  metricFilters, TimelineFilterList eventFilters,
      TimelineFilterList confsToRetrieve, TimelineFilterList metricsToRetrieve,
      EnumSet<Field> fieldsToRetrieve) throws IOException;

The suggestion is to put related parameters into a separate class.
So limit, createdTimeBegin/End, modifiedTimeBegin/End, relatesTo, isRelatedTo, info/config/metric/event
filters can be boxed in one class named {{TimelineEntityFilters}}. 
Better name ?

Also, we can put userId, clusterId, flowId, flowRunId and appId in a class named {{TimelineReaderContext}}.
metricToRetrieve, confsToRetrieve and fieldToRetrieve can be in a single class named {{TimelineDataToRetrieve}}(say).

This would allow for better extensibility. Because if we add any other filter or data to retrieve
in future, we need not change the caller until and unless we want to pass the new information.
And hence would be far more easier to extend.

> Refactor reader API for better extensibility
> --------------------------------------------
>                 Key: YARN-4446
>                 URL: https://issues.apache.org/jira/browse/YARN-4446
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: timelineserver
>    Affects Versions: YARN-2928
>            Reporter: Varun Saxena
>            Assignee: Varun Saxena
>              Labels: yarn-2928-1st-milestone

This message was sent by Atlassian JIRA

View raw message