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

Todd Lipcon commented on HBASE-4169:
------------------------------------

This patch is a little strange - why use reflection here to access the static 
method in FSHDFSUtils instead of just creating a new interface or abstract 
class, and using non-static methods?

I think a more conventional approach would be:
- Create an abstract class FSUtils, which declares either default 
implementations or abstract methods for all of the things that different file 
systems would want to override
- This class would also have a method getInstance(Filesystem, Configuration), 
which returns a subclass of FSUtils dependent on scheme, using 
ReflectionUtils.newInstance
- If this ever becomes a performance hotspot we could add a cache here, but for 
rare operations like recoverLease it shouldn't matter


> FSUtils LeaseRecovery for non HDFS FileSystems.
> -----------------------------------------------
>
>                 Key: HBASE-4169
>                 URL: https://issues.apache.org/jira/browse/HBASE-4169
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.3, 0.90.4
>            Reporter: Lohit Vijayarenu
>         Attachments: HBASE-4169.1.patch, HBASE-4169.2.patch
>
>
> FSUtils.recoverFileLease uses HDFS's recoverLease method to get lease before 
> splitting hlog file.
> This might not work for other filesystem implementations. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to