Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HADOOP-19354. S3AInputStream to be created by factory under S3AStore. #7237

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1560,6 +1560,11 @@ private Constants() {
*/
public static final String AWS_AUTH_CLASS_PREFIX = "com.amazonaws.auth";


public static final String INPUT_STREAM_TYPE = "fs.s3a.input.stream.type";

public static final String INPUT_STREAM_TYPE_DEFAULT = "classic";

/**
* Controls whether the prefetching input stream is enabled.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package org.apache.hadoop.fs.s3a;

Check failure on line 1 in hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/InputStreamType.java

View check run for this annotation

ASF Cloudbees Jenkins ci-hadoop / Apache Yetus

hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/InputStreamType.java#L1

asflicense: Missing Apache License

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public enum InputStreamType {
CLASSIC("classic"),
PREFETCH("prefetch"),
ANALYTICS("analytics");

private final String name;

private static final Logger LOG = LoggerFactory.getLogger(InputStreamType.class);

InputStreamType(String name) {
this.name = name;
}

public static InputStreamType fromString(String inputStreamType) {
for (InputStreamType value : values()) {
if (value.name.equalsIgnoreCase(inputStreamType)) {
return value;
}
}
LOG.warn("Unknown input stream type {}, using default classic stream.", inputStreamType);

return CLASSIC;
}
}
Loading
Loading