Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-2869

CassandraStorage does not function properly when used multiple times in a single pig script due to UDFContext sharing issues

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 0.7.9, 0.8.2
    • None
    • None
    • Normal

    Description

      CassandraStorage appears to have threading issues along the lines of those described at http://pig.markmail.org/message/oz7oz2x2dwp66eoz due to the sharing of the UDFContext.

      I believe the fix lies in implementing

      public void setStoreFuncUDFContextSignature(String signature)
          {
          }
      

      and then using that signature when getting the UDFContext.

      From the Pig manual:

      setStoreFunc!UDFContextSignature(): This method will be called by Pig both in the front end and back end to pass a unique signature to the Storer. The signature can be used to store into the UDFContext any information which the Storer needs to store between various method invocations in the front end and back end. The default implementation in StoreFunc has an empty body. This method will be called before other methods.

      Attachments

        1. 2869.txt
          4 kB
          Jeremy Hanna
        2. 2869-2.txt
          5 kB
          Jeremy Hanna

        Activity

          People

            jeromatron Jeremy Hanna
            gsingers Grant Ingersoll
            Jeremy Hanna
            Brandon Williams
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: