Fixes #16 - Refactored examples in client.md (#19)

3 files changed
tree: 4523c0d0425f1a73b5467b33974d1be95a054ab4
  1. bin/
  2. conf/
  3. docs/
  4. src/
  5. .gitignore
  6. .travis.yml
  7. checkstyle.xml
  8. CONTRIBUTING.md
  9. examples.conf.template
  10. LICENSE
  11. NOTICE
  12. pom.xml
  13. README.md
README.md

Apache Accumulo Examples

Setup instructions

Before running any of the examples, the following steps must be performed.

  1. Install and run Accumulo via the instructions found in INSTALL.md of Accumulo's tarball. Remember the instance name. It will be referred to as “instance” throughout the examples. A comma-separated list of zookeeper servers will be referred to as “zookeepers”.

  2. Create an Accumulo user (for help see the ‘User Administration’ section of the user manual), or use the root user. This user and their password should replace any reference to “username” or “password” in the examples. This user needs the ability to create tables.

  3. Clone and build this repository.

     git clone https://github.com/apache/accumulo-examples.git
     mvn clean package
    
  4. Specify Accumulo connection information in conf/accumulo-client.properties. Some old examples still read connection information from an examples.conf file so that should also be configured.

     cd accumulo-examples
     nano conf/accumulo-client.properties
     cp examples.conf.template examples.conf
     nano examples.conf
    
  5. The examples have some custom iterators that need to be executed by Accumulo tablet servers. Make them available by copying the accumulo-examples.jar to Accumulo's lib/ext directory.

     cp target/accumulo-examples-X.Y.Z.jar /path/accumulo/lib/ext/
    
  6. Each Accumulo example has its own documentation and instructions for running the example which are linked to below.

When running the examples, remember the tips below:

  • Examples are run using the runex command which is located in the bin/ directory of this repo. The runex command is a simple wrapper around the Maven Exec plugin.
  • Commands intended to be run in bash are prefixed by ‘$’ and should be run from the root of this repository.
  • Several examples use the accumulo and accumulo-util commands which are expected to be on your PATH. These commands are found in the bin/ directory of your Accumulo installation.
  • Commands intended to be run in the Accumulo shell are prefixed by ‘>’.

Available Examples

Each example below highlights a feature of Apache Accumulo.

ExampleDescription
batchUsing the batch writer and batch scanner
bloomCreating a bloom filter enabled table to increase query performance
bulkIngestIngesting bulk data using map/reduce jobs on Hadoop
classpathUsing per-table classpaths
clientUsing table operations, reading and writing data in Java.
combinerUsing example StatsCombiner to find min, max, sum, and count.
compactionStrategyConfiguring a compaction strategy
constraintsUsing constraints with tables.
dirlistStoring filesystem information.
exportExporting and importing tables.
filedataStoring file data.
filterUsing the AgeOffFilter to remove records more than 30 seconds old.
helloworldInserting records both inside map/reduce jobs and outside. And reading records between two rows.
isolationUsing the isolated scanner to ensure partial changes are not seen.
mapredUsing MapReduce to read from and write to Accumulo tables.
maxmutationLimiting mutation size to avoid running out of memory.
regexUsing MapReduce and Accumulo to find data using regular expressions.
reservationsUsing conditional mutations to implement simple reservation system.
rgbalancerUsing a balancer to spread groups of tablets within a table evenly
rowhashUsing MapReduce to read a table and write to a new column in the same table.
sampleBuilding and using sample data in Accumulo.
shardUsing the intersecting iterator with a term index partitioned by document.
tabletofileUsing MapReduce to read a table and write one of its columns to a file in HDFS.
terasortGenerating random data and sorting it using Accumulo.
visibilityUsing visibilities (or combinations of authorizations). Also shows user permissions.

Release Testing

This repository can be used to test Accumulo release candidates. See docs/release-testing.md.