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

Konstantin Shvachko commented on HDFS-1245:
-------------------------------------------

The idea is interesting, but it will be hard to provide protection from 
switching from one block id generator to another incompatible one.
Like in HDFS-898 it is easy to write a new sequential block id generator, the 
hard problem is to covert current file system to the new generating strategy.
It would be good if you could provide some motivation on 
- why you need generator to be plugable, and 
- what stratagies other than random and sequential do you have in mind, and 
- in which conditions they may be useful.

You know, if I had a choice I'd rather not choose between paper and plastic. 
Ask sysadmins.

> Plugable block id generation 
> -----------------------------
>
>                 Key: HDFS-1245
>                 URL: https://issues.apache.org/jira/browse/HDFS-1245
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>          Components: name-node
>            Reporter: Dmytro Molkov
>            Assignee: Dmytro Molkov
>
> The idea is to have a way to easily create block id generation engines that 
> may fit a certain purpose. One of them could be HDFS-898 started by 
> Konstantin, but potentially others.
> We chatted with Dhruba about this for a while and came up with the following 
> approach:
> There should be a BlockIDGenerator interface that has following methods:
> void blockAdded(Block)
> void blockRemoved(Block)
> Block nextBlock()
> First two methods are needed for block generation engines that hold a certain 
> state. During the restart, when namenode reads the fsimage it will notify 
> generator about all the blocks it reads from the image and during runtime 
> namenode will notify the generator about block removals on file deletion.
> The instance of the generator will also have a reference to the block 
> registry, the interface that BlockManager implements. The only method there 
> is __blockExists(Block)__, so that the current random block id generation can 
> be implemented, since it needs to check with the block manager if the id is 
> already present.
> What does the community think about this proposal?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to