Closed GoogleCodeExporter closed 9 years ago
This feature has been implemented as follows.
1. Data sources now contain the name for a "formatter" class, which is
responsible for converting Java objects to string representation suitable for
CSV. The property setting is shown below:
# CSV data formatter. This is the class responsible for translating
# from Java objects to CSV strings. The data format can vary independently
# from the CSV type based where data are extracted from or the types of
# tools that will process data.
replicator.datasource.applier.csvFormatter=com.continuent.tungsten.replicator.cs
v.DefaultCsvDataFormat
2. The current implementation provides data formatting to make comparison
simple with MySQL sources. Users can provide their own formatters by
implementing the following interface:
com.continuent.tungsten.replicator.csv.CsvDataFormat
The implementation in
com.continuent.tungsten.replicator.csv.DefaultCsvDataFormat provides a good
example of how to create your own.
3. Once further implementations are available, users can include them the
configuration using tpm as shown in the following update example:
tpm update myservice --property=replicator.datasource.applier.csvFormatter=com.continuent.tungsten.replicator.csv.DefaultCsvDataFormat
4. Internally all replicator CSV classes are in a single package named
com.continuent.tungsten.replicator.csv with a corresponding unit test. Any
further additions to CSV processing belong in this package.
Original comment by robert.h...@continuent.com
on 8 Mar 2014 at 3:24
Original comment by robert.h...@continuent.com
on 8 Mar 2014 at 3:38
Original comment by robert.h...@continuent.com
on 8 Mar 2014 at 3:51
This feature was implemented successfully.
Every aspect of the CSV is configurable either by changing the datasource
values or from the command line.
In fact, this flexibility was exploited by tungsten-sandbox to deploy the
'fileapplier' topology with custom CSV.
Original comment by g.maxia
on 18 Sep 2014 at 3:36
There are already a few tests for this feature in the regression suite.
Original comment by g.maxia
on 18 Sep 2014 at 3:37
A note has been added into the 3.0 release notes
Original comment by mc.br...@continuent.com
on 13 Oct 2014 at 9:19
Original issue reported on code.google.com by
robert.h...@continuent.com
on 4 Mar 2014 at 4:29