mirror of
https://github.com/apache/nifi.git
synced 2025-02-17 15:36:36 +00:00
NIFI-3995: This closes #1873. No longer use the 14th byte in the header for hwx content-encoded schema reference
Signed-off-by: joewitt <joewitt@apache.org>
This commit is contained in:
parent
7bcccb10f4
commit
a0b2311ff6
@ -46,7 +46,7 @@ public class HortonworksEncodedSchemaReferenceStrategy implements SchemaAccessSt
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RecordSchema getSchema(final FlowFile flowFile, final InputStream contentStream) throws SchemaNotFoundException, IOException {
|
public RecordSchema getSchema(final FlowFile flowFile, final InputStream contentStream) throws SchemaNotFoundException, IOException {
|
||||||
final byte[] buffer = new byte[14];
|
final byte[] buffer = new byte[13];
|
||||||
try {
|
try {
|
||||||
StreamUtils.fillBuffer(contentStream, buffer);
|
StreamUtils.fillBuffer(contentStream, buffer);
|
||||||
} catch (final IOException ioe) {
|
} catch (final IOException ioe) {
|
||||||
|
@ -47,7 +47,6 @@ public class HortonworksEncodedSchemaReferenceWriter implements SchemaAccessWrit
|
|||||||
bb.put((byte) LATEST_PROTOCOL_VERSION);
|
bb.put((byte) LATEST_PROTOCOL_VERSION);
|
||||||
bb.putLong(id);
|
bb.putLong(id);
|
||||||
bb.putInt(version);
|
bb.putInt(version);
|
||||||
bb.put((byte) 0); // We always use generic records
|
|
||||||
|
|
||||||
out.write(bb.array());
|
out.write(bb.array());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user