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

Ewan Higgs commented on HDFS-12713:
-----------------------------------

{quote}Hi Ewan Higgs, Yes, I think that makes sense. The getBlockPoolID() in 
the diff was in the Reader class but having block pool id as an argument of 
getReader would also be useful.{quote}

{quote}Can blockPoolID an option, instead of a separate parameter?{quote}

I've got some code that goes one better by making {{getReader}} and 
{{getWriter}} have the same interface (again) by receiving the BlockPoolID in 
the function. This gives implementers a few nice options:

1. In the trivial CSV case, the bpid can be part of the csv file name and the 
{{getReader}} call can open the appropriate CSV file.
2. In the case of a db backed AliasMap there are two options: 1. bpid is a 
column in the table which can then be used as part of a query to filter the 
correct blocks. 2. Each bpid is in a separate database (i.e. {{USE DATABASE;}} 
not a different server). and the connection string is constructed with the 
appropriate bpid/database.

I don't have a clean solution (yet) to handle this in the 
InMemoryLevelDBAliasMap since there's no natural way to dispatch to the 
appropriate Namenode.



> [READ] Refactor FileRegion and BlockAliasMap to separate out HDFS metadata 
> and PROVIDED storage metadata
> --------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-12713
>                 URL: https://issues.apache.org/jira/browse/HDFS-12713
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Virajith Jalaparti
>            Assignee: Ewan Higgs
>         Attachments: HDFS-12713-HDFS-9806.001.patch
>
>




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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to