Startup¶
Launch arkouda server¶
Follow the Installation instructions to build the arkouda server program. In a terminal, launch it with
arkouda_server -nl <numLocales>
Choose a number of locales that is right for your system and data. The -h
flag gives a detailed usage with additional command-line options added by Chapel.
The last line of output from the arkouda_server
command should look like
server listening on tcp://node01:5555
Use this hostname and port in the next step to connect to the server.
Connect a Python 3 client¶
In Python 3, connect to the arkouda server using the hostname and port shown by the server program (example values shown here)
>>> import arkouda as ak
>>> ak.connect(connect_url='tcp://node01:5555')
...
connected to node01:5555
If the output does not say “connected”, then something went wrong (even if the command executes). Check that the hostname and port match what the server printed, and that the hostname is reachable from the machine on which the client is running (e.g. not “localhost” for a remote server)
- arkouda.connect(server='localhost', port=5555, timeout=0, access_token=None, connect_url=None, access_channel=None)[source]¶
Connect to a running arkouda server.
- Parameters:
server (str, optional) – The hostname of the server (must be visible to the current machine). Defaults to localhost.
port (int, optional) – The port of the server. Defaults to 5555.
timeout (int, optional) – The timeout in seconds for client send and receive operations. Defaults to 0 seconds, whicn is interpreted as no timeout.
access_token (str, optional) – The token used to connect to an existing socket to enable access to an Arkouda server where authentication is enabled. Defaults to None.
connect_url (str, optional) – The complete url in the format of tcp://server:port?token=<token_value> where the token is optional
access_channel (Channel, optional) – The desired Channel implementation that differs from the default ZmqChannel
- Return type:
None
- Raises:
ConnectionError – Raised if there’s an error in connecting to the Arkouda server
ValueError – Raised if there’s an error in parsing the connect_url parameter
RuntimeError – Raised if there is a server-side error
Notes
On success, prints the connected address, as seen by the server. If called with an existing connection, the socket will be re-initialized.