Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

50 lines (40 sloc) 2.452 kB
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<title>Accumulo Constraints</title>
<link rel='stylesheet' type='text/css' href='documentation.css' media='screen'/>
</head>
<body>
<h1>Apache Accumulo Documentation : Constraints</h1>
Accumulo supports constraints. Constraints are applied to mutations at ingest time.
<p>Implementing a new constraint is a snap. Simply write some Java code that implements <a href='apidocs/org/apache/accumulo/core/constraints/Constraint.html'>org.apache.accumulo.core.constraints.Constraint</a>.
<p>To deploy a new constraint, jar it up and put the jar in accumulo/lib/ext.
<p>After creating a constraint, set a table specific property to use it. The following example adds two constraints to table foo. In the example com.test.ExampleConstraint and com.test.AnotherConstraint are class names.
<p><pre>
user@instance:9999 perDayCounts&gt; createtable foo
user@instance:9999 foo&gt; config -t foo -s table.constraint.1=com.test.ExampleConstraint
user@instance:9999 foo&gt; config -t foo -s table.constraint.2=com.test.AnotherConstraint
user@instance:9999 foo&gt; config -t foo -f constraint
---------+------------------------------------------+-----------------------------------------
SCOPE | NAME | VALUE
---------+------------------------------------------+-----------------------------------------
table | table.constraint.1...................... | com.test.ExampleConstraint
table | table.constraint.2...................... | com.test.AnotherConstraint
---------+------------------------------------------+-----------------------------------------
user@instance:9999 foo&gt;
</pre>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.