You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-commits@hadoop.apache.org by ms...@apache.org on 2019/10/20 06:26:19 UTC
[hadoop-ozone] branch master updated: HDDS-2286. Add a log info in
ozone client and scm to print the exclusion list during allocate block.
Contributed by Siddharth Wagle. (#46)
This is an automated email from the ASF dual-hosted git repository.
msingh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 7651aec HDDS-2286. Add a log info in ozone client and scm to print the exclusion list during allocate block. Contributed by Siddharth Wagle. (#46)
7651aec is described below
commit 7651aec22acd6c3e89cdd0a90911d82d9b0b822d
Author: Siddharth <sw...@hortonworks.com>
AuthorDate: Sat Oct 19 23:26:12 2019 -0700
HDDS-2286. Add a log info in ozone client and scm to print the exclusion list during allocate block. Contributed by Siddharth Wagle. (#46)
---
.../hadoop/hdds/scm/container/common/helpers/ExcludeList.java | 9 +++++++++
.../apache/hadoop/hdds/scm/server/SCMBlockProtocolServer.java | 2 ++
.../hadoop/ozone/client/io/BlockOutputStreamEntryPool.java | 1 +
3 files changed, 12 insertions(+)
diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/container/common/helpers/ExcludeList.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/container/common/helpers/ExcludeList.java
index 180da40..b558f2d 100644
--- a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/container/common/helpers/ExcludeList.java
+++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/container/common/helpers/ExcludeList.java
@@ -113,4 +113,13 @@ public class ExcludeList {
containerIds.clear();
pipelineIds.clear();
}
+
+ @Override
+ public String toString() {
+ return "ExcludeList {" +
+ "datanodes = " + datanodes +
+ ", containerIds = " + containerIds +
+ ", pipelineIds = " + pipelineIds +
+ '}';
+ }
}
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMBlockProtocolServer.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMBlockProtocolServer.java
index 9c69758..ef035d9 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMBlockProtocolServer.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMBlockProtocolServer.java
@@ -176,6 +176,8 @@ public class SCMBlockProtocolServer implements
auditMap.put("owner", owner);
List<AllocatedBlock> blocks = new ArrayList<>(num);
boolean auditSuccess = true;
+ LOG.info("Allocating {} blocks of size {}, with {}",
+ num, size, excludeList);
try {
for (int i = 0; i < num; i++) {
AllocatedBlock block = scm.getScmBlockManager()
diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/BlockOutputStreamEntryPool.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/BlockOutputStreamEntryPool.java
index b179ca5..1f700e4 100644
--- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/BlockOutputStreamEntryPool.java
+++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/BlockOutputStreamEntryPool.java
@@ -254,6 +254,7 @@ public class BlockOutputStreamEntryPool {
* @throws IOException
*/
private void allocateNewBlock() throws IOException {
+ LOG.info("Allocating block with {}", excludeList);
OmKeyLocationInfo subKeyInfo =
omClient.allocateBlock(keyArgs, openID, excludeList);
addKeyLocationInfo(subKeyInfo);
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-commits-help@hadoop.apache.org