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

sstable2json exports keys in a wrong format

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 2.1.1
    • Legacy/Tools
    • Low

    Description

      I examined code of SSTableImport and SSTableExport classes and found one thing that looks strange to me. Currently processing (encoding/decoding) of columns' names and values is performed based on CF Comparator and Value Validator correspondingly. But row keys are processed using #bytesToHex and #hexToBytes methods despite of there is Key Validator. Such approach works properly for "bytes" keys only. For other types it exports keys in a wrong format (i.e. they are exported in unreadable form).

      In the scope of this ticket we need to consider backward compatibility (import of previously exported sstables). For "bytes" keys it will work as previously since #bytesToHex and #hexToBytes methods are used in internals of BytesType class. For other types we need to allow an ability to import data using "bytes" despite of configured validator.

      Attachments

        1. CASSANDRA-2.1-7498.txt
          21 kB
          Aleksei Zotov

        Activity

          People

            azotcsit Aleksei Zotov
            azotcsit Aleksei Zotov
            Aleksei Zotov
            Benjamin Lerer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: