File: //home/arjun/projects/env/lib/python3.10/site-packages/boto/emr/__pycache__/step.cpython-310.pyc
o
we3# � @ s� d dl mZ G dd� de�ZG dd� de�ZG dd� de�ZG dd � d e�ZG d
d� de�ZG dd
� d
e�ZG dd� de�Z G dd� de�Z
G dd� de
�ZG dd� de
�ZdS )� )�sixc @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) �Stepz!
Jobflow Step base class
c C � t � �)z=
:rtype: str
:return: URI to the jar
��NotImplemented��self� r �F/home/arjun/projects/env/lib/python3.10/site-packages/boto/emr/step.py�jar � zStep.jarc C r )zS
:rtype: list(str)
:return: List of arguments for the step
r r r r r
�args% r z Step.argsc C r )zB
:rtype: str
:return: The main class name
r r r r r
�
main_class, r zStep.main_classN)�__name__�
__module__�__qualname__�__doc__r r
r r r r r
r s
r c @ s6 e Zd ZdZ ddd�Zdd� Zdd � Zd
d� ZdS )
�JarStepz
Custom jar step
N�TERMINATE_JOB_FLOWc C s4 || _ || _|| _|| _t|tj�r|g}|| _dS )a
A elastic mapreduce step that executes a jar
:type name: str
:param name: The name of the step
:type jar: str
:param jar: S3 URI to the Jar file
:type main_class: str
:param main_class: The class to execute in the jar
:type action_on_failure: str
:param action_on_failure: An action, defined in the EMR docs to
take on failure.
:type step_args: list(str)
:param step_args: A list of arguments to pass to the step
N)�name�_jar�_main_class�action_on_failure�
isinstancer �string_types� step_args)r r r r r r r r r
�__init__8 s
zJarStep.__init__c C � | j S �N�r r r r r
r S � zJarStep.jarc C s g }| j r|�| j � |S r )r �extend)r r
r r r
r
V s zJarStep.argsc C r r )r r r r r
r ^ r zJarStep.main_class)Nr N)r r r r r r r
r r r r r
r 4 s
�r c @ sD e Zd ZdZ ddd�Zdd� Zd d
� Zdd� Zd
d� ZdS )�
StreamingStepz
Hadoop streaming step
Nr �3/home/hadoop/contrib/streaming/hadoop-streaming.jarc C sX || _ || _|| _|| _|| _|| _|| _| | _|
| _|| _ t
|tj�r'|g}|| _
dS )a�
A hadoop streaming elastic mapreduce step
:type name: str
:param name: The name of the step
:type mapper: str
:param mapper: The mapper URI
:type reducer: str
:param reducer: The reducer URI
:type combiner: str
:param combiner: The combiner URI. Only works for Hadoop 0.20
and later!
:type action_on_failure: str
:param action_on_failure: An action, defined in the EMR docs to
take on failure.
:type cache_files: list(str)
:param cache_files: A list of cache files to be bundled with the job
:type cache_archives: list(str)
:param cache_archives: A list of jar archives to be bundled with
the job
:type step_args: list(str)
:param step_args: A list of arguments to pass to the step
:type input: str or a list of str
:param input: The input uri
:type output: str
:param output: The output uri
:type jar: str
:param jar: The hadoop streaming jar. This can be either a local
path on the master node, or an s3:// URI.
N)r �mapper�reducer�combinerr �cache_files�cache_archives�input�outputr r r r r )r r r$ r% r&