You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by el...@apache.org on 2018/11/29 16:54:14 UTC
[1/4] hbase git commit: HBASE-21524 Fix logging in
ConnectionImplementation.isTableAvailable()
Repository: hbase
Updated Branches:
refs/heads/branch-2 aaafafe63 -> 68bb66e35
refs/heads/branch-2.1 001aabd40 -> acb58284a
refs/heads/master f1f2b5a03 -> fdddc47e7
HBASE-21524 Fix logging in ConnectionImplementation.isTableAvailable()
Signed-off-by: Michael Stack <st...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/68bb66e3
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/68bb66e3
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/68bb66e3
Branch: refs/heads/branch-2
Commit: 68bb66e35e1b92cbbfba345b50068dfba557f73e
Parents: aaafafe
Author: Josh Elser <el...@apache.org>
Authored: Wed Nov 28 22:03:55 2018 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Thu Nov 29 11:28:19 2018 -0500
----------------------------------------------------------------------
.../hbase/client/ConnectionImplementation.java | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/68bb66e3/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
index 2f35220..f71b839 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
@@ -624,7 +624,7 @@ class ConnectionImplementation implements ClusterConnection, Closeable {
checkClosed();
try {
if (!isTableEnabled(tableName)) {
- LOG.debug("Table " + tableName + " not enabled");
+ LOG.debug("Table {} not enabled", tableName);
return false;
}
List<Pair<RegionInfo, ServerName>> locations =
@@ -635,10 +635,8 @@ class ConnectionImplementation implements ClusterConnection, Closeable {
for (Pair<RegionInfo, ServerName> pair : locations) {
RegionInfo info = pair.getFirst();
if (pair.getSecond() == null) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("Table " + tableName + " has not deployed region " + pair.getFirst()
- .getEncodedName());
- }
+ LOG.debug("Table {} has not deployed region {}", tableName,
+ pair.getFirst().getEncodedName());
notDeployed++;
} else if (splitKeys != null
&& !Bytes.equals(info.getStartKey(), HConstants.EMPTY_BYTE_ARRAY)) {
@@ -656,23 +654,21 @@ class ConnectionImplementation implements ClusterConnection, Closeable {
}
if (notDeployed > 0) {
if (LOG.isDebugEnabled()) {
- LOG.debug("Table " + tableName + " has " + notDeployed + " regions");
+ LOG.debug("Table {} has {} regions not deployed", tableName, notDeployed);
}
return false;
} else if (splitKeys != null && regionCount != splitKeys.length + 1) {
if (LOG.isDebugEnabled()) {
- LOG.debug("Table " + tableName + " expected to have " + (splitKeys.length + 1)
- + " regions, but only " + regionCount + " available");
+ LOG.debug("Table {} expected to have {} regions, but only {} available", tableName,
+ splitKeys.length + 1, regionCount);
}
return false;
} else {
- if (LOG.isDebugEnabled()) {
- LOG.debug("Table " + tableName + " should be available");
- }
+ LOG.trace("Table {} should be available", tableName);
return true;
}
} catch (TableNotFoundException tnfe) {
- LOG.warn("Table " + tableName + " not enabled, it is not exists");
+ LOG.warn("Table {} does not exist", tableName);
return false;
}
}
[4/4] hbase git commit: HBASE-21523 Avoid extra logging when the
backup system table already exists
Posted by el...@apache.org.
HBASE-21523 Avoid extra logging when the backup system table already exists
Signed-off-by: Peter Somogyi <ps...@cloudera.com>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/fdddc47e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/fdddc47e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/fdddc47e
Branch: refs/heads/master
Commit: fdddc47e77d57ce1a95d9c194655f0a86d589124
Parents: 8a68f0d
Author: Josh Elser <el...@apache.org>
Authored: Wed Nov 28 21:56:10 2018 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Thu Nov 29 11:40:28 2018 -0500
----------------------------------------------------------------------
.../apache/hadoop/hbase/backup/impl/BackupSystemTable.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/fdddc47e/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java
----------------------------------------------------------------------
diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java
index d177384..94ccfe5 100644
--- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java
+++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java
@@ -229,8 +229,14 @@ public final class BackupSystemTable implements Closeable {
}
private void waitForSystemTable(Admin admin, TableName tableName) throws IOException {
+ // Return fast if the table is available and avoid a log message
+ if (admin.tableExists(tableName) && admin.isTableAvailable(tableName)) {
+ return;
+ }
long TIMEOUT = 60000;
long startTime = EnvironmentEdgeManager.currentTime();
+ LOG.debug("Backup table {} is not present and available, waiting for it to become so",
+ tableName);
while (!admin.tableExists(tableName) || !admin.isTableAvailable(tableName)) {
try {
Thread.sleep(100);
@@ -241,7 +247,7 @@ public final class BackupSystemTable implements Closeable {
"Failed to create backup system table " + tableName + " after " + TIMEOUT + "ms");
}
}
- LOG.debug("Backup table " + tableName + " exists and available");
+ LOG.debug("Backup table {} exists and available", tableName);
}
@Override
[2/4] hbase git commit: HBASE-21524 Fix logging in
ConnectionImplementation.isTableAvailable()
Posted by el...@apache.org.
HBASE-21524 Fix logging in ConnectionImplementation.isTableAvailable()
Signed-off-by: Michael Stack <st...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/acb58284
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/acb58284
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/acb58284
Branch: refs/heads/branch-2.1
Commit: acb58284a55bf58e6f10b9f61226c7d166ec4f61
Parents: 001aabd
Author: Josh Elser <el...@apache.org>
Authored: Wed Nov 28 22:03:55 2018 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Thu Nov 29 11:34:15 2018 -0500
----------------------------------------------------------------------
.../hbase/client/ConnectionImplementation.java | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/acb58284/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
index 21d796c..de0116c 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
@@ -611,7 +611,7 @@ class ConnectionImplementation implements ClusterConnection, Closeable {
checkClosed();
try {
if (!isTableEnabled(tableName)) {
- LOG.debug("Table " + tableName + " not enabled");
+ LOG.debug("Table {} not enabled", tableName);
return false;
}
List<Pair<RegionInfo, ServerName>> locations =
@@ -622,10 +622,8 @@ class ConnectionImplementation implements ClusterConnection, Closeable {
for (Pair<RegionInfo, ServerName> pair : locations) {
RegionInfo info = pair.getFirst();
if (pair.getSecond() == null) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("Table " + tableName + " has not deployed region " + pair.getFirst()
- .getEncodedName());
- }
+ LOG.debug("Table {} has not deployed region {}", tableName,
+ pair.getFirst().getEncodedName());
notDeployed++;
} else if (splitKeys != null
&& !Bytes.equals(info.getStartKey(), HConstants.EMPTY_BYTE_ARRAY)) {
@@ -643,23 +641,21 @@ class ConnectionImplementation implements ClusterConnection, Closeable {
}
if (notDeployed > 0) {
if (LOG.isDebugEnabled()) {
- LOG.debug("Table " + tableName + " has " + notDeployed + " regions");
+ LOG.debug("Table {} has {} regions not deployed", tableName, notDeployed);
}
return false;
} else if (splitKeys != null && regionCount != splitKeys.length + 1) {
if (LOG.isDebugEnabled()) {
- LOG.debug("Table " + tableName + " expected to have " + (splitKeys.length + 1)
- + " regions, but only " + regionCount + " available");
+ LOG.debug("Table {} expected to have {} regions, but only {} available", tableName,
+ splitKeys.length + 1, regionCount);
}
return false;
} else {
- if (LOG.isDebugEnabled()) {
- LOG.debug("Table " + tableName + " should be available");
- }
+ LOG.trace("Table {} should be available", tableName);
return true;
}
} catch (TableNotFoundException tnfe) {
- LOG.warn("Table " + tableName + " not enabled, it is not exists");
+ LOG.warn("Table {} does not exist", tableName);
return false;
}
}
[3/4] hbase git commit: HBASE-21524 Fix logging in
ConnectionImplementation.isTableAvailable()
Posted by el...@apache.org.
HBASE-21524 Fix logging in ConnectionImplementation.isTableAvailable()
Signed-off-by: Michael Stack <st...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/8a68f0d6
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/8a68f0d6
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/8a68f0d6
Branch: refs/heads/master
Commit: 8a68f0d65636bb35e768d9e80e8d3d48d00b58c9
Parents: f1f2b5a
Author: Josh Elser <el...@apache.org>
Authored: Wed Nov 28 22:03:55 2018 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Thu Nov 29 11:40:06 2018 -0500
----------------------------------------------------------------------
.../hbase/client/ConnectionImplementation.java | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/8a68f0d6/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
index 67fe551..da6b592 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
@@ -626,7 +626,7 @@ class ConnectionImplementation implements ClusterConnection, Closeable {
checkClosed();
try {
if (!isTableEnabled(tableName)) {
- LOG.debug("Table " + tableName + " not enabled");
+ LOG.debug("Table {} not enabled", tableName);
return false;
}
List<Pair<RegionInfo, ServerName>> locations =
@@ -637,10 +637,8 @@ class ConnectionImplementation implements ClusterConnection, Closeable {
for (Pair<RegionInfo, ServerName> pair : locations) {
RegionInfo info = pair.getFirst();
if (pair.getSecond() == null) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("Table " + tableName + " has not deployed region " + pair.getFirst()
- .getEncodedName());
- }
+ LOG.debug("Table {} has not deployed region {}", tableName,
+ pair.getFirst().getEncodedName());
notDeployed++;
} else if (splitKeys != null
&& !Bytes.equals(info.getStartKey(), HConstants.EMPTY_BYTE_ARRAY)) {
@@ -658,23 +656,21 @@ class ConnectionImplementation implements ClusterConnection, Closeable {
}
if (notDeployed > 0) {
if (LOG.isDebugEnabled()) {
- LOG.debug("Table " + tableName + " has " + notDeployed + " regions");
+ LOG.debug("Table {} has {} regions not deployed", tableName, notDeployed);
}
return false;
} else if (splitKeys != null && regionCount != splitKeys.length + 1) {
if (LOG.isDebugEnabled()) {
- LOG.debug("Table " + tableName + " expected to have " + (splitKeys.length + 1)
- + " regions, but only " + regionCount + " available");
+ LOG.debug("Table {} expected to have {} regions, but only {} available", tableName,
+ splitKeys.length + 1, regionCount);
}
return false;
} else {
- if (LOG.isDebugEnabled()) {
- LOG.debug("Table " + tableName + " should be available");
- }
+ LOG.trace("Table {} should be available", tableName);
return true;
}
} catch (TableNotFoundException tnfe) {
- LOG.warn("Table " + tableName + " not enabled, it is not exists");
+ LOG.warn("Table {} does not exist", tableName);
return false;
}
}