Hello all,

there is a strange behavior on our NIFI  installation.

I wrote a script in python and for some reason and sometimes the flowfile does 
not always moves into it, like in this case:


[cid:bc2b4b7b-c4dc-4a6a-bffb-e78f432a897b]


I see that Queued Duration for the above flowfile  is 07:53:04.557!  What is it 
waiting for ?

The executeScript processor is running on each node with concurrent Task set to 
1.

In attachment there is the flowfile source code.


Any help is appreciated.

Thanks in advance.


AP
from urlparse import parse_qs, urlparse 

def parse ( uri2parse ) : 
        o = urlparse( uri2parse )
        d = parse_qs( o.query )        
        return ( o.path[1:], d['year'][0], d['month'][0], d['day'][0] )    

# get the flow file from the incoming queue

flowfile = session.get() 
if flowfile is not None: 
        source_URI = flowfile.getAttribute( 'source_URI' )
        destination_URI = flowfile.getAttribute(  'destination_URI' ) 
        current_time = flowfile.getAttribute(  'current_time' ) 

        # expand the URI into smaller pieces 
        src_table, src_year, src_month, src_day = parse( source_URI ) 
        dst_table, dst_year, dst_month, dst_day = parse( destination_URI ) 

        flowfile = session.putAllAttributes( flowfile, { 'src_table' : src_table, 'src_year': src_year, 'src_month' :src_month, 'src_day': src_day })
        flowfile = session.putAllAttributes( flowfile, { 'dst_table' : dst_table, 'dst_year': dst_year, 'dst_month' :dst_month, 'dst_day': dst_day })
 
        session.transfer( flowfile, REL_SUCCESS )
else: 
        flowfile = session.create() 
        session.transer( flowfile, REL_FAILURE ) 

Reply via email to