[
https://issues.apache.org/jira/browse/HBASE-12785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14262471#comment-14262471
]
Sean Busbey commented on HBASE-12785:
-------------------------------------
hurm. meant for the timeout bit ot have a log message. :/
{code}
+ executor.execute(futureTask);
+ FSDataOutputStream stream = null;
try {
<snip>
+ stream = futureTask.get(30, TimeUnit.SECONDS);
+ } catch (TimeoutException exception) {
+ LOG.warn("Timed out while attempting to open lock file.");
+ executor.shutdownNow();
{code}
> Use FutureTask to timeout the attempt to get the lock for hbck
> --------------------------------------------------------------
>
> Key: HBASE-12785
> URL: https://issues.apache.org/jira/browse/HBASE-12785
> Project: HBase
> Issue Type: Task
> Reporter: Ted Yu
> Assignee: Ted Yu
> Priority: Minor
> Attachments: 12785-001.patch
>
>
> In reviewing HBASE-12607, Sean pointed out:
> It would be nice if we used a
> [FutureTask|http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/FutureTask.html]
> to timeout the attempt to get the lock rather than wait the whole period and
> then fail.
> This issue is to address Sean's review comment.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)