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:26
KS3 archive storage (KArchive) 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 type 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 type, the object will be the archive type automatically. If the bucket is the non archive type, the object will be the standard type automatically. If the x-kss-storageClass
of the object is specified, the user specified will prevail. For example, in the non archive storage space, the object specified. When the x-kss-storageClass
of is ARCHIVE
, the file is of archive storage type.
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 | Standard Infrequent Access Class |
Non Archive Storage Class | No Upload | Standard Class |
Non Archive Storage Class | STANDAND | Standard Class |
Non Archive Storage Class | STANDARD_IA | Standard 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 type 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 type 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 type.
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 types. 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 types. The storage type of the destination file must be the same as the storage type of the source file.
For replication chunking, KS3 ignores the x-kss-storage-class
request header.
If the storage type of the source file is inconsistent with the storage type 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 type 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 type 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 access 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 type 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 type 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
.
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