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

Dinesh S. Atreya commented on HDFS-9607:
----------------------------------------


Since Java 8 https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html 
offers the following method, 
{noformat} static byte[]        copyOfRange(byte[] original, int from, int to)
// Copies  the specified range of the specified array into a new array.
{noformat}

we can use a simpler write signature corresponding to the read signature.
{noformat} FSDataInputStream.read(long position, byte[] buffer, int offset, int 
length) {noformat}
with the assumption that the caller will only supply the exact byte array that 
needs to be written without {{offset}} and {{length}}.
 

> Advance Hadoop Architecture (AHA) - HDFS Update (write-in-place)
> ----------------------------------------------------------------
>
>                 Key: HDFS-9607
>                 URL: https://issues.apache.org/jira/browse/HDFS-9607
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>            Reporter: Dinesh S. Atreya
>
> Link to Umbrella JIRA
> https://issues.apache.org/jira/browse/HADOOP-12620 
> Provide capability to carry out in-place writes/updates. Only writes in-place 
> are supported where the existing length does not change.
> For example, "Hello World" can be replaced by "Hello HDFS!"
> See 
> https://issues.apache.org/jira/browse/HADOOP-12620?focusedCommentId=15046300&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15046300
>  for more details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to