@Test public void testSplitRuntimeArgs() { String str1 = "-Xms314572800"; String[] result = RuntimeUtils.splitRuntimeArgs(str1); Assert.assertEquals(result.length,1); Assert.assertEquals(result[0], str1); String str2 = "-Xms314572800 -Dbar=foo"; result = RuntimeUtils.splitRuntimeArgs(str2); Assert.assertEquals(result.length,2); Assert.assertEquals(result[0], "-Xms314572800"); Assert.assertEquals(result[1], "-Dbar=foo"); String str3 = "-Xms314572800 -Dbar=foo -Dfoo=\"bar foo\""; result = RuntimeUtils.splitRuntimeArgs(str3); Assert.assertEquals(result.length,3); Assert.assertEquals(result[0], "-Xms314572800"); Assert.assertEquals(result[1], "-Dbar=foo"); Assert.assertEquals(result[2], "-Dfoo=\"bar foo\""); }
public static String[] splitRuntimeArgs(String input) { return input.split("\\s(?=([^\"]*\"[^\"]*\")*[^\"]*$)"); }
RuntimeUtils { public static String[] splitRuntimeArgs(String input) { return input.split("\\s(?=([^\"]*\"[^\"]*\")*[^\"]*$)"); } }
RuntimeUtils { public static String[] splitRuntimeArgs(String input) { return input.split("\\s(?=([^\"]*\"[^\"]*\")*[^\"]*$)"); }  }
RuntimeUtils { public static String[] splitRuntimeArgs(String input) { return input.split("\\s(?=([^\"]*\"[^\"]*\")*[^\"]*$)"); }  static List<String> composeCmd(InstanceConfig instanceConfig,
                                          String instanceFile,
                                          String extraDependenciesDir, /* extra dependencies for running instances */
                                          String logDirectory,
                                          String originalCodeFileName,
                                          String pulsarServiceUrl,
                                          String stateStorageServiceUrl,
                                          AuthenticationConfig authConfig,
                                          String shardId,
                                          Integer grpcPort,
                                          Long expectedHealthCheckInterval,
                                          String logConfigFile,
                                          String secretsProviderClassName,
                                          String secretsProviderConfig,
                                          Boolean installUserCodeDependencies,
                                          String pythonDependencyRepository,
                                          String pythonExtraDependencyRepository,
                                          int metricsPort,
                                          String narExtractionDirectory); static List<String> getArgsBeforeCmd(InstanceConfig instanceConfig, String extraDependenciesDir); static List<String> getGoInstanceCmd(InstanceConfig instanceConfig,
                                                String originalCodeFileName,
                                                String pulsarServiceUrl); static List<String> getCmd(InstanceConfig instanceConfig,
                                      String instanceFile,
                                      String extraDependenciesDir, /* extra dependencies for running instances */
                                      String logDirectory,
                                      String originalCodeFileName,
                                      String pulsarServiceUrl,
                                      String stateStorageServiceUrl,
                                      AuthenticationConfig authConfig,
                                      String shardId,
                                      Integer grpcPort,
                                      Long expectedHealthCheckInterval,
                                      String logConfigFile,
                                      String secretsProviderClassName,
                                      String secretsProviderConfig,
                                      Boolean installUserCodeDependencies,
                                      String pythonDependencyRepository,
                                      String pythonExtraDependencyRepository,
                                      int metricsPort,
                                      String narExtractionDirectory); static String genFunctionLogFolder(String logDirectory, InstanceConfig instanceConfig); static String getPrometheusMetrics(int metricsPort); static String[] splitRuntimeArgs(String input); static T getRuntimeFunctionConfig(Map<String, Object> configMap, Class<T> functionRuntimeConfigClass); }
RuntimeUtils { public static String[] splitRuntimeArgs(String input) { return input.split("\\s(?=([^\"]*\"[^\"]*\")*[^\"]*$)"); }  static List<String> composeCmd(InstanceConfig instanceConfig,
                                          String instanceFile,
                                          String extraDependenciesDir, /* extra dependencies for running instances */
                                          String logDirectory,
                                          String originalCodeFileName,
                                          String pulsarServiceUrl,
                                          String stateStorageServiceUrl,
                                          AuthenticationConfig authConfig,
                                          String shardId,
                                          Integer grpcPort,
                                          Long expectedHealthCheckInterval,
                                          String logConfigFile,
                                          String secretsProviderClassName,
                                          String secretsProviderConfig,
                                          Boolean installUserCodeDependencies,
                                          String pythonDependencyRepository,
                                          String pythonExtraDependencyRepository,
                                          int metricsPort,
                                          String narExtractionDirectory); static List<String> getArgsBeforeCmd(InstanceConfig instanceConfig, String extraDependenciesDir); static List<String> getGoInstanceCmd(InstanceConfig instanceConfig,
                                                String originalCodeFileName,
                                                String pulsarServiceUrl); static List<String> getCmd(InstanceConfig instanceConfig,
                                      String instanceFile,
                                      String extraDependenciesDir, /* extra dependencies for running instances */
                                      String logDirectory,
                                      String originalCodeFileName,
                                      String pulsarServiceUrl,
                                      String stateStorageServiceUrl,
                                      AuthenticationConfig authConfig,
                                      String shardId,
                                      Integer grpcPort,
                                      Long expectedHealthCheckInterval,
                                      String logConfigFile,
                                      String secretsProviderClassName,
                                      String secretsProviderConfig,
                                      Boolean installUserCodeDependencies,
                                      String pythonDependencyRepository,
                                      String pythonExtraDependencyRepository,
                                      int metricsPort,
                                      String narExtractionDirectory); static String genFunctionLogFolder(String logDirectory, InstanceConfig instanceConfig); static String getPrometheusMetrics(int metricsPort); static String[] splitRuntimeArgs(String input); static T getRuntimeFunctionConfig(Map<String, Object> configMap, Class<T> functionRuntimeConfigClass); static final String FUNCTIONS_INSTANCE_CLASSPATH; }