[
https://issues.apache.org/jira/browse/HDFS-11567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15944130#comment-15944130
]
Anu Engineer commented on HDFS-11567:
-------------------------------------
Thanks for taking care of this feature. It looks really good.
Couple of minor comments:
Function: {{updateContainer}}
* Better error message
{code}
} catch (NoSuchAlgorithmException e) {
throw new StorageContainerException("failed to create container",
NO_SUCH_ALGORITHM);
}
{code}
-- replace with
StorageContainerException("Unable to create Message Digest, usually this is a
java configuration issue.",NO_SUCH_ALGORITHM);
* File another JIRA to force update or support force flag
{code}
if (!orgData.isOpen()) {
throw new StorageContainerException(
"Update a closed container is not allowed. Name: " +
containerName,
UNSUPPORTED_REQUEST);
}
{code}
This will allow us to repair the metadata from command line if needed.
* Add force flag ?
{code}
if (!containerFile.exists() || !containerFile.canWrite()) {
throw new StorageContainerException(
"Container file not exists or corrupted. Name: " +
containerName,
CONTAINER_INTERNAL_ERROR);
}
{code}
> Ozone: Support update container
> -------------------------------
>
> Key: HDFS-11567
> URL: https://issues.apache.org/jira/browse/HDFS-11567
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: ozone
> Affects Versions: HDFS-7240
> Reporter: Weiwei Yang
> Assignee: Weiwei Yang
> Attachments: HDFS-11567-HDFS-7240.001.patch
>
>
> Add support to update a container. A container has a set of states. That
> states include information like SHA256 hashes, the metadata of the container,
> a set of key value pairs. etc. This API allows us to update or change those
> values for an existing container. This API is also critical if we want to
> force a rewrite of the container data on the datanode. We could read the data
> and write it back to for a disk update, which would allow us to repair a
> container metadata if it is really needed.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]