-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
batch-reset creates an empty record at the end when writing and many empty records with encode marcxml #543
Comments
After fixing #525 some strange behavior occures when using the combination of With encode-marcxml it creates an additional empty record with every single record. See: https://gitlab.com/oersi/oersi-marc/-/commit/2abe46321aefc650fe85e5a88a43eba0add3b649 It must have to do with the combination of batch-reset error AND the changes done for encode-marcxml With Metafix Runner 1.1.1
|
This commit fails and so shows that, although the record is empty, the footer is written.
Test fails because the stream is resetted two times although only one time called.
By not calling the pipe (aka wrapper) but the receiver directly the stream is only once resetted when called once. (In conjunction with ObjectFileWriter and StreamBatchResetter this bug had resulted in as many empty files as non-empty ones.) Complements 04f8410fddceeefce5e228eb5d1866a82dff1687.
Test fails because it's a line break inserted although there was no data processed.
I think here are two issues mixed - one of them is no issue at all ( s. a) & b) ). metafacture-core/metafacture-io/src/test/java/org/metafacture/io/ObjectFileWriterTest.java Line 103 in f5cc9dc
b) You use Line 90 in f5cc9dc
c) Not https://github.com/metafacture/metafacture-core/pull/532/files changed the behaviour. It has indeed something to do with I've also discovered that when an empty Another bug surfaced: if a record was empty a footer was written. This is fixed in 0ea6d23. A good way to test this is the following flux (which is useful with CLI, not for playground because of the written files which you cannot see in that web app):
|
By not calling the pipe (aka wrapper) but the receiver directly the stream is only once resetted when called once. (In conjunction with ObjectFileWriter and StreamBatchResetter this bug had resulted in as many empty files as non-empty ones.)
@dr0i i tested it with: https://github.com/TobiasNx/notWorkingFlux/blob/f8c3f5167e0ab254e7efd8498785ba1036cef822/batchResetEmptyFiles/batchResetEmptyFile.flux See: The additional empty records are not processed anymore. Which is good :) a) -> empty record at the end is created because of the resetting, right? So the empty record at the end is intentional? b) what is the difference between Not solved as stated. c) is fixed which is great.
Looks goo. There seems to be a linebreak between records too. That is not new but I dont know if we need it too?
Looks good the footer in empty record is now deleted. |
No. A new file is intentionally opened. If it's filled with data or not depends on the data, the resetsize etc.
sure it is. What you said in your words is what
you may want to open a new issue |
See: TobiasNx/metafacture_workflows@64ba3e8
Running the workflow with Metafix-Runner 1.0.0
When using the flux module
batch-reset
and set the batch size to "1" (| batch-reset(batchsize="1")
. MF creates an empty record after the last transfromation.batch-reset
should not output empty records.e.g.:
or
The text was updated successfully, but these errors were encountered: