Skip to content
Open
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 @@ -140,9 +140,21 @@ public void close() {

public DelegateFileIO io(String location) {
String s = scheme(location);
if (s == null) {
throw new IllegalArgumentException(
String.format(
"File location has no URI scheme (expected s3://, file://, gs://, etc.): \"%s\". "
+ "This usually means the create-table request specified a table \"location\" "
+ "without a scheme, or the catalog warehouse is misconfigured.",
location));
}
String impl = SCHEME_TO_FILE_IO.get(s);
Preconditions.checkNotNull(
impl, String.format("unsupported scheme \"%s\": \"%s\"", s, location));
if (impl == null) {
throw new IllegalArgumentException(
String.format(
"Unsupported file location scheme \"%s\": \"%s\". Supported schemes: %s",
s, location, SCHEME_TO_FILE_IO.keySet()));
}
DelegateFileIO io = ioMap.get(impl);
if (io != null) {
return io;
Expand Down
Loading