[ 
https://issues.apache.org/jira/browse/HDFS-11780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16023884#comment-16023884
 ] 

Xiaoyu Yao commented on HDFS-11780:
-----------------------------------

Thanks [~vagarychen] for working on this. The patch looks good to me overall. 
Here are some comments:

KsmKeyBlock.java
NIT: KsmKeyBlock-> KsmKeyInfo to be consistent with Volume/Bucket?
NIT: Line 35: blockKey-> blockId? Can you update the comment:
"name of the block scm specified" -> "name of the block id SCM assigned for the 
key"


KeySpaceManagerProtocol.java
NIT: allocateKeyBlock-> allocateKey
" Allocate a block to a container, the block is returned to the client" -> 
" Allocate a key, the block/container information is returned to the client"


KeySpaceManagerProtocolClientSideTranslatorPB.java
Line 327-328 javadocs

KeySpaceManagerProtocol.proto 

KeyInfo -> KeyArg
KeyBlockInfo -> KeyInfo
getKeyBlock-> createKey to be consistent

KeyManagerImpl.java

Line 76: AllocatedBlock has a field called shouldCreateContainer.
This needs to be included in KsmKeyInfo (currently called KsmKeyBlock) so that
the client can handle the case where the newly created container can be created 
before
write.

DistributedStorageHandler.java
Line 295: this is related to previous comment, ChunkOutputStream needs to be 
updated to handle the shouldCreateContainer
when the key got assigned to a container that has not been created on SCM 
datanodes.


TestKeySpaceManager.java
Line 222: the OutputStream need to be closed to trigger writeChunkToContainer().
This can be done either by calling DistributedStorageHandler#commitKey() or use 
try-with-resources for the stream. Otherwise, the write is just writen to a 
ByteBuffer (see ChunkOutputStream#flushBufferToTrunk()).


> Ozone: KSM : Add putKey
> -----------------------
>
>                 Key: HDFS-11780
>                 URL: https://issues.apache.org/jira/browse/HDFS-11780
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>            Reporter: Anu Engineer
>            Assignee: Chen Liang
>         Attachments: HDFS-11780-HDFS-7240.001.patch, 
> HDFS-11780-HDFS-7240.002.patch, HDFS-11780-HDFS-7240.003.patch
>
>
> Support putting a key into an Ozone bucket. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to