ProcessJob extends AbstractProcessJob { public static String[] partitionCommandLine(final String command) { final ArrayList<String> commands = new ArrayList<>(); int index = 0; StringBuffer buffer = new StringBuffer(command.length()); boolean isApos = false; boolean isQuote = false; while (index < command.length()) { final char c = command.charAt(index); switch (c) { case ' ': if (!isQuote && !isApos) { final String arg = buffer.toString(); buffer = new StringBuffer(command.length() - index); if (arg.length() > 0) { commands.add(arg); } } else { buffer.append(c); } break; case '\'': if (!isQuote) { isApos = !isApos; } else { buffer.append(c); } break; case '"': if (!isApos) { isQuote = !isQuote; } else { buffer.append(c); } break; default: buffer.append(c); } index++; } if (buffer.length() > 0) { final String arg = buffer.toString(); commands.add(arg); } return commands.toArray(new String[commands.size()]); } ProcessJob(final String jobId, final Props sysProps,
      final Props jobProps, final Logger log);  ProcessJob(final String jobId, final Props sysProps,
      final Props jobProps, final Props privateProps, final Logger log); static String[] partitionCommandLine(final String command); @Override void run(); @Override void cancel(); @Override double getProgress(); int getProcessId(); String getPath(); static final String COMMAND; static final String AZKABAN_MEMORY_CHECK; @Deprecated
  static final String NATIVE_LIB_FOLDER; static final String EXECUTE_AS_USER; static final String KRB5CCNAME; }
@Test public void testPartitionCommand() throws Exception { final String test1 = "a b c"; Assert.assertArrayEquals(new String[]{"a", "b", "c"}, ProcessJob.partitionCommandLine(test1)); final String test2 = "a 'b c'"; Assert.assertArrayEquals(new String[]{"a", "b c"}, ProcessJob.partitionCommandLine(test2)); final String test3 = "a e='b c'"; Assert.assertArrayEquals(new String[]{"a", "e=b c"}, ProcessJob.partitionCommandLine(test3)); }