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

Konstantin Shvachko commented on HADOOP-4358:
---------------------------------------------

Yes, the image stores the long value, that is we store the value returned by 
getAccessTime() and the precision is factored out at this point. It is just 
that the value is rounded up to the latest whole hour. So if we start a cluster 
with the new precision value then this rounded value will be divided by the new 
precision and everything is correct. So, there is no issue with configuring 
precision value as I suggested before, and Dhruba can safely run different 
clusters with different precisions. Sorry about the confusion.
# The question is how to get rid of the static method call in INode.
#- I think we should change setAccessTime to {{setAccessTime(lonk aTime, int 
precision)}} and propagate changes to the INode constructors.
#- Alternatively, we can create a {{static FSNmesystem.getPresision()}}, which 
would return the default precision if {{FSNmesystem.this == null}}. Don't 
really like it, seems like another shortcut to me.
# Second question is in what units the precision should be specified in 
configuration?
Aren't we introducing a Y2K-type bug even if the precision is specified it in 
hours?
# Raghu> _INode should be totally unaware of precision._
I don't think we can achieve this if we do not want to store the entire long 
for each file/directory object.


> NPE from CreateEditsLog
> -----------------------
>
>                 Key: HADOOP-4358
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4358
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs, test
>    Affects Versions: 0.19.0
>            Reporter: Chris Douglas
>            Priority: Blocker
>             Fix For: 0.19.0
>
>         Attachments: HADOOP-4358.patch
>
>
> HADOOP-1869 added a call to setAccessTime(long) from the INode cstr, which 
> relies on a non-null value from FSNamesystem::getFSNamesystem.
> {noformat}
> java.lang.NullPointerException
>         at 
> org.apache.hadoop.hdfs.server.namenode.INode.setAccessTime(INode.java:301)
>         at org.apache.hadoop.hdfs.server.namenode.INode.<init>(INode.java:99)
>         at 
> org.apache.hadoop.hdfs.server.namenode.INodeDirectory.<init>(INodeDirectory.java:45)
>         at 
> org.apache.hadoop.hdfs.CreateEditsLog.addFiles(CreateEditsLog.java:68)
>         at org.apache.hadoop.hdfs.CreateEditsLog.main(CreateEditsLog.java:214)
> {noformat}

-- 
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