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

Zhijie Shen commented on YARN-2165:
-----------------------------------

bq. should the check be (<= 0) instead of (< 0) ? Since 0 ttl and ttlinterval 
have no real meanings.

Agree.

To be more general, it's better to do the sanity check for all the numeric 
configurations while initializing the timeline server, making sure a valid 
number has been set. Here's the current list.

{code}
  <property>
    <description>Time to live for timeline store data in 
milliseconds.</description>
    <name>yarn.timeline-service.ttl-ms</name>
    <value>604800000</value>
  </property>

  <property>
    <description>Length of time to wait between deletion cycles of leveldb 
timeline store in milliseconds.</description>
    <name>yarn.timeline-service.leveldb-timeline-store.ttl-interval-ms</name>
    <value>300000</value>
  </property>

  <property>
    <description>Size of read cache for uncompressed blocks for leveldb 
timeline store in bytes.</description>
    <name>yarn.timeline-service.leveldb-timeline-store.read-cache-size</name>
    <value>104857600</value>
  </property>

  <property>
    <description>Size of cache for recently read entity start times for leveldb 
timeline store in number of entities.</description>
    
<name>yarn.timeline-service.leveldb-timeline-store.start-time-read-cache-size</name>
    <value>10000</value>
  </property>

  <property>
    <description>Size of cache for recently written entity start times for 
leveldb timeline store in number of entities.</description>
    
<name>yarn.timeline-service.leveldb-timeline-store.start-time-write-cache-size</name>
    <value>10000</value>
  </property>

  <property>
    <description>Handler thread count to serve the client RPC 
requests.</description>
    <name>yarn.timeline-service.handler-thread-count</name>
    <value>10</value>
  </property>

  <property>
    <description>
    Default maximum number of retires for timeline servive client.
    </description>
    <name>yarn.timeline-service.client.max-retries</name>
    <value>30</value>
  </property>

  <property>
    <description>
    Default retry time interval for timeline servive client.
    </description>
    <name>yarn.timeline-service.client.retry-interval-ms</name>
    <value>1000</value>
  </property>
{code}

> 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
>         Attachments: 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)

Reply via email to