From 666af5870001d4d91a8ba3385e47f3fa2f6ca6ef Mon Sep 17 00:00:00 2001 From: Anmol Asrani Date: Mon, 9 Oct 2023 21:21:12 +0530 Subject: [PATCH] HADOOP-18876. ABFS: Change default for fs.azure.data.blocks.buffer to bytebuffer (#6009) The default value for fs.azure.data.blocks.buffer is changed from "disk" to "bytebuffer" This will speed up writing to azure storage, at the risk of running out of memory -especially if there are many threads writing to abfs at the same time and the upload bandwidth is limited. If jobs do run out of memory writing to abfs, change the option back to "disk" Contributed by Anmol Asrani --- .../hadoop/fs/azurebfs/constants/ConfigurationKeys.java | 2 +- .../fs/azurebfs/constants/FileSystemConfigurations.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/constants/ConfigurationKeys.java b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/constants/ConfigurationKeys.java index 872364a8e6..461e43a9f7 100644 --- a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/constants/ConfigurationKeys.java +++ b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/constants/ConfigurationKeys.java @@ -85,7 +85,7 @@ public final class ConfigurationKeys { /** * What data block buffer to use. *
- * Options include: "disk"(Default), "array", and "bytebuffer". + * Options include: "disk", "array", and "bytebuffer"(Default). *
* Default is {@link FileSystemConfigurations#DATA_BLOCKS_BUFFER_DEFAULT}. * Value: {@value} diff --git a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/constants/FileSystemConfigurations.java b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/constants/FileSystemConfigurations.java index 32f9966e30..00fc4a6a3d 100644 --- a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/constants/FileSystemConfigurations.java +++ b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/constants/FileSystemConfigurations.java @@ -132,11 +132,13 @@ public final class FileSystemConfigurations { */ public static final String DATA_BLOCKS_BUFFER_DISK = "disk"; + public static final String DATA_BLOCKS_BYTEBUFFER = "bytebuffer"; + /** * Default buffer option: {@value}. */ public static final String DATA_BLOCKS_BUFFER_DEFAULT = - DATA_BLOCKS_BUFFER_DISK; + DATA_BLOCKS_BYTEBUFFER; /** * IO rate limit. Value: {@value}