private SourceType getKnownSource(String type) { return getKnownComponent(type, SourceType.values()); }
throws ConfigurationException { if (this == OTHER) { return new SourceConfiguration(name); } else { instance = new SourceConfiguration(name); instance.setNotFoundConfigClass(); instance = new SourceConfiguration(name); instance.setNotFoundConfigClass(); } catch (Exception e) { throw new ConfigurationException("Error creating configuration", e);
@SuppressWarnings("unchecked") @Override public Class<? extends Source> getClass(String type) throws FlumeException { String sourceClassName = type; SourceType srcType = SourceType.OTHER; try { srcType = SourceType.valueOf(type.toUpperCase(Locale.ENGLISH)); } catch (IllegalArgumentException ex) { logger.debug("Source type {} is a custom type", type); } if (!srcType.equals(SourceType.OTHER)) { sourceClassName = srcType.getSourceClassName(); } try { return (Class<? extends Source>) Class.forName(sourceClassName); } catch (Exception ex) { throw new FlumeException("Unable to load source type: " + type + ", class: " + sourceClassName, ex); } } }
config = srcType.toString().toUpperCase(Locale.ENGLISH); configSpecified = true; sourceName, config, ComponentType.SOURCE); if (srcConf != null) { srcConf.configure(srcContext); Set<String> channels = new HashSet<String>(); if (srcConf.getChannels() != null) { channels.addAll(srcConf.getChannels()); this.getSpaceDelimitedList(channels)); if ((configSpecified && srcConf.isNotFoundConfigClass()) || !configSpecified) { newContextMap.put(sourceName, srcContext); sourceConfigMap.put(sourceName, srcConf); if (srcConf != null) errorList.addAll(srcConf.getErrors()); } catch (ConfigurationException e) { if (srcConf != null) errorList.addAll(srcConf.getErrors()); iter.remove(); LOGGER.warn(
try { Configurables.configure(source, config); Set<String> channelNames = config.getChannels(); List<Channel> sourceChannels = getSourceChannels(channelComponentMap, source, channelNames); config.getSelectorConfiguration();
switch (component) { case SOURCE: return SourceConfigurationType.valueOf(type.toUpperCase(Locale.ENGLISH)) .getConfiguration(name); case CONFIG_FILTER: return ConfigFilterConfigurationType.valueOf(type.toUpperCase(Locale.ENGLISH))
ErrorOrWarning.ERROR)); throw new ConfigurationException("No channels set for " + this.getComponentName()); this.getKnownChannelSelector(selType); Context selectorContext = new Context(); selectorContext.putAll(selectorParams);
config = srcType.toString().toUpperCase(Locale.ENGLISH); configSpecified = true; sourceName, config, ComponentType.SOURCE); if (srcConf != null) { srcConf.configure(srcContext); Set<String> channels = new HashSet<String>(); if (srcConf.getChannels() != null) { channels.addAll(srcConf.getChannels()); this.getSpaceDelimitedList(channels)); if ((configSpecified && srcConf.isNotFoundConfigClass()) || !configSpecified) { newContextMap.put(sourceName, srcContext); sourceConfigMap.put(sourceName, srcConf); if (srcConf != null) errorList.addAll(srcConf.getErrors()); } catch (ConfigurationException e) { if (srcConf != null) errorList.addAll(srcConf.getErrors()); iter.remove(); LOGGER.warn(
@SuppressWarnings("unchecked") @Override public Class<? extends Source> getClass(String type) throws FlumeException { String sourceClassName = type; SourceType srcType = SourceType.OTHER; try { srcType = SourceType.valueOf(type.toUpperCase(Locale.ENGLISH)); } catch (IllegalArgumentException ex) { logger.debug("Source type {} is a custom type", type); } if (!srcType.equals(SourceType.OTHER)) { sourceClassName = srcType.getSourceClassName(); } try { return (Class<? extends Source>) Class.forName(sourceClassName); } catch (Exception ex) { throw new FlumeException("Unable to load source type: " + type + ", class: " + sourceClassName, ex); } } }
try { Configurables.configure(source, config); Set<String> channelNames = config.getChannels(); List<Channel> sourceChannels = getSourceChannels(channelComponentMap, source, channelNames); config.getSelectorConfiguration();
throws ConfigurationException { if (this == OTHER) { return new SourceConfiguration(name); } else { instance = new SourceConfiguration(name); instance.setNotFoundConfigClass(); instance = new SourceConfiguration(name); instance.setNotFoundConfigClass(); } catch (Exception e) { throw new ConfigurationException("Error creating configuration", e);
switch (component) { case SOURCE: return SourceConfigurationType.valueOf(type.toUpperCase(Locale.ENGLISH)) .getConfiguration(name); case CONFIG_FILTER: return ConfigFilterConfigurationType.valueOf(type.toUpperCase(Locale.ENGLISH))
ErrorOrWarning.ERROR)); throw new ConfigurationException("No channels set for " + this.getComponentName()); this.getKnownChannelSelector(selType); Context selectorContext = new Context(); selectorContext.putAll(selectorParams);
private SourceType getKnownSource(String type) { return getKnownComponent(type, SourceType.values()); }