Confluo
0.1.0
|
Public Member Functions | |
def | __init__ (self, host='localhost', port=9090) |
def | close (self) |
def | connect (self, host, port) |
def | disconnect (self) |
def | create_atomic_multilog (self, name, schema, storage_mode) |
def | set_current_atomic_multilog (self, atomic_multilog_name) |
def | remove_atomic_multilog (self) |
def | add_index (self, field_name, bucket_size=1) |
def | remove_index (self, field_name) |
def | add_filter (self, filter_name, filter_expr) |
def | remove_filter (self, filter_name) |
def | add_aggregate (self, aggregate_name, filter_name, aggregate_expr) |
def | remove_aggregate (self, aggregate_name) |
def | install_trigger (self, trigger_name, trigger_expr) |
def | remove_trigger (self, trigger_name) |
def | append_raw (self, data) |
def | append (self, rec) |
def | get_batch_builder (self) |
def | read_raw (self, offset) |
def | read (self, offset) |
def | get_aggregate (self, aggregate_name, begin_ms, end_ms) |
def | execute_filter (self, filter_expr) |
def | query_filter (self, filter_name, begin_ms, end_ms, filter_expr="") |
def | get_alerts (self, begin_ms, end_ms, trigger_name="") |
def | num_records (self) |
Public Attributes | |
LOG | |
socket_ | |
transport_ | |
protocol_ | |
client_ | |
cur_m_id_ | |
cur_schema_ | |
Client for Confluo through RPC.
def confluo.rpc.client.RpcClient.__init__ | ( | self, | |
host = 'localhost' , |
|||
port = 9090 |
|||
) |
Initializes the rpc client to the specified host and port. Args: host: The host for the client. port: The port number to communicate through.
def confluo.rpc.client.RpcClient.add_aggregate | ( | self, | |
aggregate_name, | |||
filter_name, | |||
aggregate_expr | |||
) |
Adds an aggregate to the atomic multilog. Args: aggregate_name: The name of the aggregate. filter_name: The name of the filter. aggregate_expr: The aggregate expression. Raises: ValueError.
def confluo.rpc.client.RpcClient.add_filter | ( | self, | |
filter_name, | |||
filter_expr | |||
) |
Adds a filter to the atomic multilog. Args: filter_name: The name of the filter filter_expr: The filter expression Raises: ValueError
def confluo.rpc.client.RpcClient.add_index | ( | self, | |
field_name, | |||
bucket_size = 1 |
|||
) |
Adds an index to the atomic multilog. Raises: ValueError.
def confluo.rpc.client.RpcClient.append | ( | self, | |
rec | |||
) |
Append record to the atomic multilog. Args: rec: The record to append. Raises: ValueError.
def confluo.rpc.client.RpcClient.append_raw | ( | self, | |
data | |||
) |
Append raw data to the atomic multilog. Args: data: The data to append. Raises: ValueError.
def confluo.rpc.client.RpcClient.close | ( | self | ) |
Closes the rpc client.
def confluo.rpc.client.RpcClient.connect | ( | self, | |
host, | |||
port | |||
) |
Connects the rpc client to the specified host and port. Args: host: The host of the client. port: The port number to communicate through.
def confluo.rpc.client.RpcClient.create_atomic_multilog | ( | self, | |
name, | |||
schema, | |||
storage_mode | |||
) |
Creates an atomic multilog for this client. Args: name: The name of the atomic multilog to create. schema: The schema for the atomic multilog. storage_mode: The mode for storage.
def confluo.rpc.client.RpcClient.disconnect | ( | self | ) |
Disconnects the rpc client from the host and port.
def confluo.rpc.client.RpcClient.execute_filter | ( | self, | |
filter_expr | |||
) |
Executes a specified filter. Args: filter_expr: The filter expression. Raises: ValueError. Returns: Record stream containing the data.
def confluo.rpc.client.RpcClient.get_aggregate | ( | self, | |
aggregate_name, | |||
begin_ms, | |||
end_ms | |||
) |
Gets an aggregate from the atomic multilog. Args: aggregate_name: The name of the aggregate. begin_ms: The beginning time in milliseconds. end_ms: The end time in milliseconds. Raises: ValueError. Returns: The aggregate.
def confluo.rpc.client.RpcClient.get_alerts | ( | self, | |
begin_ms, | |||
end_ms, | |||
trigger_name = "" |
|||
) |
Gets the alerts. Args: begin_ms: The beginning time in milliseconds. end_ms: The end time in milliseconds. trigger_name: The name of the trigger. Raises: ValueError. Returns: A stream of alerts.
def confluo.rpc.client.RpcClient.get_batch_builder | ( | self | ) |
Get a record batch builder instance Returns: A record batch builder instance.
def confluo.rpc.client.RpcClient.install_trigger | ( | self, | |
trigger_name, | |||
trigger_expr | |||
) |
Adds a trigger to the atomic multilog. Args: trigger_name: The name of the trigger to add. trigger_expr: The trigger expression. Raises: ValueError.
def confluo.rpc.client.RpcClient.num_records | ( | self | ) |
Gets the number of records in the atomic multilog. Raises: ValueError. Returns: The number of records.
def confluo.rpc.client.RpcClient.query_filter | ( | self, | |
filter_name, | |||
begin_ms, | |||
end_ms, | |||
filter_expr = "" |
|||
) |
Queries a filter. Args: filter_name: The name of the filter. begin_ms: The beginning time in milliseconds. end_ms: The end time in milliseconds. filter_expr: The filter expression. Raises: ValueError. Returns: A record stream containing the results of the filter.
def confluo.rpc.client.RpcClient.read_raw | ( | self, | |
offset | |||
) |
Reads raw data from a specified offset. Args: offset: The offset from the log to read from. Raises: ValueError. Returns: The data at the offset.
def confluo.rpc.client.RpcClient.remove_aggregate | ( | self, | |
aggregate_name | |||
) |
Removes an aggregate from the atomic multilog. Args: aggregate_name: The name of the aggregate. Raises: ValueError.
def confluo.rpc.client.RpcClient.remove_atomic_multilog | ( | self | ) |
Removes an atomic multilog from the client. Raises: ValueError.
def confluo.rpc.client.RpcClient.remove_filter | ( | self, | |
filter_name | |||
) |
Removes a filter from the atomic multilog. Args: filter_name: The name of the filter. Raises: ValueError.
def confluo.rpc.client.RpcClient.remove_index | ( | self, | |
field_name | |||
) |
Removes an index from the atomic multilog. Args: field_name: The name of the associated field. Raises: ValueError
def confluo.rpc.client.RpcClient.remove_trigger | ( | self, | |
trigger_name | |||
) |
Removes a trigger from the atomic multilog. Args: trigger_name: The name of the trigger. Raises: ValueError.
def confluo.rpc.client.RpcClient.set_current_atomic_multilog | ( | self, | |
atomic_multilog_name | |||
) |
Sets the atomic multilog to the desired atomic multilog. Args: atomic_multilog_name: The name of atomic multilog to set the current atomic multilog to.