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

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

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

origin: apache/hbase

/**
 * Read in the configuration from the String encoded configuration
 * 
 * @param bytes
 *          to read from
 * @return A valid configuration
 * @throws IOException
 *           if the configuration could not be read
 */
private static Configuration readConfiguration(String bytes)
  throws IOException {
 return readConfiguration(Bytes.toBytes(bytes));
}
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

 conf = readConfiguration(e.getValue().get());
} catch (IOException e1) {
origin: apache/hbase

Configuration internal = readConfiguration(e.getSecond());
origin: co.cask.hbase/hbase

/**
 * Read in the configuration from the String encoded configuration
 * 
 * @param bytes
 *          to read from
 * @return A valid configuration
 * @throws IOException
 *           if the configuration could not be read
 */
private static Configuration readConfiguration(String bytes)
  throws IOException {
 return readConfiguration(Bytes.toBytes(bytes));
}
origin: harbby/presto-connectors

/**
 * Read in the configuration from the String encoded configuration
 * 
 * @param bytes
 *          to read from
 * @return A valid configuration
 * @throws IOException
 *           if the configuration could not be read
 */
private static Configuration readConfiguration(String bytes)
  throws IOException {
 return readConfiguration(Bytes.toBytes(bytes));
}
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

/**
 * 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

/**
 * 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: 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: co.cask.hbase/hbase

 conf = readConfiguration(e.getValue().get());
} catch (IOException e1) {
origin: harbby/presto-connectors

 conf = readConfiguration(e.getValue().get());
} catch (IOException e1) {
origin: harbby/presto-connectors

Configuration internal = readConfiguration(e.getSecond());
origin: co.cask.hbase/hbase

Configuration internal = readConfiguration(e.getSecond());
org.apache.hadoop.hbase.constraintConstraintsreadConfiguration

Javadoc

Read in the configuration from the String encoded configuration

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
  • getKeyValueForClass
    Get the kv Entry in the descriptor for the specified class
  • getNextPriority
  • 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

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • notifyDataSetChanged (ArrayAdapter)
  • putExtra (Intent)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Top Sublime Text plugins
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