dlmarion commented on code in PR #3180:
URL: https://github.com/apache/accumulo/pull/3180#discussion_r1097415819
##########
server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java:
##########
@@ -104,4 +111,88 @@ public Scope getChooserScope() {
assertThrows(RuntimeException.class, () -> vm.choose(chooserEnv,
volumes));
}
}
+
+ @Test
+ public void testConfigurationOverrides() throws Exception {
+
+ final String vol1 = "file://127.0.0.1/vol1/";
+ final String vol2 = "file://localhost/vol2/";
+ final String vol3 = "hdfs://127.0.0.1/accumulo";
+ final String vol4 = "hdfs://localhost/accumulo";
+
+ ConfigurationCopy conf = new ConfigurationCopy();
+ conf.set(Property.INSTANCE_VOLUMES, String.join(",", vol1, vol2, vol3,
vol4));
+ conf.set(Property.GENERAL_VOLUME_CHOOSER,
Property.GENERAL_VOLUME_CHOOSER.getDefaultValue());
+ conf.set(Property.GENERAL_ARBITRARY_PROP_PREFIX.getKey() + vol1 + "."
+ + HdfsClientConfigKeys.HedgedRead.THREADPOOL_SIZE_KEY, "10");
+ conf.set(Property.GENERAL_ARBITRARY_PROP_PREFIX.getKey() + vol1 + "."
+ + HdfsClientConfigKeys.DFS_CLIENT_CACHE_DROP_BEHIND_READS, "true");
+ conf.set(Property.GENERAL_ARBITRARY_PROP_PREFIX.getKey() + vol2 + "."
+ + HdfsClientConfigKeys.HedgedRead.THREADPOOL_SIZE_KEY, "20");
+ conf.set(Property.GENERAL_ARBITRARY_PROP_PREFIX.getKey() + vol2 + "."
+ + HdfsClientConfigKeys.DFS_CLIENT_CACHE_DROP_BEHIND_READS, "false");
+ conf.set(Property.GENERAL_ARBITRARY_PROP_PREFIX.getKey() + vol3 + "."
+ + HdfsClientConfigKeys.HedgedRead.THREADPOOL_SIZE_KEY, "30");
+ conf.set(Property.GENERAL_ARBITRARY_PROP_PREFIX.getKey() + vol3 + "."
+ + HdfsClientConfigKeys.DFS_CLIENT_CACHE_DROP_BEHIND_READS, "TRUE");
+ conf.set(Property.GENERAL_ARBITRARY_PROP_PREFIX.getKey() + vol4 + "."
+ + HdfsClientConfigKeys.HedgedRead.THREADPOOL_SIZE_KEY, "40");
+ conf.set(Property.GENERAL_ARBITRARY_PROP_PREFIX.getKey() + vol4 + "."
+ + HdfsClientConfigKeys.DFS_CLIENT_CACHE_DROP_BEHIND_READS, "FALSE");
+
+ VolumeManager vm = VolumeManagerImpl.get(conf, hadoopConf);
+
+ FileSystem fs1 = vm.getFileSystemByPath(new Path(vol1));
+ Configuration conf1 = fs1.getConf();
+
+ FileSystem fs2 = vm.getFileSystemByPath(new Path(vol2));
+ Configuration conf2 = fs2.getConf();
+
+ FileSystem fs3 = vm.getFileSystemByPath(new Path(vol3));
+ Configuration conf3 = fs3.getConf();
+
+ FileSystem fs4 = vm.getFileSystemByPath(new Path(vol4));
+ Configuration conf4 = fs4.getConf();
Review Comment:
Added a fifth volume to the test in e0c12c4.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]