use of alluxio.conf.AlluxioConfiguration in project alluxio by Alluxio.
the class AbfsUnderFileSystemFactoryTest method factory.
/**
* Tests the
* {@link UnderFileSystemFactoryRegistry#find(String, alluxio.conf.AlluxioConfiguration)} method.
*/
@Test
public void factory() {
AlluxioConfiguration conf = ConfigurationTestUtils.defaults();
UnderFileSystemFactory factory = UnderFileSystemFactoryRegistry.find("abfs://localhost/test/path", conf);
Assert.assertNotNull("A UnderFileSystemFactory should exist for abfs paths when using this module", factory);
factory = UnderFileSystemFactoryRegistry.find("abfss://localhost/test/path", conf);
Assert.assertNotNull("A UnderFileSystemFactory should exist for abfss 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 WebUnderFileSystemFactoryTest method factory.
/**
* This test ensures the web UFS module correctly accepts paths that begin with / or file://.
*/
@Test
public void factory() {
AlluxioConfiguration conf = new InstancedConfiguration(ConfigurationUtils.defaults());
UnderFileSystemFactory factory = UnderFileSystemFactoryRegistry.find("https://downloads.alluxio.io/downloads/files/2.0.0-preview/", conf);
UnderFileSystemFactory factory2 = UnderFileSystemFactoryRegistry.find("http://downloads.alluxio.org/", conf);
UnderFileSystemFactory factory3 = UnderFileSystemFactoryRegistry.find("httpx://path", conf);
Assert.assertNotNull("A UnderFileSystemFactory should exist for http paths when using this module", factory);
Assert.assertNotNull("A UnderFileSystemFactory should exist for http paths when using this module", factory2);
Assert.assertNull("A UnderFileSystemFactory should not exist for non http paths when using this module", factory3);
}
use of alluxio.conf.AlluxioConfiguration in project alluxio by Alluxio.
the class WasbUnderFileSystemFactoryTest method factory.
/**
* Tests the
* {@link UnderFileSystemFactoryRegistry#find(String, alluxio.conf.AlluxioConfiguration)} method.
*/
@Test
public void factory() {
AlluxioConfiguration conf = ConfigurationTestUtils.defaults();
UnderFileSystemFactory factory = UnderFileSystemFactoryRegistry.find("wasb://localhost/test/path", conf);
Assert.assertNotNull("A UnderFileSystemFactory should exist for wasb paths when using this module", factory);
factory = UnderFileSystemFactoryRegistry.find("wasbs://localhost/test/path", conf);
Assert.assertNotNull("A UnderFileSystemFactory should exist for wasbs 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 ConfigurationUtilsTest method getMasterRpcAddressesFallback.
@Test
public void getMasterRpcAddressesFallback() {
AlluxioConfiguration conf = createConf(ImmutableMap.of(PropertyKey.MASTER_EMBEDDED_JOURNAL_ADDRESSES, "host1:99,host2:100", PropertyKey.MASTER_RPC_PORT, "50"));
assertEquals(Arrays.asList(InetSocketAddress.createUnresolved("host1", 50), InetSocketAddress.createUnresolved("host2", 50)), ConfigurationUtils.getMasterRpcAddresses(conf));
}
use of alluxio.conf.AlluxioConfiguration in project alluxio by Alluxio.
the class ConfigurationUtilsTest method getSingleMasterRpcAddress.
@Test
public void getSingleMasterRpcAddress() {
AlluxioConfiguration conf = createConf(ImmutableMap.of(PropertyKey.MASTER_HOSTNAME, "testhost", PropertyKey.MASTER_RPC_PORT, "1000"));
assertEquals(Arrays.asList(InetSocketAddress.createUnresolved("testhost", 1000)), ConfigurationUtils.getMasterRpcAddresses(conf));
}
Aggregations