You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "nkeywal (Created) (JIRA)" <ji...@apache.org> on 2011/12/07 17:16:41 UTC
[jira] [Created] (HBASE-4973) On failure, HBaseAdmin sleeps one
time too many
On failure, HBaseAdmin sleeps one time too many
-----------------------------------------------
Key: HBASE-4973
URL: https://issues.apache.org/jira/browse/HBASE-4973
Project: HBase
Issue Type: Improvement
Components: client
Affects Versions: 0.94.0
Reporter: nkeywal
Assignee: nkeywal
Priority: Minor
In this code last sleep is useless as we're not retrying. This can slow down failure scenarios by a few seconds (up to 32 second).
{noformat}
public HBaseAdmin(Configuration c)
throws MasterNotRunningException, ZooKeeperConnectionException {
this.conf = HBaseConfiguration.create(c);
this.connection = HConnectionManager.getConnection(this.conf);
this.pause = this.conf.getLong("hbase.client.pause", 1000);
this.numRetries = this.conf.getInt("hbase.client.retries.number", 10);
this.retryLongerMultiplier = this.conf.getInt(
"hbase.client.retries.longer.multiplier", 10);
int tries = 0;
for (; tries < numRetries; ++tries) {
try {
this.connection.getMaster();
break;
} catch (MasterNotRunningException mnre) {
HConnectionManager.deleteStaleConnection(this.connection);
this.connection = HConnectionManager.getConnection(this.conf);
} catch (UndeclaredThrowableException ute) {
HConnectionManager.deleteStaleConnection(this.connection);
this.connection = HConnectionManager.getConnection(this.conf);
}
try { // Sleep
Thread.sleep(getPauseTime(tries));
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
// we should delete connection between client and zookeeper
HConnectionManager.deleteStaleConnection(this.connection);
throw new MasterNotRunningException("Interrupted");
}
}
if (tries >= numRetries) {
// we should delete connection between client and zookeeper
HConnectionManager.deleteStaleConnection(this.connection);
throw new MasterNotRunningException("Retried " + numRetries + " times");
}
}
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-4973) On failure, HBaseAdmin sleeps one
time too many
Posted by "nkeywal (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4973?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
nkeywal updated HBASE-4973:
---------------------------
Status: Patch Available (was: Open)
> On failure, HBaseAdmin sleeps one time too many
> -----------------------------------------------
>
> Key: HBASE-4973
> URL: https://issues.apache.org/jira/browse/HBASE-4973
> Project: HBase
> Issue Type: Improvement
> Components: client
> Affects Versions: 0.94.0
> Reporter: nkeywal
> Assignee: nkeywal
> Priority: Minor
> Attachments: 4973_HBaseAdmin.patch
>
>
> In this code last sleep is useless as we're not retrying. This can slow down failure scenarios by a few seconds (up to 32 second).
> {noformat}
> public HBaseAdmin(Configuration c)
> throws MasterNotRunningException, ZooKeeperConnectionException {
> this.conf = HBaseConfiguration.create(c);
> this.connection = HConnectionManager.getConnection(this.conf);
> this.pause = this.conf.getLong("hbase.client.pause", 1000);
> this.numRetries = this.conf.getInt("hbase.client.retries.number", 10);
> this.retryLongerMultiplier = this.conf.getInt(
> "hbase.client.retries.longer.multiplier", 10);
> int tries = 0;
> for (; tries < numRetries; ++tries) {
> try {
> this.connection.getMaster();
> break;
> } catch (MasterNotRunningException mnre) {
> HConnectionManager.deleteStaleConnection(this.connection);
> this.connection = HConnectionManager.getConnection(this.conf);
> } catch (UndeclaredThrowableException ute) {
> HConnectionManager.deleteStaleConnection(this.connection);
> this.connection = HConnectionManager.getConnection(this.conf);
> }
> try { // Sleep
> Thread.sleep(getPauseTime(tries));
> } catch (InterruptedException e) {
> Thread.currentThread().interrupt();
> // we should delete connection between client and zookeeper
> HConnectionManager.deleteStaleConnection(this.connection);
> throw new MasterNotRunningException("Interrupted");
> }
> }
> if (tries >= numRetries) {
> // we should delete connection between client and zookeeper
> HConnectionManager.deleteStaleConnection(this.connection);
> throw new MasterNotRunningException("Retried " + numRetries + " times");
> }
> }
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4973) On failure, HBaseAdmin sleeps one
time too many
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166177#comment-13166177 ]
Hudson commented on HBASE-4973:
-------------------------------
Integrated in HBase-TRUNK-security #26 (See [https://builds.apache.org/job/HBase-TRUNK-security/26/])
HBASE-4973 On failure, HBaseAdmin sleeps one time too many
stack :
Files :
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
> On failure, HBaseAdmin sleeps one time too many
> -----------------------------------------------
>
> Key: HBASE-4973
> URL: https://issues.apache.org/jira/browse/HBASE-4973
> Project: HBase
> Issue Type: Improvement
> Components: client
> Affects Versions: 0.94.0
> Reporter: nkeywal
> Assignee: nkeywal
> Priority: Minor
> Fix For: 0.94.0
>
> Attachments: 4973_HBaseAdmin.patch
>
>
> In this code last sleep is useless as we're not retrying. This can slow down failure scenarios by a few seconds (up to 32 second).
> {noformat}
> public HBaseAdmin(Configuration c)
> throws MasterNotRunningException, ZooKeeperConnectionException {
> this.conf = HBaseConfiguration.create(c);
> this.connection = HConnectionManager.getConnection(this.conf);
> this.pause = this.conf.getLong("hbase.client.pause", 1000);
> this.numRetries = this.conf.getInt("hbase.client.retries.number", 10);
> this.retryLongerMultiplier = this.conf.getInt(
> "hbase.client.retries.longer.multiplier", 10);
> int tries = 0;
> for (; tries < numRetries; ++tries) {
> try {
> this.connection.getMaster();
> break;
> } catch (MasterNotRunningException mnre) {
> HConnectionManager.deleteStaleConnection(this.connection);
> this.connection = HConnectionManager.getConnection(this.conf);
> } catch (UndeclaredThrowableException ute) {
> HConnectionManager.deleteStaleConnection(this.connection);
> this.connection = HConnectionManager.getConnection(this.conf);
> }
> try { // Sleep
> Thread.sleep(getPauseTime(tries));
> } catch (InterruptedException e) {
> Thread.currentThread().interrupt();
> // we should delete connection between client and zookeeper
> HConnectionManager.deleteStaleConnection(this.connection);
> throw new MasterNotRunningException("Interrupted");
> }
> }
> if (tries >= numRetries) {
> // we should delete connection between client and zookeeper
> HConnectionManager.deleteStaleConnection(this.connection);
> throw new MasterNotRunningException("Retried " + numRetries + " times");
> }
> }
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-4973) On failure, HBaseAdmin sleeps one
time too many
Posted by "nkeywal (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4973?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
nkeywal updated HBASE-4973:
---------------------------
Attachment: 4973_HBaseAdmin.patch
> On failure, HBaseAdmin sleeps one time too many
> -----------------------------------------------
>
> Key: HBASE-4973
> URL: https://issues.apache.org/jira/browse/HBASE-4973
> Project: HBase
> Issue Type: Improvement
> Components: client
> Affects Versions: 0.94.0
> Reporter: nkeywal
> Assignee: nkeywal
> Priority: Minor
> Attachments: 4973_HBaseAdmin.patch
>
>
> In this code last sleep is useless as we're not retrying. This can slow down failure scenarios by a few seconds (up to 32 second).
> {noformat}
> public HBaseAdmin(Configuration c)
> throws MasterNotRunningException, ZooKeeperConnectionException {
> this.conf = HBaseConfiguration.create(c);
> this.connection = HConnectionManager.getConnection(this.conf);
> this.pause = this.conf.getLong("hbase.client.pause", 1000);
> this.numRetries = this.conf.getInt("hbase.client.retries.number", 10);
> this.retryLongerMultiplier = this.conf.getInt(
> "hbase.client.retries.longer.multiplier", 10);
> int tries = 0;
> for (; tries < numRetries; ++tries) {
> try {
> this.connection.getMaster();
> break;
> } catch (MasterNotRunningException mnre) {
> HConnectionManager.deleteStaleConnection(this.connection);
> this.connection = HConnectionManager.getConnection(this.conf);
> } catch (UndeclaredThrowableException ute) {
> HConnectionManager.deleteStaleConnection(this.connection);
> this.connection = HConnectionManager.getConnection(this.conf);
> }
> try { // Sleep
> Thread.sleep(getPauseTime(tries));
> } catch (InterruptedException e) {
> Thread.currentThread().interrupt();
> // we should delete connection between client and zookeeper
> HConnectionManager.deleteStaleConnection(this.connection);
> throw new MasterNotRunningException("Interrupted");
> }
> }
> if (tries >= numRetries) {
> // we should delete connection between client and zookeeper
> HConnectionManager.deleteStaleConnection(this.connection);
> throw new MasterNotRunningException("Retried " + numRetries + " times");
> }
> }
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4973) On failure, HBaseAdmin sleeps one
time too many
Posted by "Hadoop QA (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13164898#comment-13164898 ]
Hadoop QA commented on HBASE-4973:
----------------------------------
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12506544/4973_HBaseAdmin.patch
against trunk revision .
+1 @author. The patch does not contain any @author tags.
-1 tests included. The patch doesn't appear to include any new or modified tests.
Please justify why no new tests are needed for this patch.
Also please list what manual steps were performed to verify this patch.
-1 javadoc. The javadoc tool appears to have generated -160 warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
-1 findbugs. The patch appears to introduce 72 new Findbugs (version 1.3.9) warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
+1 core tests. The patch passed unit tests in .
Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/470//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/470//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/470//console
This message is automatically generated.
> On failure, HBaseAdmin sleeps one time too many
> -----------------------------------------------
>
> Key: HBASE-4973
> URL: https://issues.apache.org/jira/browse/HBASE-4973
> Project: HBase
> Issue Type: Improvement
> Components: client
> Affects Versions: 0.94.0
> Reporter: nkeywal
> Assignee: nkeywal
> Priority: Minor
> Attachments: 4973_HBaseAdmin.patch
>
>
> In this code last sleep is useless as we're not retrying. This can slow down failure scenarios by a few seconds (up to 32 second).
> {noformat}
> public HBaseAdmin(Configuration c)
> throws MasterNotRunningException, ZooKeeperConnectionException {
> this.conf = HBaseConfiguration.create(c);
> this.connection = HConnectionManager.getConnection(this.conf);
> this.pause = this.conf.getLong("hbase.client.pause", 1000);
> this.numRetries = this.conf.getInt("hbase.client.retries.number", 10);
> this.retryLongerMultiplier = this.conf.getInt(
> "hbase.client.retries.longer.multiplier", 10);
> int tries = 0;
> for (; tries < numRetries; ++tries) {
> try {
> this.connection.getMaster();
> break;
> } catch (MasterNotRunningException mnre) {
> HConnectionManager.deleteStaleConnection(this.connection);
> this.connection = HConnectionManager.getConnection(this.conf);
> } catch (UndeclaredThrowableException ute) {
> HConnectionManager.deleteStaleConnection(this.connection);
> this.connection = HConnectionManager.getConnection(this.conf);
> }
> try { // Sleep
> Thread.sleep(getPauseTime(tries));
> } catch (InterruptedException e) {
> Thread.currentThread().interrupt();
> // we should delete connection between client and zookeeper
> HConnectionManager.deleteStaleConnection(this.connection);
> throw new MasterNotRunningException("Interrupted");
> }
> }
> if (tries >= numRetries) {
> // we should delete connection between client and zookeeper
> HConnectionManager.deleteStaleConnection(this.connection);
> throw new MasterNotRunningException("Retried " + numRetries + " times");
> }
> }
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4973) On failure, HBaseAdmin sleeps one
time too many
Posted by "nkeywal (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13165246#comment-13165246 ]
nkeywal commented on HBASE-4973:
--------------------------------
I believe it can be committed.
> On failure, HBaseAdmin sleeps one time too many
> -----------------------------------------------
>
> Key: HBASE-4973
> URL: https://issues.apache.org/jira/browse/HBASE-4973
> Project: HBase
> Issue Type: Improvement
> Components: client
> Affects Versions: 0.94.0
> Reporter: nkeywal
> Assignee: nkeywal
> Priority: Minor
> Attachments: 4973_HBaseAdmin.patch
>
>
> In this code last sleep is useless as we're not retrying. This can slow down failure scenarios by a few seconds (up to 32 second).
> {noformat}
> public HBaseAdmin(Configuration c)
> throws MasterNotRunningException, ZooKeeperConnectionException {
> this.conf = HBaseConfiguration.create(c);
> this.connection = HConnectionManager.getConnection(this.conf);
> this.pause = this.conf.getLong("hbase.client.pause", 1000);
> this.numRetries = this.conf.getInt("hbase.client.retries.number", 10);
> this.retryLongerMultiplier = this.conf.getInt(
> "hbase.client.retries.longer.multiplier", 10);
> int tries = 0;
> for (; tries < numRetries; ++tries) {
> try {
> this.connection.getMaster();
> break;
> } catch (MasterNotRunningException mnre) {
> HConnectionManager.deleteStaleConnection(this.connection);
> this.connection = HConnectionManager.getConnection(this.conf);
> } catch (UndeclaredThrowableException ute) {
> HConnectionManager.deleteStaleConnection(this.connection);
> this.connection = HConnectionManager.getConnection(this.conf);
> }
> try { // Sleep
> Thread.sleep(getPauseTime(tries));
> } catch (InterruptedException e) {
> Thread.currentThread().interrupt();
> // we should delete connection between client and zookeeper
> HConnectionManager.deleteStaleConnection(this.connection);
> throw new MasterNotRunningException("Interrupted");
> }
> }
> if (tries >= numRetries) {
> // we should delete connection between client and zookeeper
> HConnectionManager.deleteStaleConnection(this.connection);
> throw new MasterNotRunningException("Retried " + numRetries + " times");
> }
> }
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4973) On failure, HBaseAdmin sleeps one
time too many
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13165975#comment-13165975 ]
Hudson commented on HBASE-4973:
-------------------------------
Integrated in HBase-TRUNK #2532 (See [https://builds.apache.org/job/HBase-TRUNK/2532/])
HBASE-4973 On failure, HBaseAdmin sleeps one time too many
stack :
Files :
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
> On failure, HBaseAdmin sleeps one time too many
> -----------------------------------------------
>
> Key: HBASE-4973
> URL: https://issues.apache.org/jira/browse/HBASE-4973
> Project: HBase
> Issue Type: Improvement
> Components: client
> Affects Versions: 0.94.0
> Reporter: nkeywal
> Assignee: nkeywal
> Priority: Minor
> Fix For: 0.94.0
>
> Attachments: 4973_HBaseAdmin.patch
>
>
> In this code last sleep is useless as we're not retrying. This can slow down failure scenarios by a few seconds (up to 32 second).
> {noformat}
> public HBaseAdmin(Configuration c)
> throws MasterNotRunningException, ZooKeeperConnectionException {
> this.conf = HBaseConfiguration.create(c);
> this.connection = HConnectionManager.getConnection(this.conf);
> this.pause = this.conf.getLong("hbase.client.pause", 1000);
> this.numRetries = this.conf.getInt("hbase.client.retries.number", 10);
> this.retryLongerMultiplier = this.conf.getInt(
> "hbase.client.retries.longer.multiplier", 10);
> int tries = 0;
> for (; tries < numRetries; ++tries) {
> try {
> this.connection.getMaster();
> break;
> } catch (MasterNotRunningException mnre) {
> HConnectionManager.deleteStaleConnection(this.connection);
> this.connection = HConnectionManager.getConnection(this.conf);
> } catch (UndeclaredThrowableException ute) {
> HConnectionManager.deleteStaleConnection(this.connection);
> this.connection = HConnectionManager.getConnection(this.conf);
> }
> try { // Sleep
> Thread.sleep(getPauseTime(tries));
> } catch (InterruptedException e) {
> Thread.currentThread().interrupt();
> // we should delete connection between client and zookeeper
> HConnectionManager.deleteStaleConnection(this.connection);
> throw new MasterNotRunningException("Interrupted");
> }
> }
> if (tries >= numRetries) {
> // we should delete connection between client and zookeeper
> HConnectionManager.deleteStaleConnection(this.connection);
> throw new MasterNotRunningException("Retried " + numRetries + " times");
> }
> }
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-4973) On failure, HBaseAdmin sleeps one
time too many
Posted by "stack (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4973?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
stack updated HBASE-4973:
-------------------------
Resolution: Fixed
Fix Version/s: 0.94.0
Hadoop Flags: Reviewed
Status: Resolved (was: Patch Available)
Committed TRUNK. Thanks for patch N.
> On failure, HBaseAdmin sleeps one time too many
> -----------------------------------------------
>
> Key: HBASE-4973
> URL: https://issues.apache.org/jira/browse/HBASE-4973
> Project: HBase
> Issue Type: Improvement
> Components: client
> Affects Versions: 0.94.0
> Reporter: nkeywal
> Assignee: nkeywal
> Priority: Minor
> Fix For: 0.94.0
>
> Attachments: 4973_HBaseAdmin.patch
>
>
> In this code last sleep is useless as we're not retrying. This can slow down failure scenarios by a few seconds (up to 32 second).
> {noformat}
> public HBaseAdmin(Configuration c)
> throws MasterNotRunningException, ZooKeeperConnectionException {
> this.conf = HBaseConfiguration.create(c);
> this.connection = HConnectionManager.getConnection(this.conf);
> this.pause = this.conf.getLong("hbase.client.pause", 1000);
> this.numRetries = this.conf.getInt("hbase.client.retries.number", 10);
> this.retryLongerMultiplier = this.conf.getInt(
> "hbase.client.retries.longer.multiplier", 10);
> int tries = 0;
> for (; tries < numRetries; ++tries) {
> try {
> this.connection.getMaster();
> break;
> } catch (MasterNotRunningException mnre) {
> HConnectionManager.deleteStaleConnection(this.connection);
> this.connection = HConnectionManager.getConnection(this.conf);
> } catch (UndeclaredThrowableException ute) {
> HConnectionManager.deleteStaleConnection(this.connection);
> this.connection = HConnectionManager.getConnection(this.conf);
> }
> try { // Sleep
> Thread.sleep(getPauseTime(tries));
> } catch (InterruptedException e) {
> Thread.currentThread().interrupt();
> // we should delete connection between client and zookeeper
> HConnectionManager.deleteStaleConnection(this.connection);
> throw new MasterNotRunningException("Interrupted");
> }
> }
> if (tries >= numRetries) {
> // we should delete connection between client and zookeeper
> HConnectionManager.deleteStaleConnection(this.connection);
> throw new MasterNotRunningException("Retried " + numRetries + " times");
> }
> }
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira