nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Chaves <e...@uolet.com>
Subject Re: Enrichment flow using ScriptedLookup
Date Sun, 05 Nov 2017 13:54:37 GMT
Hi Mike, I'm running nifi using the official docker image (version 1.4.0)
and my logs folder is empty. I was looking at bootstrap.conf, logback.xml
and nifi.properties but couldn't found any config value that may
disable/enable log. Where should those logs be going?

2017-11-04 12:55 GMT-02:00 Mike Thomsen <mikerthomsen@gmail.com>:

> You may need to update the logback xml file in the conf folder. There is a
> line in there for the processor package. Might be too high for info.
>
> On Sat, Nov 4, 2017 at 10:50 AM Eric Chaves <eric@uolet.com> wrote:
>
>> Hi folks,
>>
>> I'm trying to adapt the flow described at https://community.hortonworks.
>> com/articles/138632/data-flow-enrichment-with-nifi-
>> lookuprecord-proces.html using ScriptedLookupService as replacement for SimpleKeyValueLookupService
>> to lookup city names and enrich and incoming record.
>>
>> When I ran the flow with KeyValueLookupService the field gets enriched
>> properly but when I use my scriptedlookup the value always come back as
>> null.  The script was pretty simple and I can't figure out where is my
>> error. I also tried the ScriptLookup (just the script, not the flow) by
>> AloPresto at https://gist.github.com/alopresto/
>> 78eb1a2c2b878f75f61481269af38a9f with the same resutls.
>>
>> I'm trying to log.info the execution to figure out my mistakes but the
>> logs are going nowhere. How can I enable logging for services?
>>
>> Does anyone spot an error?
>>
>> ---[service-lookup.groovy]---
>> import org.apache.nifi.lookup.StringLookupService
>>
>> class GroovyLookupService implements StringLookupService {
>>
>>   def lookupTable = [
>>     '1': 'Paris',
>>     '2': 'Lyon',
>>     '3': 'Marseille',
>>     '4': 'Toulouse',
>>     '5': 'Nice'
>>   ]
>>
>>     @Override
>>     Optional<String> lookup(final String key) {
>>       log.warn('key value: ', key)
>>       return Optional.ofNullable(lookupTable[key])
>>     }
>> }
>>
>> lookupService = new GroovyLookupService()
>> ---
>>
>>

Mime
View raw message