public Context(Map<String, String> paramters) { this(); this.putAll(paramters); }
public static ChannelSelector create(List<Channel> channels, Map<String, String> config) { ChannelSelector selector = getSelectorForType(config.get( BasicConfigurationConstants.CONFIG_TYPE)); selector.setChannels(channels); Context context = new Context(); context.putAll(config); Configurables.configure(selector, context); return selector; }
logger.info("No serializer defined, Will use default"); serializerContext.putAll(context.getSubProperties( HBaseSinkConfigurationConstants.CONFIG_SERIALIZER_PREFIX)); columnFamily = cf.getBytes(Charsets.UTF_8);
logger.info("No serializer defined, Will use default"); serializerContext.putAll(context.getSubProperties( HBase2SinkConfigurationConstants.CONFIG_SERIALIZER_PREFIX)); columnFamily = cf.getBytes(Charsets.UTF_8);
logger.info("No serializer defined, Will use default"); serializerContext.putAll(context.getSubProperties( HBaseSinkConfigurationConstants.CONFIG_SERIALIZER_PREFIX)); columnFamily = cf.getBytes(Charsets.UTF_8);
@Override public void configure(Context context) throws ConfigurationException { super.configure(context); sinks = Arrays.asList(context.getString( BasicConfigurationConstants.CONFIG_SINKS).split("\\s+")); Map<String, String> params = context.getSubProperties( BasicConfigurationConstants.CONFIG_SINK_PROCESSOR_PREFIX); processorContext = new Context(); processorContext.putAll(params); SinkProcessorType spType = getKnownSinkProcessor(processorContext.getString( BasicConfigurationConstants.CONFIG_TYPE)); if (spType != null) { processorConf = (SinkProcessorConfiguration) ComponentConfigurationFactory.create( this.getComponentName() + "-processor", spType.toString(), ComponentType.SINK_PROCESSOR); if (processorConf != null) { processorConf.setSinks(new HashSet<String>(sinks)); processorConf.configure(processorContext); } } setConfigured(); }
this.getKnownChannelSelector(selType); Context selectorContext = new Context(); selectorContext.putAll(selectorParams); String config = null; if (selectorType == null) {
/** * Initializes the serializer for flume events. * @param eventSerializerType */ private void initializeSerializer(final Context context,final String eventSerializerType) { EventSerializers eventSerializer = null; try { eventSerializer = EventSerializers.valueOf(eventSerializerType.toUpperCase()); } catch(IllegalArgumentException iae) { logger.error("An invalid eventSerializer {} was passed. Please specify one of {} ",eventSerializerType, Joiner.on(",").skipNulls().join(EventSerializers.values())); Throwables.propagate(iae); } final Context serializerContext = new Context(); serializerContext.putAll(context.getSubProperties(FlumeConstants.CONFIG_SERIALIZER_PREFIX)); copyPropertiesToSerializerContext(context,serializerContext); try { @SuppressWarnings("unchecked") Class<? extends EventSerializer> clazz = (Class<? extends EventSerializer>) Class.forName(eventSerializer.getClassName()); serializer = clazz.newInstance(); serializer.configure(serializerContext); } catch (Exception e) { logger.error("Could not instantiate event serializer." , e); Throwables.propagate(e); } }
serializerContext.putAll(context.getSubProperties(FlumeConstants.CONFIG_SERIALIZER_PREFIX)); copyPropertiesToSerializerContext(context,serializerContext);
serializerContext.putAll(context.getSubProperties(FlumeConstants.CONFIG_SERIALIZER_PREFIX)); copyPropertiesToSerializerContext(context,serializerContext);
public Context(Map<String, String> paramters) { this(); this.putAll(paramters); }
public static ChannelSelector create(List<Channel> channels, Map<String, String> config) { ChannelSelector selector = getSelectorForType(config.get( BasicConfigurationConstants.CONFIG_TYPE)); selector.setChannels(channels); Context context = new Context(); context.putAll(config); Configurables.configure(selector, context); return selector; }
serializerContext.putAll(context.getSubProperties(FlumeConstants.CONFIG_SERIALIZER_PREFIX)); copyPropertiesToSerializerContext(context,serializerContext);
logger.info("No serializer defined, Will use default"); serializerContext.putAll(context.getSubProperties( HBase2SinkConfigurationConstants.CONFIG_SERIALIZER_PREFIX)); columnFamily = cf.getBytes(Charsets.UTF_8);
logger.info("No serializer defined, Will use default"); serializerContext.putAll(context.getSubProperties( HBaseSinkConfigurationConstants.CONFIG_SERIALIZER_PREFIX)); columnFamily = cf.getBytes(Charsets.UTF_8);
logger.info("No serializer defined, Will use default"); serializerContext.putAll(context.getSubProperties( HBaseSinkConfigurationConstants.CONFIG_SERIALIZER_PREFIX)); columnFamily = cf.getBytes(Charsets.UTF_8);
@Override public void configure(Context context) throws ConfigurationException { super.configure(context); sinks = Arrays.asList(context.getString( BasicConfigurationConstants.CONFIG_SINKS).split("\\s+")); Map<String, String> params = context.getSubProperties( BasicConfigurationConstants.CONFIG_SINK_PROCESSOR_PREFIX); processorContext = new Context(); processorContext.putAll(params); SinkProcessorType spType = getKnownSinkProcessor(processorContext.getString( BasicConfigurationConstants.CONFIG_TYPE)); if (spType != null) { processorConf = (SinkProcessorConfiguration) ComponentConfigurationFactory.create( this.getComponentName() + "-processor", spType.toString(), ComponentType.SINK_PROCESSOR); if (processorConf != null) { processorConf.setSinks(new HashSet<String>(sinks)); processorConf.configure(processorContext); } } setConfigured(); }
this.getKnownChannelSelector(selType); Context selectorContext = new Context(); selectorContext.putAll(selectorParams); String config = null; if (selectorType == null) {