gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hsapu...@apache.org
Subject svn commit: r1410703 - in /gora/trunk/gora-core/src: main/java/org/apache/gora/store/impl/DataStoreBase.java test/java/org/apache/gora/mapreduce/MapReduceTestUtils.java
Date Sat, 17 Nov 2012 06:52:16 GMT
Author: hsaputra
Date: Sat Nov 17 06:52:16 2012
New Revision: 1410703

URL: http://svn.apache.org/viewvc?rev=1410703&view=rev
Log:
Cleanup on code style

Modified:
    gora/trunk/gora-core/src/main/java/org/apache/gora/store/impl/DataStoreBase.java
    gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/MapReduceTestUtils.java

Modified: gora/trunk/gora-core/src/main/java/org/apache/gora/store/impl/DataStoreBase.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/main/java/org/apache/gora/store/impl/DataStoreBase.java?rev=1410703&r1=1410702&r2=1410703&view=diff
==============================================================================
--- gora/trunk/gora-core/src/main/java/org/apache/gora/store/impl/DataStoreBase.java (original)
+++ gora/trunk/gora-core/src/main/java/org/apache/gora/store/impl/DataStoreBase.java Sat Nov
17 06:52:16 2012
@@ -51,7 +51,7 @@ import org.slf4j.LoggerFactory;
  * A Base class for Avro persistent {@link DataStore}s.
  */
 public abstract class DataStoreBase<K, T extends PersistentBase>
-implements DataStore<K, T>, Configurable, Writable, Closeable {
+    implements DataStore<K, T>, Configurable, Writable, Closeable {
 	
   protected BeanFactory<K, T> beanFactory;
 

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/MapReduceTestUtils.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/MapReduceTestUtils.java?rev=1410703&r1=1410702&r2=1410703&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/MapReduceTestUtils.java (original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/MapReduceTestUtils.java Sat
Nov 17 06:52:16 2012
@@ -18,7 +18,6 @@
 
 package org.apache.gora.mapreduce;
 
-import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -40,23 +39,20 @@ public class MapReduceTestUtils {
   private static final Logger log = LoggerFactory.getLogger(MapReduceTestUtils.class);
   
   /** Tests by running the {@link QueryCounter} mapreduce job */
-  public static void testCountQuery(DataStore<String, WebPage> dataStore
-      , Configuration conf) 
-  throws Exception {
-    
-	((DataStoreBase<String, WebPage>)dataStore).setConf(conf);
+  public static void testCountQuery(DataStore<String, WebPage> dataStore, Configuration
conf)
+      throws Exception {
+
+    ((DataStoreBase<String, WebPage>)dataStore).setConf(conf);
     
     //create input
     WebPageDataCreator.createWebPageData(dataStore);
-    
-    
+
     QueryCounter<String,WebPage> counter = new QueryCounter<String,WebPage>(conf);
     Query<String,WebPage> query = dataStore.newQuery();
     query.setFields(WebPage._ALL_FIELDS);
     
     dataStore.close();
-    
-    
+
     //run the job
     log.info("running count query job");
     long result = counter.countQuery(dataStore, query);
@@ -64,11 +60,9 @@ public class MapReduceTestUtils {
     
     //assert results
     Assert.assertEquals(WebPageDataCreator.URLS.length, result);
-    
   }
  
-  public static void testWordCount(Configuration conf, 
-      DataStore<String,WebPage> inStore, DataStore<String, 
+  public static void testWordCount(Configuration conf, DataStore<String,WebPage> inStore,
DataStore<String,
       TokenDatum> outStore) throws Exception {
 	  //Datastore now has to be a Hadoop based datastore
     ((DataStoreBase<String,WebPage>)inStore).setConf(conf);
@@ -97,7 +91,7 @@ public class MapReduceTestUtils {
   }
   
   private static void assertTokenCount(DataStore<String, TokenDatum> outStore,
-      String token, int count) throws IOException, Exception {
+      String token, int count) throws Exception {
     TokenDatum datum = outStore.get(token, null);
     Assert.assertNotNull("token:" + token + " cannot be found in datastore", datum);
     Assert.assertEquals("count for token:" + token + " is wrong", count, datum.getCount());



Mime
View raw message