congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
Constraints.getKeyValueForClass
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: apache/hbase

/**
 * Check to see if the Constraint is currently set.
 * 
 * @param desc
 *          {@link HTableDescriptor} to check
 * @param clazz
 *          {@link Constraint} class to check for.
 * @return <tt>true</tt> if the {@link Constraint} is present, even if it is
 *         disabled. <tt>false</tt> otherwise.
 */
public static boolean has(HTableDescriptor desc,
  Class<? extends Constraint> clazz) {
 return getKeyValueForClass(desc, clazz) != null;
}
origin: apache/hbase

/**
 * Check to see if the given constraint is enabled.
 * 
 * @param desc
 *          {@link HTableDescriptor} to check.
 * @param clazz
 *          {@link Constraint} to check for
 * @return <tt>true</tt> if the {@link Constraint} is present and enabled.
 *         <tt>false</tt> otherwise.
 * @throws IOException
 *           If the constraint has improperly stored in the table
 */
public static boolean enabled(HTableDescriptor desc,
  Class<? extends Constraint> clazz) throws IOException {
 // get the kv
 Pair<String, String> entry = getKeyValueForClass(desc, clazz);
 // its not enabled so just return false. In fact, its not even present!
 if (entry == null) {
  return false;
 }
 // get the info about the constraint
 Configuration conf = readConfiguration(entry.getSecond());
 return conf.getBoolean(ENABLED_KEY, false);
}
origin: apache/hbase

/**
 * Change the whether the constraint (if it is already present) is enabled or
 * disabled.
 */
private static void changeConstraintEnabled(HTableDescriptor desc,
  Class<? extends Constraint> clazz, boolean enabled) throws IOException {
 // get the original constraint
 Pair<String, String> entry = getKeyValueForClass(desc, clazz);
 if (entry == null) {
  throw new IllegalArgumentException("Constraint: " + clazz.getName()
    + " is not associated with this table. You can't enable it!");
 }
 // create a new configuration from that conf
 Configuration conf = readConfiguration(entry.getSecond());
 // set that it is enabled
 conf.setBoolean(ENABLED_KEY, enabled);
 // write it back out
 writeConstraint(desc, entry.getFirst(), conf);
}
origin: apache/hbase

 throws IOException, IllegalArgumentException {
Pair<String, String> e = getKeyValueForClass(desc, clazz);
origin: harbby/presto-connectors

/**
 * Check to see if the Constraint is currently set.
 * 
 * @param desc
 *          {@link HTableDescriptor} to check
 * @param clazz
 *          {@link Constraint} class to check for.
 * @return <tt>true</tt> if the {@link Constraint} is present, even if it is
 *         disabled. <tt>false</tt> otherwise.
 */
public static boolean has(HTableDescriptor desc,
  Class<? extends Constraint> clazz) {
 return getKeyValueForClass(desc, clazz) != null;
}
origin: co.cask.hbase/hbase

/**
 * Check to see if the Constraint is currently set.
 * 
 * @param desc
 *          {@link HTableDescriptor} to check
 * @param clazz
 *          {@link Constraint} class to check for.
 * @return <tt>true</tt> if the {@link Constraint} is present, even if it is
 *         disabled. <tt>false</tt> otherwise.
 */
public static boolean has(HTableDescriptor desc,
  Class<? extends Constraint> clazz) {
 return getKeyValueForClass(desc, clazz) != null;
}
origin: co.cask.hbase/hbase

/**
 * Check to see if the given constraint is enabled.
 * 
 * @param desc
 *          {@link HTableDescriptor} to check.
 * @param clazz
 *          {@link Constraint} to check for
 * @return <tt>true</tt> if the {@link Constraint} is present and enabled.
 *         <tt>false</tt> otherwise.
 * @throws IOException
 *           If the constraint has improperly stored in the table
 */
public static boolean enabled(HTableDescriptor desc,
  Class<? extends Constraint> clazz) throws IOException {
 // get the kv
 Pair<String, String> entry = getKeyValueForClass(desc, clazz);
 // its not enabled so just return false. In fact, its not even present!
 if (entry == null) {
  return false;
 }
 // get the info about the constraint
 Configuration conf = readConfiguration(entry.getSecond());
 return conf.getBoolean(ENABLED_KEY, false);
}
origin: harbby/presto-connectors

/**
 * Check to see if the given constraint is enabled.
 * 
 * @param desc
 *          {@link HTableDescriptor} to check.
 * @param clazz
 *          {@link Constraint} to check for
 * @return <tt>true</tt> if the {@link Constraint} is present and enabled.
 *         <tt>false</tt> otherwise.
 * @throws IOException
 *           If the constraint has improperly stored in the table
 */
public static boolean enabled(HTableDescriptor desc,
  Class<? extends Constraint> clazz) throws IOException {
 // get the kv
 Pair<String, String> entry = getKeyValueForClass(desc, clazz);
 // its not enabled so just return false. In fact, its not even present!
 if (entry == null) {
  return false;
 }
 // get the info about the constraint
 Configuration conf = readConfiguration(entry.getSecond());
 return conf.getBoolean(ENABLED_KEY, false);
}
origin: co.cask.hbase/hbase

/**
 * Change the whether the constraint (if it is already present) is enabled or
 * disabled.
 */
private static void changeConstraintEnabled(HTableDescriptor desc,
  Class<? extends Constraint> clazz, boolean enabled) throws IOException {
 // get the original constraint
 Pair<String, String> entry = getKeyValueForClass(desc, clazz);
 if (entry == null) {
  throw new IllegalArgumentException("Constraint: " + clazz.getName()
    + " is not associated with this table. You can't enable it!");
 }
 // create a new configuration from that conf
 Configuration conf = readConfiguration(entry.getSecond());
 // set that it is enabled
 conf.setBoolean(ENABLED_KEY, enabled);
 // write it back out
 writeConstraint(desc, entry.getFirst(), conf);
}
origin: harbby/presto-connectors

/**
 * Change the whether the constraint (if it is already present) is enabled or
 * disabled.
 */
private static void changeConstraintEnabled(HTableDescriptor desc,
  Class<? extends Constraint> clazz, boolean enabled) throws IOException {
 // get the original constraint
 Pair<String, String> entry = getKeyValueForClass(desc, clazz);
 if (entry == null) {
  throw new IllegalArgumentException("Constraint: " + clazz.getName()
    + " is not associated with this table. You can't enable it!");
 }
 // create a new configuration from that conf
 Configuration conf = readConfiguration(entry.getSecond());
 // set that it is enabled
 conf.setBoolean(ENABLED_KEY, enabled);
 // write it back out
 writeConstraint(desc, entry.getFirst(), conf);
}
origin: harbby/presto-connectors

 throws IOException, IllegalArgumentException {
Pair<String, String> e = getKeyValueForClass(desc, clazz);
origin: co.cask.hbase/hbase

 throws IOException, IllegalArgumentException {
Pair<String, String> e = getKeyValueForClass(desc, clazz);
org.apache.hadoop.hbase.constraintConstraintsgetKeyValueForClass

Javadoc

Get the kv Entry in the descriptor for the specified class

Popular methods of Constraints

  • disable
    Turn off processing constraints for a given table, even if constraints have been turned on or added.
  • getConstraints
  • addConstraint
    Write the raw constraint and configuration to the descriptor. This method takes care of creating a n
  • 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
  • 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

  • Finding current android device location
  • getExternalFilesDir (Context)
  • getSystemService (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • JButton (javax.swing)
  • JFrame (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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