Package org.apache.commons.cli

Examples of org.apache.commons.cli.MissingArgumentException


        @Override
        int runCmd(CommandLine cmdLine) throws Exception {
            String[] args = cmdLine.getArgs();
            if (args.length < 1) {
                throw new MissingArgumentException(
                        "'bookieSrc' argument required");
            }

            ClientConfiguration adminConf = new ClientConfiguration(bkConf);
            BookKeeperAdmin admin = new BookKeeperAdmin(adminConf);
View Full Code Here


        break;
      }
    }

    if (opt.getValues() == null && !opt.hasOptionalArg()) {
      throw new MissingArgumentException(opt);
    }
  }
View Full Code Here

        break;
      }
    }

    if (opt.getValues() == null && !opt.hasOptionalArg()) {
      throw new MissingArgumentException(opt);
    }
  }
View Full Code Here

        @Override
        int runCmd(CommandLine cmdLine) throws Exception {
            String[] args = cmdLine.getArgs();
            if (args.length < 1) {
                throw new MissingArgumentException(
                        "'bookieSrc' argument required");
            }

            ClientConfiguration adminConf = new ClientConfiguration(bkConf);
            BookKeeperAdmin admin = new BookKeeperAdmin(adminConf);
View Full Code Here

      shellState.checkTableState();
      tableName = shellState.getTableName();
    }
   
    if (cl.getArgList().isEmpty())
      throw new MissingArgumentException("No terms specified");
   
    // handle first argument, if present, the authorizations list to
    // scan with
    int numThreads = 20;
    if (cl.hasOption(numThreadsOpt.getOpt())) {
View Full Code Here

        if (!line.isEmpty())
          splits.add(decode ? new Text(Base64.decodeBase64(line.getBytes())) : new Text(line));
      }
    } else {
      if (cl.getArgList().isEmpty())
        throw new MissingArgumentException("No split points specified");
     
      for (String s : cl.getArgs()) {
        splits.add(new Text(s));
      }
    }
View Full Code Here

    ConsoleReader reader = new ConsoleReader();
    try {
      cl = new BasicParser().parse(opts, args);
     
      if (cl.hasOption(zooKeeperInstance.getOpt()) && cl.getOptionValues(zooKeeperInstance.getOpt()).length != 2)
        throw new MissingArgumentException(zooKeeperInstance);
     
      user = cl.getOptionValue(usernameOption.getOpt());
      passw = cl.getOptionValue(passwOption.getOpt());
     
      if (cl.hasOption(zooKeeperInstance.getOpt())) {
View Full Code Here

      setDebugging(cl.hasOption(debugOption.getLongOpt()));
      authTimeout = Integer.parseInt(cl.getOptionValue(authTimeoutOpt.getLongOpt(), DEFAULT_AUTH_TIMEOUT)) * 60 * 1000;
      disableAuthTimeout = cl.hasOption(disableAuthTimeoutOpt.getLongOpt());
     
      if (cl.hasOption(zooKeeperInstance.getOpt()) && cl.getOptionValues(zooKeeperInstance.getOpt()).length != 2)
        throw new MissingArgumentException(zooKeeperInstance);
     
    } catch (Exception e) {
      configError = true;
      printException(e);
      printHelp("shell", SHELL_DESCRIPTION, opts);
View Full Code Here

    public int execute(String fullCommand, CommandLine cl, Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException,
        IOException, MissingArgumentException {
      shellState.checkTableState();
     
      if (cl.getArgList().isEmpty())
        throw new MissingArgumentException("No terms specified");
     
      // handle first argument, if present, the authorizations list to
      // scan with
      int numThreads = 20;
      if (cl.hasOption(numThreadsOpt.getOpt())) {
View Full Code Here

          if (!line.isEmpty())
            splits.add(decode ? new Text(Base64.decodeBase64(line.getBytes())) : new Text(line));
        }
      } else {
        if (cl.getArgList().isEmpty())
          throw new MissingArgumentException("No split points specified");
       
        for (String s : cl.getArgs()) {
          splits.add(new Text(s));
        }
      }
View Full Code Here

TOP

Related Classes of org.apache.commons.cli.MissingArgumentException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.