Sangjin Lee updated YARN-3949:
    Attachment: YARN-3949-YARN-2928.002.patch

v.2 patch posted.

I removed the line that sets entityTable to null. I believe it is indeed 
possible for public API calls to come in while the service is in the midst of 
stopping (or there is no mechanism that prevents that).

The underlying buffered mutator can handle this situation more or less. If 
{{flush()}} is called after the buffered mutator is closed, it will be a no-op. 
If {{write()}} is called after the buffered mutator is closed, it will throw an 
{{IllegalStateException}}. IMO that is an acceptable outcome.

> ensure timely flush of timeline writes
> --------------------------------------
>                 Key: YARN-3949
>                 URL: https://issues.apache.org/jira/browse/YARN-3949
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: timelineserver
>    Affects Versions: YARN-2928
>            Reporter: Sangjin Lee
>            Assignee: Sangjin Lee
>         Attachments: YARN-3949-YARN-2928.001.patch, 
> YARN-3949-YARN-2928.002.patch
> Currently flushing of timeline writes is not really handled. For example, 
> {{HBaseTimelineWriterImpl}} relies on HBase's {{BufferedMutator}} to batch 
> and write puts asynchronously. However, {{BufferedMutator}} may not flush 
> them to HBase unless the internal buffer fills up.
> We do need a flush functionality first to ensure that data are written in a 
> reasonably timely manner, and to be able to ensure some critical writes are 
> done synchronously (e.g. key lifecycle events).

This message was sent by Atlassian JIRA

Reply via email to