-
Notifications
You must be signed in to change notification settings - Fork 155
Open
Description
Built a standalone browser(javascript) distribution bundle from the etc/browser folder using the following browserify command:
browserify --standalone avro avsc.js | uglify -o "dist/avsc.js"
Tested the BlockEncoder class using the function below:
function blockEncoderTest() {
let BlockEncoder = avro.streams.BlockEncoder;
let t = avro.Type.forSchema('int');
let chunks = [];
let encoder = new BlockEncoder(t, {
omitHeader: true,
});
encoder.on('data', function(chunk) {
console.log(chunk);
chunks.push(chunk);
});
encoder.write(12);
encoder.end();
}Ended up with the following error:
Error: stream.push() after EOF
at new NodeError (dist/avsc.js:8498:38)
at readableAddChunk (dist/avsc.js:8849:60)
at BlockEncoder.Readable.push (dist/avsc.js:8824:32)
at BlockEncoder._read (dist/avsc.js:12778:30)
at dist/avsc.js:12801:38
at BlockEncoder.null [as _compress] (dist/avsc.js:12710:33)
at BlockEncoder._flushChunk (dist/avsc.js:12761:30)
at BlockEncoder.<anonymous> (dist/avsc.js:12697:38)
at BlockEncoder.emit (dist/avsc.js:3318:21)
at finishMaybe (dist/avsc.js:9986:40)
Metadata
Metadata
Assignees
Labels
No labels