@Tags(value={"lookup","cache","enrich","join","csv","reloadable","key","value"}) @CapabilityDescription(value="A reloadable CSV file-based lookup service. The first line of the csv file is considered as header.") public class SimpleCsvFileLookupService extends AbstractCSVLookupService implements StringLookupService
| Modifier and Type | Field and Description |
|---|---|
private ConcurrentMap<String,String> |
cache |
static PropertyDescriptor |
LOOKUP_VALUE_COLUMN |
private String |
lookupValueColumn |
private static Set<String> |
REQUIRED_KEYS |
charset, CHARSET, CSV_FILE, CSV_FORMAT, csvFile, csvFormat, DEFAULT, IGNORE_DUPLICATES, ignoreDuplicates, KEY, lock, LOOKUP_KEY_COLUMN, lookupKeyColumn, properties, RFC4180, watcher| Constructor and Description |
|---|
SimpleCsvFileLookupService() |
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getRequiredKeys() |
protected void |
init(ControllerServiceInitializationContext context) |
(package private) boolean |
isCaching() |
protected void |
loadCache() |
Optional<String> |
lookup(Map<String,Object> coordinates) |
void |
onDisabled() |
void |
onEnabled(ConfigurationContext context) |
getSupportedPropertyDescriptorsabstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getConfigurationContext, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, initialize, isEnabledcustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetValueTypelookupinitialize, isStatefulgetIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final PropertyDescriptor LOOKUP_VALUE_COLUMN
private volatile ConcurrentMap<String,String> cache
private volatile String lookupValueColumn
protected void loadCache()
throws IllegalStateException,
IOException
loadCache in class AbstractCSVLookupServiceIllegalStateExceptionIOExceptionprotected void init(ControllerServiceInitializationContext context)
init in class AbstractCSVLookupService@OnEnabled public void onEnabled(ConfigurationContext context) throws IOException, InitializationException
onEnabled in class AbstractCSVLookupServiceIOExceptionInitializationExceptionpublic Optional<String> lookup(Map<String,Object> coordinates) throws LookupFailureException
lookup in interface LookupService<String>LookupFailureExceptionpublic Set<String> getRequiredKeys()
getRequiredKeys in interface LookupService<String>@OnDisabled public void onDisabled()
boolean isCaching()
Copyright © 2023 Apache NiFi Project. All rights reserved.