%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/modules/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/modules/hadoop.pyc

�
���^c@@s�dZddlmZmZmZddlZdddddgZd	�Zd
�Z	d�Z
dd�Zdd
�Z
d�Zd�Zdd�ZdS(uw
Support for hadoop

:maintainer: Yann Jouanin <yann.jouanin@intelunix.fr>
:maturity: new
:depends:
:platform: linux


i(tabsolute_importtprint_functiontunicode_literalsNuversionunamenodeudfsadminudfsufscC@s8tjjjd�s*tjjjd�r.dStdfS(u:
    Check if hadoop is present, then load the module
    uhadoopuhdfsuPThe hadoop execution module cannot be loaded: hadoop or hdfs binary not in path.(tsalttutilstpathtwhichtFalse(((s7/usr/lib/python2.7/site-packages/salt/modules/hadoop.pyt__virtual__s*cG@s�d}tjjjd�r$d}nd
}|r�|r�|tkr�i|d6|d6|d6dj|�d6}dj|�}td	|d
t	�}q�dSndS|S(uj
       Hadoop/hdfs command wrapper

       As Hadoop command has been deprecated this module will default
       to use hdfs command and fall back to hadoop if it is not found

       In order to prevent random execution the module name is checked

       Follows hadoop command template:
          hadoop module -command args
       E.g.: hadoop dfs -ls /
    uhadoopuhdfsutoolumoduleucommandu uargsu!{tool} {module} -{command} {args}ucmd.runtpython_shelluError: Unknown moduleu%Error: Module and command not definedN(
RRRRtNonet__authorized_modules__tjointformatt__salt__R(tmoduletcommandtargsttooltouttmappingstcmd((s7/usr/lib/python2.7/site-packages/salt/modules/hadoop.pyt_hadoop_cmds
	+cC@s#d}t|t�j�}|dS(uy
    Return version from hadoop version

    CLI Example:

    .. code-block:: bash

        salt '*' hadoop.version
    uversioni(RtTruetsplit(RR((s7/usr/lib/python2.7/site-packages/salt/modules/hadoop.pytversion<s
cG@s|rtd||�SdSdS(up
    Execute a command on DFS

    CLI Example:

    .. code-block:: bash

        salt '*' hadoop.dfs ls /
    udfsuError: command must be providedN(R(RR((s7/usr/lib/python2.7/site-packages/salt/modules/hadoop.pytdfsKs
cC@s@|dk	r/|dkr(tdd|�SdSn
tdd�SdS(	u+
    .. versionadded:: 2019.2.0

    Reports basic filesystem information and statistics. Optional flags may be used to filter the list of displayed DataNodes.

    arg
        [live] [dead] [decommissioning]

    CLI Example:

    .. code-block:: bash

        salt '*' hadoop.dfsadmin -report
    uliveudeadudecommissioningudfsadminureportuJError: the arg is wrong, it must be in ['live', 'dead', 'decommissioning']N(uliveudeadudecommissioning(R
R(targ((s7/usr/lib/python2.7/site-packages/salt/modules/hadoop.pytdfsadmin_report[s
cC@s,tdd|�}d}||kr(tStS(u�
    Check if a file or directory is present on the distributed FS.

    CLI Example:

    .. code-block:: bash

        salt '*' hadoop.dfs_present /some_random_file

    Returns True if the file is present
    udfsustatuNo such file or directory(RRR(Rt
cmd_returntmatch((s7/usr/lib/python2.7/site-packages/salt/modules/hadoop.pytdfs_presentsscC@s,tdd|�}d}||kr(tStS(u�
    Check if a file or directory is absent on the distributed FS.

    CLI Example:

    .. code-block:: bash

        salt '*' hadoop.dfs_absent /some_random_file

    Returns True if the file is absent
    udfsustatuNo such file or directory(RRR(RRR((s7/usr/lib/python2.7/site-packages/salt/modules/hadoop.pyt
dfs_absent�scC@s(d}|rd}ntddd|�S(uj
    Format a name node

    .. code-block:: bash

        salt '*' hadoop.namenode_format force=True
    uu-forceunamenodeuformatu-nonInteractive(R(tforcetforce_param((s7/usr/lib/python2.7/site-packages/salt/modules/hadoop.pytnamenode_format�s	(t__doc__t
__future__RRRtsalt.utils.pathRRRRRR
RRRR R#(((s7/usr/lib/python2.7/site-packages/salt/modules/hadoop.pyt<module>s						

Zerion Mini Shell 1.0