Learn R Programming

RCassandra (version 0.1-3)

RC.connect: Connect, login, close connection to Cassandra

Description

RC.connect connects a to a host running Cassandra. All subsequent operations are performed on the handle returned by this function.

RC.close closes a Cassandra connection.

RC.login perform an authentication request.

Usage

RC.connect(host = NULL, port = 9160L) RC.close(conn) RC.login(conn, username = "default", password = "")

Arguments

host
host name or IP address to connect to using TCP/IP
port
port to connect to on the above host
conn
connection handle as returned by RC.connect
username
username for the authentication dictionary
password
password for the authentication dictionary

Value

RC.connect returns a Cassandra connection handle.RC.close return NULLRC.login returns conn.

Details

RC.connect return an opaque connection handle that has to be used for all subsequent calls on the same connection. RCassandra uses low-level system calls to communicate with Cassandra, this handle is not an R connection.

RC.close closes an existing Cassandra connection.

RC.login sends an authenticataion request with the given credentials. How this is processed depend on the authentication module use in the Cassandra instance this connection connects to.

Examples

Run this code
## Not run: 
# c <- RC.connect("cassandra-host")
# RC.login(c, "foo", "bar")
# RC.cluster.name(c)
# RC.describe.keyspaces(c)
# RC.close(c)
# ## End(Not run)

Run the code above in your browser using DataLab