[
https://issues.apache.org/jira/browse/BEAM-6820?focusedWorklogId=218840&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-218840
]
ASF GitHub Bot logged work on BEAM-6820:
----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Mar/19 18:39
Start Date: 26/Mar/19 18:39
Worklog Time Spent: 10m
Work Description: goldfishy commented on issue #8069: [BEAM-6820]
Cassandra object mapper abstraction
URL: https://github.com/apache/beam/pull/8069#issuecomment-476792103
> This is looking great! Thanks a lot for the clear explanation. I
understand now the issues. After thinking a bit in all the pros/cons I decided
to go into a different direction but closer to your proposal.
No worries. Happy that is was understandable.
> Remove the MapperFactory interface. In CassandraIO and update the
signature to `withMapperFactoryFn(SerializableFunction<Session, Mapper>
mapperFactoryFn)` add the corresponding javadoc and make `DefaultMapperFactory`
a package protected implementation of it and the default implementation of the
`AutoValue.Builder`, of course instantiate update the rest of the CassandraIO
code and tests to comply with this new signature.
>
Awesome suggestion. Done.
> We should be ok to merge with this final change and the final cleanups.
Please squash all your commits into one and update the title of the commit to
`[BEAM-6820] Add custom Row-Object mapper implementation for CassandraIO`
>
Done!
> Note: If you want this to be in the next release (2.12) you need to hurry
because tomorrow is the branch cut.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 218840)
Time Spent: 7h 20m (was: 7h 10m)
> Custom Row-Object mapper implementation for CassandraIO
> -------------------------------------------------------
>
> Key: BEAM-6820
> URL: https://issues.apache.org/jira/browse/BEAM-6820
> Project: Beam
> Issue Type: Improvement
> Components: io-java-cassandra
> Reporter: Max Charas
> Assignee: Max Charas
> Priority: Minor
> Time Spent: 7h 20m
> Remaining Estimate: 0h
>
> The current Cassandra source sink is tightly coupled to the Datastax Object
> Mapper. [This requires
> users|https://docs.datastax.com/en/developer/java-driver/3.1/manual/object_mapper/]
> of the sink to provide a POJO describing the table in Cassandra. Although
> the POJO is a easy and powerful way to describe the table it does requires
> users to always recompile the pipeline for each change in the table
> definition.
> I suggest adding a abstraction layer that allows users to inject their own
> mapper implementation. One example use would be a mapper that works with a
> generic
> [Row|https://beam.apache.org/releases/javadoc/2.4.0/org/apache/beam/sdk/values/Row.html]
> implementation rather than a compile-time POJO.
> This abstraction layer could be implemented by simply supplying a
> MapperFactory through the Sink/Source builder.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)