/** * 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); }
addConstraint(desc, clazz, null, priority++); updateLatestPriority(desc, priority);
addConstraint(desc, pair.getFirst(), pair.getSecond(), priority++); updateLatestPriority(desc, priority);
/** * 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); }
/** * 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); }
addConstraint(desc, clazz, null, priority++); updateLatestPriority(desc, priority);
addConstraint(desc, clazz, null, priority++); updateLatestPriority(desc, priority);
addConstraint(desc, pair.getFirst(), pair.getSecond(), priority++); updateLatestPriority(desc, priority);
addConstraint(desc, pair.getFirst(), pair.getSecond(), priority++); updateLatestPriority(desc, priority);