use of org.apache.hadoop.hdds.conf.InMemoryConfiguration in project ozone by apache.
the class TestOzoneAddressClientCreation method explicitHAHostPort.
@Test
public void explicitHAHostPort() throws OzoneClientException, IOException {
TestableOzoneAddress address = new TestableOzoneAddress("o3://om:1234/vol1/bucket1/key1");
address.createClient(new InMemoryConfiguration());
Assert.assertFalse(address.simpleCreation);
Assert.assertEquals("om", address.host);
Assert.assertEquals(1234, address.port);
}
use of org.apache.hadoop.hdds.conf.InMemoryConfiguration in project ozone by apache.
the class TestTracingUtil method tracingEnabled.
private static MutableConfigurationSource tracingEnabled() {
MutableConfigurationSource config = new InMemoryConfiguration();
config.setBoolean(ScmConfigKeys.HDDS_TRACING_ENABLED, true);
return config;
}
use of org.apache.hadoop.hdds.conf.InMemoryConfiguration in project ozone by apache.
the class TestReplicationConfigValidator method testValidation.
@Test
public void testValidation() {
MutableConfigurationSource config = new InMemoryConfiguration();
final ReplicationConfigValidator validator = config.getObject(ReplicationConfigValidator.class);
validator.validate(RatisReplicationConfig.getInstance(THREE));
validator.validate(RatisReplicationConfig.getInstance(ONE));
validator.validate(StandaloneReplicationConfig.getInstance(THREE));
validator.validate(StandaloneReplicationConfig.getInstance(ONE));
}
use of org.apache.hadoop.hdds.conf.InMemoryConfiguration in project ozone by apache.
the class TestReplicationConfigValidator method testCustomValidation.
@Test(expected = IllegalArgumentException.class)
public void testCustomValidation() {
MutableConfigurationSource config = new InMemoryConfiguration();
config.set("ozone.replication.allowed-configs", "RATIS/THREE");
final ReplicationConfigValidator validator = config.getObject(ReplicationConfigValidator.class);
validator.validate(RatisReplicationConfig.getInstance(THREE));
validator.validate(RatisReplicationConfig.getInstance(ONE));
// exception is expected
}
use of org.apache.hadoop.hdds.conf.InMemoryConfiguration in project ozone by apache.
the class TestOzoneAddressClientCreation method explicitWrongScheme.
@Test(expected = OzoneClientException.class)
public void explicitWrongScheme() throws OzoneClientException, IOException {
TestableOzoneAddress address = new TestableOzoneAddress("ssh://host/vol1/bucket1/key1");
address.createClient(new InMemoryConfiguration());
}
Aggregations