mirror of https://github.com/apache/nifi.git
NIFI-4646: This closes #2306.
- Ensuring the reason behind the SchemaNotFoundException is reported when interacting with the configured SchemaRegistry. Signed-off-by: joewitt <joewitt@apache.org>
This commit is contained in:
parent
9ea9996b36
commit
3df3ff6c61
|
@ -17,17 +17,6 @@
|
||||||
|
|
||||||
package org.apache.nifi.processors.standard;
|
package org.apache.nifi.processors.standard;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
|
||||||
|
|
||||||
import org.apache.nifi.components.PropertyDescriptor;
|
import org.apache.nifi.components.PropertyDescriptor;
|
||||||
import org.apache.nifi.flowfile.FlowFile;
|
import org.apache.nifi.flowfile.FlowFile;
|
||||||
import org.apache.nifi.flowfile.attributes.CoreAttributes;
|
import org.apache.nifi.flowfile.attributes.CoreAttributes;
|
||||||
|
@ -47,6 +36,17 @@ import org.apache.nifi.serialization.WriteResult;
|
||||||
import org.apache.nifi.serialization.record.Record;
|
import org.apache.nifi.serialization.record.Record;
|
||||||
import org.apache.nifi.serialization.record.RecordSchema;
|
import org.apache.nifi.serialization.record.RecordSchema;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
public abstract class AbstractRecordProcessor extends AbstractProcessor {
|
public abstract class AbstractRecordProcessor extends AbstractProcessor {
|
||||||
|
|
||||||
static final PropertyDescriptor RECORD_READER = new PropertyDescriptor.Builder()
|
static final PropertyDescriptor RECORD_READER = new PropertyDescriptor.Builder()
|
||||||
|
@ -128,7 +128,9 @@ public abstract class AbstractRecordProcessor extends AbstractProcessor {
|
||||||
attributes.putAll(writeResult.getAttributes());
|
attributes.putAll(writeResult.getAttributes());
|
||||||
recordCount.set(writeResult.getRecordCount());
|
recordCount.set(writeResult.getRecordCount());
|
||||||
}
|
}
|
||||||
} catch (final SchemaNotFoundException | MalformedRecordException e) {
|
} catch (final SchemaNotFoundException e) {
|
||||||
|
throw new ProcessException(e.getLocalizedMessage(), e);
|
||||||
|
} catch (final MalformedRecordException e) {
|
||||||
throw new ProcessException("Could not parse incoming data", e);
|
throw new ProcessException("Could not parse incoming data", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue