
                             S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r  SSK	Jr   " S	 S
\R                  5      rg)zBase class for Hive Job.    )absolute_import)division)unicode_literals)encoding)arg_parsers)base)utilc                   H    \ rS rSrSr\S 5       r\S 5       r\S 5       rSr	g)HiveBase   z,Common functionality between release tracks.c           
         U R                  SS9nUR                  SSSSS/ SS	9  UR                  S
SSS9  U R                  S[        R                  " 5       S/ SS9  U R                  S[        R                  " 5       SSS9  U R                  S[        R                  " 5       SSS9  U R                  S[
        R                  S9  U R                  SSSS9  g)z/Performs command line parsing specific to Hive.T)requiredz	--executez-eQUERYqueriesappendz+A Hive query to execute as part of the job.)metavardestactiondefaulthelpz--filez-fz>HCFS URI of file containing Hive script to execute as the job.)r   z--jarsJARzVComma separated list of jar files to be provided to the Hive and MR. May contain UDFs.)typer   r   r   z--paramszPARAM=VALUEz?A list of key value pairs to set variables in the Hive queries.)r   r   r   z--propertieszPROPERTY=VALUEz,A list of key value pairs to configure Hive.z--properties-filez--continue-on-failure
store_truez,Whether to continue if a single query fails.)r   r   N)add_mutually_exclusive_groupadd_argumentr   ArgListArgDictjob_utilPROPERTIES_FILE_HELP_TEXT)parserdrivers     4lib/googlecloudsdk/command_lib/dataproc/jobs/hive.pyArgsHiveBase.Args    s    00$0?F
T:  < $M  O   "/  1   "N	  P
   " ;	  =
 //  1 ;  =    c                 4    U R                   U R                  S.$ )Njarsfiler'   )argss    r"   GetFilesByTypeHiveBase.GetFilesByTypeG   s     				 r%   c                    U R                  UR                  US   US   S9nUR                  (       a  U R                  UR                  S9Ul        UR
                  (       a:  [        R                  " UR
                  U R                   R                  5      Ul	        [        R                  " UR                  UR                  5      nU(       a.  [        R                  " XPR                   R                  SS9Ul        XAl        g)z.Populates the hiveJob member of the given job.r(   r)   )continueOnFailurejarFileUrisqueryFileUri)r   T)
sort_itemsN)HiveJobcontinue_on_failurer   	QueryList	queryListparamsr   DictToAdditionalPropertyMessageScriptVariablesValuescriptVariablesr   BuildJobProperties
propertiesproperties_filePropertiesValuehiveJob)messagesjobfiles_by_typer*   hive_jobjob_propertiess         r"   ConfigureJobHiveBase.ConfigureJobM   s     22!&)"6*   ,H
 ||#--dll-Ch{{!)!I!I
++x''<<">h 00--/N$DD
**::tMh Kr%    N)
__name__
__module____qualname____firstlineno____doc__staticmethodr#   r+   rD   __static_attributes__rF   r%   r"   r   r      s@    4$= $=L  
  r%   r   N)rK   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.callioper   (googlecloudsdk.command_lib.dataproc.jobsr   job_baser	   r   JobBaser   rF   r%   r"   <module>rT      s3      &  ' % / E EFx Fr%   