ahmarsuhail commented on code in PR #7214: URL: https://github.com/apache/hadoop/pull/7214#discussion_r1959909346
########## hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/reading.md: ########## @@ -0,0 +1,228 @@ +t<!--- + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. See accompanying LICENSE file. +--> + +# Reading Data From S3 Storage. + +One of the most important --and performance sensitive-- parts +of the S3A connector is reading data from storage. +This is always evolving, based on experience, and benchmarking, +and in collaboration with other projects. + +## Key concepts + +* Data is read from S3 through an instance of an `ObjectInputStream`. +* There are different implementations of this in the codebase: + `classic`, `analytics` and `prefetch`; these are called _stream types_ +* The choice of which stream type to use is made in the hadoop configuration. + +Configuration Options + + +| Property | Permitted Values | Default | Meaning | +|----------------------------|---------------------------------------------------------|-----------|----------------------------| +| `fs.s3a.input.stream.type` | `default`, `classic`, `analytics`, `prefetch`, `custom` | `classic` | Name of stream type to use | + +### Stream type `default` + +The default implementation for this release of Hadoop. + +```xml +<property> + <name>fs.s3a.input.stream.type</name> + <value>default</value> +</property> +``` + +The choice of which stream type to use by default may change in future releases. + +It is currently `classic`. + +### Stream type `classic` + +This is the classic S3A input stream, present since the original addition of the S3A connector +to the Hadoop codebase. + +```xml +<property> + <name>fs.s3a.input.stream.type</name> + <value>classic</value> +</property> +``` + +Strengths +* Stable +* Petabytes of data are read through the connector a day, so well tested in production. +* Resilience to network and service failures acquired "a stack trace at at time" +* Implements Vector IO through parallel HTTP requests. + +Weaknesses +* Takes effort to tune for different file formats/read strategies (sequential, random etc), + and suboptimal if not correctly tuned for the workloads. +* Non-vectored reads are blocking, with the sole buffering being that from + the http client library and layers beneath. +* Can keep HTTP connections open too long/not returned to the connection pool. + This can consume both network resources and can consume all connections + in the pool if streams are not correctly closed by applications. + +### Stream type `analytics` + +An input stream aware-of and adapted-to the columnar storage +formats used in production, currently with specific support for +Apache Parquet. + +```xml +<property> + <name>fs.s3a.input.stream.type</name> + <value>default</value> Review Comment: typo: should be "analytics" -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
