To see the latest version of the document click here

Denodo SSH Custom Wrapper - User Manual

Introduction

ssh-customwrapper is a Virtual DataPort custom wrapper which uses the secure shell protocol to connect to a remote computer and execute a command.

The motivation behind the ssh-customwrapper is in the Denodo connectors that integrate the Denodo Platform with Big Data solutions like Apache Hadoop:

  • In this scenario it is useful to be able to execute a MapReduce job connecting to the Hadoop machine via SSH. Reading the output files with hdfs-custom wrapper when the MapReduce job has finished.

                             

Denodo Platform and Hadoop

SSH custom wrapper

Implemented by class com.denodo.connect.ssh.SSHWrapper.

The base views created from the SSHWrapper need the following mandatory parameters:

  • Host: Name of the remote machine or its IP address.

  • Port: Port number to connect to the remote machine, default is 22.

  • User: Username to log into the remote machine.

  • Command: Command to run on the remote machine after the connection has been established.

One optional parameter:

  • Connection timeout: Amount of time, in milliseconds, that the wrapper will wait for the SSH command to complete. Configure a value of 0 or leave the box blank to wait indefinitely.

There are also two parameters that are mutually exclusive:

  • Password: Password associated with the username.

  • Key file: Key file created with PuTTY key file generator.
  • Passphrase: Passphrase associated with the key file.

Base view edition to connect  to Hadoop in a VM and execute a MapReduce job

The base views created from the SSHWrapper have the following schema:

  • Exit code: The return value of the command. Exit code is used to check the result (success/failure) of the execution of the command. If the exit status is zero, then the command is success.

                

Exit Value

Exit Status

0

Success

Non-zero

Failure

2

Incorrect usage

126

Not an executable

127

Command not found

Tip for exit value 127: Make sure that ssh-customwrapper can find the command on the remote server. You may need to add path to the command to PATH environment variable. Also make sure that the startup script that sets PATH is actually executed for non-interactive sessions.

  • Execution result: The result of the command execution. Shows the process stdout when the command is successful, otherwise shows the process stderr.

View schema

 

The execution of the wrapper returns the result of the command execution.

View results