[jira] [Commented] (HBASE-15292) Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction

2016-05-27 Thread Hudson (JIRA)

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

Hudson commented on HBASE-15292:


FAILURE: Integrated in HBase-0.98-matrix #348 (See 
[https://builds.apache.org/job/HBase-0.98-matrix/348/])
HBASE-15292 Refined ZooKeeperWatcher to prevent ZooKeeper's callback (apurtell: 
rev c7445edd627bee2ad822691de9475b0ce0264a87)
* 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/InstancePending.java
* 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/PendingWatcher.java
* 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
* 
hbase-client/src/test/java/org/apache/hadoop/hbase/zookeeper/TestInstancePending.java


> Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction
> ---
>
> Key: HBASE-15292
> URL: https://issues.apache.org/jira/browse/HBASE-15292
> Project: HBase
>  Issue Type: Bug
>  Components: Zookeeper
>Reporter: Hiroshi Ikeda
>Assignee: Hiroshi Ikeda
>Priority: Minor
> Fix For: 2.0.0, 1.3.0, 1.4.0, 0.98.20
>
> Attachments: HBASE-15292-V2.patch, HBASE-15292-V3.patch, 
> HBASE-15292-V4.patch, HBASE-15292-V5.patch, HBASE-15292.patch
>
>
> The existing code is not just messy but also contains a subtle bug of 
> visibility due to missing synchronization between threads.
> The root of the evil is that ZooKeeper uses a silly anti-pattern, starting a 
> thread within its constructor, and in practice all the developers are not 
> allowed to use ZooKeeper correctly without tedious code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-15292) Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction

2016-05-27 Thread Hudson (JIRA)

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

Hudson commented on HBASE-15292:


FAILURE: Integrated in HBase-0.98-on-Hadoop-1.1 #1220 (See 
[https://builds.apache.org/job/HBase-0.98-on-Hadoop-1.1/1220/])
HBASE-15292 Refined ZooKeeperWatcher to prevent ZooKeeper's callback (apurtell: 
rev c7445edd627bee2ad822691de9475b0ce0264a87)
* 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/PendingWatcher.java
* 
hbase-client/src/test/java/org/apache/hadoop/hbase/zookeeper/TestInstancePending.java
* 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
* 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/InstancePending.java


> Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction
> ---
>
> Key: HBASE-15292
> URL: https://issues.apache.org/jira/browse/HBASE-15292
> Project: HBase
>  Issue Type: Bug
>  Components: Zookeeper
>Reporter: Hiroshi Ikeda
>Assignee: Hiroshi Ikeda
>Priority: Minor
> Fix For: 2.0.0, 1.3.0, 1.4.0, 0.98.20
>
> Attachments: HBASE-15292-V2.patch, HBASE-15292-V3.patch, 
> HBASE-15292-V4.patch, HBASE-15292-V5.patch, HBASE-15292.patch
>
>
> The existing code is not just messy but also contains a subtle bug of 
> visibility due to missing synchronization between threads.
> The root of the evil is that ZooKeeper uses a silly anti-pattern, starting a 
> thread within its constructor, and in practice all the developers are not 
> allowed to use ZooKeeper correctly without tedious code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-15292) Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction

2016-05-15 Thread Hiroshi Ikeda (JIRA)

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

Hiroshi Ikeda commented on HBASE-15292:
---

NVM, that's wrong; Setting these parameters happens before starting the event 
thread.

> Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction
> ---
>
> Key: HBASE-15292
> URL: https://issues.apache.org/jira/browse/HBASE-15292
> Project: HBase
>  Issue Type: Bug
>  Components: Zookeeper
>Reporter: Hiroshi Ikeda
>Assignee: Hiroshi Ikeda
>Priority: Minor
> Fix For: 2.0.0, 1.3.0, 1.4.0
>
> Attachments: HBASE-15292-V2.patch, HBASE-15292-V3.patch, 
> HBASE-15292-V4.patch, HBASE-15292-V5.patch, HBASE-15292.patch
>
>
> The existing code is not just messy but also contains a subtle bug of 
> visibility due to missing synchronization between threads.
> The root of the evil is that ZooKeeper uses a silly anti-pattern, starting a 
> thread within its constructor, and in practice all the developers are not 
> allowed to use ZooKeeper correctly without tedious code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-15292) Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction

2016-05-09 Thread Hiroshi Ikeda (JIRA)

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

Hiroshi Ikeda commented on HBASE-15292:
---

FYI It is already fixed by this patch but I just noticed that, it was more 
dangerous than what I thought. ZooKeeperWatcher sets many fields (which are 
effectively final) while constructing, and the variables had possibility not to 
be seen to other threads when the reference to the RecoverableZooKeeper 
instance is seen without synchronization.

> Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction
> ---
>
> Key: HBASE-15292
> URL: https://issues.apache.org/jira/browse/HBASE-15292
> Project: HBase
>  Issue Type: Bug
>  Components: Zookeeper
>Reporter: Hiroshi Ikeda
>Assignee: Hiroshi Ikeda
>Priority: Minor
> Fix For: 2.0.0, 1.3.0, 1.4.0
>
> Attachments: HBASE-15292-V2.patch, HBASE-15292-V3.patch, 
> HBASE-15292-V4.patch, HBASE-15292-V5.patch, HBASE-15292.patch
>
>
> The existing code is not just messy but also contains a subtle bug of 
> visibility due to missing synchronization between threads.
> The root of the evil is that ZooKeeper uses a silly anti-pattern, starting a 
> thread within its constructor, and in practice all the developers are not 
> allowed to use ZooKeeper correctly without tedious code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-15292) Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction

2016-05-05 Thread Hudson (JIRA)

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

Hudson commented on HBASE-15292:


FAILURE: Integrated in HBase-1.3 #687 (See 
[https://builds.apache.org/job/HBase-1.3/687/])
HBASE-15292 Refined ZooKeeperWatcher to prevent ZooKeeper's callback (tedyu: 
rev 6844474a122739f2cf42553280687bbef9bcd24a)
* 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/InstancePending.java
* 
hbase-client/src/test/java/org/apache/hadoop/hbase/zookeeper/TestInstancePending.java
* 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
* 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/PendingWatcher.java


> Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction
> ---
>
> Key: HBASE-15292
> URL: https://issues.apache.org/jira/browse/HBASE-15292
> Project: HBase
>  Issue Type: Bug
>  Components: Zookeeper
>Reporter: Hiroshi Ikeda
>Assignee: Hiroshi Ikeda
>Priority: Minor
> Fix For: 2.0.0, 1.3.0, 1.4.0
>
> Attachments: HBASE-15292-V2.patch, HBASE-15292-V3.patch, 
> HBASE-15292-V4.patch, HBASE-15292-V5.patch, HBASE-15292.patch
>
>
> The existing code is not just messy but also contains a subtle bug of 
> visibility due to missing synchronization between threads.
> The root of the evil is that ZooKeeper uses a silly anti-pattern, starting a 
> thread within its constructor, and in practice all the developers are not 
> allowed to use ZooKeeper correctly without tedious code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-15292) Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction

2016-05-05 Thread Hudson (JIRA)

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

Hudson commented on HBASE-15292:


FAILURE: Integrated in HBase-1.3-IT #650 (See 
[https://builds.apache.org/job/HBase-1.3-IT/650/])
HBASE-15292 Refined ZooKeeperWatcher to prevent ZooKeeper's callback (tedyu: 
rev 6844474a122739f2cf42553280687bbef9bcd24a)
* 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
* 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/InstancePending.java
* 
hbase-client/src/test/java/org/apache/hadoop/hbase/zookeeper/TestInstancePending.java
* 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/PendingWatcher.java


> Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction
> ---
>
> Key: HBASE-15292
> URL: https://issues.apache.org/jira/browse/HBASE-15292
> Project: HBase
>  Issue Type: Bug
>  Components: Zookeeper
>Reporter: Hiroshi Ikeda
>Assignee: Hiroshi Ikeda
>Priority: Minor
> Fix For: 2.0.0, 1.3.0, 1.4.0
>
> Attachments: HBASE-15292-V2.patch, HBASE-15292-V3.patch, 
> HBASE-15292-V4.patch, HBASE-15292-V5.patch, HBASE-15292.patch
>
>
> The existing code is not just messy but also contains a subtle bug of 
> visibility due to missing synchronization between threads.
> The root of the evil is that ZooKeeper uses a silly anti-pattern, starting a 
> thread within its constructor, and in practice all the developers are not 
> allowed to use ZooKeeper correctly without tedious code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-15292) Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction

2016-05-05 Thread Hudson (JIRA)

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

Hudson commented on HBASE-15292:


FAILURE: Integrated in HBase-1.4 #139 (See 
[https://builds.apache.org/job/HBase-1.4/139/])
HBASE-15292 Refined ZooKeeperWatcher to prevent ZooKeeper's callback (tedyu: 
rev 09d451b1db0a38155d61d9e900a8f1b1885d6153)
* 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
* 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/InstancePending.java
* 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/PendingWatcher.java
* 
hbase-client/src/test/java/org/apache/hadoop/hbase/zookeeper/TestInstancePending.java


> Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction
> ---
>
> Key: HBASE-15292
> URL: https://issues.apache.org/jira/browse/HBASE-15292
> Project: HBase
>  Issue Type: Bug
>  Components: Zookeeper
>Reporter: Hiroshi Ikeda
>Assignee: Hiroshi Ikeda
>Priority: Minor
> Fix For: 2.0.0, 1.3.0, 1.4.0
>
> Attachments: HBASE-15292-V2.patch, HBASE-15292-V3.patch, 
> HBASE-15292-V4.patch, HBASE-15292-V5.patch, HBASE-15292.patch
>
>
> The existing code is not just messy but also contains a subtle bug of 
> visibility due to missing synchronization between threads.
> The root of the evil is that ZooKeeper uses a silly anti-pattern, starting a 
> thread within its constructor, and in practice all the developers are not 
> allowed to use ZooKeeper correctly without tedious code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-15292) Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction

2016-05-05 Thread Hudson (JIRA)

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

Hudson commented on HBASE-15292:


FAILURE: Integrated in HBase-Trunk_matrix #896 (See 
[https://builds.apache.org/job/HBase-Trunk_matrix/896/])
HBASE-15292 Refined ZooKeeperWatcher to prevent ZooKeeper's callback (tedyu: 
rev 8b0ce77942e99751394cc23a40436d9f20d4254c)
* 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/InstancePending.java
* 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/PendingWatcher.java
* 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
* 
hbase-client/src/test/java/org/apache/hadoop/hbase/zookeeper/TestInstancePending.java


> Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction
> ---
>
> Key: HBASE-15292
> URL: https://issues.apache.org/jira/browse/HBASE-15292
> Project: HBase
>  Issue Type: Bug
>  Components: Zookeeper
>Reporter: Hiroshi Ikeda
>Assignee: Hiroshi Ikeda
>Priority: Minor
> Fix For: 2.0.0, 1.3.0, 1.4.0
>
> Attachments: HBASE-15292-V2.patch, HBASE-15292-V3.patch, 
> HBASE-15292-V4.patch, HBASE-15292-V5.patch, HBASE-15292.patch
>
>
> The existing code is not just messy but also contains a subtle bug of 
> visibility due to missing synchronization between threads.
> The root of the evil is that ZooKeeper uses a silly anti-pattern, starting a 
> thread within its constructor, and in practice all the developers are not 
> allowed to use ZooKeeper correctly without tedious code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-15292) Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction

2016-04-14 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HBASE-15292:
---

| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:green}+1{color} | {color:green} hbaseanti {color} | {color:green} 0m 
0s {color} | {color:green} Patch does not have any anti-patterns. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s 
{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green} 0m 
0s {color} | {color:green} The patch appears to include 1 new or modified test 
files. {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 3m 
6s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 27s 
{color} | {color:green} master passed with JDK v1.8.0 {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 16s 
{color} | {color:green} master passed with JDK v1.7.0_79 {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 2m 
7s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 
9s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 0m 
56s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 26s 
{color} | {color:green} master passed with JDK v1.8.0 {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 18s 
{color} | {color:green} master passed with JDK v1.7.0_79 {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 0m 
18s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 18s 
{color} | {color:green} the patch passed with JDK v1.8.0 {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 18s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 16s 
{color} | {color:green} the patch passed with JDK v1.7.0_79 {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 16s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 2m 
2s {color} | {color:green} hbase-client: patch generated 0 new + 40 unchanged - 
1 fixed = 40 total (was 41) {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 
11s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 
0s {color} | {color:green} Patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} hadoopcheck {color} | {color:green} 
28m 8s {color} | {color:green} Patch does not cause any errors with Hadoop 
2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.6.1 2.6.2 2.6.3 2.7.1. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 1m 
24s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 28s 
{color} | {color:green} the patch passed with JDK v1.8.0 {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 19s 
{color} | {color:green} the patch passed with JDK v1.7.0_79 {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 0m 57s 
{color} | {color:green} hbase-client in the patch passed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 
8s {color} | {color:green} Patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 42m 39s {color} 
| {color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12798899/HBASE-15292-V5.patch |
| JIRA Issue | HBASE-15292 |
| Optional Tests |  asflicense  javac  javadoc  unit  findbugs  hadoopcheck  
hbaseanti  checkstyle  compile  |
| uname | Linux asf901.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP 
PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build@2/component/dev-support/hbase-personality.sh
 |
| git revision | master / 7efb9ed |
| Default Java | 1.7.0_79 |
| Multi-JDK versions |  /home/jenkins/tools/java/jdk1.8.0:1.8.0 
/usr/local/jenkins/java/jdk1.7.0_79:1.7.0_79 |
| findbugs | v3.0.0 |
|  Test Results | 
https://builds.apache

[jira] [Commented] (HBASE-15292) Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction

2016-04-12 Thread Ted Yu (JIRA)

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

Ted Yu commented on HBASE-15292:


Fine to keep the current form.

> Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction
> ---
>
> Key: HBASE-15292
> URL: https://issues.apache.org/jira/browse/HBASE-15292
> Project: HBase
>  Issue Type: Bug
>  Components: Zookeeper
>Reporter: Hiroshi Ikeda
>Assignee: Hiroshi Ikeda
>Priority: Minor
> Attachments: HBASE-15292-V2.patch, HBASE-15292-V3.patch, 
> HBASE-15292-V4.patch, HBASE-15292.patch
>
>
> The existing code is not just messy but also contains a subtle bug of 
> visibility due to missing synchronization between threads.
> The root of the evil is that ZooKeeper uses a silly anti-pattern, starting a 
> thread within its constructor, and in practice all the developers are not 
> allowed to use ZooKeeper correctly without tedious code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-15292) Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction

2016-04-08 Thread Hiroshi Ikeda (JIRA)

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

Hiroshi Ikeda commented on HBASE-15292:
---

{quote}
Actually can PendingWatcher be omitted ?
{quote}
If you means embedding an anonymous class instead PendingWatcher, I think the 
code becomes a little messy, doesn't it?

> Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction
> ---
>
> Key: HBASE-15292
> URL: https://issues.apache.org/jira/browse/HBASE-15292
> Project: HBase
>  Issue Type: Bug
>  Components: Zookeeper
>Reporter: Hiroshi Ikeda
>Assignee: Hiroshi Ikeda
>Priority: Minor
> Attachments: HBASE-15292-V2.patch, HBASE-15292-V3.patch, 
> HBASE-15292-V4.patch, HBASE-15292.patch
>
>
> The existing code is not just messy but also contains a subtle bug of 
> visibility due to missing synchronization between threads.
> The root of the evil is that ZooKeeper uses a silly anti-pattern, starting a 
> thread within its constructor, and in practice all the developers are not 
> allowed to use ZooKeeper correctly without tedious code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-15292) Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction

2016-04-08 Thread Hiroshi Ikeda (JIRA)

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

Hiroshi Ikeda commented on HBASE-15292:
---

{quote}
Add javadoc and audience annotation to the class.
{quote}
Audience annotations are for public classes, as their documentation. Non-public 
classes cannot be API and cannot break compatibility.
Javadoc might be useful so I'll try next week :)

{quote}
Call to Thread.currentThread().interrupt() can be performed inside the catch 
block - this would save variable interrupted.
{quote}
That is required to postpone the interruption at pendingLatch.await() inside 
the catch block, otherwise that method doesn't wait.

{quote}
One way of calming findbugs is to use (instanceHolder != null) as condition for 
the while loop.
{quote}
I'll try it :)

{quote}
Actually can PendingWatcher be omitted ?
InstancePending is generic and the two methods PendingWatcher overrides are 
one-liner.
{quote}
The thread safety of InstancePending is based on a subtle part of the Java 
Language Specification, in order to avoid slight overhead of synchronization. 
That is tricky and will be easily broken when someone edits, and it is better 
to encapsulate the concern into an independent class.

{quote}
After the change, "hbase.zookeeper.watcher.sync.connected.wait" is dropped.
Should the loop in InstancePending#get() be passed a timeout so that the above 
config is still respected ?
{quote}
No. PendingWathcer.prepare is expected to call immediately after its 
instantiation.
Moreover, the name of the property is wrong in actual fact; The existing code 
sleeps until just sharing the data without synchronization (and to make matters 
worse, sophisticated VM implementations might optimize and replace the variable 
references to null forever).


> Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction
> ---
>
> Key: HBASE-15292
> URL: https://issues.apache.org/jira/browse/HBASE-15292
> Project: HBase
>  Issue Type: Bug
>  Components: Zookeeper
>Reporter: Hiroshi Ikeda
>Assignee: Hiroshi Ikeda
>Priority: Minor
> Attachments: HBASE-15292-V2.patch, HBASE-15292-V3.patch, 
> HBASE-15292-V4.patch, HBASE-15292.patch
>
>
> The existing code is not just messy but also contains a subtle bug of 
> visibility due to missing synchronization between threads.
> The root of the evil is that ZooKeeper uses a silly anti-pattern, starting a 
> thread within its constructor, and in practice all the developers are not 
> allowed to use ZooKeeper correctly without tedious code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-15292) Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction

2016-04-06 Thread Ted Yu (JIRA)

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

Ted Yu commented on HBASE-15292:


{code}
+class InstancePending {
{code}
Add javadoc and audience annotation to the class.
{code}
+  if (interrupted) {
+Thread.currentThread().interrupt();
{code}
Call to Thread.currentThread().interrupt() can be performed inside the catch 
block - this would save variable interrupted.
{code}
+  instanceHolder = this.instanceHolder;
+  assert instanceHolder != null;
{code}
One way of calming findbugs is to use (instanceHolder != null) as condition for 
the while loop.
{code}
+class PendingWatcher implements Watcher {
{code}
Add javadoc and audience annotation to the class.
Actually can PendingWatcher be omitted ?
InstancePending is generic and the two methods PendingWatcher overrides are 
one-liner.

After the change, "hbase.zookeeper.watcher.sync.connected.wait" is dropped.
Should the loop in InstancePending#get() be passed a timeout so that the above 
config is still respected ?

> Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction
> ---
>
> Key: HBASE-15292
> URL: https://issues.apache.org/jira/browse/HBASE-15292
> Project: HBase
>  Issue Type: Bug
>  Components: Zookeeper
>Reporter: Hiroshi Ikeda
>Assignee: Hiroshi Ikeda
>Priority: Minor
> Attachments: HBASE-15292-V2.patch, HBASE-15292-V3.patch, 
> HBASE-15292-V4.patch, HBASE-15292.patch
>
>
> The existing code is not just messy but also contains a subtle bug of 
> visibility due to missing synchronization between threads.
> The root of the evil is that ZooKeeper uses a silly anti-pattern, starting a 
> thread within its constructor, and in practice all the developers are not 
> allowed to use ZooKeeper correctly without tedious code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-15292) Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction

2016-02-21 Thread Hiroshi Ikeda (JIRA)

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

Hiroshi Ikeda commented on HBASE-15292:
---

FindBugs has denied my assertion itself straight on. When did he become so 
something? :(

> Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction
> ---
>
> Key: HBASE-15292
> URL: https://issues.apache.org/jira/browse/HBASE-15292
> Project: HBase
>  Issue Type: Bug
>  Components: Zookeeper
>Reporter: Hiroshi Ikeda
>Assignee: Hiroshi Ikeda
>Priority: Minor
> Attachments: HBASE-15292-V2.patch, HBASE-15292-V3.patch, 
> HBASE-15292-V4.patch, HBASE-15292.patch
>
>
> The existing code is not just messy but also contains a subtle bug of 
> visibility due to missing synchronization between threads.
> The root of the evil is that ZooKeeper uses a silly anti-pattern, starting a 
> thread within its constructor, and in practice all the developers are not 
> allowed to use ZooKeeper correctly without tedious code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-15292) Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction

2016-02-21 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HBASE-15292:
---

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 0s 
{color} | {color:blue} Docker mode activated. {color} |
| {color:green}+1{color} | {color:green} hbaseanti {color} | {color:green} 0m 
0s {color} | {color:green} Patch does not have any anti-patterns. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s 
{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green} 0m 
0s {color} | {color:green} The patch appears to include 1 new or modified test 
files. {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 3m 
5s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 21s 
{color} | {color:green} master passed with JDK v1.8.0_72 {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 19s 
{color} | {color:green} master passed with JDK v1.7.0_95 {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 1m 
58s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 
11s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 1m 
13s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 25s 
{color} | {color:green} master passed with JDK v1.8.0_72 {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 21s 
{color} | {color:green} master passed with JDK v1.7.0_95 {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 0m 
20s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 23s 
{color} | {color:green} the patch passed with JDK v1.8.0_72 {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 23s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 19s 
{color} | {color:green} the patch passed with JDK v1.7.0_95 {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 19s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 1m 
51s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 
12s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 
0s {color} | {color:green} Patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} hadoopcheck {color} | {color:green} 
27m 9s {color} | {color:green} Patch does not cause any errors with Hadoop 
2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.6.1 2.6.2 2.6.3 2.7.1. {color} |
| {color:red}-1{color} | {color:red} findbugs {color} | {color:red} 1m 22s 
{color} | {color:red} hbase-client introduced 1 new FindBugs issues. {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 24s 
{color} | {color:green} the patch passed with JDK v1.8.0_72 {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 23s 
{color} | {color:green} the patch passed with JDK v1.7.0_95 {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 1m 12s 
{color} | {color:green} hbase-client in the patch passed with JDK v1.8.0_72. 
{color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 0m 59s 
{color} | {color:green} hbase-client in the patch passed with JDK v1.7.0_95. 
{color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 
8s {color} | {color:green} Patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 43m 0s {color} | 
{color:black} {color} |
\\
\\
|| Reason || Tests ||
| FindBugs | module:hbase-client |
|  |  Load of known null value in 
org.apache.hadoop.hbase.zookeeper.InstancePending.get()  At 
InstancePending.java:in org.apache.hadoop.hbase.zookeeper.InstancePending.get() 
 At InstancePending.java:[line 55] |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=1.9.1 Server=1.9.1 Image:yetus/hbase:date2016-02-22 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12788953/HBASE-15292-V4.patch |
| JIRA Issue | HBASE-15292 |
| Optional

[jira] [Commented] (HBASE-15292) Refined ZooKeeperWatcher to prevent ZooKeeper's callback while construction

2016-02-21 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HBASE-15292:
---

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 0s 
{color} | {color:blue} Docker mode activated. {color} |
| {color:green}+1{color} | {color:green} hbaseanti {color} | {color:green} 0m 
0s {color} | {color:green} Patch does not have any anti-patterns. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s 
{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green} 0m 
0s {color} | {color:green} The patch appears to include 1 new or modified test 
files. {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 3m 
47s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 19s 
{color} | {color:green} master passed with JDK v1.8.0_72 {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 19s 
{color} | {color:green} master passed with JDK v1.7.0_95 {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 2m 
11s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 
12s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 1m 7s 
{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 21s 
{color} | {color:green} master passed with JDK v1.8.0_72 {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 22s 
{color} | {color:green} master passed with JDK v1.7.0_95 {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 0m 
21s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 18s 
{color} | {color:green} the patch passed with JDK v1.8.0_72 {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 18s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 19s 
{color} | {color:green} the patch passed with JDK v1.7.0_95 {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 19s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 2m 
9s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 
12s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 
0s {color} | {color:green} Patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} hadoopcheck {color} | {color:green} 
28m 28s {color} | {color:green} Patch does not cause any errors with Hadoop 
2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.6.1 2.6.2 2.6.3 2.7.1. {color} |
| {color:red}-1{color} | {color:red} findbugs {color} | {color:red} 1m 19s 
{color} | {color:red} hbase-client introduced 1 new FindBugs issues. {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 19s 
{color} | {color:green} the patch passed with JDK v1.8.0_72 {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 22s 
{color} | {color:green} the patch passed with JDK v1.7.0_95 {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 0m 57s 
{color} | {color:green} hbase-client in the patch passed with JDK v1.8.0_72. 
{color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 1m 3s 
{color} | {color:green} hbase-client in the patch passed with JDK v1.7.0_95. 
{color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 
9s {color} | {color:green} Patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 58m 44s {color} 
| {color:black} {color} |
\\
\\
|| Reason || Tests ||
| FindBugs | module:hbase-client |
|  |  Possible null pointer dereference of instanceHolder in 
org.apache.hadoop.hbase.zookeeper.InstancePending.get()  Dereferenced at 
InstancePending.java:instanceHolder in 
org.apache.hadoop.hbase.zookeeper.InstancePending.get()  Dereferenced at 
InstancePending.java:[line 56] |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=1.9.1 Server=1.9.1 Image:yetus/hbase:date2016-02-22 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12