Search in sources :

Example 91 with InstancedConfiguration

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

the class JobShell method main.

/**
 * Main method, starts a new JobShell.
 *
 * @param argv array of arguments given by the user's input from the terminal
 */
public static void main(String[] argv) throws IOException {
    int ret;
    InstancedConfiguration conf = new InstancedConfiguration(ConfigurationUtils.defaults());
    if (!ConfigurationUtils.masterHostConfigured(conf) && argv.length > 0) {
        System.out.println(ConfigurationUtils.getMasterHostNotConfiguredMessage("Alluxio job shell"));
        System.exit(1);
    }
    try (JobShell shell = new JobShell(conf)) {
        ret = shell.run(argv);
    }
    System.exit(ret);
}
Also used : InstancedConfiguration(alluxio.conf.InstancedConfiguration)

Example 92 with InstancedConfiguration

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

the class AlluxioWorkerMonitor method main.

/**
 * Starts the Alluxio worker monitor.
 *
 * @param args command line arguments, should be empty
 */
public static void main(String[] args) {
    if (args.length != 0) {
        LOG.info("java -cp {} {}", RuntimeConstants.ALLUXIO_JAR, AlluxioWorkerMonitor.class.getCanonicalName());
        LOG.warn("ignoring arguments");
    }
    AlluxioConfiguration conf = new InstancedConfiguration(ConfigurationUtils.defaults());
    HealthCheckClient client = new WorkerHealthCheckClient(NetworkAddressUtils.getConnectAddress(NetworkAddressUtils.ServiceType.WORKER_RPC, conf), ONE_MIN_EXP_BACKOFF, conf);
    if (!client.isServing()) {
        System.exit(1);
    }
    System.exit(0);
}
Also used : InstancedConfiguration(alluxio.conf.InstancedConfiguration) AlluxioConfiguration(alluxio.conf.AlluxioConfiguration) HealthCheckClient(alluxio.HealthCheckClient)

Example 93 with InstancedConfiguration

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

the class AlluxioJobWorkerMonitor method main.

/**
 * Starts the Alluxio job_worker monitor.
 *
 * @param args command line arguments, should be empty
 */
public static void main(String[] args) {
    if (args.length != 0) {
        LOG.info("java -cp {} {}", RuntimeConstants.ALLUXIO_JAR, AlluxioJobWorkerMonitor.class.getCanonicalName());
        LOG.warn("ignoring arguments");
    }
    AlluxioConfiguration conf = new InstancedConfiguration(ConfigurationUtils.defaults());
    HealthCheckClient client = new JobWorkerHealthCheckClient(NetworkAddressUtils.getConnectAddress(NetworkAddressUtils.ServiceType.JOB_WORKER_RPC, conf), AlluxioWorkerMonitor.ONE_MIN_EXP_BACKOFF, conf);
    if (!client.isServing()) {
        System.exit(1);
    }
    System.exit(0);
}
Also used : InstancedConfiguration(alluxio.conf.InstancedConfiguration) AlluxioConfiguration(alluxio.conf.AlluxioConfiguration) HealthCheckClient(alluxio.HealthCheckClient)

Example 94 with InstancedConfiguration

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

the class HdfsFileInputStreamIntegrationTest method createUfsInStream.

private void createUfsInStream(ReadType readType) throws Exception {
    InstancedConfiguration conf = new InstancedConfiguration(ServerConfiguration.copyProperties());
    conf.set(PropertyKey.USER_FILE_READ_TYPE_DEFAULT, readType.name());
    FileSystem fs = FileSystem.Factory.create(conf);
    FileSystemTestUtils.createByteFile(fs, UFS_ONLY_FILE, WritePType.THROUGH, FILE_LEN);
    mUfsInputStream = new HdfsFileInputStream(fs, new AlluxioURI(UFS_ONLY_FILE), null);
}
Also used : InstancedConfiguration(alluxio.conf.InstancedConfiguration) FileSystem(alluxio.client.file.FileSystem) HdfsFileInputStream(alluxio.hadoop.HdfsFileInputStream) AlluxioURI(alluxio.AlluxioURI)

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