use of org.apache.hadoop.hdds.conf.InMemoryConfiguration in project ozone by apache.
the class TestOzoneClient method init.
@Before
public void init() throws IOException {
ConfigurationSource config = new InMemoryConfiguration();
client = new OzoneClient(config, new RpcClient(config, null) {
@Override
protected OmTransport createOmTransport(String omServiceId) throws IOException {
return new MockOmTransport();
}
@NotNull
@Override
protected XceiverClientFactory createXceiverClientFactory(List<X509Certificate> x509Certificates) throws IOException {
return new MockXceiverClientFactory();
}
});
store = client.getObjectStore();
}
use of org.apache.hadoop.hdds.conf.InMemoryConfiguration in project ozone by apache.
the class TestReplicatedFileChecksumHelper method init.
@Before
public void init() throws IOException {
ConfigurationSource config = new InMemoryConfiguration();
rpcClient = new RpcClient(config, null) {
@Override
protected OmTransport createOmTransport(String omServiceId) throws IOException {
return new MockOmTransport();
}
@NotNull
@Override
protected XceiverClientFactory createXceiverClientFactory(List<X509Certificate> x509Certificates) throws IOException {
return new MockXceiverClientFactory();
}
};
client = new OzoneClient(config, rpcClient);
store = client.getObjectStore();
}
use of org.apache.hadoop.hdds.conf.InMemoryConfiguration in project ozone by apache.
the class TestOzoneAddressClientCreation method explicitNonHAHostPort.
@Test
public void explicitNonHAHostPort() throws OzoneClientException, IOException {
TestableOzoneAddress address = new TestableOzoneAddress("o3://om:9862/vol1/bucket1/key1");
address.createClient(new InMemoryConfiguration());
Assert.assertFalse(address.simpleCreation);
Assert.assertEquals("om", address.host);
Assert.assertEquals(9862, address.port);
}
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 TestOzoneAddressClientCreation method implicitNonHA.
@Test
public void implicitNonHA() throws OzoneClientException, IOException {
TestableOzoneAddress address = new TestableOzoneAddress("/vol1/bucket1/key1");
address.createClient(new InMemoryConfiguration());
Assert.assertTrue(address.simpleCreation);
}
Aggregations