Commit Graph

1323 Commits

Author SHA1 Message Date
Mahmoud Ben Hassine
6752c97c0e Fix NPE in MongoItemReader when sorting is not specified through the builder
Resolves #4082
2022-05-05 16:00:44 +02:00
Edgar Asatryan
6417065141 Check arguments of MongoItemReader#setSort
Issue #4014
2022-02-23 12:34:17 +01:00
me
721d0bb2df change parameterValues check -> CollectionUtils.isEmpty
Resolves #4021
2022-02-22 14:30:05 +01:00
Henning Poettker
db2d622145 Adapt H2PagingQueryProvider for H2 v2.x
Issue #4047
2022-01-18 16:11:58 +01:00
Henning Pöttker
781faf1306 Fix multi-threaded empty read for JdbcPagingItemReader
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
2021-09-24 10:35:13 +02:00
Rémi Kaeffer
d6178d3e0e Fix double "the" typo everywhere in source code 2021-09-03 19:10:17 +02:00
Henning Pöttker
3fbf38a9c7 Fix HippyMethodInvoker by not considering unsuitable candidates
Resolves #3794
2021-09-03 14:56:21 +02:00
Ilya Samartsev
c90aa63ca3 Fix NPE in sql exception translation
Resolves #3968
2021-08-18 20:23:45 +02:00
abielewicz
63169f3486 Change the order in which datum writer is selected
Due to GenericRecord being checked before SpecificRecordBase,
GenericDatumWriter was used incorrectly for types that extend
SpecificRecordBase.

Resolves #3859
2021-05-18 17:53:10 +02:00
이동욱
d19f0b5444 Replace ArrayList with LinkedList in ListItemReader
Issue #3782
2021-05-18 10:37:02 +02:00
Parikshit Dutta
ff2bcdba07 Updated verifyCursorPosition default to true in JdbcCursorItemReaderBuilder
Issue #3893
2021-05-12 15:09:36 +02:00
Marten Deinum
fe4edac938 Reduce the toCharArray overhead
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.
2021-03-17 18:32:12 +01:00
Marten Deinum
d9a360d0a8 Better sizes for StringBuilder
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.
2021-03-17 16:03:59 +01:00
Marten Deinum
737f6ace13 Added isXXXEnabled for logging statements
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.
2021-03-17 15:01:41 +01:00
Niels Ferguson
f7e6eabd17 Fix incorrect usage of StringBuilder#append in TransactionAwareBufferedWriter
Issue #3745
2021-03-10 10:34:30 +01:00
Mahmoud Ben Hassine
e176058d3e Add timeout when flushing items to Kafka in KafkaItemWriter
Issue #3773
2021-03-09 15:15:37 +01:00
Mahmoud Ben Hassine
5cf389ccf0 Refine contribution #3827
* Update year in licence headers
* Update Javadoc
* Add `this` keyword where appropriate
2021-03-09 15:15:31 +01:00
Jacob Botuck
7b6b15d954 KafkaItemWriter.write should not return until items are confirmed to have been written
Issue #3773
2021-03-09 15:15:23 +01:00
Mahmoud Ben Hassine
2a6aab3399 Refine af14a2e471
* Make default constructors call other constructors with default values
* Fix formatting
* Update year in license headers
2021-02-23 16:51:53 +01:00
Marten Deinum
cf16aec7ca Provide constructors for injection
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.
2021-02-23 16:51:43 +01:00
Mahmoud Ben Hassine
af3eff3474 Fix KafkaItemReaderTests
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)
2021-02-18 14:52:10 +01:00
Mahmoud Ben Hassine
5c1a6083fd Polish contribution feb46fd3f7
* Update year in license header
* Use "this" keyword where appropriate
2020-11-27 23:32:02 +01:00
Aditya Sathe
644e24351f Make kafkaTemplate protected in KafkaItemWriter
Issue #3802
2020-11-27 23:30:43 +01:00
Antoine Kapps
95f11facf4 Fix incorrect behaviour of RepositoryItemReader#jumpToItem() on restart
* 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
2020-11-20 15:00:47 +01:00
lucap
613f425336 Use isQuoteCharacter instead of direct char comparison in DelimitedLineTokenizer
Issue #682
2020-11-20 11:20:07 +01:00
Parikshit Dutta
1ce4da5cce Fix for setting name of StaxEventItemReader at build 2020-09-25 10:17:47 +02:00
Parikshit Dutta
c2625b1f87 Add support to build StaxEventItemReader when no Resource is provided
Resolves #3736
2020-09-21 14:22:32 +02:00
Mahmoud Ben Hassine
4000d1d579 Polish contribution 2020-09-21 13:16:38 +02:00
Santiago Molano
c78e2b518b Add support to build JsonItemReader when no Resource is provided
Resolves #3731
2020-09-21 13:16:37 +02:00
Mahmoud Ben Hassine
41854008e8 Add JpaCursorItemReader implementation
Issue #901
2020-09-16 15:52:28 -05:00
Mahmoud Ben Hassine
264243b73c Deprecate org.springframework.batch.item.xml.StaxUtils
This commit deprecates org.springframework.batch.item.xml.StaxUtils
in favor of org.springframework.util.xml.StaxUtils.

Resolves #3779
2020-09-16 10:08:28 +02:00
Mahmoud Ben Hassine
9449551d9f Deprecate Alignment enum
Resolves #3778
2020-09-15 20:59:25 +02:00
Mahmoud Ben Hassine
08d7f56eea Deprecate AbstractNeo4jItemReader
Resolves #3777
2020-09-15 20:39:40 +02:00
Mahmoud Ben Hassine
f6a8d10595 Deprecate MultiResourceItemReader#getCurrentResource
Resolves #3776
2020-09-15 17:00:08 +02:00
Michael Minella
7e485a1b2b Polish 2020-09-14 10:01:13 -05:00
Mahmoud Ben Hassine
615a4aee2c Add initial support for Java 14 records mapping
Issue #3693
2020-09-10 10:23:07 +02:00
Mahmoud Ben Hassine
65d31bff1d Polish d65203e2d3
* Minor formatting update
* Use a regexp to discard xml header in tests
2020-09-09 21:09:50 +02:00
Parikshit Dutta
d65203e2d3 Add support for 'standalone' attribute in StaxEventItemWriter
Issue #758
2020-09-09 21:09:10 +02:00
Mahmoud Ben Hassine
ce22cddbbc Add partitionOffsets setter in KafkaItemReaderBuilder
Resolves #3761
2020-08-14 21:39:27 +02:00
Mahmoud Ben Hassine
15a393b8ef Add ability to start reading from a custom offset in KafkaItemReader
Issue #737
2020-08-10 12:18:49 +02:00
Mahmoud Ben Hassine
9dde586442 Open FlatFileItemReader#isComment for extension
Resolves #1134
2020-07-24 16:18:02 +02:00
Mahmoud Ben Hassine
67317e66d0 Open StaxEventItemReader#isFragmentRootElementName for extension
Resolves #1020
2020-07-24 15:14:33 +02:00
Mahmoud Ben Hassine
bbfe1a9a76 Polish 6c5cb2b13d
* Move class Item as inner class of surrounding test
* Update mongodb sample for item deletion use case
2020-07-17 19:30:16 +02:00
Parikshit Dutta
6c5cb2b13d Use BulkOperations API for Remove Operations in MongoItemWriter
Issue #3737
2020-07-17 19:29:52 +02:00
Mahmoud Ben Hassine
e7ea16c9bc Add connection parameter to AbstractCursorItemReader#cleanupOnClose
This change makes it possible to (re)use the same connection used in
the openCursor method to clean up resources when the reader is closed.

Resolves #1696
2020-07-17 10:40:58 +02:00
Mahmoud Ben Hassine
2952e9a039 Add encoding parameter in StaxEventItemReader
Resolves #807
2020-07-15 11:54:55 +02:00
MinJun Kweon
a88b074c8d Add getChunkSize in SimpleCompletionPolicy
resolved #3738
2020-07-13 10:39:47 +02:00
Mahmoud Ben Hassine
4e0d6a982b Polish 3b58fecfe4
* Add query creation test in JpaNamedQueryProviderTests
* Make JpaPagingItemReaderNamedQueryIntegrationTests consistent
  with JpaPagingItemReaderNativeQueryIntegrationTests
2020-06-26 13:51:35 +02:00
Parikshit Dutta
3b58fecfe4 Add support for Named Query in JpaPagingItemReader
Issue #1667
2020-06-26 13:49:33 +02:00
Mahmoud Ben Hassine
d257fcee01 Polish 629497d5bb
* Fix tests in MongoItemWriterBuilderTests
* Minor code refactoring in MongoItemWriter
2020-06-25 13:09:50 +02:00