[ 
https://issues.apache.org/jira/browse/HADOOP-16840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

wujinhu updated HADOOP-16840:
-----------------------------
    Description: 
When hadoop lists object in versioning bucket with many delete marker in it, 
OSS will return
{code:java}
<?xml version="1.0" encoding="UTF-8"?>
<ListBucketResult>
  <Name>select-us-east-1</Name>
  <Prefix>test/hadoop/file/</Prefix>
  <Marker></Marker>
  <MaxKeys>100</MaxKeys>
  <Delimiter>/</Delimiter>
  <IsTruncated>true</IsTruncated>
  <NextMarker>test/hadoop/file/sub2</NextMarker>
</ListBucketResult>
{code}
It sets *IsTruncated* to true and without *ObjectSummaries* or *CommonPrefixes*
{code:java}
// code placeholder
ObjectListing listing = store.listObjects(key, 1, null, false);
if (CollectionUtils.isNotEmpty(listing.getObjectSummaries()) ||
    CollectionUtils.isNotEmpty(listing.getCommonPrefixes())) {
  return new OSSFileStatus(0, true, 1, 0, 0, qualifiedPath, username);
} else {
  throw new FileNotFoundException(path + ": No such file or directory!");
}
{code}
 

 

  was:
When hadoop lists object in versioning bucket with many delete marker in it, 
OSS will return
{code:java}
<?xml version="1.0" encoding="UTF-8"?>
<ListBucketResult>
  <Name>select-us-east-1</Name>
  <Prefix>test/hadoop/file/</Prefix>
  <Marker></Marker>
  <MaxKeys>100</MaxKeys>
  <Delimiter>/</Delimiter>
  <IsTruncated>true</IsTruncated>
  <NextMarker>test/hadoop/file/sub2</NextMarker>
</ListBucketResult>
{code}


> AliyunOSS: getFileStatus throws FileNotFoundException in versioning bucket
> --------------------------------------------------------------------------
>
>                 Key: HADOOP-16840
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16840
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs/oss
>    Affects Versions: 2.10.0, 2.9.2, 3.0.3, 3.2.1, 3.1.3
>            Reporter: wujinhu
>            Assignee: wujinhu
>            Priority: Major
>
> When hadoop lists object in versioning bucket with many delete marker in it, 
> OSS will return
> {code:java}
> <?xml version="1.0" encoding="UTF-8"?>
> <ListBucketResult>
>   <Name>select-us-east-1</Name>
>   <Prefix>test/hadoop/file/</Prefix>
>   <Marker></Marker>
>   <MaxKeys>100</MaxKeys>
>   <Delimiter>/</Delimiter>
>   <IsTruncated>true</IsTruncated>
>   <NextMarker>test/hadoop/file/sub2</NextMarker>
> </ListBucketResult>
> {code}
> It sets *IsTruncated* to true and without *ObjectSummaries* or 
> *CommonPrefixes*
> {code:java}
> // code placeholder
> ObjectListing listing = store.listObjects(key, 1, null, false);
> if (CollectionUtils.isNotEmpty(listing.getObjectSummaries()) ||
>     CollectionUtils.isNotEmpty(listing.getCommonPrefixes())) {
>   return new OSSFileStatus(0, true, 1, 0, 0, qualifiedPath, username);
> } else {
>   throw new FileNotFoundException(path + ": No such file or directory!");
> }
> {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to