FRTc@sdZddlZddlZddlZddlmZddlmZmZm Z m Z m Z m Z m Z mZmZmZmZmZddlmZddlmZddlmZddlmZd efd YZdS( s, Represents a connection to the EMR service iN(t RegionInfo( tAddInstanceGroupsResponsetBootstrapActionListtClustertClusterSummaryListt HadoopSteptInstanceGroupListt InstanceListtJobFlowtJobFlowStepListtModifyInstanceGroupsResponsetRunJobFlowResponsetStepSummaryList(tJarStep(tAWSQueryConnection(tEmrResponseError(tsixt EmrConnectioncBs eZejjdddZejjdddZejjdddZeZ dZ dZ d-d-e d-d-d-d-d-d d-d-d d-e d-d Zd Zd ZdZd-d-d-d-dZdZd-dZd-d-d-d-dZd-dZd-d-d-dZd-d-dZdZdZdZdZdZdZdZd-d-d-dddde e d-ggd-d-d-d-d-d-d-d Z!d!Z"d"Z#d#Z$d$Z%d%Z&d&Z'd'Z(d(Z)d)Z*d*Z+d+Z,d,Z-RS(.tBotot emr_versions 2009-03-31temr_region_names us-east-1temr_region_endpoints(elasticmapreduce.us-east-1.amazonaws.comsEs3n://us-east-1.elasticmapreduce/libs/script-runner/script-runner.jars<s3n://us-east-1.elasticmapreduce/libs/state-pusher/0.1/fetchit/cCs| s!t||j|j} n| |_tt|j|||||||||jj| | | | d|d| |jj|_ d|_ dS(Ntvalidate_certst profile_nametelasticmapreduce( RtDefaultRegionNametDefaultRegionEndpointtregiontsuperRt__init__tendpointtnametauth_region_nametauth_service_name(tselftaws_access_key_idtaws_secret_access_keyt is_securetporttproxyt proxy_portt proxy_usert proxy_passtdebugthttps_connection_factoryRtpathtsecurity_tokenRR((s@/opt/freeware/lib/python2.7/site-packages/boto/emr/connection.pyR7s    cCsdgS(Nshmac-v4((R#((s@/opt/freeware/lib/python2.7/site-packages/boto/emr/connection.pyt_required_auth_capabilityRscCs i|d6}|jd|tS(s Describes an Elastic MapReduce cluster :type cluster_id: str :param cluster_id: The cluster id of interest t ClusterIdtDescribeCluster(t get_objectR(R#t cluster_idtparams((s@/opt/freeware/lib/python2.7/site-packages/boto/emr/connection.pytdescribe_clusterUs cCs'|jd|g}|r#|dSdS(s Describes a single Elastic MapReduce job flow :type jobflow_id: str :param jobflow_id: The job flow id of interest t jobflow_idsiN(tdescribe_jobflows(R#t jobflow_idtjobflows((s@/opt/freeware/lib/python2.7/site-packages/boto/emr/connection.pytdescribe_jobflowascCsi}|r"|j||dn|r>|j||dn|r`|jtjj|dsR sSetup Hadoop Debuggingtaction_on_failureRt main_classtjarRyit AmiVersiontAdditionalInfottruetVisibleToAllUserstfalset JobFlowRolet ServiceRolet RunJobFlowR`RaN(t_build_instance_common_argsRet#_build_instance_count_and_type_argsR|tdictRt iteritemsR tNonet DebuggingJart DebuggingArgstinsertRuRvt_build_bootstrap_action_argst_build_bootstrap_action_listtpopR3R t jobflowid(!R#R tlog_urit ec2_keynametavailability_zonetmaster_instance_typetslave_instance_typet num_instancesRt keep_alivetenable_debuggingthadoop_versionRwtbootstrap_actionsR}tadditional_infot ami_versiont api_paramstvisible_to_all_userst job_flow_rolet service_roleR5t common_paramstinstance_paramst list_argstdebugging_stepRxRytbootstrap_actiontbootstrap_action_argstkeytvaluetresponse((s@/opt/freeware/lib/python2.7/site-packages/boto/emr/connection.pyt run_jobflowslh           ""           cCs`|ttfksti}|r*dp-d|d<|j||gd|jd|ddS(s/ Set termination protection on specified Elastic MapReduce job flows :type jobflow_ids: list or str :param jobflow_ids: A list of job flow IDs :type termination_protection_status: bool :param termination_protection_status: Termination protection status RRtTerminationProtectedsJobFlowIds.membertSetTerminationProtectionR`Ra(tTruetFalseRdR@Rg(R#R9ttermination_protection_statusR5((s@/opt/freeware/lib/python2.7/site-packages/boto/emr/connection.pytset_termination_protectionHs cCs`|ttfksti}|r*dp-d|d<|j||gd|jd|ddS(s Set whether specified Elastic Map Reduce job flows are visible to all IAM users :type jobflow_ids: list or str :param jobflow_ids: A list of job flow IDs :type visibility: bool :param visibility: Visibility RRRsJobFlowIds.membertSetVisibleToAllUsersR`Ra(RRRdR@Rg(R#R9t visibilityR5((s@/opt/freeware/lib/python2.7/site-packages/boto/emr/connection.pytset_visible_to_all_users[s cCsdi}|j|ds   R