hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yiqun Lin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-12519) Ozone: Add a Lease Manager to SCM
Date Tue, 10 Oct 2017 05:40:02 GMT

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

Yiqun Lin commented on HDFS-12519:

[~nandakumar131], thanks for your patient explanation. I have some wrong understanding of
 LOG.isDebug(). Thanks for correcting me. The  new change of {{LOG.isDebugEnabled()}} looks
good to me.

bq. I agree on this point, but even if we remove the timeout option while acquiring lease
we will be stuck with the same problem. Lets assume we are running lease monitor in fixed
interval of time
Makes sense to me, I agree on this and scenario you mentioned.

One comment for your latest patch,  As you also mentioned, finally part in {{LeaseMonitor#run}}
can be removed as it's already running inside while loop. line {{leaseMonitorThread.interrupt();}}
in acquire method is still needed?
+  public synchronized Lease<T> acquire(T resource, long timeout)
+      throws LeaseAlreadyExistException {
+    checkStatus();
+    if(LOG.isDebugEnabled()) {
+      LOG.debug("Acquiring lease on {} for {} milliseconds", resource, timeout);
+    }
+    if(activeLeases.containsKey(resource)) {
+      throw new LeaseAlreadyExistException("Resource: " + resource);
+    }
+    Lease<T> lease = new Lease<>(resource, timeout);
+    activeLeases.put(resource, lease);
+    leaseMonitorThread.interrupt();   <=========
+    return lease;
+  }

> 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