Search in sources :

Example 81 with InstancedConfiguration

use of alluxio.conf.InstancedConfiguration in project alluxio by Alluxio.

the class ProcessLauncherTest method scriptNotExists.

@Test
public void scriptNotExists() throws Exception {
    InstancedConfiguration conf = getTestConfig();
    conf.set(PropertyKey.HOME, "/path/to/non/existent/directory");
    assertThrows(IOException.class, () -> new ProcessLauncher(conf));
}
Also used : InstancedConfiguration(alluxio.conf.InstancedConfiguration) Test(org.junit.Test) BaseHubTest(alluxio.hub.test.BaseHubTest)

Example 82 with InstancedConfiguration

use of alluxio.conf.InstancedConfiguration in project alluxio by Alluxio.

the class AgentRpcServerTest method testGetAddress.

@Test
public void testGetAddress() {
    InstancedConfiguration c = new InstancedConfiguration(ServerConfiguration.global().copyProperties());
    c.set(PropertyKey.HUB_AGENT_RPC_BIND_HOST, "127.6.5.4");
    c.set(PropertyKey.HUB_AGENT_RPC_PORT, 0);
    InetSocketAddress addr = AgentRpcServer.getConfiguredAddress(c);
    assertEquals("127.6.5.4", addr.getHostString());
    assertEquals(0, addr.getPort());
}
Also used : InstancedConfiguration(alluxio.conf.InstancedConfiguration) InetSocketAddress(java.net.InetSocketAddress) Test(org.junit.Test) BaseHubTest(alluxio.hub.test.BaseHubTest)

Example 83 with InstancedConfiguration

use of alluxio.conf.InstancedConfiguration in project alluxio by Alluxio.

the class AgentRpcServerTest method getTestSpecificTestConfig.

private InstancedConfiguration getTestSpecificTestConfig() {
    InstancedConfiguration c = new InstancedConfiguration(ServerConfiguration.global().copyProperties());
    c.set(PropertyKey.HUB_AGENT_RPC_PORT, 0);
    return c;
}
Also used : InstancedConfiguration(alluxio.conf.InstancedConfiguration)

Example 84 with InstancedConfiguration

use of alluxio.conf.InstancedConfiguration in project alluxio by Alluxio.

the class OBSUnderFileSystemFactoryTest method factory.

/**
 * Tests that the OBS UFS module correctly accepts paths that begin with obs://.
 */
@Test
public void factory() {
    UnderFileSystemFactory factory = UnderFileSystemFactoryRegistry.find("obs://bucket/key", new InstancedConfiguration(ConfigurationUtils.defaults()));
    Assert.assertNotNull("A UnderFileSystemFactory should exist for obs paths when using this module", factory);
}
Also used : InstancedConfiguration(alluxio.conf.InstancedConfiguration) UnderFileSystemFactory(alluxio.underfs.UnderFileSystemFactory) Test(org.junit.Test)

Example 85 with InstancedConfiguration

use of alluxio.conf.InstancedConfiguration in project alluxio by Alluxio.

the class JournalUpgrader method main.

/**
 * Reads a journal via
 * {@code java -cp \
 * assembly/server/target/alluxio-assembly-server-<ALLUXIO-VERSION>-jar-with-dependencies.jar \
 * alluxio.master.journal.JournalUpgrader -master BlockMaster}.
 *
 * @param args arguments passed to the tool
 */
public static void main(String[] args) {
    if (!parseInputArgs(args)) {
        usage();
        System.exit(EXIT_FAILED);
    }
    if (sHelp) {
        usage();
        System.exit(EXIT_SUCCEEDED);
    }
    List<String> masters = new ArrayList<>();
    for (MasterFactory factory : ServiceUtils.getMasterServiceLoader()) {
        masters.add(factory.getName());
    }
    for (String master : masters) {
        Upgrader upgrader = new Upgrader(master, new InstancedConfiguration(ConfigurationUtils.defaults()));
        try {
            upgrader.upgrade();
        } catch (IOException e) {
            LOG.error("Failed to upgrade the journal for {}.", master, e);
            System.exit(EXIT_FAILED);
        }
    }
}
Also used : InstancedConfiguration(alluxio.conf.InstancedConfiguration) ArrayList(java.util.ArrayList) IOException(java.io.IOException) MasterFactory(alluxio.master.MasterFactory)

Aggregations

InstancedConfiguration (alluxio.conf.InstancedConfiguration)94 Test (org.junit.Test)35 AlluxioConfiguration (alluxio.conf.AlluxioConfiguration)16 AlluxioURI (alluxio.AlluxioURI)14 AlluxioProperties (alluxio.conf.AlluxioProperties)11 ArrayList (java.util.ArrayList)11 IOException (java.io.IOException)10 HashMap (java.util.HashMap)9 BaseHubTest (alluxio.hub.test.BaseHubTest)8 InetSocketAddress (java.net.InetSocketAddress)8 FileSystemShell (alluxio.cli.fs.FileSystemShell)6 FileSystemContext (alluxio.client.file.FileSystemContext)6 HealthCheckClient (alluxio.HealthCheckClient)5 AbstractFileSystemShellTest (alluxio.client.cli.fs.AbstractFileSystemShellTest)5 FileSystemShellUtilsTest (alluxio.client.cli.fs.FileSystemShellUtilsTest)5 MasterInquireClient (alluxio.master.MasterInquireClient)5 Properties (java.util.Properties)5 ParseException (org.apache.commons.cli.ParseException)5 ClientContext (alluxio.ClientContext)4 FileSystem (alluxio.client.file.FileSystem)4