Sure! Thanks a lot!
The mapping file is attached here On Sun, Aug 25, 2013 at 5:57 PM, Renato Marroquín Mogrovejo < [email protected]> wrote: > Hi Benjamin, > > While looking at your log, it says " java.lang.IllegalStateException: > tableName is not specified " you might be missing some information in your > mapping files. > Would you like to share them with us so we can help you out? > > > Renato M. > > > 2013/8/25 Sznajder ForMailingList <[email protected]> > >> Hi, >> >> I tried the following : >> >> My aim was to run the LogManager class (I copied gora-tutorial) in my >> own project. >> In addition, I want to run it when Gora is defined on HBASE. >> >> For this purpose, I copied the LogManager class to my project. I added >> the different jars to the classpath and in addition, I added at first line >> in the classpath a conf/ directory containing two files: >> - gora.properties >> - gora-hbase.mapping.xml >> (I attach the two files here) >> >> However, when running the program, I get the following error: >> >> Thank you for your help! >> >> Benjamin >> >> >> >> 13/08/25 17:44:00 INFO zookeeper.ZooKeeper: Initiating client connection, >> connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection >> 13/08/25 17:44:00 INFO zookeeper.ClientCnxn: Opening socket connection to >> server localhost/127.0.0.1:2181 >> 13/08/25 17:44:00 INFO zookeeper.ClientCnxn: Socket connection >> established to localhost/127.0.0.1:2181, initiating session >> 13/08/25 17:44:00 INFO zookeeper.ClientCnxn: Session establishment >> complete on server localhost/127.0.0.1:2181, sessionid = >> 0x1407cacf0da001b, negotiated timeout = 40000 >> Exception in thread "main" java.lang.RuntimeException: >> org.apache.gora.util.GoraException: java.lang.RuntimeException: >> java.lang.IllegalStateException: tableName is not specified >> at com.ibm.hrl.gora.logmanager.LogManager.<init>(LogManager.java:68) >> at com.ibm.hrl.gora.logmanager.LogManager.main(LogManager.java:245) >> Caused by: org.apache.gora.util.GoraException: >> java.lang.RuntimeException: java.lang.IllegalStateException: tableName is >> not specified >> at >> org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:167) >> at >> org.apache.gora.store.DataStoreFactory.getDataStore(DataStoreFactory.java:278) >> at com.ibm.hrl.gora.logmanager.LogManager.init(LogManager.java:77) >> at com.ibm.hrl.gora.logmanager.LogManager.<init>(LogManager.java:66) >> ... 1 more >> Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: >> tableName is not specified >> at >> org.apache.gora.hbase.store.HBaseStore.initialize(HBaseStore.java:127) >> at >> org.apache.gora.store.DataStoreFactory.initializeDataStore(DataStoreFactory.java:102) >> at >> org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:161) >> ... 4 more >> Caused by: java.lang.IllegalStateException: tableName is not specified >> at >> org.apache.gora.hbase.store.HBaseMapping$HBaseMappingBuilder.build(HBaseMapping.java:166) >> at >> org.apache.gora.hbase.store.HBaseStore.readMapping(HBaseStore.java:665) >> at >> org.apache.gora.hbase.store.HBaseStore.initialize(HBaseStore.java:110) >> ... 6 more >> >> >
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Gora Mapping file for HBase Backend
-->
<gora-orm>
<table name="Pageview"> <!-- optional descriptors for tables -->
<family name="common"/> <!-- This can also have params like compression, bloom filters -->
<family name="http"/>
<family name="misc"/>
</table>
<class name="org.apache.gora.tutorial.log.generated.Pageview" keyClass="java.lang.Long" table="AccessLog">
<field name="url" family="common" qualifier="url"/>
<field name="timestamp" family="common" qualifier="timestamp"/>
<field name="ip" family="common" qualifier="ip" />
<field name="httpMethod" family="http" qualifier="httpMethod"/>
<field name="httpStatusCode" family="http" qualifier="httpStatusCode"/>
<field name="responseSize" family="http" qualifier="responseSize"/>
<field name="referrer" family="misc" qualifier="referrer"/>
<field name="userAgent" family="misc" qualifier="userAgent"/>
</class>
<class name="com.ibm.hrl.gora.urlDb.generated.CrawlUrl" keyClass="java.lang.String" table="CrawlDB">
<field name="url" qualifier="url"/>
<field name="timestamp" qualifier="timestamp"/>
<field name="domain" qualifier="domain" />
<field name="status" qualifier="status"/>
<field name="from_url" qualifier="from_url"/>
</class>
<class name="org.apache.gora.tutorial.log.generated.MetricDatum" keyClass="java.lang.String" table="Metrics">
<field name="metricDimension" family="common" qualifier="metricDimension"/>
<field name="timestamp" family="common" qualifier="ts"/>
<field name="metric" family="common" qualifier="metric"/>
</class>
</gora-orm>
gora.properties
Description: Binary data

