Search in sources :

Example 1 with RecordPathCache

use of org.apache.nifi.record.path.util.RecordPathCache in project nifi by apache.

the class PutElasticsearchHttpRecord method setup.

@OnScheduled
public void setup(ProcessContext context) {
    super.setup(context);
    recordPathCache = new RecordPathCache(10);
}
Also used : RecordPathCache(org.apache.nifi.record.path.util.RecordPathCache) OnScheduled(org.apache.nifi.annotation.lifecycle.OnScheduled)

Example 2 with RecordPathCache

use of org.apache.nifi.record.path.util.RecordPathCache in project nifi by apache.

the class UpdateRecord method createRecordPaths.

@OnScheduled
public void createRecordPaths(final ProcessContext context) {
    recordPathCache = new RecordPathCache(context.getProperties().size() * 2);
    final List<String> recordPaths = new ArrayList<>(context.getProperties().size() - 2);
    for (final PropertyDescriptor property : context.getProperties().keySet()) {
        if (property.isDynamic()) {
            recordPaths.add(property.getName());
        }
    }
    this.recordPaths = recordPaths;
}
Also used : RecordPathCache(org.apache.nifi.record.path.util.RecordPathCache) PropertyDescriptor(org.apache.nifi.components.PropertyDescriptor) ArrayList(java.util.ArrayList) OnScheduled(org.apache.nifi.annotation.lifecycle.OnScheduled)

Aggregations

OnScheduled (org.apache.nifi.annotation.lifecycle.OnScheduled)2 RecordPathCache (org.apache.nifi.record.path.util.RecordPathCache)2 ArrayList (java.util.ArrayList)1 PropertyDescriptor (org.apache.nifi.components.PropertyDescriptor)1