/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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 com.amazonaws.services.elasticmapreduce.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* A cluster step consisting of a JAR file whose main function will be executed. The main function submits a job for * Hadoop to execute and waits for the job to finish or fail. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class HadoopStepConfig implements Serializable, Cloneable, StructuredPojo { /** ** The path to the JAR file that runs during the step. *
*/ private String jar; /** ** The list of Java properties that are set when the step runs. You can use these properties to pass key-value pairs * to your main function. *
*/ private com.amazonaws.internal.SdkInternalMap* The name of the main class in the specified Java file. If not specified, the JAR file should specify a main class * in its manifest file. *
*/ private String mainClass; /** ** The list of command line arguments to pass to the JAR file's main function for execution. *
*/ private com.amazonaws.internal.SdkInternalList* The path to the JAR file that runs during the step. *
* * @param jar * The path to the JAR file that runs during the step. */ public void setJar(String jar) { this.jar = jar; } /** ** The path to the JAR file that runs during the step. *
* * @return The path to the JAR file that runs during the step. */ public String getJar() { return this.jar; } /** ** The path to the JAR file that runs during the step. *
* * @param jar * The path to the JAR file that runs during the step. * @return Returns a reference to this object so that method calls can be chained together. */ public HadoopStepConfig withJar(String jar) { setJar(jar); return this; } /** ** The list of Java properties that are set when the step runs. You can use these properties to pass key-value pairs * to your main function. *
* * @return The list of Java properties that are set when the step runs. You can use these properties to pass * key-value pairs to your main function. */ public java.util.Map* The list of Java properties that are set when the step runs. You can use these properties to pass key-value pairs * to your main function. *
* * @param properties * The list of Java properties that are set when the step runs. You can use these properties to pass * key-value pairs to your main function. */ public void setProperties(java.util.Map* The list of Java properties that are set when the step runs. You can use these properties to pass key-value pairs * to your main function. *
* * @param properties * The list of Java properties that are set when the step runs. You can use these properties to pass * key-value pairs to your main function. * @return Returns a reference to this object so that method calls can be chained together. */ public HadoopStepConfig withProperties(java.util.Map* The name of the main class in the specified Java file. If not specified, the JAR file should specify a main class * in its manifest file. *
* * @param mainClass * The name of the main class in the specified Java file. If not specified, the JAR file should specify a * main class in its manifest file. */ public void setMainClass(String mainClass) { this.mainClass = mainClass; } /** ** The name of the main class in the specified Java file. If not specified, the JAR file should specify a main class * in its manifest file. *
* * @return The name of the main class in the specified Java file. If not specified, the JAR file should specify a * main class in its manifest file. */ public String getMainClass() { return this.mainClass; } /** ** The name of the main class in the specified Java file. If not specified, the JAR file should specify a main class * in its manifest file. *
* * @param mainClass * The name of the main class in the specified Java file. If not specified, the JAR file should specify a * main class in its manifest file. * @return Returns a reference to this object so that method calls can be chained together. */ public HadoopStepConfig withMainClass(String mainClass) { setMainClass(mainClass); return this; } /** ** The list of command line arguments to pass to the JAR file's main function for execution. *
* * @return The list of command line arguments to pass to the JAR file's main function for execution. */ public java.util.List* The list of command line arguments to pass to the JAR file's main function for execution. *
* * @param args * The list of command line arguments to pass to the JAR file's main function for execution. */ public void setArgs(java.util.Collection* The list of command line arguments to pass to the JAR file's main function for execution. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setArgs(java.util.Collection)} or {@link #withArgs(java.util.Collection)} if you want to override the * existing values. *
* * @param args * The list of command line arguments to pass to the JAR file's main function for execution. * @return Returns a reference to this object so that method calls can be chained together. */ public HadoopStepConfig withArgs(String... args) { if (this.args == null) { setArgs(new com.amazonaws.internal.SdkInternalList* The list of command line arguments to pass to the JAR file's main function for execution. *
* * @param args * The list of command line arguments to pass to the JAR file's main function for execution. * @return Returns a reference to this object so that method calls can be chained together. */ public HadoopStepConfig withArgs(java.util.Collection