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

Disable buffering to disk for Azure output streams #18298

Merged
merged 1 commit into from
Jul 27, 2023
Merged
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 @@ -27,6 +27,8 @@

import static com.google.common.base.Preconditions.checkArgument;
import static java.lang.String.format;
import static org.apache.hadoop.fs.azurebfs.constants.ConfigurationKeys.DATA_BLOCKS_BUFFER;
import static org.apache.hadoop.fs.store.DataBlocks.DATA_BLOCKS_BUFFER_ARRAY;

public class TrinoAzureConfigurationInitializer
implements ConfigurationInitializer
Expand Down Expand Up @@ -117,6 +119,9 @@ public void initializeConfiguration(Configuration config)

// do not rely on information returned from local system about users and groups
config.set("fs.azure.skipUserGroupMetadataDuringInitialization", "true");

// disable buffering Azure output streams to disk(default is DATA_BLOCKS_BUFFER_DISK)
config.set(DATA_BLOCKS_BUFFER, DATA_BLOCKS_BUFFER_ARRAY);
}

private static Optional<String> dropEmpty(Optional<String> optional)
Expand Down