You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/03/03 14:08:00 UTC
[jira] [Commented] (HADOOP-18450) JavaKeyStoreProvider should throw FileNotFoundException in renameOrFail
[ https://issues.apache.org/jira/browse/HADOOP-18450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17696163#comment-17696163 ]
ASF GitHub Bot commented on HADOOP-18450:
-----------------------------------------
snmvaughan opened a new pull request, #5452:
URL: https://github.com/apache/hadoop/pull/5452
… in renameOrFail
### Description of PR
Attempting to create a key a KMS is configured with the JavaKeystoreProvider and an HDFS store. The calls to:
```
renameOrFail(Path src, Path dest) throws IOException
```
... fails with an IOException when it attempts to rename a file. The calling code catches FileNotFoundException since the src file may not exist.
Example:
```
$ hadoop key create sample
java.io.IOException: Rename unsuccessful : 'hdfs://mycluster/security/kms.jks_NEW' to 'hdfs://mycluster/security/kms.jks_NEW_ORPHANED_1662946593691'
```
Update the implementation to check for the file, throwing a FileNotFoundException.
### How was this patch tested?
Running in an Hadoop development environment docker image.
### For code changes:
- [X] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
- [ ] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files?
> JavaKeyStoreProvider should throw FileNotFoundException in renameOrFail
> -----------------------------------------------------------------------
>
> Key: HADOOP-18450
> URL: https://issues.apache.org/jira/browse/HADOOP-18450
> Project: Hadoop Common
> Issue Type: New Feature
> Components: common
> Affects Versions: 3.4.0, 3.3.5
> Environment: UBI 8 running Java 11
> Reporter: Steve Vaughan
> Assignee: Steve Vaughan
> Priority: Critical
>
> Attempting to create a key a KMS is configured with the JavaKeystoreProvider and an HDFS store. The calls to:
> {noformat}
> renameOrFail(Path src, Path dest) throws IOException {noformat}
> ... fails with an IOException when it attempts to rename a file. The calling code catches FileNotFoundException since the src file may not exist.
>
> Example:
> {noformat}
> $ hadoop key create sample
> java.io.IOException: Rename unsuccessful : 'hdfs://mycluster/security/kms.jks_NEW' to 'hdfs://mycluster/security/kms.jks_NEW_ORPHANED_1662946593691'{noformat}
>
> Update the implementation to check for the file, throwing a FileNotFoundException.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org