[
https://issues.apache.org/jira/browse/HDFS-10195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15211103#comment-15211103
]
Jing Zhao commented on HDFS-10195:
----------------------------------
Thanks for updating the patch, Anu. Just some minor comments on the 002 patch:
# These two attributes can be avoided. We can call {{lock.readLock()}} and
{{lock.writeLock()}}.
{code}
+ private final ReentrantReadWriteLock.ReadLock readLock = lock.readLock();
+ private final ReentrantReadWriteLock.WriteLock writeLock = lock.writeLock();
{code}
# In case the process was killed while a container was being created and before
the metafile was created, {{new FileInputStream(metaFileName)}} may still throw
NPE. I think here we need to explicitly check if the meta file exists.
{code}
+ try {
+ String containerFileName = containerName.concat(CONTAINER_EXTENSION);
+ String metaFileName = containerName.concat(CONTAINER_META);
+ containerStream = new FileInputStream(containerFileName);
+ metaStream = new FileInputStream(metaFileName);
{code}
> Ozone: Add container persistence
> --------------------------------
>
> Key: HDFS-10195
> URL: https://issues.apache.org/jira/browse/HDFS-10195
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: ozone
> Affects Versions: HDFS-7240
> Reporter: Anu Engineer
> Assignee: Anu Engineer
> Fix For: HDFS-7240
>
> Attachments: HDFS-10195-HDFS-7240.001.patch,
> HDFS-10195-HDFS-7240.002.patch
>
>
> Adds file based persistence for containers.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)