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

Pig Storage Handler: Add >=0.8.1 types, Guess right type for Key in Schema

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 0.8.8, 1.0.1
    • None
    • None

    Description

      Various patches in the Pig Storage Handler:

      • correctly guess the right Pig type for the Row Key
      • add support for FloatType, DoubleType, UUIDType (as String) and DateType (as time epoch) (removed in v2 because it would break when storing data back in Cassandra)
      • add support to specify correct type comparator in SlicePredicate

      SlicePredicate comparator:
      For instance:

      raw = LOAD 'cassandra://ks/cf?slice_start=2.5&slice_end=5.3&comparator=DoubleType' USING CassandraStorage() AS ();

      It's an optional parameter. If it's not present, it will default to BytesType. Which mean you must use hex strings.
      Hence slice_start=00&slice_end=FF isn't the same as slice_start=00&slice_end=FF&comparator=AsciiType !

      Attachments

        1. new_types_and_key_type.txt
          8 kB
          Steeve Morin
        2. new_types_and_key_type_v2.txt
          7 kB
          Steeve Morin

        Activity

          People

            Unassigned Unassigned
            steeve Steeve Morin
            Brandon Williams
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: