On empty input, the JdbcPagingItemReader cannot derive
a start value for the sort key to be used in further
queries. For multi-threaded steps, it is thus necessary
to prevent the reader from trying to read further pages
if the first page is empty.
Issue #3898
Due to GenericRecord being checked before SpecificRecordBase,
GenericDatumWriter was used incorrectly for types that extend
SpecificRecordBase.
Resolves#3859
Both the PatternMatcher and JdbcParameterUtils use String.toCharArray for
processing. This will create a new char[] which needs to be collected. The
same code has been rewritten to use String.charAt to reduce the overhead.
Additionally unneeded object creation in the PatternMatcher has been removed
as well, to reduce further objects needed to be gc'ed.
StringBuilder by default has a size of 16, however there
are some places that already create larger strings already.
For efficiency and garbage reduction it would be better to have
larger sizes to begin with.
Guarded the logging statements which do concatenation of strings
or calling toString on objects. When a log level isn't enabled
this still would produce garbage that would need to be collected.
Guarded all logging up to info, warn and error can be assumed to be
enabled on a production system.
Currently when reading/writing JSON and using the reader/marshaller provided
and you want a custom Gson or ObjectMapper instance it still creates the not
needed instance. Move the construction to a constructor and provide a constructor
to directly pass in the pre-configured Gson or ObjectMapper instance.
The same approach is used in Spring itself where Gson or ObjectMapper instances
can be passed in.
Tests in this class fail intermittently because
they send messages to Kafka in an asynchronous
way and assert on the results immediately without
waiting for the send operation to complete.
This commit updates the tests to wait for
send results before asserting on them
(similar to a140a9f5).
(cherry picked from commit 5826111b85)
* Corrects unit tests with expected behavior.
* Creates integration tests highlighting Hibernate lazy-loading failure if the reader has requested the page on open().
Issue #1074
TransactionAwareBufferedWriter offers a number of optimization
potentials. First it creates an unnecessary local, temporary char[]
in write(char[], int, int). Second it does not overwrite any of the
#write(String) methods leading to unnecessary intermediate copies.
* avoid local, temporary char[] in #write(char[], int, int)
* overwrite #write(String) methods to avoid copies
Together these two changes should help to reduce allocation rate.
Issue: #1166
Modify `removeKeyWord(...)` such that the keyword is removed regardless
of what kind of whitespace follows. This is especially useful for those
who read in SQL from a file which has been formatted such that keywords
live on their own lines.
Added unit tests for trimming whitespace.
Resolves#765
Before this commit, the default value of comment prefix in
FlatFileItemReaderBuilder was not consistent with the one in
FlatFileItemReader.
This commit changes the default value of comment prefix to # in
the builder to be consistent with the reader.
Resolves BATCH-2862
Previously, if supplying empty comments or no comments to comments() of the FlatFileItemReaderBuilder, the comments would be ignored and instead use the default comments "#" provided by the FlatFileItemReader.
Resolves BATCH-2837
Previously, if supplying an empty delimiter, to the delimited().delimiter() of DelimitedBuilder from the parent FlatFileItemWriterBuilder, it would be ignored and instead use the default delimiter ",".
Resolves BATCH-2844
This commit removes the requirement for a Resource to be configured at
build time. This requirement prevented the use of this builder along
with the MultiResourceItemWriter.
Resolves BATCH-2720
ListPreparedStatementSetter is almost a duplicate of
ArgumentPreparedStatementSetter except that it accepts a List of
arguments instead of an array of arguments.
Resolves BATCH-2796