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

Colin Patrick McCabe commented on HADOOP-12973:
-----------------------------------------------

Hi [~eclark],

Good idea.  This seems like something that many people would use.

I think what we want to do here is not to make DU pluggable, but to create a 
generic {{GetSpaceAvailable}} interface that can make use of either DU or DF, 
and then adapt the DataNode code to use that instead.  The thing about 
pluggable interfaces is, they need to be really well designed so that we can 
avoid breaking compatibility in the future.  {{DU.java}} is a 
{{LimitedPrivate}} file which we don't want to expose to the world.

We may want to plug in other things in the future as well.  One possible 
improvement that I can think of is using JNI or a possible future JDK API to 
get the available space, rather than running a shell command.  This is similar 
to our approach with user/groups mappings.  I don't think we should do that in 
this patch, but we should make it possible to do that in the future without 
rewriting the code.  That's another reason to create a public interface rather 
than extend an existing {{LimitedPrivate}} class.

> make DU pluggable
> -----------------
>
>                 Key: HADOOP-12973
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12973
>             Project: Hadoop Common
>          Issue Type: Sub-task
>            Reporter: Elliott Clark
>            Assignee: Elliott Clark
>         Attachments: HADOOP-12973v0.patch, HADOOP-12973v1.patch, 
> HADOOP-12973v2.patch, HADOOP-12973v3.patch, HADOOP-12973v5.patch, 
> HADOOP-12973v6.patch, HADOOP-12973v7.patch, HADOOP-12973v8.patch
>
>
> If people are concerned about replacing the call to DU. Then an easy first 
> step is to make it pluggable. Then it's possible to replace it with something 
> while leaving the default alone.



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

Reply via email to