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

MockDataStore throws ClassCastException when used with LogManager

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.2
    • 1.0
    • storage
    • None

    Description

      lewismc@lewismc-HP-Mini-110-3100:~/ASF/gora$ bin/gora logmanager -parse gora-tutorial/src/main/resources/access.log
      12/05/17 21:16:40 INFO log.LogManager: Parsing file:gora-tutorial/src/main/resources/access.log
      Exception in thread "main" java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
      at org.apache.gora.mock.store.MockDataStore.put(MockDataStore.java:36)
      at org.apache.gora.tutorial.log.LogManager.storePageview(LogManager.java:140)
      at org.apache.gora.tutorial.log.LogManager.parse(LogManager.java:91)
      at org.apache.gora.tutorial.log.LogManager.main(LogManager.java:240)

      I actually remember getting this exception ages ago. All other datastore implementations accept public void put(K key, T value), whereas the MockDataStore accepts public void put(String key, MockPersistent obj)

      Understandably a simple way out of this is to define another datastore, however this really should be dealt with as I think mock datastore seems to be the default datastore!

      Attachments

        1. GORA-XX.patch
          10 kB
          Lewis John McGibbney

        Activity

          People

            Unassigned Unassigned
            lewismc Lewis John McGibbney
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: