Uploaded image for project: 'Apache Gora'
  1. Apache Gora
  2. GORA-270

IOUtils static SerializationFactory field

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.4
    • Component/s: gora-core
    • Labels:

      Description

      (From http://mail-archives.apache.org/mod_mbox/gora-dev/201308.mbox/%3CCAG50ZE_poN4C%2B%2B8t2xLZ3MoJVDMRo6nfW_Wygd%3D%3DeteF3jyLrw%40mail.gmail.com%3E)

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                drazzib Damien Raude-Morvan
                Reporter:
                drazzib Damien Raude-Morvan
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: