[
https://issues.apache.org/jira/browse/HDFS-10195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15209422#comment-15209422
]
Chris Nauroth commented on HDFS-10195:
--------------------------------------
Hello [~anu]. Thank you for sharing this patch. In addition to the pre-commit
checks, here are a few comments.
# Each test start with creation of {{path}}. Can that logic be refactored to a
JUnit {{@Before}} method?
# Similarly, each test ends with {{FileUtils.deleteDirectory}}. Can that logic
be refactored to a JUnit {{@After}} method?
# In {{TestContainerPersistence#testCreateContainer}}, there is a small risk of
a resource leak. If {{Assert.assertNotNull(store.getDB())}} fails, then the
call to {{store.close()}} won't execute. Please ensure that the {{close}} call
happens in a {{finally}} block. If {{LevelDBStore}} were to implement
{{Closeable}}, then you'd be able to use try-with-resources too.
# I don't think this necessarily needs to be changed for the scope of this
patch, but I wonder if the interface/impl split is really necessary for some
things like {{ContainerLocationManager}}/{{ContainerLocationManagerImpl}}. I'm
not immediately anticipating multiple implementations (though maybe you have
additional work in mind that would do that). Like I said, I'm not asking for
changes to this right now, but let's keep it in mind as we keep working on the
branch.
> 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
>
>
> Adds file based persistence for containers.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)