[ https://issues.apache.org/jira/browse/YARN-2165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14216914#comment-14216914 ]
Zhijie Shen commented on YARN-2165: ----------------------------------- [~vasanthkumar], thanks for your contribution! Some comments about the patch. 1. TIMELINE_SERVICE_CLIENT_MAX_RETRIES can be -1 for endless retry. It's good to make it clear in yarn-default.xml too. 2. Instead of {{" property value should be positive and non-zero"}}, can we simply say {{" property value should be greater than zero}}? 3. You can use {{com.google.common.base.Preconditions.checkArgument}}. 4. Multiple lines are longer than 80 chars. 5. TIMELINE_SERVICE_LEVELDB_READ_CACHE_SIZE can be zero. 6. TIMELINE_SERVICE_LEVELDB_START_TIME_READ_CACHE_SIZE and TIMELINE_SERVICE_LEVELDB_START_TIME_WRITE_CACHE_SIZE seems to be > 0 because LRUMap requires this. However, ideally we should be able to disable cache completely. Let's deal with it separately. > Timelineserver should validate that yarn.timeline-service.ttl-ms is greater > than zero > ------------------------------------------------------------------------------------- > > Key: YARN-2165 > URL: https://issues.apache.org/jira/browse/YARN-2165 > Project: Hadoop YARN > Issue Type: Sub-task > Components: timelineserver > Reporter: Karam Singh > Assignee: Vasanth kumar RJ > Attachments: YARN-2165.1.patch, YARN-2165.2.patch, YARN-2165.patch > > > Timelineserver should validate that yarn.timeline-service.ttl-ms is greater > than zero > Currently if set yarn.timeline-service.ttl-ms=0 > Or yarn.timeline-service.ttl-ms=-86400 > Timeline server start successfully with complaining > {code} > 2014-06-15 14:52:16,562 INFO timeline.LeveldbTimelineStore > (LeveldbTimelineStore.java:<init>(247)) - Starting deletion thread with ttl > -604800000 and cycle interval 300000 > {code} > At starting timelinserver should that yarn.timeline-service-ttl-ms > 0 > otherwise specially for -ive value discard oldvalues timestamp will be set > future value. Which may lead to inconsistancy in behavior > {code} > public void run() { > while (true) { > long timestamp = System.currentTimeMillis() - ttl; > try { > discardOldEntities(timestamp); > Thread.sleep(ttlInterval); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)