Tabnine Logo
Constraints.addConstraint
Code IndexAdd Tabnine to your IDE (free)

How to use
addConstraint
method
in
org.apache.hadoop.hbase.constraint.Constraints

Best Java code snippets using org.apache.hadoop.hbase.constraint.Constraints.addConstraint (Showing top 9 results out of 315)

origin: apache/hbase

/**
 * Add a {@link Constraint} to the table with the given configuration
 * <p>
 * Each constraint, when added to the table, will have a specific priority,
 * dictating the order in which the {@link Constraint} will be run. A
 * {@link Constraint} added will run on the regionserver before those added to
 * the {@link HTableDescriptor} later.
 * 
 * @param desc
 *          table descriptor to the constraint to
 * @param constraint
 *          to be added
 * @param conf
 *          configuration associated with the constraint
 * @throws IOException
 *           if any constraint could not be deserialized. Assumes if 1
 *           constraint is not loaded properly, something has gone terribly
 *           wrong and that all constraints need to be enforced.
 */
public static void add(HTableDescriptor desc,
  Class<? extends Constraint> constraint, Configuration conf)
  throws IOException {
 enable(desc);
 long priority = getNextPriority(desc);
 addConstraint(desc, constraint, conf, priority++);
 updateLatestPriority(desc, priority);
}
origin: apache/hbase

addConstraint(desc, clazz, null, priority++);
origin: apache/hbase

long priority = getNextPriority(desc);
for (Pair<Class<? extends Constraint>, Configuration> pair : constraints) {
 addConstraint(desc, pair.getFirst(), pair.getSecond(), priority++);
origin: co.cask.hbase/hbase

/**
 * Add a {@link Constraint} to the table with the given configuration
 * <p>
 * Each constraint, when added to the table, will have a specific priority,
 * dictating the order in which the {@link Constraint} will be run. A
 * {@link Constraint} added will run on the regionserver before those added to
 * the {@link HTableDescriptor} later.
 * 
 * @param desc
 *          table descriptor to the constraint to
 * @param constraint
 *          to be added
 * @param conf
 *          configuration associated with the constraint
 * @throws IOException
 *           if any constraint could not be deserialized. Assumes if 1
 *           constraint is not loaded properly, something has gone terribly
 *           wrong and that all constraints need to be enforced.
 */
public static void add(HTableDescriptor desc,
  Class<? extends Constraint> constraint, Configuration conf)
  throws IOException {
 enable(desc);
 long priority = getNextPriority(desc);
 addConstraint(desc, constraint, conf, priority++);
 updateLatestPriority(desc, priority);
}
origin: harbby/presto-connectors

/**
 * Add a {@link Constraint} to the table with the given configuration
 * <p>
 * Each constraint, when added to the table, will have a specific priority,
 * dictating the order in which the {@link Constraint} will be run. A
 * {@link Constraint} added will run on the regionserver before those added to
 * the {@link HTableDescriptor} later.
 * 
 * @param desc
 *          table descriptor to the constraint to
 * @param constraint
 *          to be added
 * @param conf
 *          configuration associated with the constraint
 * @throws IOException
 *           if any constraint could not be deserialized. Assumes if 1
 *           constraint is not loaded properly, something has gone terribly
 *           wrong and that all constraints need to be enforced.
 */
public static void add(HTableDescriptor desc,
  Class<? extends Constraint> constraint, Configuration conf)
  throws IOException {
 enable(desc);
 long priority = getNextPriority(desc);
 addConstraint(desc, constraint, conf, priority++);
 updateLatestPriority(desc, priority);
}
origin: co.cask.hbase/hbase

addConstraint(desc, clazz, null, priority++);
origin: harbby/presto-connectors

addConstraint(desc, clazz, null, priority++);
origin: co.cask.hbase/hbase

long priority = getNextPriority(desc);
for (Pair<Class<? extends Constraint>, Configuration> pair : constraints) {
 addConstraint(desc, pair.getFirst(), pair.getSecond(), priority++);
origin: harbby/presto-connectors

long priority = getNextPriority(desc);
for (Pair<Class<? extends Constraint>, Configuration> pair : constraints) {
 addConstraint(desc, pair.getFirst(), pair.getSecond(), priority++);
org.apache.hadoop.hbase.constraintConstraintsaddConstraint

Javadoc

Write the raw constraint and configuration to the descriptor.

This method takes care of creating a new configuration based on the passed in configuration and then updating that with enabled and priority of the constraint.

When a constraint is added, it is automatically enabled.

Popular methods of Constraints

  • disable
    Turn off processing constraints for a given table, even if constraints have been turned on or added.
  • getConstraints
  • changeConstraintEnabled
    Change the whether the constraint (if it is already present) is enabled or disabled.
  • configure
    Setup the configuration for a constraint as to whether it is enabled and its priority
  • enable
    Enable constraints on a table. Currently, if you attempt to add a constraint to the table, then Cons
  • getKeyValueForClass
    Get the kv Entry in the descriptor for the specified class
  • getNextPriority
  • readConfiguration
    Read the Configuration stored in the byte stream.
  • serializeConfiguration
    Write the configuration to a String
  • serializeConstraintClass
    Just write the class to a String representation of the class as a key for the HTableDescriptor
  • updateLatestPriority
  • writeConstraint
    Write the given key and associated configuration to the HTableDescriptor
  • updateLatestPriority,
  • writeConstraint,
  • add,
  • disableConstraint,
  • enabled,
  • has,
  • remove,
  • setConfiguration

Popular in Java

  • Making http post requests using okhttp
  • getExternalFilesDir (Context)
  • runOnUiThread (Activity)
  • setRequestProperty (URLConnection)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now