Skip to Main Content
Accumulo
book

Accumulo

by Michael Wall, Aaron Cordova, Billie Rinaldi
July 2015
Intermediate to advanced content levelIntermediate to advanced
400 pages
13h 19m
English
O'Reilly Media, Inc.
Content preview from Accumulo

Chapter 6. Server-Side Functionality and External Clients

Beyond reading and writing data, configuring tables, and securing data, Accumulo has a few additional concepts that can be used to add functionality to tables, and for performing some computation on the server side. These mechanisms are optional but can have a drastic impact on application performance, depending on the access patterns and updates that an application requires.

Constraints

Tables can apply logic to data that is about to be written to determine if a given mutation should be allowed. This logic is implemented by creating a constraint. Constraints are classes that implement a simple filtering function that is applied to every mutation before writing it to a table.

Constraints can be used to ensure that all data in a table conforms to some specification. This helps simplify applications, because they can then assume that the data read from this table has already been checked for conformity.

For example, we can choose to constrain the values inserted into a table to be of a certain type, such as a number. This allows applications to avoid having to check the type of values returned.

If a mutation fails a constraint’s criteria, the mutation will be rejected and a code returned, indicating which criterion was violated. For example:

try {
  writer.addMutation(m);
}
catch (MutationsRejectedException e) {
  List<ConstraintViolationSummary> violations =
    e.getConstraintViolationSummaries();

  for(ConstraintViolationSummary ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Lossless Information Hiding in Images

Lossless Information Hiding in Images

Zhe-Ming Lu, Shi-Ze Guo
Getting Started with Storm

Getting Started with Storm

Jonathan Leibiusky, Gabriel Eisbruch, Dario Simonassi

Publisher Resources

ISBN: 9781491947098Errata PageSupplemental Content