use of org.apache.hadoop.hdds.conf.ConfigurationSource 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.ConfigurationSource 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.ConfigurationSource in project ozone by apache.
the class GeneratorScm method call.
@Override
public Void call() throws Exception {
init();
ConfigurationSource config = createOzoneConfiguration();
scmDb = DBStoreBuilder.createDBStore(config, new SCMDBDefinition());
containerStore = CONTAINERS.getTable(scmDb);
timer = getMetrics().timer("scm-generator");
runTests(this::writeScmData);
scmDb.close();
return null;
}
use of org.apache.hadoop.hdds.conf.ConfigurationSource in project ozone by apache.
the class TestReplicationConfig method testParseFromTypeAndFactorAsString.
@Test
public void testParseFromTypeAndFactorAsString() {
ConfigurationSource conf = new OzoneConfiguration();
ReplicationConfig replicationConfig = ReplicationConfig.parse(org.apache.hadoop.hdds.client.ReplicationType.valueOf(type), factor, conf);
validate(replicationConfig, org.apache.hadoop.hdds.client.ReplicationType.valueOf(type), org.apache.hadoop.hdds.client.ReplicationFactor.valueOf(factor));
}
use of org.apache.hadoop.hdds.conf.ConfigurationSource in project ozone by apache.
the class TestReplicationConfig method testParseFromTypeAndFactorAsStringifiedInteger.
@Test
public void testParseFromTypeAndFactorAsStringifiedInteger() {
ConfigurationSource conf = new OzoneConfiguration();
String f = factor == "ONE" ? "1" : factor == "THREE" ? "3" : "Test adjustment needed!";
ReplicationConfig replicationConfig = ReplicationConfig.parse(org.apache.hadoop.hdds.client.ReplicationType.valueOf(type), f, conf);
validate(replicationConfig, org.apache.hadoop.hdds.client.ReplicationType.valueOf(type), org.apache.hadoop.hdds.client.ReplicationFactor.valueOf(this.factor));
}
Aggregations