[ 
https://issues.apache.org/jira/browse/HDFS-12543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chen Liang updated HDFS-12543:
------------------------------
    Attachment: HDFS-12543-HDFS-7240.002.patch

Post v002 patch to fix the checkstyle and findbug warnings. 

Additionally, one thing about v001 patch was that, when a key is opened, in 
general cases, it is expected that client will then request a block to write. 
So in v001 patch KSM always allocate one block when a key is opened and 
piggyback this key back to client to save one RPC call.

But turns out if client is writing empty data, this will be issue because the 
block is allocated but not written. So the container does not have the entry 
for the key. Then next time when client open the key, he/she will ask the 
container  for the key, then it fails. This why one of test failure happened.

So in v002 patch, it is changed to that, KSM no longer piggyback this one 
single block back to client. But instead, KSM looks at the key size when a key 
is opened:
1. If size is set to 0/not set, the key is opened, but no block is allocated at 
this point.
2. if size is not 0, KSM will allocate some blocks based on the size and return 
to client. This serves as an optimization for the case where write size is 
known already.
But in either case, client can always still requests for more blocks to write.

> Ozone : allow create key without specifying size
> ------------------------------------------------
>
>                 Key: HDFS-12543
>                 URL: https://issues.apache.org/jira/browse/HDFS-12543
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Chen Liang
>            Assignee: Chen Liang
>              Labels: ozoneMerge
>         Attachments: HDFS-12543-HDFS-7240.001.patch, 
> HDFS-12543-HDFS-7240.002.patch
>
>
> Currently when creating a key, it is required to specify the total size of 
> the key. This makes it inconvenient for the case where a key is created and 
> data keeps coming and being appended. This JIRA is remove the requirement of 
> specifying the size on key creation, and allows appending to the key 
> indefinitely.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
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