Package org.apache.zookeeper.server.quorum

Examples of org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException


        super.setSystemID(systemID);
    }

    public void setVolumeID(String volumeID) throws ConfigException {
        if (volumeID.length() > 16) {
            throw new ConfigException(this, "The Volume Identifier may be no longer than 16 characters.");
        }
        super.setVolumeID(volumeID);
    }
View Full Code Here


     *
     * @throws com.github.stephenc.javaisotools.iso9660.ConfigException Invalid or unsupported Interchange Level
     */
    public void setInterchangeLevel(int level) throws ConfigException {
        if (level < 1 || level > 3) {
            throw new ConfigException(this, "Invalid ISO9660 Interchange Level: " + level);
        }
        if (level == 3) {
            throw new ConfigException(this,
                    "Interchange Level 3 (multiple File Sections per file) is not (yet) supported by this implementation.");
        }
        ISO9660NamingConventions.INTERCHANGE_LEVEL = level;
    }
View Full Code Here

     *
     * @throws ConfigException Invalid length
     */
    public void setMaxDirectoryLength(int length) throws ConfigException {
        if (length < 0) {
            throw new ConfigException(this, "Invalid maximum directory length: " + length);
        }
        RockRidgeNamingConventions.MAX_DIRECTORY_LENGTH = length;
    }
View Full Code Here

     *
     * @throws com.github.stephenc.javaisotools.iso9660.ConfigException Invalid length
     */
    public void setMaxFilenameLength(int length) throws ConfigException {
        if (length < 0) {
            throw new ConfigException(this, "Invalid maximum directory length: " + length);
        }
        RockRidgeNamingConventions.MAX_FILENAME_LENGTH = length;
    }
View Full Code Here

   {
      logger.debug("Starting the test zookeeper server on port " + zkConfig.get("clientPort"));

      final TestZookeeperServerIntern server = new TestZookeeperServerIntern();
      try {
         QuorumPeerConfig qpConfig = new QuorumPeerConfig();
         qpConfig.parseProperties(zkConfig);
         final ServerConfig sConfig = new ServerConfig();
         sConfig.readFrom(qpConfig);
        
         Thread t = new Thread(new Runnable() {
        
View Full Code Here

  public static void main(String[] args) {
    Configuration conf = HBaseConfiguration.create();
    try {
      Properties zkProperties = ZKConfig.makeZKProps(conf);
      writeMyID(zkProperties);
      QuorumPeerConfig zkConfig = new QuorumPeerConfig();
      zkConfig.parseProperties(zkProperties);

      // login the zookeeper server principal (if using security)
      ZKUtil.loginServer(conf, "hbase.zookeeper.server.keytab.file",
        "hbase.zookeeper.server.kerberos.principal",
        zkConfig.getClientPortAddress().getHostName());

      runZKServer(zkConfig);
    } catch (Exception e) {
      e.printStackTrace();
      System.exit(-1);
View Full Code Here

  public static void main(String[] args) {
    Configuration conf = WaspConfiguration.create();
    try {
      Properties zkProperties = ZKConfig.makeZKProps(conf);
      writeMyID(conf, zkProperties);
      QuorumPeerConfig zkConfig = new QuorumPeerConfig();
      zkConfig.parseProperties(zkProperties);
      runZKServer(zkConfig);
    } catch (Exception e) {
      e.printStackTrace();
      System.exit(-1);
    }
View Full Code Here

  public static void startZooKeeper(final Properties properties, boolean format, String path) {
    String realPath = path + "/zk_test";
    properties.setProperty("dataDir", realPath);
    final ServerConfig serverConfig = new ServerConfig();
    QuorumPeerConfig config = new QuorumPeerConfig();
    try {
      config.parseProperties(properties);
    } catch (IOException e) {
      LOG.error(e);
      throw new RuntimeException(e);
    } catch (ConfigException e) {
      LOG.error(e);
View Full Code Here

            {
                public void run()
                {
                    try
                    {
                        QuorumPeerConfig config = configBuilder.buildConfig(thisInstanceIndex);
                        main.runFromConfig(config);
                    }
                    catch ( Exception e )
                    {
                        logger.error(String.format("From testing server (random state: %s) for instance: %s", String.valueOf(configBuilder.isFromRandom()), getInstanceSpec()), e);
View Full Code Here

  public static void main(String[] args) {
    Configuration conf = HBaseConfiguration.create();
    try {
      Properties zkProperties = makeZKProps(conf);
      writeMyID(zkProperties);
      QuorumPeerConfig zkConfig = new QuorumPeerConfig();
      zkConfig.parseProperties(zkProperties);
      runZKServer(zkConfig);
    } catch (Exception e) {
      e.printStackTrace();
      System.exit(-1);
    }
View Full Code Here

TOP

Related Classes of org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException

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.