[
https://issues.apache.org/jira/browse/HDFS-13110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16353738#comment-16353738
]
Rakesh R commented on HDFS-13110:
---------------------------------
I'm attaching patch addressing the below cases. I hope below explanation would
help to get a brief overview about the proposed changes in the patch.
Appreciate your feedback/reviews, thanks!
*Case-1)* NamenodeProtocol#getFilePath(Long inodeId)
+Proposed approach:+
For {{external sps}}, it can use string representation of the file path. This
would avoid inodeID to filePath conversion api in
NamenodeProtocol#getFilePath(Long inodeId).
For {{internal sps}}, it can use long *_inodeID_* for the computation. This
would reduce the memory consumption compares to keep file path string.
I'm thinking to use generics <T> for _*ItemInfo*_ class so that it would
incorporates both the cases.
{code:java}
public class ItemInfo<T> {
private T startId;
private T fileId;
{code}
*Case-2)* NamenodeProtocol#hasLowRedundancyBlocks(long inodeID)
+Proposed approach+
SPS can use a logic by iterating over all the blocks and checks the block
location array length. If it is < replication factor, I can mark this file as
under replicated.
*Case-3)* Context#getFileInfo swallows all IOEs, based on assumption that any
and all IOEs means FNF which probably isn’t the intention during rpc exceptions.
+Proposed approach+
Returns _HdfsFileStatus_, which contains information regarding the file or
null if file doesn't exists. All other exceptions will be thrown back to
caller. For _ExternalSPSContext#getFileInfo_, caught specifically
{{FileNotFoundException}}. For _IntraSPSNameNodeContext#getFileInfo_,
{{namesystem.getFileInfo}} api itself does the required functionality and we
relay on that.
> [SPS]: Reduce the number of APIs in NamenodeProtocol used by external
> satisfier
> -------------------------------------------------------------------------------
>
> Key: HDFS-13110
> URL: https://issues.apache.org/jira/browse/HDFS-13110
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Rakesh R
> Priority: Major
> Attachments: HDFS-13110-HDFS-10285-00.patch
>
>
> This task is to address [~daryn] comments.
> *Comment No.10)*
> NamenodeProtocolTranslatorPB
> Most of the api changes appear unnecessary.
> IntraSPSNameNodeContext#getFileInfo swallows all IOEs, based on assumption
> that any and all IOEs means FNF which probably isn’t the intention during rpc
> exceptions.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]