Apache Gora
  1. Apache Gora
  2. GORA-139

Creates Cassandra column family with BytesType for column value validator (and comparators), instead of UTF8Type

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.2.1
    • Component/s: gora-cassandra
    • Labels:
      None

      Description

      Currently, if a column family does not exist, it is created by CassandraClient with CassandraMapping
      but its column value validator and its comparators are UTF8Type, and it may cause an exception,
      depending on its value as follows:

      Column Families:
      ColumnFamily: f
      Key Validation Class: org.apache.cassandra.db.marshal.BytesType
      Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
      Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
      GC grace seconds: 0
      Compaction min/max thresholds: 4/32
      Read repair chance: 0.0
      DC Local Read repair chance: 0.0
      Replicate on write: false
      Caching: KEYS_ONLY
      Bloom Filter FP chance: default
      Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
      Compression Options:
      sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor

      me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:(String didn't validate.) [aarpdaily][f][ts] failed validation)
      at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:52)
      at me.prettyprint.cassandra.service.KeyspaceServiceImpl$1.execute(KeyspaceServiceImpl.java:97)
      ...

      It should be BytesType instead of UTF8Type to support any value.

      1. GORA-139.patch
        1 kB
        Kazuomi Kashii

        Issue Links

          Activity

          Hide
          Kazuomi Kashii added a comment -

          + cfDef.setDefaultValidationClass(ComparatorType.BYTESTYPE.getClassName());
          for GORA-132

          Show
          Kazuomi Kashii added a comment - + cfDef.setDefaultValidationClass(ComparatorType.BYTESTYPE.getClassName()); for GORA-132
          Hide
          Kazuomi Kashii added a comment -

          + cfDef.setComparatorType(ComparatorType.BYTESTYPE);
          for GORA-138

          Show
          Kazuomi Kashii added a comment - + cfDef.setComparatorType(ComparatorType.BYTESTYPE); for GORA-138
          Hide
          Lewis John McGibbney added a comment -

          Committed @revision 1341264 in trunk
          Thank you Kazuomi

          Show
          Lewis John McGibbney added a comment - Committed @revision 1341264 in trunk Thank you Kazuomi
          Hide
          Hudson added a comment -

          Integrated in gora-trunk #288 (See https://builds.apache.org/job/gora-trunk/288/)
          commit to address GORA-139 and update to CHANGES.txt (Revision 1341264)

          Result = SUCCESS
          lewismc :
          Files :

          • /gora/trunk/CHANGES.txt
          • /gora/trunk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraMapping.java
          Show
          Hudson added a comment - Integrated in gora-trunk #288 (See https://builds.apache.org/job/gora-trunk/288/ ) commit to address GORA-139 and update to CHANGES.txt (Revision 1341264) Result = SUCCESS lewismc : Files : /gora/trunk/CHANGES.txt /gora/trunk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraMapping.java
          Hide
          Hudson added a comment -

          Integrated in goraOracle #6 (See https://builds.apache.org/job/goraOracle/6/)
          commit to address GORA-139 and update to CHANGES.txt (Revision cc50fdeed3c43d8991137db3ffc0b82258d41bb0)

          Result = FAILURE
          lewismc :
          Files :

          • CHANGES.txt
          • gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraMapping.java
          Show
          Hudson added a comment - Integrated in goraOracle #6 (See https://builds.apache.org/job/goraOracle/6/ ) commit to address GORA-139 and update to CHANGES.txt (Revision cc50fdeed3c43d8991137db3ffc0b82258d41bb0) Result = FAILURE lewismc : Files : CHANGES.txt gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraMapping.java

            People

            • Assignee:
              Unassigned
              Reporter:
              Kazuomi Kashii
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development