Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to read propertydescriptor value in custom processor

How to read propertydescriptor value in custom processor

New Contributor

I am building an custom processor to process flow file , to process the flow file i need to read an CSV file from my local file system. I created an proerty descriptor CSV_PATH as follows

public static final PropertyDescriptor CSV_PATH = new PropertyDescriptor

.Builder().name("CSV Path")

.displayName("CSV Path")

.description("CSV Path Reader")

.required(true)

.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)

.build();


@Override

protected void init(final ProcessorInitializationContext context) {

final List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>();

descriptors.add(JSON_PATH);

descriptors.add(CSV_PATH);

this.descriptors = Collections.unmodifiableList(descriptors);


final Set<Relationship> relationships = new HashSet<Relationship>();

relationships.add(SUCCESS);

this.relationships = Collections.unmodifiableSet(relationships);

}

Now I wants to get the value of CSV_PATH property set in UI while configuring processor. I am not getting the way to read that value.


Thanks