Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/3916#discussion_r22841684
--- Diff:
launcher/src/main/java/org/apache/spark/launcher/SparkSubmitOptionParser.java
---
@@ -0,0 +1,197 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.launcher;
+
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Parser for spark-submit command line options.
+ * </p>
+ * This class, although public, is not designed to be used outside of
Spark.
+ * <p/>
+ * This class encapsulates the parsing code for spark-submit command line
options, so that there
+ * is a single list of options that needs to be maintained (well, sort of,
but it makes it harder
+ * to break things).
+ */
+public abstract class SparkSubmitOptionParser {
+
+ // The following constants define the "main" name for the available
options. They're defined
+ // to avoid copy & paste of the raw strings where they're needed.
+ protected static final String ARCHIVES = "--archives";
+ protected static final String CLASS = "--class";
+ protected static final String CONF = "--conf";
+ protected static final String DEPLOY_MODE = "--deploy-mode";
+ protected static final String DRIVER_CLASS_PATH = "--driver-class-path";
+ protected static final String DRIVER_CORES = "--driver-cores";
+ protected static final String DRIVER_JAVA_OPTIONS =
"--driver-java-options";
+ protected static final String DRIVER_LIBRARY_PATH = "--driver-library
-path";
+ protected static final String DRIVER_MEMORY = "--driver-memory";
+ protected static final String EXECUTOR_CORES = "--executor-cores";
+ protected static final String EXECUTOR_MEMORY = "--executor-memory";
+ protected static final String FILES = "--files";
+ protected static final String JARS = "--jars";
+ protected static final String MASTER = "--master";
+ protected static final String NAME = "--name";
+ protected static final String NUM_EXECUTORS = "--num-executors";
+ protected static final String PROPERTIES_FILE = "--properties-file";
+ protected static final String PY_FILES = "--py-files";
+ protected static final String QUEUE = "--queue";
+ protected static final String TOTAL_EXECUTOR_CORES =
"--total-executor-cores";
--- End diff --
can you separate out the YARN ones and add a quick comment like `// for
YARN only` or something?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]