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

Improve error logging when gora-$module-mapping.xml is not correctly defined

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.2
    • 1.0
    • gora-core, storage

    Description

      I've recently encountered this myself during running gora-cassandra aginst Keith Turner's goraci module where my gora-cassandra-mapping.xml configuration was incorrect. This has also been experienced further downstream in Nutch 2.X land where new users are met with a rather hellish stack such as the following

      12/07/21 13:04:27 INFO mapred.JobClient: Task Id : attempt_201207211239_0003_m_000001_2, Status : FAILED
      org.apache.gora.util.GoraException: java.io.IOException
      	at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:167)
      	at org.apache.gora.store.DataStoreFactory.getDataStore(DataStoreFactory.java:278)
      	at goraci.Generator$GeneratorMapper.map(Generator.java:197)
      	at goraci.Generator$GeneratorMapper.map(Generator.java:179)
      	at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
      	at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764)
      	at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370)
      	at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAs(Subject.java:396)
      	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1093)
      	at org.apache.hadoop.mapred.Child.main(Child.java:249)
      Caused by: java.io.IOException
      	at org.apache.gora.cassandra.store.CassandraStore.initialize(CassandraStore.java:88)
      	at org.apache.gora.store.DataStoreFactory.initializeDataStore(DataStoreFactory.java:102)
      	at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:161)
      	... 11 more
      Caused by: java.lang.NullPointerException
      	at org.apache.gora.cassandra.store.CassandraMapping.<init>(CassandraMapping.java:117)
      	at org.apache.gora.cassandra.store.CassandraMappingManager.get(CassandraMappingManager.java:84)
      	at org.apache.gora.cassandra.store.CassandraClient.initialize(CassandraClient.java:83)
      	at org.apache.gora.cassandra.store.CassandraStore.initialize(CassandraStore.java:85)
      	... 13 more
      
      

      We should implement much better logging for this which clearly specifies that it is a mapping problem due to incorrect mapping configuration.

      Attachments

        Issue Links

          Activity

            There are no comments yet on this issue.

            People

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

              Dates

                Created:
                Updated: