7.5. Client Connections to Accumulo and Retrieving Effective accumulo-site.xml

The most efficient method for obtaining a client for Accumulo would be to install the Accumulo .rpm (yum install accumulo) and the Accumulo configuration .rpm (yum install accumulo-conf-standalone). Then copy all of the Accumulo default configuration files from the /usr/hdp/<version_number>/etc/accumulo/conf.dist/templates/ directory into your desired Accumulo configuration directory (e.g. /etc/accumulo/conf).

The next step is to obtain some configuration files from the registry for your Slider Accumulo cluster to enable your client to connect to the instance of Accumulo you created. Once Slider Accumulo is running, you can use the following commands to retrieve the necessary configurations from the registry into the Accumulo conf directory you are setting up.

slider registry --getconf accumulo-site --name <cluster name> --format xml --dest <accumulo_conf_dir>/accumulo-site.xml
slider registry --getconf client --name <cluster name> --format properties --dest <accumulo_conf_dir>/client.conf
slider registry --getconf accumulo-env --name <cluster name> --format json --dest accumulo-env.json
python -c "import json; file = open('accumulo-env.json'); content = json.load(file); file.close(); print content['content']" > <accumulo_conf_dir>/accumulo-env.sh

You should now be able to connect to Accumulo with the following command:

accumulo shell -u root

If there are multiple Slider Accumulo clusters running, you can connect to any of them from the same client installation. You still must download the configuration files from the registry for one running cluster, but you only need to do that once, and can then connect to other clusters with the following command:

accumulo shell -zh <zookeeper host(s)> -zi <instance name> -u root

Remember that the Accumulo instance name will be <user name>-<slider cluster name> if you are using the default setting in the appConfig.json file (which is strongly recommended).


loading table of contents...