awsdocs / amazon-glacier-developer-guide Goto Github PK
View Code? Open in Web Editor NEWThe open source version of the Amazon Glacier docs
License: Other
The open source version of the Amazon Glacier docs
License: Other
Hi Randy..this is a test.
On this topi.. i see a spelling error.
The Java example at https://github.com/awsdocs/amazon-glacier-developer-guide/blob/master/doc_source/checksum-calculations.md contains a bug in getChunkSHA256Hashes
. The offset
variable is misused when reading from the fileStream
into the buff
buffer. As soon as you try to hash a file larger than one chunk size (1MiB) it will thrown an IndexOutOfBounds
exception:
Exception in thread "main" java.lang.IndexOutOfBoundsException
at java.base/java.io.FileInputStream.readBytes(Native Method)
at java.base/java.io.FileInputStream.read(FileInputStream.java:279)
at TreeHashExample.getChunkSHA256Hashes(TreeHashExample.java:97)
at TreeHashExample.computeSHA256TreeHash(TreeHashExample.java:56)
at TreeHashExample.main(TreeHashExample.java:28)
Removing the offset
variable and changing the while-loop to:
while ((bytesRead = fileStream.readNBytes(buff, 0, ONE_MB)) > 0) {
md.reset();
md.update(buff, 0, bytesRead);
chunkSHA256Hashes[idx++] = md.digest();
}
will make it work correctly.
Correct me if I'm wrong, but in this doc we mention bulk retrieval cost the least but we don't say how to calculate.
I did some search and found it's free:
https://aws.amazon.com/s3/glacier/pricing/
this was also mentioned in https://aws.amazon.com/about-aws/whats-new/2021/11/amazon-s3-glacier-storage-class-amazon-s3-glacier-flexible-retrieval/
If it is true, I think it'd be more user-friendly for the doc to just say so("cost the least" is technically true but ambiguous ).
Glacier topic blah ..has this test issue. fix it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.