Search in sources :

Example 1 with MockXceiverClientFactory

use of org.apache.hadoop.ozone.client.MockXceiverClientFactory 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();
}
Also used : ConfigurationSource(org.apache.hadoop.hdds.conf.ConfigurationSource) MockOmTransport(org.apache.hadoop.ozone.client.MockOmTransport) MockOmTransport(org.apache.hadoop.ozone.client.MockOmTransport) OmTransport(org.apache.hadoop.ozone.om.protocolPB.OmTransport) ByteString(org.apache.ratis.thirdparty.com.google.protobuf.ByteString) IOException(java.io.IOException) OzoneClient(org.apache.hadoop.ozone.client.OzoneClient) MockXceiverClientFactory(org.apache.hadoop.ozone.client.MockXceiverClientFactory) XceiverClientFactory(org.apache.hadoop.hdds.scm.XceiverClientFactory) NotNull(org.jetbrains.annotations.NotNull) X509Certificate(java.security.cert.X509Certificate) MockXceiverClientFactory(org.apache.hadoop.ozone.client.MockXceiverClientFactory) InMemoryConfiguration(org.apache.hadoop.hdds.conf.InMemoryConfiguration) RpcClient(org.apache.hadoop.ozone.client.rpc.RpcClient) Before(org.junit.Before)

Aggregations

IOException (java.io.IOException)1 X509Certificate (java.security.cert.X509Certificate)1 ConfigurationSource (org.apache.hadoop.hdds.conf.ConfigurationSource)1 InMemoryConfiguration (org.apache.hadoop.hdds.conf.InMemoryConfiguration)1 XceiverClientFactory (org.apache.hadoop.hdds.scm.XceiverClientFactory)1 MockOmTransport (org.apache.hadoop.ozone.client.MockOmTransport)1 MockXceiverClientFactory (org.apache.hadoop.ozone.client.MockXceiverClientFactory)1 OzoneClient (org.apache.hadoop.ozone.client.OzoneClient)1 RpcClient (org.apache.hadoop.ozone.client.rpc.RpcClient)1 OmTransport (org.apache.hadoop.ozone.om.protocolPB.OmTransport)1 ByteString (org.apache.ratis.thirdparty.com.google.protobuf.ByteString)1 NotNull (org.jetbrains.annotations.NotNull)1 Before (org.junit.Before)1