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

Hudson commented on HBASE-10516:
--------------------------------

SUCCESS: Integrated in HBase-TRUNK #4940 (See 
[https://builds.apache.org/job/HBase-TRUNK/4940/])
HBASE-10516 Refactor code where Threads.sleep is called within a while/for loop 
(Feng Honghua) (nkeywal: rev 1570524)
* 
/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
* 
/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java
* 
/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
* 
/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DeleteTableHandler.java
* 
/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
* 
/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
* 
/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManager.java


> Refactor code where Threads.sleep is called within a while/for loop
> -------------------------------------------------------------------
>
>                 Key: HBASE-10516
>                 URL: https://issues.apache.org/jira/browse/HBASE-10516
>             Project: HBase
>          Issue Type: Bug
>          Components: Client, master, regionserver
>    Affects Versions: 0.98.0, 0.99.0
>            Reporter: Feng Honghua
>            Assignee: Feng Honghua
>             Fix For: 0.99.0
>
>         Attachments: HBASE-10516-trunk_v1.patch, HBASE-10516-trunk_v2.patch, 
> HBASE-10516-trunk_v3.patch
>
>
> Threads.sleep implementation:
> {code}
>  public static void sleep(long millis) {
>     try {
>       Thread.sleep(millis);
>     } catch (InterruptedException e) {
>       e.printStackTrace();
>       Thread.currentThread().interrupt();
>     }
>   }
> {code}
> From above implementation, the current thread's interrupt status is 
> restored/reset when InterruptedException is caught and handled. If this 
> method is called within a while/for loop, if a first InterruptedException is 
> thrown during sleep, it will make the Threads.sleep in next loop immediately 
> throw InterruptedException without expected sleep. This behavior breaks the 
> intention for independent sleep in each loop
> I mentioned above in HBASE-10497 and this jira is created to handle it 
> separately per [~nkeywal]'s suggestion



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to