From 8264b61656b8195d3a3e641ad94f265efd81fa8f Mon Sep 17 00:00:00 2001 From: Chris Nauroth Date: Fri, 29 Apr 2016 20:44:38 -0700 Subject: [PATCH] HDFS-10349. Ozone: StorageContainerManager fails to compile after merge of HDFS-10312 maxDataLength enforcement. Contributed by Chris Nauroth. --- .../hadoop/ozone/storage/StorageContainerManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/storage/StorageContainerManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/storage/StorageContainerManager.java index bad945a52cb..e89ebfcc280 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/storage/StorageContainerManager.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/storage/StorageContainerManager.java @@ -18,6 +18,8 @@ package org.apache.hadoop.ozone.storage; +import static org.apache.hadoop.fs.CommonConfigurationKeys.IPC_MAXIMUM_DATA_LENGTH; +import static org.apache.hadoop.fs.CommonConfigurationKeys.IPC_MAXIMUM_DATA_LENGTH_DEFAULT; import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY; import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_HANDLER_COUNT_DEFAULT; import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_HANDLER_COUNT_KEY; @@ -154,11 +156,13 @@ public class StorageContainerManager RPC.setProtocolEngine(conf, StorageContainerLocationProtocolPB.class, ProtobufRpcEngine.class); + int maxDataLength = conf.getInt(IPC_MAXIMUM_DATA_LENGTH, + IPC_MAXIMUM_DATA_LENGTH_DEFAULT); BlockingService dnProtoPbService = DatanodeProtocolProtos .DatanodeProtocolService .newReflectiveBlockingService( - new DatanodeProtocolServerSideTranslatorPB(this)); + new DatanodeProtocolServerSideTranslatorPB(this, maxDataLength)); InetSocketAddress serviceRpcAddr = NameNode.getServiceAddress(conf, false); serviceRpcServer = startRpcServer(conf, serviceRpcAddr,