Description
Right now, IOUtils keep a static reference to an SerializationFactory
which is initialized on first call to writeObject() with a Configuration
instance. Given Configuration is also stored in a static field of same
class for latter usage.
But in fact each call to IOUtils.writeObject() can have a different
Configuration instance than previous one. In my personnal use case, I've
multiple M/R jobs which use Gora M/R feature to process Persistent object
but each job can work with a different datastore configuration (for
instance, name of table/collection/colum family).
If we keep a static reference to SerializationFactory (and so its
Configuration reference),
QueryBase#readFields will then create a DataStore with wrong Configuration
(ie. using first DataStore/Configuration instead of new one)
I've started working on this issue, and come up with a possible fix :
https://github.com/drazzib/gora/compare/apache-gora-0.2.1...ioutils_static_conf
- remove static SerializationFactory from IOUtils (will recreate it every
time) - in PartitionQueryImpl and QueryBase now send current configuration to
deserialize
One linked fix, is that gora "drivers" needs to be updated to define
Configuration instance in PartitionQueryImpl (like this
https://github.com/drazzib/gora/commit/395f2e2ad50d524f42ecc563104c165fa0fa6f39
).
Attachments
Attachments
Issue Links
- is depended upon by
-
GORA-275 Update Gora stores to pass conf when creating instance of PartitionQueryImpl
- Closed