hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nandakumar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-12519) Ozone: Add a Lease Manager to SCM
Date Sat, 07 Oct 2017 16:48:03 GMT

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

Nandakumar commented on HDFS-12519:

Thanks for the review [~linyiqun].

bq. line64 and line107: Can use {{Time.now()}} to replace of {{System.currentTimeMillis()}}?
Used {{Time.monotonicNow()}} instead of {{Time.now()}}, according to Times.now() java doc
* Current system time.  Do not use this to calculate a duration or interval
* to sleep, because it will be broken by settimeofday.  Instead, use
* monotonicNow.

bq. line32: Log instance seems get incorrect.
This was done intentionally, so that the logging will be done as {{Lease}}. Please let me
know if it's misleading, I'm ok with changing it too.

bq. line65, line70 line154, line193: should add the check {{LOG.isDebug()}} before invoking

bq. line152: the running flag {{isRunning}} doesn't set to false when shutting down lease
Thanks for the catch, fixed.

bq. Why not use ScheduledExecutorService and make this as a periodical task?
Periodic execution will not help us here.
Consider the following cases:
1. Service 'A' wants to use LeaseManager with timeout of 60 seconds
2. Service 'B' wants to use LeaseManager with timeout of 10 minutes
We can't decide a proper interval which can suit for all the cases. We can add a parameter
in LeaseManager constructor to get lease check interval, but this will make the API complex
for someone who is using it. Using ScheduledExecutorService will also bring in the complexity
of two Threads executing {{LeaseMonitor#run}}, one is executed whenever a lease is expired
and the other will be the periodic task. Also with ScheduledExecutorService we will be unnecessarily
executing the monitor periodically even if LeaseManager is started and never used at all i.e.
no lease is obtained.

> Ozone: Add a Lease Manager to SCM
> ---------------------------------
>                 Key: HDFS-12519
>                 URL: https://issues.apache.org/jira/browse/HDFS-12519
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>            Reporter: Anu Engineer
>            Assignee: Nandakumar
>              Labels: OzonePostMerge
>         Attachments: HDFS-12519-HDFS-7240.000.patch, HDFS-12519-HDFS-7240.001.patch
> Many objects, including Containers and pipelines can time out during creating process.
We need a way to track these timeouts. This lease Manager allows SCM to hold a lease on these
objects and helps SCM timeout waiting for creating of these objects.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org

View raw message