.. _f-sshremoteconnection: module ``remote.ssh_remote_connection`` ======================================= .. inheritance-diagram:: pyenbc.remote.ssh_remote_connection Short summary +++++++++++++ module ``pyenbc.remote.ssh_remote_connection`` A class to help connect with a remote machine and send command line. :githublink:`%|py|5` Classes +++++++ +----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +======================================================================+=========================================================================================================================+ | :class:`ASSHClient ` | A simple class to access to remote machine through SSH. It requires modules `paramiko `_, ... | +----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ Static Methods ++++++++++++++ +----------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+ | staticmethod | truncated documentation | +======================================================================================================================+===================================================================================+ | :py:meth:`_get_out_format ` | Returns a function which converts an :epkg:`ANSI` string into a different format. | +----------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+ | :meth:`build_command_line_parameters ` | builds a string for ``pig`` based on the parameters in params | +----------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+ | :meth:`parse_lsout ` | parses the output of a command ls | +----------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+ Methods +++++++ +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +==============================================================================================+=====================================================================================================================================================================+ | :py:meth:`__init__ ` | constructor | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__str__ ` | usual | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`close ` | close the connection | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`close_session ` | close a session | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`connect ` | connect | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`dfs_exists ` | tells if a file exists on the cluster | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`dfs_ls ` | return the content of a folder on the cluster as a DataFrame | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`dfs_mkdir ` | creates a directory on the cluster | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`dfs_rm ` | removes a file on the cluster | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`download ` | download a file from the remote machine (not on the cluster) | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`download_cluster ` | download a file directly from the cluster to the local machine | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`execute_command ` | execute a command line, it raises an error if there is an error | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`exists ` | tells if a file exists on the bridge | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`hive_submit ` | submits a PIG script, it first upload the script to the default folder and submit it | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`ls ` | return the content of a folder on the bridge as a DataFrame | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`open_session ` | Opens a session with method `invoke_shell `_. ... | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`pig_submit ` | Submits a :epkg:`PIG` script, it first upload the script to the default folder and submits it. | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`send_recv_session ` | Send something through a session, the function is supposed to return when the execute of the given command is done, ... | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`upload ` | upload a file to the remote machine (not on the cluster) | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`upload_cluster ` | the function directly uploads the file to the cluster, it first goes to the bridge, uploads it to the cluster and ... | +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: pyenbc.remote.ssh_remote_connection :members: :special-members: __init__ :show-inheritance: