[
https://issues.apache.org/jira/browse/HDDS-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16631044#comment-16631044
]
Hanisha Koneru commented on HDDS-289:
-------------------------------------
Thanks for working on this [~candychencan].
Patch LGTM overall. A few comments:
# PutKey should allow "/" in the key name. We can create keys using {{ozone
fs}} (and they can have "/" in the keyname). So {{ozone sh key}} should also
allow keys with a "/" in them.
# The error message "Path ... too long in ..." is ambiguous. Can we expand it
to say something like "Invalid bucket name.Delimiters ("/") not allowed in
bucket name"
# A minor NIT: Most of the handlers already have a check with respect to
path.getNameCount(). We could probably optimize by combining them. Something
like below:
{code:java}
int pathNameCount = path.getNameCount();
if (pathNameCount != 2) {
String errorMessage;
if (pathNameCount < 2) {
errorMessage = "volume and bucket name required in createBucket";
} else {
errorMessage = "invalid bucket name. Delimiters (/) not allowed in " +
"bucket name";
}
throw new OzoneClientException(errorMessage);
}
{code}
> While creating bucket everything after '/' is ignored without any warning
> -------------------------------------------------------------------------
>
> Key: HDDS-289
> URL: https://issues.apache.org/jira/browse/HDDS-289
> Project: Hadoop Distributed Data Store
> Issue Type: Bug
> Components: Ozone Client
> Affects Versions: 0.2.1
> Reporter: Namit Maheshwari
> Assignee: chencan
> Priority: Major
> Labels: newbie
> Attachments: HDDS-289.001.patch, HDDS-289.002.patch,
> HDDS-289.003.patch
>
>
> Please see below example. Here the user issues command to create bucket like
> below. Where /namit is the volume.
> {code}
> hadoop@288c0999be17:~$ ozone oz -createBucket /namit/hjk/fgh
> 2018-07-24 00:30:52 WARN NativeCodeLoader:60 - Unable to load native-hadoop
> library for your platform... using builtin-java classes where applicable
> 2018-07-24 00:30:52 INFO RpcClient:337 - Creating Bucket: namit/hjk, with
> Versioning false and Storage Type set to DISK
> {code}
> As seen above it just ignored '/fgh'
> There should be a Warning / Error message instead of just ignoring everything
> after a '/'
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]