|
@@ -14,12 +14,12 @@
|
|
|
* See the License for the specific language governing permissions and
|
|
|
* limitations under the License.
|
|
|
*/
|
|
|
+
|
|
|
package org.apache.dolphinscheduler.common.task.flink;
|
|
|
|
|
|
import org.apache.dolphinscheduler.common.enums.ProgramType;
|
|
|
import org.apache.dolphinscheduler.common.process.ResourceInfo;
|
|
|
import org.apache.dolphinscheduler.common.task.AbstractParameters;
|
|
|
-import org.apache.dolphinscheduler.common.utils.CollectionUtils;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
@@ -29,201 +29,213 @@ import java.util.List;
|
|
|
*/
|
|
|
public class FlinkParameters extends AbstractParameters {
|
|
|
|
|
|
-
|
|
|
- * major jar
|
|
|
- */
|
|
|
- private ResourceInfo mainJar;
|
|
|
-
|
|
|
-
|
|
|
- * major class
|
|
|
- */
|
|
|
- private String mainClass;
|
|
|
-
|
|
|
-
|
|
|
- * deploy mode yarn-cluster yarn-client yarn-local
|
|
|
- */
|
|
|
- private String deployMode;
|
|
|
-
|
|
|
-
|
|
|
- * arguments
|
|
|
- */
|
|
|
- private String mainArgs;
|
|
|
-
|
|
|
-
|
|
|
- * slot count
|
|
|
- */
|
|
|
- private int slot;
|
|
|
-
|
|
|
-
|
|
|
- *Yarn application name
|
|
|
- */
|
|
|
-
|
|
|
- private String appName;
|
|
|
-
|
|
|
-
|
|
|
- * taskManager count
|
|
|
- */
|
|
|
- private int taskManager;
|
|
|
-
|
|
|
-
|
|
|
- * job manager memory
|
|
|
- */
|
|
|
- private String jobManagerMemory ;
|
|
|
-
|
|
|
-
|
|
|
- * task manager memory
|
|
|
- */
|
|
|
- private String taskManagerMemory;
|
|
|
-
|
|
|
-
|
|
|
- * resource list
|
|
|
- */
|
|
|
- private List<ResourceInfo> resourceList = new ArrayList<>();
|
|
|
-
|
|
|
-
|
|
|
- * The YARN queue to submit to
|
|
|
- */
|
|
|
- private String queue;
|
|
|
-
|
|
|
-
|
|
|
- * other arguments
|
|
|
- */
|
|
|
- private String others;
|
|
|
-
|
|
|
-
|
|
|
- * flink version
|
|
|
- */
|
|
|
- private String flinkVersion;
|
|
|
-
|
|
|
-
|
|
|
- * program type
|
|
|
- * 0 JAVA,1 SCALA,2 PYTHON
|
|
|
- */
|
|
|
- private ProgramType programType;
|
|
|
-
|
|
|
- public ResourceInfo getMainJar() {
|
|
|
- return mainJar;
|
|
|
- }
|
|
|
-
|
|
|
- public void setMainJar(ResourceInfo mainJar) {
|
|
|
- this.mainJar = mainJar;
|
|
|
- }
|
|
|
-
|
|
|
- public String getMainClass() {
|
|
|
- return mainClass;
|
|
|
- }
|
|
|
-
|
|
|
- public void setMainClass(String mainClass) {
|
|
|
- this.mainClass = mainClass;
|
|
|
- }
|
|
|
-
|
|
|
- public String getDeployMode() {
|
|
|
- return deployMode;
|
|
|
- }
|
|
|
-
|
|
|
- public void setDeployMode(String deployMode) {
|
|
|
- this.deployMode = deployMode;
|
|
|
- }
|
|
|
-
|
|
|
- public String getMainArgs() {
|
|
|
- return mainArgs;
|
|
|
- }
|
|
|
-
|
|
|
- public void setMainArgs(String mainArgs) {
|
|
|
- this.mainArgs = mainArgs;
|
|
|
- }
|
|
|
-
|
|
|
- public int getSlot() {
|
|
|
- return slot;
|
|
|
- }
|
|
|
-
|
|
|
- public void setSlot(int slot) {
|
|
|
- this.slot = slot;
|
|
|
- }
|
|
|
-
|
|
|
- public String getAppName() {
|
|
|
- return appName;
|
|
|
- }
|
|
|
-
|
|
|
- public void setAppName(String appName) {
|
|
|
- this.appName = appName;
|
|
|
- }
|
|
|
-
|
|
|
- public int getTaskManager() {
|
|
|
- return taskManager;
|
|
|
- }
|
|
|
-
|
|
|
- public void setTaskManager(int taskManager) {
|
|
|
- this.taskManager = taskManager;
|
|
|
- }
|
|
|
-
|
|
|
- public String getJobManagerMemory() {
|
|
|
- return jobManagerMemory;
|
|
|
- }
|
|
|
-
|
|
|
- public void setJobManagerMemory(String jobManagerMemory) {
|
|
|
- this.jobManagerMemory = jobManagerMemory;
|
|
|
- }
|
|
|
-
|
|
|
- public String getTaskManagerMemory() {
|
|
|
- return taskManagerMemory;
|
|
|
- }
|
|
|
-
|
|
|
- public void setTaskManagerMemory(String taskManagerMemory) {
|
|
|
- this.taskManagerMemory = taskManagerMemory;
|
|
|
- }
|
|
|
-
|
|
|
- public String getQueue() {
|
|
|
- return queue;
|
|
|
- }
|
|
|
-
|
|
|
- public void setQueue(String queue) {
|
|
|
- this.queue = queue;
|
|
|
- }
|
|
|
-
|
|
|
- public List<ResourceInfo> getResourceList() {
|
|
|
- return resourceList;
|
|
|
- }
|
|
|
+
|
|
|
+ * major jar
|
|
|
+ */
|
|
|
+ private ResourceInfo mainJar;
|
|
|
+
|
|
|
+
|
|
|
+ * major class
|
|
|
+ */
|
|
|
+ private String mainClass;
|
|
|
+
|
|
|
+
|
|
|
+ * deploy mode yarn-cluster yarn-local
|
|
|
+ */
|
|
|
+ private String deployMode;
|
|
|
+
|
|
|
+
|
|
|
+ * arguments
|
|
|
+ */
|
|
|
+ private String mainArgs;
|
|
|
+
|
|
|
+
|
|
|
+ * slot count
|
|
|
+ */
|
|
|
+ private int slot;
|
|
|
+
|
|
|
+
|
|
|
+ * parallelism
|
|
|
+ */
|
|
|
+ private int parallelism;
|
|
|
+
|
|
|
+
|
|
|
+ * yarn application name
|
|
|
+ */
|
|
|
+ private String appName;
|
|
|
+
|
|
|
+
|
|
|
+ * taskManager count
|
|
|
+ */
|
|
|
+ private int taskManager;
|
|
|
+
|
|
|
+
|
|
|
+ * job manager memory
|
|
|
+ */
|
|
|
+ private String jobManagerMemory;
|
|
|
+
|
|
|
+
|
|
|
+ * task manager memory
|
|
|
+ */
|
|
|
+ private String taskManagerMemory;
|
|
|
+
|
|
|
+
|
|
|
+ * resource list
|
|
|
+ */
|
|
|
+ private List<ResourceInfo> resourceList = new ArrayList<>();
|
|
|
+
|
|
|
+
|
|
|
+ * The YARN queue to submit to
|
|
|
+ */
|
|
|
+ private String queue;
|
|
|
+
|
|
|
+
|
|
|
+ * other arguments
|
|
|
+ */
|
|
|
+ private String others;
|
|
|
+
|
|
|
+
|
|
|
+ * flink version
|
|
|
+ */
|
|
|
+ private String flinkVersion;
|
|
|
+
|
|
|
+
|
|
|
+ * program type
|
|
|
+ * 0 JAVA,1 SCALA,2 PYTHON
|
|
|
+ */
|
|
|
+ private ProgramType programType;
|
|
|
+
|
|
|
+ public ResourceInfo getMainJar() {
|
|
|
+ return mainJar;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setMainJar(ResourceInfo mainJar) {
|
|
|
+ this.mainJar = mainJar;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getMainClass() {
|
|
|
+ return mainClass;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setMainClass(String mainClass) {
|
|
|
+ this.mainClass = mainClass;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getDeployMode() {
|
|
|
+ return deployMode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setDeployMode(String deployMode) {
|
|
|
+ this.deployMode = deployMode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getMainArgs() {
|
|
|
+ return mainArgs;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setMainArgs(String mainArgs) {
|
|
|
+ this.mainArgs = mainArgs;
|
|
|
+ }
|
|
|
+
|
|
|
+ public int getSlot() {
|
|
|
+ return slot;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setSlot(int slot) {
|
|
|
+ this.slot = slot;
|
|
|
+ }
|
|
|
+
|
|
|
+ public int getParallelism() {
|
|
|
+ return parallelism;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setParallelism(int parallelism) {
|
|
|
+ this.parallelism = parallelism;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getAppName() {
|
|
|
+ return appName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setAppName(String appName) {
|
|
|
+ this.appName = appName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public int getTaskManager() {
|
|
|
+ return taskManager;
|
|
|
+ }
|
|
|
|
|
|
- public void setResourceList(List<ResourceInfo> resourceList) {
|
|
|
- this.resourceList = resourceList;
|
|
|
- }
|
|
|
+ public void setTaskManager(int taskManager) {
|
|
|
+ this.taskManager = taskManager;
|
|
|
+ }
|
|
|
|
|
|
- public String getOthers() {
|
|
|
- return others;
|
|
|
- }
|
|
|
+ public String getJobManagerMemory() {
|
|
|
+ return jobManagerMemory;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setJobManagerMemory(String jobManagerMemory) {
|
|
|
+ this.jobManagerMemory = jobManagerMemory;
|
|
|
+ }
|
|
|
|
|
|
- public void setOthers(String others) {
|
|
|
- this.others = others;
|
|
|
- }
|
|
|
+ public String getTaskManagerMemory() {
|
|
|
+ return taskManagerMemory;
|
|
|
+ }
|
|
|
|
|
|
- public ProgramType getProgramType() {
|
|
|
- return programType;
|
|
|
- }
|
|
|
+ public void setTaskManagerMemory(String taskManagerMemory) {
|
|
|
+ this.taskManagerMemory = taskManagerMemory;
|
|
|
+ }
|
|
|
|
|
|
- public void setProgramType(ProgramType programType) {
|
|
|
- this.programType = programType;
|
|
|
- }
|
|
|
+ public String getQueue() {
|
|
|
+ return queue;
|
|
|
+ }
|
|
|
|
|
|
- public String getFlinkVersion() {
|
|
|
- return flinkVersion;
|
|
|
- }
|
|
|
+ public void setQueue(String queue) {
|
|
|
+ this.queue = queue;
|
|
|
+ }
|
|
|
|
|
|
- public void setFlinkVersion(String flinkVersion) {
|
|
|
- this.flinkVersion = flinkVersion;
|
|
|
- }
|
|
|
+ public List<ResourceInfo> getResourceList() {
|
|
|
+ return resourceList;
|
|
|
+ }
|
|
|
|
|
|
- @Override
|
|
|
- public boolean checkParameters() {
|
|
|
- return mainJar != null && programType != null;
|
|
|
- }
|
|
|
+ public void setResourceList(List<ResourceInfo> resourceList) {
|
|
|
+ this.resourceList = resourceList;
|
|
|
+ }
|
|
|
|
|
|
+ public String getOthers() {
|
|
|
+ return others;
|
|
|
+ }
|
|
|
|
|
|
- @Override
|
|
|
- public List<ResourceInfo> getResourceFilesList() {
|
|
|
- if (mainJar != null && !resourceList.contains(mainJar)) {
|
|
|
- resourceList.add(mainJar);
|
|
|
+ public void setOthers(String others) {
|
|
|
+ this.others = others;
|
|
|
}
|
|
|
- return resourceList;
|
|
|
- }
|
|
|
+
|
|
|
+ public ProgramType getProgramType() {
|
|
|
+ return programType;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setProgramType(ProgramType programType) {
|
|
|
+ this.programType = programType;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getFlinkVersion() {
|
|
|
+ return flinkVersion;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setFlinkVersion(String flinkVersion) {
|
|
|
+ this.flinkVersion = flinkVersion;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean checkParameters() {
|
|
|
+ return mainJar != null && programType != null;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<ResourceInfo> getResourceFilesList() {
|
|
|
+ if (mainJar != null && !resourceList.contains(mainJar)) {
|
|
|
+ resourceList.add(mainJar);
|
|
|
+ }
|
|
|
+ return resourceList;
|
|
|
+ }
|
|
|
+
|
|
|
}
|