@InterfaceAudience.Private @InterfaceStability.Unstable public class MapReduceActionBuilder extends NodeBuilderBaseImpl<MapReduceActionBuilder> implements Builder<MapReduceAction>
MapReduceAction.
The properties of the builder can only be set once, an attempt to set them a second time will trigger
an IllegalStateException. The properties that are lists are an exception to this rule, of course multiple
elements can be added / removed.
Builder instances can be used to build several elements, although properties already set cannot be changed after
a call to build() either.
| Modifier and Type | Method and Description |
|---|---|
MapReduceAction |
build()
Creates a new
MapReduceAction object with the properties stores in this builder. |
MapReduceActionBuilder |
clearArchives()
Removes all archives that are registered with this builder.
|
MapReduceActionBuilder |
clearFiles()
Removes all files that are registered with this builder.
|
MapReduceActionBuilder |
clearJobXmls()
Removes all job XMLs that are registered with this builder.
|
static MapReduceActionBuilder |
create()
Creates and returns an empty builder.
|
static MapReduceActionBuilder |
createFromExistingAction(Node action)
Create and return a new
MapReduceActionBuilder that is based on an already built
MapReduceAction object. |
protected MapReduceActionBuilder |
getRuntimeSelfReference() |
MapReduceActionBuilder |
withArchive(String archive)
Registers an archive with this builder.
|
MapReduceActionBuilder |
withConfigClass(String configClass)
Registers a configuration class with this builder.
|
MapReduceActionBuilder |
withConfigProperty(String key,
String value)
Registers a configuration property (a key-value pair) with this builder.
|
MapReduceActionBuilder |
withFile(String file)
Registers a file with this builder.
|
MapReduceActionBuilder |
withJobXml(String jobXml)
Registers a job XML with this builder.
|
MapReduceActionBuilder |
withNameNode(String nameNode)
Registers a name node.
|
MapReduceActionBuilder |
withoutArchive(String archive)
Removes an archive if it is registered with this builder, otherwise does nothing.
|
MapReduceActionBuilder |
withoutFile(String file)
Removes a file if it is registered with this builder, otherwise does nothing.
|
MapReduceActionBuilder |
withoutJobXml(String jobXml)
Removes a job XML if it is registered with this builder, otherwise does nothing.
|
MapReduceActionBuilder |
withPipes(Pipes pipes)
Registers a
Pipes object. |
MapReduceActionBuilder |
withPrepare(Prepare prepare)
Registers a
Prepare object. |
MapReduceActionBuilder |
withResourceManager(String resourceManager) |
MapReduceActionBuilder |
withStreaming(Streaming streaming)
Registers a
Streaming object. |
addAsChildToAllParents, clearCredentials, clearParents, withCredential, withErrorHandler, withName, withoutCredential, withoutErrorHandler, withoutParent, withParent, withParentDefaultConditional, withParentWithCondition, withRetryInterval, withRetryMax, withRetryPolicypublic static MapReduceActionBuilder create()
public static MapReduceActionBuilder createFromExistingAction(Node action)
MapReduceActionBuilder that is based on an already built
MapReduceAction object. The properties of the builder will initially be the same as those of the
provided MapReduceAction object, but it is possible to modify them once.action - The MapReduceAction object on which this MapReduceActionBuilder will be based.MapReduceActionBuilder that is based on a previously built MapReduceAction object.public MapReduceActionBuilder withResourceManager(String resourceManager)
public MapReduceActionBuilder withNameNode(String nameNode)
nameNode - The string representing the name node.IllegalStateException - if a name node has already been set on this builder.public MapReduceActionBuilder withPrepare(Prepare prepare)
Prepare object.prepare - The Prepare object to register.IllegalStateException - if a Prepare object has already been set on this builder.public MapReduceActionBuilder withStreaming(Streaming streaming)
Streaming object.streaming - The Streaming object to register.IllegalStateException - if a Streaming object has already been set on this builder.public MapReduceActionBuilder withPipes(Pipes pipes)
Pipes object.pipes - The Pipes object to register.IllegalStateException - if a Pipes object has already been set on this builder.public MapReduceActionBuilder withJobXml(String jobXml)
jobXml - The job XML to register.public MapReduceActionBuilder withoutJobXml(String jobXml)
jobXml - The job XML to remove.public MapReduceActionBuilder clearJobXmls()
public MapReduceActionBuilder withConfigProperty(String key, String value)
key - The name of the property to set.value - The value of the property to set.IllegalStateException - if the provided key has already been set on this builder.public MapReduceActionBuilder withConfigClass(String configClass)
configClass - The string representing the configuration class.IllegalStateException - if a configuration class has already been set on this builder.public MapReduceActionBuilder withFile(String file)
file - The file to register.public MapReduceActionBuilder withoutFile(String file)
file - The file to remove.public MapReduceActionBuilder clearFiles()
public MapReduceActionBuilder withArchive(String archive)
archive - The archive to register.public MapReduceActionBuilder withoutArchive(String archive)
archive - The archive to remove.public MapReduceActionBuilder clearArchives()
public MapReduceAction build()
MapReduceAction object with the properties stores in this builder.
The new MapReduceAction object is independent of this builder and the builder can be used to build
new instances.build in interface Builder<MapReduceAction>MapReduceAction object with the properties stored in this builder.protected MapReduceActionBuilder getRuntimeSelfReference()
getRuntimeSelfReference in class NodeBuilderBaseImpl<MapReduceActionBuilder>Copyright © 2021 Apache Software Foundation. All rights reserved.