What Gets Installed Where
This module provides an overview of the Riak TS configuration files, log files, ports, user accounts, data directory, command line utilities, and services. This is not a comprehensive list; however, it is a good starting place when reviewing which parts of Riak can be managed or monitored.
This module assumes Riak TS was installed from a binary package.
riak.conf is the main configuration file for node attribute settings. By default, it is located in
/etc/riak/. The following is a list of a few notable settings.
nodename- The name of the Riak node. The nodename must be unique and helps nodes communicate with each other within the cluster.
ring_size- Must be set to an integer, which is the number of partitions in the cluster. Note, the ring size must be set before the nodes are started, and it should not be updated once the cluster has been created. The default number of partitions is 64.
search- Can be set to on or off to enable or disable the use of Riak’s search. By default search is off.
log.console.level- The message level that is sent to console.log. Options: debug, info, error, and warning. The default is info.
storage_backend- The available options are: bitcask, levelbd, memory, or multi. By default the storage backend is set to bitcask. Read our documentation to learn more about each backend.
Additionally, default bucket properties and object settings can be configured in
riak.conf. For a complete list please visit the Riak configuration reference guide.
advanced.config is an optional configuration file that contains configuration management settings and should be located in
/etc/riak. By default, it is not present and will need to be created.
advanced.config should be written in Erlang. To learn more about the available setting please visit the documentation.
Riak TS Logs
By default all Riak logs will be located in
/var/log/riak. To change individual log locations
riak.conf can be updated. There are five different logs:
- console.log - By default, console.log includes messages from the Riak subsystems, of all levels; debug, error, warning, and info. This log is great for understanding the context around an error or crash.
- error.log - Includes general errors from the Riak subsystems: active anti-entropy (AAE), search, core, repl, etc.
- run.log - Logs the command-line arguments during the startup of Riak TS.
- erlang.log - Messages from the Erlang Virtual Machine.
- crash.log - Contains fatal events including: node failures, running out of disk space, etc.
Riak Client Port
The default Protocol Buffers port is
8087. This port must be able to accept incoming requests. A request could be fetching or deleting an object.
Learn more about the Riak Client Port on docs.basho.com.
Riak User Accounts
riak and group
riak are created to manage the log files and log directory, and data directory. The riak user also runs the riak process.
The main data directory is
/var/lib/riak/, it contains the following subdirectories:
- ring - The mapping of the location of data partitions on the Riak nodes.
- leveldb - The disk location of data stored in the leveldb backend.
- bitcask - The disk location of data stored in the bitcask backend.
- memory - The disk location of data stored in the memory backend.
- kv_vnode - Contains the metadata for vnodes and, most imprortantly, vector clocks.
- cluster_meta - Contains the meta-data for the cluster.
- ddl_ebin - The disk location of the Riak TS-generated Data Description Language(DDL) helper modules.
- riak_kv_compile_tab.dets and riak_kv_compile_tab_v2.dets - contain infomation regarding the compilation process of the DDL helper modules.
Command Line Utilities
Riak TS has four useful executables located in
- riak - Is the primary executable for node-level operations, and its main function is to control and monitor the node’s state. A few useful commands are
riak ping. Learn more here.
- riak-admin - Is used for administering cluster commands, such as;
member-status. For more information regarding these and other operations please refer to the documentation.
- riak-debug - Is used to collect logs and system information for Support. It creates a tarball which can easily be attached to an email.
- riak-shell - The
riak-shellis used to run SQL commands on any Riak TS node. To learn more about the shell please visit the documentation.
--help with any of the executables (except
riak-debug) to learn more about all the available command line options.
Riak runs inside an Erlang Virtural Machine. If there are any service crashes the VM will restart, which means it is highly unlikely to have downtime due to a hung process. The following services should be running on each Riak TS node:
- riak - Is the Riak process for the Erlang VM. Within the process status output, the name of the Riak node can be identified by the
- epmd - Erlang Port Mapper Daemon is an Erlang process that enables Erlang VMs to communicate within the cluster. Additionally, it enables the joining process of new Erlang VMs.
- run_erl - Is the
riak consolewhich allows users to run the node in the foreground.
We have completed the Introduction to Riak TS track! In this track we:
- Became familiar with the benefits of Riak TS when storing time series data.
- Installed Riak TS and learned nine commonly used terms.
- Learned where the configuration files, Riak core directory, and log files are located, as well as about the services, command line utilities, and user accounts installed by default.
What’s next? Start the Introduction to Operations track, where you will learn how to configure a cluster and set up replication. Or start the Introduction to Application Integration track, where you will learn how to create Riak TS tables and use various APIs to develop applications.
Do you have questions, comments, suggestions, or just want to chat about topics related to Basho Academy? If so, please drop by our community forums and say hello.