Package org.apache.accumulo.core.conf

Examples of org.apache.accumulo.core.conf.Property


   
    return true;
  }
 
  public static boolean isPropertyValid(String property, String value) {
    Property p = Property.getPropertyByKey(property);
    if ((p != null && !p.getType().isValidFormat(value)) || !Property.isValidTablePropertyKey(property))
      return false;
   
    return true;
  }
View Full Code Here


import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
import org.apache.zookeeper.KeeperException;

public class SystemPropUtil {
  public static boolean setSystemProperty(String property, String value) throws KeeperException, InterruptedException {
    Property p = Property.getPropertyByKey(property);
    if ((p != null && !p.getType().isValidFormat(value)) || !Property.isValidZooPropertyKey(property))
      return false;
   
    // create the zk node for this property and set it's data to the specified value
    String zPath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZCONFIG + "/" + property;
    ZooReaderWriter.getInstance().putPersistentData(zPath, value.getBytes(Constants.UTF8), NodeExistsPolicy.OVERWRITE);
View Full Code Here

    AccumuloConfiguration conf = Monitor.getSystemConfiguration();
    String principal = conf.get(Property.TRACE_USER);
    AuthenticationToken at;
    Map<String,String> loginMap = conf.getAllPropertiesWithPrefix(Property.TRACE_TOKEN_PROPERTY_PREFIX);
    if (loginMap.isEmpty()) {
      Property p = Property.TRACE_PASSWORD;
      at = new PasswordToken(conf.get(p).getBytes(Constants.UTF8));
    } else {
      Properties props = new Properties();
      int prefixLength = Property.TRACE_TOKEN_PROPERTY_PREFIX.getKey().length();
      for (Entry<String,String> entry : loginMap.entrySet()) {
View Full Code Here

  public Map<String,String> getTableProperties() {
    return tableConfig.getAllPropertiesWithPrefix(Property.TABLE_PREFIX);
  }

  public String getTableConfig(String key) {
    Property property = Property.getPropertyByKey(key);
    if (property == null || property.isSensitive())
      throw new RuntimeException("Unable to access the configuration value " + key);
    return tableConfig.get(property);
  }
View Full Code Here

import org.apache.accumulo.core.zookeeper.ZooUtil.NodeExistsPolicy;
import org.apache.zookeeper.KeeperException;

public class SystemPropUtil {
  public static boolean setSystemProperty(String property, String value) throws KeeperException, InterruptedException {
    Property p = Property.getPropertyByKey(property);
    if ((p != null && !p.getType().isValidFormat(value)) || !Property.isValidZooPropertyKey(property))
      return false;
   
    // create the zk node for this property and set it's data to the specified value
    String zPath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZCONFIG + "/" + property;
    ZooUtil.putPersistentData(zPath, value.getBytes(), NodeExistsPolicy.OVERWRITE);
View Full Code Here

import org.apache.accumulo.core.zookeeper.ZooUtil.NodeExistsPolicy;
import org.apache.zookeeper.KeeperException;

public class TablePropUtil {
  public static boolean setTableProperty(String tableId, String property, String value) throws KeeperException, InterruptedException {
    Property p = Property.getPropertyByKey(property);
    if ((p != null && !p.getType().isValidFormat(value)) || !Property.isValidTablePropertyKey(property))
      return false;
   
    // create the zk node for per-table properties for this table if it doesn't already exist
    String zkTablePath = getTablePath(tableId);
    ZooUtil.putPersistentData(zkTablePath, new byte[0], NodeExistsPolicy.SKIP);
View Full Code Here

    out.println("<?xml-stylesheet type=\"text/xsl\" href=\"configuration.xsl\"?>");
    out.println("\n<configuration>\n");
   
    for (PropertyValueDescription entry : c.contents) {
     
      Property p = Property.getPropertyByKey(entry.property);
      if (p != null) {
        if (p.getDefaultValue().equals(entry.value))
          continue;
       
        if (p.getType().equals(PropertyType.TIMEDURATION)) {
          int value = Integer.parseInt(entry.value);
          if (value > 1000) {
            if (value % 1000 == 0)
              entry.value = String.format("%ds", value / 1000);
            else
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.conf.Property

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.