From d85a756d6f2e3045d312f6411720cdaa6f9121ae Mon Sep 17 00:00:00 2001 From: wangyuyang Date: Fri, 24 Nov 2023 11:24:49 +0800 Subject: [PATCH] resolve conflict --- .../java/alluxio/master/file/DefaultFileSystemMaster.java | 1 + .../alluxio/underfs/obs/OBSLowLevelOutputStreamTest.java | 5 +++-- .../alluxio/underfs/oss/OSSLowLevelOutputStreamTest.java | 5 +++-- .../java/alluxio/underfs/oss/StsOssClientProviderTest.java | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/core/server/master/src/main/java/alluxio/master/file/DefaultFileSystemMaster.java b/core/server/master/src/main/java/alluxio/master/file/DefaultFileSystemMaster.java index 1d54c3499219..f0968fa502ac 100644 --- a/core/server/master/src/main/java/alluxio/master/file/DefaultFileSystemMaster.java +++ b/core/server/master/src/main/java/alluxio/master/file/DefaultFileSystemMaster.java @@ -198,6 +198,7 @@ import java.io.FileNotFoundException; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; diff --git a/underfs/obs/src/test/java/alluxio/underfs/obs/OBSLowLevelOutputStreamTest.java b/underfs/obs/src/test/java/alluxio/underfs/obs/OBSLowLevelOutputStreamTest.java index 906cd5d58f57..b78e9ad226ef 100644 --- a/underfs/obs/src/test/java/alluxio/underfs/obs/OBSLowLevelOutputStreamTest.java +++ b/underfs/obs/src/test/java/alluxio/underfs/obs/OBSLowLevelOutputStreamTest.java @@ -18,9 +18,9 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.when; -import alluxio.conf.Configuration; import alluxio.conf.InstancedConfiguration; import alluxio.conf.PropertyKey; +import alluxio.util.ConfigurationUtils; import alluxio.util.FormatUtils; import com.google.common.util.concurrent.ListenableFuture; @@ -62,7 +62,8 @@ public class OBSLowLevelOutputStreamTest { private static final String PARTITION_SIZE = "8MB"; private static final String KEY = "testKey"; private static final String UPLOAD_ID = "testUploadId"; - private static InstancedConfiguration sConf = Configuration.modifiableGlobal(); + private static InstancedConfiguration sConf = new InstancedConfiguration( + ConfigurationUtils.defaults()); private IObsClient mMockObsClient; private ListeningExecutorService mMockExecutor; diff --git a/underfs/oss/src/test/java/alluxio/underfs/oss/OSSLowLevelOutputStreamTest.java b/underfs/oss/src/test/java/alluxio/underfs/oss/OSSLowLevelOutputStreamTest.java index 95aab3ed7180..7f083c3130c6 100644 --- a/underfs/oss/src/test/java/alluxio/underfs/oss/OSSLowLevelOutputStreamTest.java +++ b/underfs/oss/src/test/java/alluxio/underfs/oss/OSSLowLevelOutputStreamTest.java @@ -19,9 +19,9 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.when; -import alluxio.conf.Configuration; import alluxio.conf.InstancedConfiguration; import alluxio.conf.PropertyKey; +import alluxio.util.ConfigurationUtils; import alluxio.util.FormatUtils; import com.aliyun.oss.OSS; @@ -65,7 +65,8 @@ public class OSSLowLevelOutputStreamTest { private static final String PARTITION_SIZE = "8MB"; private static final String KEY = "testKey"; private static final String UPLOAD_ID = "testUploadId"; - private static InstancedConfiguration sConf = Configuration.modifiableGlobal(); + private static InstancedConfiguration sConf = new InstancedConfiguration( + ConfigurationUtils.defaults()); private OSS mMockOssClient; private ListeningExecutorService mMockExecutor; diff --git a/underfs/oss/src/test/java/alluxio/underfs/oss/StsOssClientProviderTest.java b/underfs/oss/src/test/java/alluxio/underfs/oss/StsOssClientProviderTest.java index e71884a41ccb..b0683d908daa 100644 --- a/underfs/oss/src/test/java/alluxio/underfs/oss/StsOssClientProviderTest.java +++ b/underfs/oss/src/test/java/alluxio/underfs/oss/StsOssClientProviderTest.java @@ -15,10 +15,10 @@ import static org.junit.Assert.assertTrue; import alluxio.Constants; -import alluxio.conf.Configuration; import alluxio.conf.InstancedConfiguration; import alluxio.conf.PropertyKey; import alluxio.underfs.UnderFileSystemConfiguration; +import alluxio.util.ConfigurationUtils; import alluxio.util.network.HttpUtils; import com.aliyun.oss.OSSClient; @@ -48,7 +48,7 @@ public class StsOssClientProviderTest { @Before public void before() { - mConf = Configuration.copyGlobal(); + mConf = new InstancedConfiguration(ConfigurationUtils.defaults()); mEcsMetadataService = mConf.getString( PropertyKey.UNDERFS_OSS_STS_ECS_METADATA_SERVICE_ENDPOINT) + ECS_RAM_ROLE; }