Found 0 result in total
Content is empty
If you don't find the content you expect, please try another search term
Last updated:2021-04-28 10:59:27
KS3 archive storage (ACHIVE) is suitable for archive data that needs to be stored for a long time (more than 3 months is recommended), which is rarely accessed in the storage cycle, and it takes 1 minute to 10 minutes for data to enter the readable state. It is suitable for archival data, medical images, scientific data, film and television materials that need to be preserved for a long time.
If you want to take the archive storage class to store files, you can do so in the following ways:
x-kss-storage-class
as ARCHIVEWhen uploading files, if the request header x-kss-storage-class
is not specified, if the bucket is the archive class, the object will be the archive class automatically. If the bucket is the non archive class, the object will be the standard class automatically. If the x-kss-storageClass
of the object is specified, the user specified will prevail. For example, in the non archive bucket, the object specified. When the x-kss-storageClass
of is ARCHIVE
, the file is of archive storage class.
Bucket Type | x-kss-storage-class Request Header | File Type |
---|---|---|
Archive Storage Class | No Upload | Archived Class |
Archive Storage Class | ARCHIVE | Archived Class |
Archive Storage Class | STANDAND | Standard Class |
Archive Storage Class | STANDARD_IA | Infrequent Access Class |
Non Archive Storage Class | No Upload | Standard Class |
Non Archive Storage Class | STANDAND | Standard Class |
Non Archive Storage Class | STANDARD_IA | Infrequent Access Class |
Non Archive Storage Class | ARCHIVE | Archived Class |
Request Syntax:
PUT /{ObjectKey} HTTP/1.1
Host: {BucketName}.{endpoint}
Date: {date}
Authorization: {SignatureValue}
x-kss-storage-class: {StorageClass}
Attention:
Users can specify the storage class by setting the x-kss-storage-class
field in the form field. The rules are consistent with the upload file of Put Object.
The user can set the storage class of the file through the x-kss-storage-class
request header when initializing block upload.
Valid values are: STANDARD
、STANDARD_IA
、ARCHIVE
. The rules are consistent with the upload file of Put Object.
KS3 rejects this request for an invalid storage class.
Request Syntax:
POST /{ObjectKey}?uploads HTTP/1.1
Host: {BucketName}.{endpoint}
Date: {date}
Authorization: {SignatureValue}
x-kss-storage-class: {StorageClass}
Attention:
All subsequent block upload operations (Upload Part、Complete、Abort) will no longer accept the x-kss-storage-class
request header.
For replicated files, KS3 supports the reassignment of storage classes. If the copy source file is an archive storage file, the precondition for successful copy is that the source file must be unfrozen and in a readable state.
For replication chunking, KS3 does not currently support reassigning storage classes. The storage class of the destination file must be the same as the storage class of the source file.
For replication chunking, KS3 ignores the x-kss-storage-class
request header.
If the storage class of the source file is inconsistent with the storage class of the destination file, an error will be reported. Prompt InvalidStorageClass
.
Detailed explanation Restore Object
Note The archive file must be unfrozen before it can be downloaded normally.
GetObjectRequest request = new GetObjectRequest(bucketName, key);
GetObjectResult result = client.getObject(request);
Ks3Object object = result.getObject();
object.getObjectContent();
In the Java SDK, you can view the storage class by obtaining the meta information. The example code is as follows:
HeadObjectRequest request = new HeadObjectRequest(bucketName, key);
HeadObjectResult result =client.headObject(request);
String storageClass = result.getObjectMetadata().getStorageClass();
For standard storage files,getStorageClass
returns null
.
For standard infrequent access storage files,getStorageClass
returns STANDARD_IA
.
For archive storage files,getStorageClass
returns ARCHIVE
.
When a user obtains a file under a Bucket, KS3 returns its storage class for each file.
SDK Sample Code:
ListObjectsRequest request = new ListObjectsRequest(bucketName);
ObjectListing listing = client.listObjects(request);
for (Ks3ObjectSummary summary : listing.getObjectSummaries()) {
String storageClas = summary.getStorageClass();
}
For standard storage files,getStorageClass
returns STANDARD
.
For standard infrequent acccess storage files,getStorageClass
returns STANDARD_IA
.
For archive storage files,getStorageClass
returns ARCHIVE
.
When users view all the block upload requests under the current bucket, KS3 will return its storage class for each block upload.
SDK Sample Code:
ListMultipartUploadsRequest request = new ListMultipartUploadsRequest(bucketName);
ListMultipartUploadsResult result = client.listMultipartUploads(request);
for (MultiPartUploadInfo uploadInfo : result.getUploads()) {
String storageClass = uploadInfo.getStorageClass();
}
For standard storage files,getStorageClass
returns STANDARD
.
For standard infrequent access storage files,getStorageClass
returns STANDARD_IA
.
For archive storage files,getStorageClass
returns ARCHIVE
.
When the user lists the uploaded blocks of a block upload, KS3 will return the storage class of the current block upload.
SDK Sample Code:
ListPartsRequest reqest = new ListPartsRequest(bucketName, key, result.getUploadId());
ListPartsResult result = client.listParts(reqest);
String storageClass = result.getStorageClass();
For standard storage files,getStorageClass
returns STANDARD
.
For standard infrequent access storage files,getStorageClass
returns STANDARD_IA
.
For archive storage files,getStorageClass
returns ARCHIVE
.
Pure Mode