nutch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1041749 - /nutch/trunk/src/java/org/apache/nutch/storage/StorageUtils.java
Date Fri, 03 Dec 2010 09:51:39 GMT
Author: ab
Date: Fri Dec  3 09:51:38 2010
New Revision: 1041749

URL: http://svn.apache.org/viewvc?rev=1041749&view=rev
Log:
Fix breakage due to the changed Gora API.

Modified:
    nutch/trunk/src/java/org/apache/nutch/storage/StorageUtils.java

Modified: nutch/trunk/src/java/org/apache/nutch/storage/StorageUtils.java
URL: http://svn.apache.org/viewvc/nutch/trunk/src/java/org/apache/nutch/storage/StorageUtils.java?rev=1041749&r1=1041748&r2=1041749&view=diff
==============================================================================
--- nutch/trunk/src/java/org/apache/nutch/storage/StorageUtils.java (original)
+++ nutch/trunk/src/java/org/apache/nutch/storage/StorageUtils.java Fri Dec  3 09:51:38 2010
@@ -11,6 +11,7 @@ import org.apache.gora.persistency.Persi
 import org.apache.gora.query.Query;
 import org.apache.gora.store.DataStore;
 import org.apache.gora.store.DataStoreFactory;
+import org.apache.gora.util.GoraException;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.mapreduce.Job;
 import org.apache.hadoop.mapreduce.Partitioner;
@@ -20,7 +21,7 @@ public class StorageUtils {
 
   @SuppressWarnings("unchecked")
   public static <K, V extends Persistent> DataStore<K, V> createDataStore(Configuration
conf,
-      Class<K> keyClass, Class<V> persistentClass) throws ClassNotFoundException
{
+      Class<K> keyClass, Class<V> persistentClass) throws ClassNotFoundException,
GoraException {
     Class<? extends DataStore<K, V>> dataStoreClass =
       (Class<? extends DataStore<K, V>>) getDataStoreClass(conf);
     return DataStoreFactory.createDataStore(dataStoreClass,
@@ -29,7 +30,7 @@ public class StorageUtils {
 
   @SuppressWarnings("unchecked")
   public static <K, V extends Persistent> DataStore<K, V> createWebStore(Configuration
conf,
-      Class<K> keyClass, Class<V> persistentClass) throws ClassNotFoundException
{
+      Class<K> keyClass, Class<V> persistentClass) throws ClassNotFoundException,
GoraException {
     String schema = conf.get("storage.schema", "webpage");
     String crawlId = conf.get(Nutch.CRAWL_ID_KEY, "");
 
@@ -97,7 +98,7 @@ public class StorageUtils {
 
   public static <K, V> void initReducerJob(Job job,
       Class<? extends GoraReducer<K, V, String, WebPage>> reducerClass)
-  throws ClassNotFoundException {
+  throws ClassNotFoundException, GoraException {
     Configuration conf = job.getConfiguration();
     DataStore<String, WebPage> store =
       StorageUtils.createWebStore(conf, String.class, WebPage.class);



Mime
View raw message