use of alluxio.conf.AlluxioConfiguration in project alluxio by Alluxio.
the class SwiftUnderFileSystemFactoryTest method factory.
/**
* This test ensures the Swift UFS module correctly accepts paths that begin with swift://.
*/
@Test
public void factory() {
AlluxioConfiguration conf = ConfigurationTestUtils.defaults();
UnderFileSystemFactory factory = UnderFileSystemFactoryRegistry.find("swift://localhost/test/path", conf);
UnderFileSystemFactory factory2 = UnderFileSystemFactoryRegistry.find("file://localhost/test/path", conf);
Assert.assertNotNull("A UnderFileSystemFactory should exist for swift paths when using this " + "module", factory);
Assert.assertNull("A UnderFileSystemFactory should not exist for non supported paths when " + "using this module", factory2);
}
use of alluxio.conf.AlluxioConfiguration in project alluxio by Alluxio.
the class ManagerProcessContext method getHostedAsyncStub.
private HostedManagerServiceGrpc.HostedManagerServiceStub getHostedAsyncStub() {
AlluxioConfiguration modifiedConfig = getConfWithHubTlsEnabled();
LOG.debug("Connecting to hosted hub with TLS enabled={}", modifiedConfig.getBoolean(PropertyKey.NETWORK_TLS_ENABLED));
if (mHostedAsyncSub == null) {
InetSocketAddress addr = NetworkAddressUtils.getConnectAddress(NetworkAddressUtils.ServiceType.HUB_HOSTED_RPC, modifiedConfig);
try {
GrpcChannel channel = RpcClient.createChannel(addr, modifiedConfig);
channel.intercept(new HubAuthenticationInterceptor(HubAuthentication.newBuilder().setApiKey(modifiedConfig.getString(PropertyKey.HUB_AUTHENTICATION_API_KEY)).setSecretKey(modifiedConfig.getString(PropertyKey.HUB_AUTHENTICATION_SECRET_KEY)).build()));
mHostedAsyncSub = HostedManagerServiceGrpc.newStub(channel);
} catch (AlluxioStatusException e) {
LOG.error("Error connecting to hosted hub {}", e);
}
}
return mHostedAsyncSub;
}
use of alluxio.conf.AlluxioConfiguration in project alluxio by Alluxio.
the class AgentRpcServerTest method testAwaitTermination.
@Test
public void testAwaitTermination() throws Exception {
AlluxioConfiguration conf = getTestSpecificTestConfig();
AgentProcessContext ctx = TestAgentProcessContextFactory.simpleContext(conf);
AgentRpcServer server = new AgentRpcServer(conf, ctx);
// shut down server once started.
Thread t = new Thread(server::close);
assertTrue(server.isServing());
t.start();
server.awaitTermination();
t.join();
assertFalse(server.isServing());
}
use of alluxio.conf.AlluxioConfiguration in project alluxio by Alluxio.
the class AdlUnderFileSystemFactoryTest method factory.
/**
* Tests the
* {@link UnderFileSystemFactoryRegistry#find(String, alluxio.conf.AlluxioConfiguration)} method.
*/
@Test
public void factory() {
AlluxioConfiguration conf = ConfigurationTestUtils.defaults();
UnderFileSystemFactory factory = UnderFileSystemFactoryRegistry.find("adl://localhost/test/path", conf);
Assert.assertNotNull("A UnderFileSystemFactory should exist for adl paths when using this module", factory);
factory = UnderFileSystemFactoryRegistry.find("adl://localhost/test/path", conf);
Assert.assertNotNull("A UnderFileSystemFactory should exist for adl paths when using this module", factory);
factory = UnderFileSystemFactoryRegistry.find("alluxio://localhost/test/path", conf);
Assert.assertNull("A UnderFileSystemFactory should not exist for unsupported paths when using" + " this module.", factory);
}
use of alluxio.conf.AlluxioConfiguration in project alluxio by Alluxio.
the class CosNUnderFileSystemFactoryTest method factory.
/**
* Tests that the COSN UFS module correctly accepts paths that begin with cosn://.
*/
@Test
public void factory() {
AlluxioConfiguration conf = ConfigurationTestUtils.defaults();
UnderFileSystemFactory factory = UnderFileSystemFactoryRegistry.find("cosn://test-bucket/path", conf);
Assert.assertNotNull("A UnderFileSystemFactory should exist for cosn paths when using this module", factory);
}
Aggregations