You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Wei-Chiu Chuang (Jira)" <ji...@apache.org> on 2023/10/25 20:54:00 UTC
[jira] [Created] (HDDS-9540) Inconsistent BlockManager.putBlock() API definition
Wei-Chiu Chuang created HDDS-9540:
-------------------------------------
Summary: Inconsistent BlockManager.putBlock() API definition
Key: HDDS-9540
URL: https://issues.apache.org/jira/browse/HDDS-9540
Project: Apache Ozone
Issue Type: Bug
Reporter: Wei-Chiu Chuang
The BlockManager interface defines API :
{code}
/**
* Puts or overwrites a block.
*
* @param container - Container for which block need to be added.
* @param data - Block Data.
* @param incrKeyCount - Whether to increase container key count.
* @return length of the Block.
* @throws IOException
*/
long putBlock(Container container, BlockData data, boolean incrKeyCount)
throws IOException;
{code}
whereas BlockManagerImpl has:
{code}
/**
* Puts or overwrites a block.
*
* @param container - Container for which block need to be added.
* @param data - BlockData.
* @param endOfBlock - The last putBlock call for this block (when
* all the chunks are written and stream is closed)
* @return length of the block.
* @throws IOException
*/
@Override
public long putBlock(Container container, BlockData data,
boolean endOfBlock) throws IOException {
{code}
That is, the last parameter is inconsistent (incrKeyCount vs. endOfBlock)
IMO the javadoc in BlockManagerImpl more accurately reflects what it's supposed to do.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org