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: [email protected]
For additional commands, e-mail: [email protected]