Fix logging bugs and update plugins (#87)

* Update README to refer to lib/ directory (lib/ext/ is no longer
  expected to exist by default)
* Add some color to the log output
* Rename log4j configuration file so it uses a name that is recognized
  as a properties file so log4j doesn't try to parse it as XML, this
  rename also allows it to be loaded from the CLASSPATH
* Use CLASSPATH environment instead of `-cp` option
* Set up class path to include the Accumulo lib/ directory so it doesn't
  complain about missing log4j runtime libraries (This fixes #86)
* Update pom.xml by updating ZK version, removing accumulo-tracer, and
  bumping plugin versions
* Fix shading warning due to migration of javax.activation-api to
  jakarta.activation-api
7 files changed
tree: 681ca71e267d8ab56539a131b3f67f71acc24bca
  1. .github/
  2. bin/
  3. conf/
  4. contrib/
  5. docs/
  6. spark/
  7. src/
  8. .asf.yaml
  9. .gitignore
  10. CONTRIBUTING.md
  11. LICENSE
  12. NOTICE
  13. pom.xml
  14. README.md
README.md

Apache Accumulo Examples

Build Status

Setup instructions

Follow the steps below to run the Accumulo examples:

  1. Clone this repository

     git clone https://github.com/apache/accumulo-examples.git
    
  2. Follow Accumulo's quickstart to install and run an Accumulo instance. Accumulo has an accumulo-client.properties in conf/ that must be configured as the examples will use this file to connect to your instance.

  3. Review env.sh.example in to see if you need to customize it. If ACCUMULO_HOME & HADOOP_HOME are set in your shell, you may be able skip this step. Make sure ACCUMULO_CLIENT_PROPS is set to the location of your accumulo-client.properties.

     cp conf/env.sh.example conf/env.sh
     vim conf/env.sh
    
  4. Build the examples repo and copy the examples jar to Accumulo's lib/ directory to get on its class path:

     ./bin/build
     cp target/accumulo-examples.jar /path/to/accumulo/lib/
    
  5. 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 or runmr commands which are located in the bin/ directory of this repo. The runex command is a simple script that use the examples shaded jar to run a a class. The runmr starts a MapReduce job in YARN.
  • 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. Limit the mutation size to avoid running out of memory
deleteKeyValuePairDeleting a key/value pair and verifying the deletion in RFile.
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.
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.
sparkUsing Accumulo as input and output for Apache Spark jobs
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.
uniquecolsUse MapReduce to count unique columns in Accumulo
visibilityUsing visibilities (or combinations of authorizations). Also shows user permissions.
wordcountUse MapReduce and Accumulo to do a word count on text files

Release Testing

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