Package com.linkedin.databus.core.util

Examples of com.linkedin.databus.core.util.InvalidConfigException


      File rootDirectory = new File(_rootDirectory);
      if (!rootDirectory.exists())
      {
        if (!rootDirectory.mkdirs())
        {
          throw new InvalidConfigException("Invalid checkpoint directory:" +
                                           rootDirectory.getAbsolutePath());
        }
      }

      LOG.info("Checkpoint directory:" + rootDirectory.getAbsolutePath());
View Full Code Here


      try
      {
        RetentionType type = RetentionType.valueOf(retentionType);
        return new RetentionStaticConfig(type, retentionQuantity);
      } catch (Exception ex) {
        throw new InvalidConfigException(ex);
      }
    }
View Full Code Here

    public DiskSpaceTriggerConfig build()
        throws InvalidConfigException
    {
      if (availableThresholdPercent > 100 ||
          availableThresholdPercent < 0)
        throw new InvalidConfigException("availableThresholdPercent must be between 0-100");

      return new DiskSpaceTriggerConfig(enable, runIntervalSeconds, availableThresholdPercent, bootstrapDBDrive);
    }
View Full Code Here

        @Override
        public StaticConfig build() throws InvalidConfigException
        {
            if (_zkAddr == null || _clusterName == null)
            {
                throw new InvalidConfigException(
                        "zkAddr or clusterName cannot be unspecified ");
            }
            return new StaticConfig(_zkAddr, _clusterName,
                    _maxNumWritesSkipped, _checkpointIntervalMs);
        }
View Full Code Here

    @Override
    public RuntimeConfig build() throws InvalidConfigException
    {
      if (null != _managedInstance) return _managedInstance.new RuntimeConfig(_enabled);
      throw new InvalidConfigException("No ContainerStatisticsCollector instance assigned");
    }
View Full Code Here

    public StaticConfig build() throws InvalidConfigException
    {
      File schemaDirFile = new File(_schemaDir);
      if (_enabled && !_fallbackToResources && ! schemaDirFile.exists())
      {
        throw new InvalidConfigException("Schemas dir not found: " + _schemaDir);
      }
      return new StaticConfig(schemaDirFile, _refreshPeriodMs, _enabled, _fallbackToResources);
    }
View Full Code Here

      }
      catch(Exception ex)
      {
        // Could be a NumberFormatException, IndexOutOfBoundsException or other exception when trying
        // to parse the partition number.
        throw new InvalidConfigException("Invalid partition configuration (" + partitionFunction + "). " +
                                         "Could not parse the constant partition number.");
      }
    }
    else
    {
      throw new InvalidConfigException("Invalid partition configuration (" + partitionFunction + ").");
    }
  }
View Full Code Here

    {
      registryType = RegistryType.valueOf(_type);
    }
    catch (Exception e)
    {
      throw new InvalidConfigException("invalid schema registry type: " + _type);
    }

    _fileSystem.setEnabled(SchemaRegistryStaticConfig.RegistryType.FILE_SYSTEM == registryType);

    // TODO Add config verification
View Full Code Here

    LOG.info("Event Log Writer enabled: " + _enabled);

    File writeDir = new File(_topLevelLogDir);
    if (writeDir.exists() && !writeDir.canWrite())
    {
      throw new InvalidConfigException("Invalid Config value : Cannot write to writeDir: " + _topLevelLogDir);
    }

    LOG.info("Event Log Writer writeDir: " + writeDir.getAbsolutePath());

    if (_writeSessionDir == null)
    {
      File writeSessionDir = new File(writeDir.getAbsolutePath() + File.separator + "session" + "_" + System.currentTimeMillis());
      _writeSessionDir = writeSessionDir.getAbsolutePath();
    }

    LOG.info("Event Log Writer writeSessionDir: " + _writeSessionDir);


    Encoding encoding = null;
    try
    {
      encoding = Encoding.valueOf(_encoding);
    }
    catch (Exception e)
    {
      throw new InvalidConfigException("Invalid Config Value for encoding: " + _encoding);
    }


    if (_maxFiles <=0)
    {
      throw new InvalidConfigException("EventLogWriter: maxFiles configured <= 0 : " + _maxFiles);
    }

    if (_maxPendingWrites <=0)
    {
      throw new InvalidConfigException("EventLogWriter: maxPendingWrites configured <=0 : " + _maxPendingWrites);
    }


    LOG.info("Event Log Writer encoding: " + _encoding);
    LOG.info("Event Log Writer writeBatchSizeInBytes: " + _writeBatchSizeInBytes);
View Full Code Here

  public SharedCheckpointPersistenceProvider(DatabusClientGroupMember node, StaticConfig config) throws InvalidConfigException
  {
    _staticConfig  = config;
    _groupMember = node;
    if (_groupMember==null) {
      throw new InvalidConfigException("Cannot initialize shared checkpoint with null cluster group member! Check if cluster node has been enabled");
    }

  }
View Full Code Here

TOP

Related Classes of com.linkedin.databus.core.util.InvalidConfigException

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.