Accumulo provides example configurations that you can modify. Copy all files from one of the examples folders in
/etc/accumulo/conf/examplesto/etc/accumulo/conf.For example, you would use the following command to copy all files in the
/etc/accumulo/conf/examples/512MB/standalonefolder to the/etc/accumulo/conffolder:cp /etc/accumulo/conf/examples/512MB/standalone/* /etc/accumulo/confAccumulo has the option to use a native library that manages the memory used for newly written data outside of the Java heap for the Tablet Servers. This allows Accumulo to manage its memory more efficiently, improving performance. Use of the native library should be enabled whenever possible. To build the native library for your system, run the following on each host:
JAVA_HOME=path_to_java_home /usr/hdp/current/accumulo-client/bin/build_native_library.shOnce this is done, various configuration properties must be changed to use the native maps, with examples appearing in the
/etc/accumulo/conf/examples/native-standalonefolder.![[Note]](../common/images/admon/note.png)
Note If native maps are not enabled, the examples in the standalone folder should be used instead.
Make an Accumulo data directory:
su - hdfshadoop fs -mkdir -p /apps/accumuloThe example configuration files include an
accumulo-site.xmlfile. Add the following property to this file to reference the Accumulo data directory:![[Note]](../common/images/admon/note.png)
Note Change the value of the instance.secret in the
accumulo-site.xmlfile, and then change the permissions on the file to 700 to protect the instance.secret from being readable by other users.<property> <name>instance.volumes</name> <value>hdfs://namenode:port/apps/accumulo</value> </property>For example:
<property> <name>instance.volumes</name> <value>hdfs://node-1.example.com:8020/apps/accumulo</value> </property>Add the configuration property
instance.zookeeper.hostto theaccumulo-site.xmlfile. The value of this property should be a comma-separated list of ZooKeeper servers.In this “host” file each non-commented line is expected to be some host which should have a process running on it. The “masters” file contains hosts which should run the Accumulo Master process (only one host will be the active master, the rest will be hot-standbys) and the “slaves” file contains hosts which should run the Accumulo TabletServer process.
For example:
<property> <name>instance.zookeeper.host</name> <value>server1:2181,server2:2181,server3:2181</value> <property>Change permissions to restrict access to the data directory to the Accumulo user:
su - hdfshadoop fs -chmod -R 700 /apps/accumuloChange ownership of the data directory to the Accumulo user and group.
su - hdfshadoop fs -chown -R accumlo:accumulo /apps/accumuloThe example configuration files also include an accumulo-env.sh file.
If JAVA_HOME is not defined in the environment, you should specify it by editing the following line of code in the accumulo-env.sh file:
test -z "$JAVA_HOME" && export JAVA_HOME=/path/to/javaIf you would like to prevent users from passing JAVA_HOME on the command line, remove the text prior to "export" and add the path to your JAVA_HOME. For example:
export JAVA_HOME=/usr/hadoop-jdk1.7.0_67If ZOOKEEPER_HOME is not defined in the environment, you should specify it by editing the following line of code in the accumulo-env.sh file:
test -z "$ZOOKEEPER_HOME" && export ZOOKEEPER_HOME=/path/to/zookeeperIf you would like to prevent users from passing ZOOKEEPER_HOME on the command line, remove the text prior to "export" and add the path to your ZOOKEEPER_HOME. For example:
export ZOOKEEPER_HOME=/usr/hdp/current/zookeeper-client/conf

