/** * Manage Alluxio file system. * * @param args array of arguments given by the user's input from the terminal */ public static void main(String[] args) { InstancedConfiguration conf = new InstancedConfiguration(ConfigurationUtils.defaults()); if (!ConfigurationUtils.masterHostConfigured(conf) && args.length > 0) { System.out.println("Cannot run alluxio fsadmin shell as master hostname is not configured."); System.exit(1); } // Reduce the RPC retry max duration to fall earlier for CLIs conf.set(PropertyKey.USER_RPC_RETRY_MAX_DURATION, "5s", Source.DEFAULT); FileSystemAdminShell fsAdminShell = new FileSystemAdminShell(conf); System.exit(fsAdminShell.run(args)); }
/** * 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(String.format( "Cannot run alluxio job shell; master hostname is not " + "configured. Please modify %s to either set %s or configure zookeeper with " + "%s=true and %s=[comma-separated zookeeper master addresses]", Constants.SITE_PROPERTIES, PropertyKey.MASTER_HOSTNAME.toString(), PropertyKey.ZOOKEEPER_ENABLED.toString(), PropertyKey.ZOOKEEPER_ADDRESS.toString())); System.exit(1); } try (JobShell shell = new JobShell(conf)) { ret = shell.run(argv); } System.exit(ret); }
/** * Starts the Alluxio proxy. * * @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, AlluxioProxy.class.getCanonicalName()); System.exit(-1); } if (!ConfigurationUtils.masterHostConfigured(ServerConfiguration.global())) { ProcessUtils.fatalError(LOG, "Cannot run alluxio proxy; master hostname is not " + "configured. Please modify %s to either set %s or configure zookeeper with " + "%s=true and %s=[comma-separated zookeeper master addresses]", Constants.SITE_PROPERTIES, PropertyKey.MASTER_HOSTNAME.toString(), PropertyKey.ZOOKEEPER_ENABLED.toString(), PropertyKey.ZOOKEEPER_ADDRESS.toString()); } CommonUtils.PROCESS_TYPE.set(CommonUtils.ProcessType.PROXY); ProxyProcess process = ProxyProcess.Factory.create(); ProcessUtils.run(process); }
/** * Main method, starts a new FileSystemShell. * * @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 && !argv[0].equals("help")) { System.out.println(String.format( "Cannot run alluxio fs shell; master hostname is not " + "configured. Please modify %s to either set %s or configure zookeeper with " + "%s=true and %s=[comma-separated zookeeper master addresses]", Constants.SITE_PROPERTIES, PropertyKey.MASTER_HOSTNAME.toString(), PropertyKey.ZOOKEEPER_ENABLED.toString(), PropertyKey.ZOOKEEPER_ADDRESS.toString())); System.exit(1); } // Reduce the RPC retry max duration to fall earlier for CLIs conf.set(PropertyKey.USER_RPC_RETRY_MAX_DURATION, "5s", Source.DEFAULT); try (FileSystemShell shell = new FileSystemShell(conf)) { ret = shell.run(argv); } System.exit(ret); }
if (!ConfigurationUtils.masterHostConfigured(ServerConfiguration.global())) { System.out.println(String.format( "Cannot run alluxio job worker; master hostname is not "
if (!ConfigurationUtils.masterHostConfigured(ServerConfiguration.global())) { ProcessUtils.fatalError(LOG, "Cannot run alluxio worker; master hostname is not "
/** * Starts the Alluxio proxy. * * @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, AlluxioProxy.class.getCanonicalName()); System.exit(-1); } if (!ConfigurationUtils.masterHostConfigured()) { ProcessUtils.fatalError(LOG, "Cannot run alluxio proxy; master hostname is not " + "configured. Please modify %s to either set %s or configure zookeeper with " + "%s=true and %s=[comma-separated zookeeper master addresses]", Constants.SITE_PROPERTIES, PropertyKey.MASTER_HOSTNAME.toString(), PropertyKey.ZOOKEEPER_ENABLED.toString(), PropertyKey.ZOOKEEPER_ADDRESS.toString()); } CommonUtils.PROCESS_TYPE.set(CommonUtils.ProcessType.PROXY); ProxyProcess process = ProxyProcess.Factory.create(); ProcessUtils.run(process); }