Package com.linkedin.databus.core.util

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


      _sourcesIdNameRegistry.getAllSources();

      _schemaRegistryService = schemaRegistry;
      if (null == _schemaRegistryService)
      {
        throw new InvalidConfigException("Unable to initialize schema registry");
      }

      HttpStatisticsCollector httpStatsColl = _relayStaticConfig.getHttpStatsCollector()
                                              .getExistingStatsCollector();
      if (null == httpStatsColl)
View Full Code Here


  public void checkForNulls()
  throws InvalidConfigException
  {
    if(_id < 0)
    {
      throw new InvalidConfigException("ID cannot be null. Must be >= 0.");
    }
    if(_name == null || _name.length() == 0)
    {
      throw new InvalidConfigException("Name cannot be null or empty.");
    }
    if(_uri == null || _uri.length() == 0)
    {
      throw new InvalidConfigException("Schema cannot be null or empty.");
    }
    if(_partitionFunction == null || _partitionFunction.length() == 0)
    {
      throw new InvalidConfigException("PartitionFunction cannot be null or empty.");
    }
   
   
  }
View Full Code Here

      }

      @Override
      public RuntimeConfig build() throws InvalidConfigException
      {
        if (null == _managedInstance) throw new InvalidConfigException("Missing relay");
        return _managedInstance.new RuntimeConfig(_container.build(),
                                                  _httpStatsCollector.build());
      }
View Full Code Here

    try
    {
      type = SourceType.valueOf(_sourceType);
    } catch (IllegalArgumentException iae) {
      throw new InvalidConfigException("Source Types should be one of (" + Arrays.asList(SourceType.values()) + ") but is (" + _sourceType + ")");
    }

    MissingValueBehavior missingValueForDelete = null;
    try
    {
      missingValueForDelete = MissingValueBehavior.valueOf(_missingValueBehavior);
    } catch ( IllegalArgumentException iae) {
      throw new InvalidConfigException("Missing Value For Delete Behavior should be one of (" + Arrays.asList(MissingValueBehavior.values()) + ") but is (" + _missingValueBehavior + ")");
    }

    return new ReplicationBitSetterStaticConfig(type, _fieldName, _remoteUpdateValueRegex, missingValueForDelete);
  }
View Full Code Here

            long srcId = Long.parseLong(srcIdStr);
            sourceIds.add(new IdNamePair(srcId, _sourceName.get(srcIdStr)));
          }
          catch (NumberFormatException nfe)
          {
            throw new InvalidConfigException("Invalid source id: " + srcIdStr);
          }
        }

        PhysicalSourceStaticConfig[] physConfigs = buildInitPhysicalSourcesConfigs();
View Full Code Here

      {
        serverAddr = InetAddress.getByName(getHost());
      }
      catch (Exception e)
      {
        throw new InvalidConfigException("Invalid server address", e);
      }

      InetSocketAddress inetAddress = new InetSocketAddress(serverAddr, getPort());

      if (null == _name)
View Full Code Here

    {
      int nameIdx = _address.indexOf(NAME_SEPARATOR);
      if (0 < nameIdx) setName(_address.substring(0, nameIdx));

      int portIdx = _address.indexOf(PORT_SEPARATOR, nameIdx + 1);
      if (0 > portIdx) throw new InvalidConfigException("no port specified in address:" + _address);
      setHost(_address.substring(nameIdx + 1, portIdx));

      int sourceListIdx = _address.indexOf(SOURCES_LIST_SEPARATOR, portIdx + 1);
      if (0 > sourceListIdx) throw new InvalidConfigException("no sources list specified in address:" + _address);
      setPort(Integer.parseInt(_address.substring(portIdx + 1, sourceListIdx)));
      setSources(_address.substring(sourceListIdx + 1));
    }
View Full Code Here

    _config = config;
    if (config.isEnabled())
    {
      if (config.getClusterServerList().isEmpty())
      {
        throw new InvalidConfigException("Property val is empty! clusterServerList ");
      }
      _members = new HashMap<String,DatabusClientGroupMember> ();
      open();

    }
View Full Code Here

      LOG.info("Event Log Reader enabled : " + _enabled);
      File topLevelLogDir = new File(_topLevelLogDir);
      if (topLevelLogDir.exists() && !topLevelLogDir.canRead())
      {
        throw new InvalidConfigException("Invalid Config value : Cannot read from top level log dir: " + _topLevelLogDir);
      }

      if (_readSessionDir == null)
      {
        File[] allFiles = topLevelLogDir.listFiles();
View Full Code Here

    @Override
    public RuntimeConfig build() throws InvalidConfigException
    {
      if (_historySize <= 0 || _historySize > MAX_HISTORY_SIZE)
      {
        throw new InvalidConfigException("Invalid history size:" + _historySize);
      }
      if (null == _managedInstance)
      {
        throw new InvalidConfigException("No associated managed instance for runtime config");
      }
      return new RuntimeConfig(_historyEnabled, _historySize);
    }
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.