gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lewi...@apache.org
Subject [1/7] gora git commit: Clean up code.
Date Sat, 05 Sep 2015 14:47:05 GMT
Repository: gora
Updated Branches:
  refs/heads/master 17bb1691e -> 550c89589


Clean up code.


Project: http://git-wip-us.apache.org/repos/asf/gora/repo
Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/c6c087c9
Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/c6c087c9
Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/c6c087c9

Branch: refs/heads/master
Commit: c6c087c9f8672bc386d93994e49e68dc97087896
Parents: 97d5845
Author: Furkan KAMACI <furkankamaci@gmail.com>
Authored: Fri Sep 4 15:01:05 2015 +0300
Committer: Furkan KAMACI <furkankamaci@gmail.com>
Committed: Fri Sep 4 15:01:05 2015 +0300

----------------------------------------------------------------------
 .../gora/accumulo/query/AccumuloResult.java     |   2 +-
 .../gora/accumulo/store/AccumuloStore.java      |   2 +-
 .../serializers/AvroSerializerUtil.java         |   4 +-
 .../cassandra/serializers/ListSerializer.java   |   4 +-
 .../cassandra/serializers/MapSerializer.java    |   4 +-
 .../gora/cassandra/store/CassandraStore.java    |   2 +-
 .../org/apache/gora/compiler/GoraCompiler.java  |   2 +-
 .../gora/examples/mapreduce/QueryCounter.java   |   2 +-
 .../gora/examples/mapreduce/WordCount.java      |   6 +-
 .../gora/avro/store/DataFileAvroStore.java      |   8 +-
 .../apache/gora/mapreduce/GoraInputSplit.java   |   2 +-
 .../apache/gora/mapreduce/GoraRecordReader.java |   2 +-
 .../org/apache/gora/memory/store/MemStore.java  |   4 +-
 .../persistency/ws/impl/BeanFactoryWSImpl.java  |   2 +-
 .../main/java/org/apache/gora/query/Result.java |   2 +-
 .../org/apache/gora/query/impl/ResultBase.java  |   4 +-
 .../apache/gora/query/ws/impl/ResultWSBase.java |   2 +-
 .../apache/gora/store/impl/DataStoreBase.java   |   2 +-
 .../gora/store/ws/impl/WSDataStoreFactory.java  |   2 +-
 .../main/java/org/apache/gora/util/IOUtils.java |   6 +-
 .../apache/gora/avro/store/TestAvroStore.java   |  14 +--
 .../persistency/impl/TestPersistentBase.java    |   2 +-
 .../apache/gora/store/DataStoreTestBase.java    |  58 +++++-----
 .../apache/gora/store/DataStoreTestUtil.java    | 112 +++++++++----------
 .../apache/gora/store/WSDataStoreTestBase.java  |  36 +++---
 .../java/org/apache/gora/goraci/Verify.java     |   2 +-
 .../gora/hbase/store/HBaseTableConnection.java  |  10 +-
 .../gora/hbase/util/HBaseByteInterface.java     |   4 +-
 .../apache/gora/hbase/store/TestHBaseStore.java |   4 +-
 .../gora/hbase/util/TestHBaseByteInterface.java |   8 +-
 .../gora/mongodb/store/TestMongoStore.java      |   4 +-
 .../gora/shims/hadoop/HadoopShimFactory.java    |   2 +-
 .../org/apache/gora/solr/store/SolrStore.java   |  16 ++-
 .../apache/gora/tutorial/log/LogAnalytics.java  |  12 +-
 .../apache/gora/tutorial/log/LogManager.java    |  16 +--
 35 files changed, 181 insertions(+), 183 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java
----------------------------------------------------------------------
diff --git a/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java b/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java
index f525f9f..f184228 100644
--- a/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java
+++ b/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java
@@ -75,7 +75,7 @@ public class AccumuloResult<K,T extends PersistentBase> extends ResultBase<K,T>
     
     Iterator<Entry<Key,Value>> nextRow = iterator.next();
     ByteSequence row = getDataStore().populate(nextRow, persistent);
-    key = (K) ((AccumuloStore<K, T>) dataStore).fromBytes(getKeyClass(), row.toArray());
+    key = ((AccumuloStore<K, T>) dataStore).fromBytes(getKeyClass(), row.toArray());
     
     return true;
   }

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
----------------------------------------------------------------------
diff --git a/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java b/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
index 601992c..6b213db 100644
--- a/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
+++ b/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
@@ -941,7 +941,7 @@ public class AccumuloStore<K,T extends PersistentBase> extends DataStoreBase<K,T
             endKey = fromBytes(getKeyClass(), TextUtil.getBytes(endRow));
           }
 
-          PartitionQueryImpl<K, T> pqi = new PartitionQueryImpl<K,T>(query, startKey, endKey, new String[] {location});
+          PartitionQueryImpl<K, T> pqi = new PartitionQueryImpl<K,T>(query, startKey, endKey, location);
           pqi.setConf(getConf());
           ret.add(pqi);
         }

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/AvroSerializerUtil.java
----------------------------------------------------------------------
diff --git a/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/AvroSerializerUtil.java b/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/AvroSerializerUtil.java
index 4bb26f8..a8f40d2 100644
--- a/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/AvroSerializerUtil.java
+++ b/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/AvroSerializerUtil.java
@@ -43,7 +43,7 @@ public class AvroSerializerUtil {
   
   @SuppressWarnings({ "unchecked", "rawtypes" })
   public static <T> byte[] serializer(T value, Schema schema) throws IOException{
-    SpecificDatumWriter writer = (SpecificDatumWriter<?>) writerMap.get(schema.getFullName());
+    SpecificDatumWriter writer = writerMap.get(schema.getFullName());
     if (writer == null) {
       writer = new SpecificDatumWriter(schema);// ignore dirty bits
       writerMap.put(schema.getFullName(),writer);
@@ -70,7 +70,7 @@ public class AvroSerializerUtil {
   public static Object deserializer(Object value, Schema schema) throws IOException{
     String schemaId = schema.getFullName();      
     
-    SpecificDatumReader<?> reader = (SpecificDatumReader<?>)readerMap.get(schemaId);
+    SpecificDatumReader<?> reader = readerMap.get(schemaId);
     if (reader == null) {
       reader = new SpecificDatumReader(schema);// ignore dirty bits
       SpecificDatumReader localReader=null;

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/ListSerializer.java
----------------------------------------------------------------------
diff --git a/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/ListSerializer.java b/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/ListSerializer.java
index 5745be9..7530421 100644
--- a/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/ListSerializer.java
+++ b/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/ListSerializer.java
@@ -130,7 +130,7 @@ public class ListSerializer<T> extends AbstractSerializer<List<T>> {
   }
 
   private ByteBuffer toByteBufferWithFixedLengthElements(List<T> array) {
-    ByteBuffer byteBuffer = ByteBuffer.allocate((int) array.size() * size);
+    ByteBuffer byteBuffer = ByteBuffer.allocate(array.size() * size);
     for (T element : array) {
       byteBuffer.put(elementSerializer.toByteBuffer(element));
     }
@@ -139,7 +139,7 @@ public class ListSerializer<T> extends AbstractSerializer<List<T>> {
   }
 
   private ByteBuffer toByteBufferWithVariableLengthElements(List<T> array) {
-    int n = (int) array.size();
+    int n = array.size();
     List<byte[]> list = new ArrayList<byte[]>(n);
     n *= 4;
     for (T element : array) {

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/MapSerializer.java
----------------------------------------------------------------------
diff --git a/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/MapSerializer.java b/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/MapSerializer.java
index 59af1d1..52849b8 100644
--- a/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/MapSerializer.java
+++ b/gora-cassandra/src/main/java/org/apache/gora/cassandra/serializers/MapSerializer.java
@@ -130,7 +130,7 @@ public class MapSerializer<T> extends AbstractSerializer<Map<CharSequence, T>> {
   }
 
   private ByteBuffer toByteBufferWithFixedLengthElements(Map<CharSequence, T> map) {
-    int n = (int) map.size();
+    int n = map.size();
     List<byte[]> list = new ArrayList<byte[]>(n);
     n *= 4;
     for (CharSequence key : map.keySet()) {
@@ -156,7 +156,7 @@ public class MapSerializer<T> extends AbstractSerializer<Map<CharSequence, T>> {
   }
 
   private ByteBuffer toByteBufferWithVariableLengthElements(Map<CharSequence, T> map) {
-    int n = (int) map.size();
+    int n = map.size();
     List<byte[]> list = new ArrayList<byte[]>(n);
     n *= 8;
     for (CharSequence key : map.keySet()) {

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java
----------------------------------------------------------------------
diff --git a/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java b/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java
index 98deb9a..14444a6 100644
--- a/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java
+++ b/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java
@@ -492,7 +492,7 @@ public class CassandraStore<K, T extends PersistentBase> extends DataStoreBase<K
   private void addOrUpdateField(K key, Field field, Schema schema, Object value) {
     Type type = schema.getType();
     // checking if the value to be updated is used for saving union schema
-    if (field.name().indexOf(CassandraStore.UNION_COL_SUFIX) < 0){
+    if (!field.name().contains(CassandraStore.UNION_COL_SUFIX)){
       switch (type) {
       case STRING:
       case BOOLEAN:

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-compiler/src/main/java/org/apache/gora/compiler/GoraCompiler.java
----------------------------------------------------------------------
diff --git a/gora-compiler/src/main/java/org/apache/gora/compiler/GoraCompiler.java b/gora-compiler/src/main/java/org/apache/gora/compiler/GoraCompiler.java
index 16a6372..7a5fdd3 100644
--- a/gora-compiler/src/main/java/org/apache/gora/compiler/GoraCompiler.java
+++ b/gora-compiler/src/main/java/org/apache/gora/compiler/GoraCompiler.java
@@ -47,7 +47,7 @@ public class GoraCompiler extends SpecificCompiler {
   private static final Set<String> GORA_RESERVED_NAMES = new HashSet<String>();
   
   static {
-    GORA_RESERVED_NAMES.addAll(Arrays.asList(new String[] { DIRTY_BYTES_FIELD_NAME }));
+    GORA_RESERVED_NAMES.addAll(Arrays.asList(DIRTY_BYTES_FIELD_NAME));
   }
 
   private static final Set<String> GORA_HIDDEN_FIELD_NAMES = new HashSet<String>();

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-core/src/examples/java/org/apache/gora/examples/mapreduce/QueryCounter.java
----------------------------------------------------------------------
diff --git a/gora-core/src/examples/java/org/apache/gora/examples/mapreduce/QueryCounter.java b/gora-core/src/examples/java/org/apache/gora/examples/mapreduce/QueryCounter.java
index a182df6..8e52486 100644
--- a/gora-core/src/examples/java/org/apache/gora/examples/mapreduce/QueryCounter.java
+++ b/gora-core/src/examples/java/org/apache/gora/examples/mapreduce/QueryCounter.java
@@ -59,7 +59,7 @@ public class QueryCounter<K, T extends Persistent> extends Configured implements
         Context context) throws IOException ,InterruptedException {
 
       context.getCounter(COUNTER_GROUP, ROWS).increment(1L);
-    };
+    }
   }
 
   /** Returns the Query to count the results of. Subclasses can

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-core/src/examples/java/org/apache/gora/examples/mapreduce/WordCount.java
----------------------------------------------------------------------
diff --git a/gora-core/src/examples/java/org/apache/gora/examples/mapreduce/WordCount.java b/gora-core/src/examples/java/org/apache/gora/examples/mapreduce/WordCount.java
index 2aac4f6..90c3b43 100644
--- a/gora-core/src/examples/java/org/apache/gora/examples/mapreduce/WordCount.java
+++ b/gora-core/src/examples/java/org/apache/gora/examples/mapreduce/WordCount.java
@@ -76,7 +76,7 @@ public class WordCount extends Configured implements Tool {
           context.write(word, one);
         }
       }
-    };
+    }
   }
   
   public static class WordCountReducer extends GoraReducer<Text, IntWritable, 
@@ -93,8 +93,8 @@ public class WordCount extends Configured implements Tool {
       }
       result.setCount(sum);
       context.write(key.toString(), result);
-    };
-    
+    }
+
   }
   
   /**

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-core/src/main/java/org/apache/gora/avro/store/DataFileAvroStore.java
----------------------------------------------------------------------
diff --git a/gora-core/src/main/java/org/apache/gora/avro/store/DataFileAvroStore.java b/gora-core/src/main/java/org/apache/gora/avro/store/DataFileAvroStore.java
index e1110ea..3d490b7 100644
--- a/gora-core/src/main/java/org/apache/gora/avro/store/DataFileAvroStore.java
+++ b/gora-core/src/main/java/org/apache/gora/avro/store/DataFileAvroStore.java
@@ -52,8 +52,8 @@ public class DataFileAvroStore<K, T extends PersistentBase> extends AvroStore<K,
   public T get(K key, String[] fields) {
     throw new OperationNotSupportedException(
         "Avro DataFile's does not support indexed retrieval");
-  };
-  
+  }
+
   @Override
   public void put(K key, T obj) {
     try{
@@ -61,8 +61,8 @@ public class DataFileAvroStore<K, T extends PersistentBase> extends AvroStore<K,
     } catch(IOException ex){
       LOG.error(ex.getMessage(), ex);
     }
-  };
-  
+  }
+
   private DataFileWriter<T> getWriter() throws IOException {
     if(writer == null) {
       writer = new DataFileWriter<T>(getDatumWriter());

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-core/src/main/java/org/apache/gora/mapreduce/GoraInputSplit.java
----------------------------------------------------------------------
diff --git a/gora-core/src/main/java/org/apache/gora/mapreduce/GoraInputSplit.java b/gora-core/src/main/java/org/apache/gora/mapreduce/GoraInputSplit.java
index 190a5c1..46a1d03 100644
--- a/gora-core/src/main/java/org/apache/gora/mapreduce/GoraInputSplit.java
+++ b/gora-core/src/main/java/org/apache/gora/mapreduce/GoraInputSplit.java
@@ -73,7 +73,7 @@ public class GoraInputSplit extends InputSplit
   @Override
   public void readFields(DataInput in) throws IOException {
     try {
-      query = (PartitionQuery<?, ?>) IOUtils.deserialize(conf, in, null);
+      query = IOUtils.deserialize(conf, in, null);
     } catch (ClassNotFoundException ex) {
       throw new IOException(ex);
     }

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-core/src/main/java/org/apache/gora/mapreduce/GoraRecordReader.java
----------------------------------------------------------------------
diff --git a/gora-core/src/main/java/org/apache/gora/mapreduce/GoraRecordReader.java b/gora-core/src/main/java/org/apache/gora/mapreduce/GoraRecordReader.java
index bff05ab..3c11068 100644
--- a/gora-core/src/main/java/org/apache/gora/mapreduce/GoraRecordReader.java
+++ b/gora-core/src/main/java/org/apache/gora/mapreduce/GoraRecordReader.java
@@ -65,7 +65,7 @@ public class GoraRecordReader<K, T extends PersistentBase> extends RecordReader<
     this.query.setLimit(recordsMax);
   }
 
-  public void executeQuery() throws IOException, Exception {
+  public void executeQuery() throws Exception {
     this.result = query.execute();
   }
   

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java
----------------------------------------------------------------------
diff --git a/gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java b/gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java
index 973031a..444c0ba 100644
--- a/gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java
+++ b/gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java
@@ -161,8 +161,8 @@ public class MemStore<K, T extends PersistentBase> extends DataStoreBase<K, T> {
     if(Arrays.equals(fields, otherFieldStrings)) { 
       return obj;
     }
-    T newObj = (T) AvroUtils.deepClonePersistent(obj); 
-      for(int i = 0; i<otherFields.size(); i++) {
+    T newObj = AvroUtils.deepClonePersistent(obj);
+    for(int i = 0; i<otherFields.size(); i++) {
       int index = otherFields.get(i).pos(); 
       newObj.put(index, obj.get(index));
     }

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-core/src/main/java/org/apache/gora/persistency/ws/impl/BeanFactoryWSImpl.java
----------------------------------------------------------------------
diff --git a/gora-core/src/main/java/org/apache/gora/persistency/ws/impl/BeanFactoryWSImpl.java b/gora-core/src/main/java/org/apache/gora/persistency/ws/impl/BeanFactoryWSImpl.java
index 376150c..ff6e1c3 100644
--- a/gora-core/src/main/java/org/apache/gora/persistency/ws/impl/BeanFactoryWSImpl.java
+++ b/gora-core/src/main/java/org/apache/gora/persistency/ws/impl/BeanFactoryWSImpl.java
@@ -110,7 +110,7 @@ public class BeanFactoryWSImpl<K, T extends Persistent> implements BeanFactory<K
    */
   public T newPersistent() {
     try {
-      return (T) persistentClass.newInstance();
+      return persistentClass.newInstance();
     } catch (InstantiationException e) {
       LOG.error(e.getMessage());
       throw new RuntimeException(e);

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-core/src/main/java/org/apache/gora/query/Result.java
----------------------------------------------------------------------
diff --git a/gora-core/src/main/java/org/apache/gora/query/Result.java b/gora-core/src/main/java/org/apache/gora/query/Result.java
index 90ab158..946360a 100644
--- a/gora-core/src/main/java/org/apache/gora/query/Result.java
+++ b/gora-core/src/main/java/org/apache/gora/query/Result.java
@@ -46,7 +46,7 @@ public interface Result<K, T extends Persistent> {
    * Advances to the next element and returns false if at end.
    * @return true if end is not reached yet
    */
-  boolean next() throws Exception, IOException;
+  boolean next() throws Exception;
   
   /**
    * Returns the current key.

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-core/src/main/java/org/apache/gora/query/impl/ResultBase.java
----------------------------------------------------------------------
diff --git a/gora-core/src/main/java/org/apache/gora/query/impl/ResultBase.java b/gora-core/src/main/java/org/apache/gora/query/impl/ResultBase.java
index 5b828fc..548739c 100644
--- a/gora-core/src/main/java/org/apache/gora/query/impl/ResultBase.java
+++ b/gora-core/src/main/java/org/apache/gora/query/impl/ResultBase.java
@@ -99,7 +99,7 @@ public abstract class ResultBase<K, T extends Persistent>
   }
   
   @Override
-  public final boolean next() throws Exception, IOException {
+  public final boolean next() throws Exception {
     if(isLimitReached()) {
       return false;
     }
@@ -144,7 +144,7 @@ public abstract class ResultBase<K, T extends Persistent>
    */
   protected abstract boolean nextInner() throws IOException; 
   
-  protected T getOrCreatePersistent(T persistent) throws Exception, IOException {
+  protected T getOrCreatePersistent(T persistent) throws Exception {
 	  if(persistent != null) {
 			return persistent;
 		}

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-core/src/main/java/org/apache/gora/query/ws/impl/ResultWSBase.java
----------------------------------------------------------------------
diff --git a/gora-core/src/main/java/org/apache/gora/query/ws/impl/ResultWSBase.java b/gora-core/src/main/java/org/apache/gora/query/ws/impl/ResultWSBase.java
index eba7ca3..4cc5f70 100644
--- a/gora-core/src/main/java/org/apache/gora/query/ws/impl/ResultWSBase.java
+++ b/gora-core/src/main/java/org/apache/gora/query/ws/impl/ResultWSBase.java
@@ -174,7 +174,7 @@ public abstract class ResultWSBase<K, T extends Persistent>
    * @throws Exception
    * @throws IOException
    */
-  protected T getOrCreatePersistent(T persistent) throws Exception, IOException {
+  protected T getOrCreatePersistent(T persistent) throws Exception {
 	  if(persistent != null) {
 			return persistent;
 		}

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-core/src/main/java/org/apache/gora/store/impl/DataStoreBase.java
----------------------------------------------------------------------
diff --git a/gora-core/src/main/java/org/apache/gora/store/impl/DataStoreBase.java b/gora-core/src/main/java/org/apache/gora/store/impl/DataStoreBase.java
index 7ed11af..5f73104 100644
--- a/gora-core/src/main/java/org/apache/gora/store/impl/DataStoreBase.java
+++ b/gora-core/src/main/java/org/apache/gora/store/impl/DataStoreBase.java
@@ -154,7 +154,7 @@ public abstract class DataStoreBase<K, T extends PersistentBase>
   @Override
   public T get(K key) {
     return get(key, getFieldsToQuery(null));
-  };
+  }
 
   /**
    * Checks whether the fields argument is null, and if so

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSDataStoreFactory.java
----------------------------------------------------------------------
diff --git a/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSDataStoreFactory.java b/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSDataStoreFactory.java
index a3d6ab2..35d1df0 100644
--- a/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSDataStoreFactory.java
+++ b/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSDataStoreFactory.java
@@ -97,7 +97,7 @@ public class WSDataStoreFactory{
 
   private static <K, T extends Persistent> void initializeDataStore(
       DataStore<K, T> dataStore, Class<K> keyClass, Class<T> persistent,
-      Properties properties) throws IOException, Exception {
+      Properties properties) throws Exception {
     dataStore.initialize(keyClass, persistent, properties);
   }
 

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-core/src/main/java/org/apache/gora/util/IOUtils.java
----------------------------------------------------------------------
diff --git a/gora-core/src/main/java/org/apache/gora/util/IOUtils.java b/gora-core/src/main/java/org/apache/gora/util/IOUtils.java
index a8fa313..eb39cec 100644
--- a/gora-core/src/main/java/org/apache/gora/util/IOUtils.java
+++ b/gora-core/src/main/java/org/apache/gora/util/IOUtils.java
@@ -266,7 +266,7 @@ public class IOUtils {
       SpecificDatumReader<T> datumReader, Schema schema, T object)
       throws IOException {
     decoder = DecoderFactory.get().binaryDecoder(is, decoder);
-    return (T)datumReader.read(object, decoder);
+    return datumReader.read(object, decoder);
   }
 
   /**
@@ -276,7 +276,7 @@ public class IOUtils {
       SpecificDatumReader<T> datumReader, Schema schema, T object)
       throws IOException {
     decoder = DecoderFactory.get().binaryDecoder(bytes, decoder);
-    return (T)datumReader.read(object, decoder);
+    return datumReader.read(object, decoder);
   }
 
   /**
@@ -286,7 +286,7 @@ public class IOUtils {
       SpecificDatumReader<T> datumReader, Schema schema, T object)
       throws IOException {
     decoder = DecoderFactory.get().binaryDecoder(bytes, decoder);
-    return (T)datumReader.read(object, decoder);
+    return datumReader.read(object, decoder);
   }
   
   /**

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-core/src/test/java/org/apache/gora/avro/store/TestAvroStore.java
----------------------------------------------------------------------
diff --git a/gora-core/src/test/java/org/apache/gora/avro/store/TestAvroStore.java b/gora-core/src/test/java/org/apache/gora/avro/store/TestAvroStore.java
index c8071f0..6baf504 100644
--- a/gora-core/src/test/java/org/apache/gora/avro/store/TestAvroStore.java
+++ b/gora-core/src/test/java/org/apache/gora/avro/store/TestAvroStore.java
@@ -94,27 +94,27 @@ public class TestAvroStore {
   }
 
   @Test
-  public void testNewInstance() throws IOException, Exception {
+  public void testNewInstance() throws Exception {
     DataStoreTestUtil.testNewPersistent(employeeStore);
   }
 
   @Test
-  public void testCreateSchema() throws IOException, Exception {
+  public void testCreateSchema() throws Exception {
     DataStoreTestUtil.testCreateEmployeeSchema(employeeStore);
   }
 
   @Test
-  public void testAutoCreateSchema() throws IOException, Exception {
+  public void testAutoCreateSchema() throws Exception {
     DataStoreTestUtil.testAutoCreateSchema(employeeStore);
   }
 
   @Test
-  public void testPut() throws IOException, Exception {
+  public void testPut() throws Exception {
     DataStoreTestUtil.testPutEmployee(employeeStore);
   }
 
   @Test
-  public void testQuery() throws IOException, Exception {
+  public void testQuery() throws Exception {
     createWebPageData(webPageStore);
     webPageStore.close();
 
@@ -123,7 +123,7 @@ public class TestAvroStore {
   }
 
   @Test
-  public void testQueryBinaryEncoder() throws IOException, Exception {
+  public void testQueryBinaryEncoder() throws Exception {
     webPageStore.setCodecType(CodecType.BINARY);
     webPageStore.setInputPath(webPageStore.getOutputPath());
 
@@ -135,7 +135,7 @@ public class TestAvroStore {
   //AvroStore should be closed so that Hadoop file is completely flushed,
   //so below test is copied and modified to close the store after pushing data
   public static void testQueryWebPages(DataStore<String, WebPage> store)
-  throws IOException, Exception {
+  throws Exception {
 
     Query<String, WebPage> query = store.newQuery();
     Result<String, WebPage> result = query.execute();

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-core/src/test/java/org/apache/gora/persistency/impl/TestPersistentBase.java
----------------------------------------------------------------------
diff --git a/gora-core/src/test/java/org/apache/gora/persistency/impl/TestPersistentBase.java b/gora-core/src/test/java/org/apache/gora/persistency/impl/TestPersistentBase.java
index af62116..2f11d9f 100644
--- a/gora-core/src/test/java/org/apache/gora/persistency/impl/TestPersistentBase.java
+++ b/gora-core/src/test/java/org/apache/gora/persistency/impl/TestPersistentBase.java
@@ -143,7 +143,7 @@ public class TestPersistentBase {
    * @throws Exception
    */
   @Test
-  public void testClone() throws IOException, Exception {
+  public void testClone() throws Exception {
     //more tests for clone are in TestPersistentDatumReader
     @SuppressWarnings("unchecked")
     MemStore<String, Employee> store = DataStoreFactory.getDataStore(

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-core/src/test/java/org/apache/gora/store/DataStoreTestBase.java
----------------------------------------------------------------------
diff --git a/gora-core/src/test/java/org/apache/gora/store/DataStoreTestBase.java b/gora-core/src/test/java/org/apache/gora/store/DataStoreTestBase.java
index e890aa3..dc06e39 100644
--- a/gora-core/src/test/java/org/apache/gora/store/DataStoreTestBase.java
+++ b/gora-core/src/test/java/org/apache/gora/store/DataStoreTestBase.java
@@ -112,7 +112,7 @@ public abstract class DataStoreTestBase {
   }
 
   @Test
-  public void testNewInstance() throws IOException, Exception {
+  public void testNewInstance() throws Exception {
     log.info("test method: testNewInstance");
     DataStoreTestUtil.testNewPersistent(employeeStore);
   }
@@ -149,7 +149,7 @@ public abstract class DataStoreTestBase {
   }
 
   @Test
-  public void testDeleteSchema() throws IOException, Exception {
+  public void testDeleteSchema() throws Exception {
     log.info("test method: testDeleteSchema");
     DataStoreTestUtil.testDeleteSchema(webPageStore);
   }
@@ -161,7 +161,7 @@ public abstract class DataStoreTestBase {
   }
 
   @Test
-  public void testPut() throws IOException, Exception {
+  public void testPut() throws Exception {
     log.info("test method: testPut");
     Employee employee = DataStoreTestUtil.testPutEmployee(employeeStore);
     assertPut(employee);
@@ -171,13 +171,13 @@ public abstract class DataStoreTestBase {
   }
 
   @Test
-  public void testPutNested() throws IOException, Exception {
+  public void testPutNested() throws Exception {
     log.info("test method: testPutNested");
     DataStoreTestUtil.testPutNested(webPageStore);
   }
 
   @Test
-  public void testPutArray() throws IOException, Exception {
+  public void testPutArray() throws Exception {
     log.info("test method: testPutArray");
     DataStoreTestUtil.testPutArray(webPageStore);
     assertPutArray();
@@ -187,7 +187,7 @@ public abstract class DataStoreTestBase {
   }
 
   @Test
-  public void testPutBytes() throws IOException, Exception {
+  public void testPutBytes() throws Exception {
     log.info("test method: testPutBytes");
     byte[] contentBytes = DataStoreTestUtil.testPutBytes(webPageStore);
     assertPutBytes(contentBytes);
@@ -197,7 +197,7 @@ public abstract class DataStoreTestBase {
   }
 
   @Test
-  public void testPutMap() throws IOException, Exception {
+  public void testPutMap() throws Exception {
     log.info("test method: testPutMap");
     DataStoreTestUtil.testPutMap(webPageStore);
     assertPutMap();
@@ -207,7 +207,7 @@ public abstract class DataStoreTestBase {
   }
 
   @Test
-  public void testUpdate() throws IOException, Exception {
+  public void testUpdate() throws Exception {
     log.info("test method: testUpdate");
     DataStoreTestUtil.testUpdateEmployee(employeeStore);
     DataStoreTestUtil.testUpdateWebPagePutToArray(webPageStore);
@@ -217,12 +217,12 @@ public abstract class DataStoreTestBase {
     DataStoreTestUtil.testUpdateWebPageRemoveField(webPageStore);
   }
 
-  public void testEmptyUpdate() throws IOException, Exception {
+  public void testEmptyUpdate() throws Exception {
     DataStoreTestUtil.testEmptyUpdateEmployee(employeeStore);
   }
 
   @Test
-  public void testGet() throws IOException, Exception {
+  public void testGet() throws Exception {
     log.info("test method: testGet");
     DataStoreTestUtil.testGetEmployee(employeeStore);
   }
@@ -234,7 +234,7 @@ public abstract class DataStoreTestBase {
    * @throws IOException
    * @throws Exception
    */
-  public void testGetRecursive() throws IOException, Exception {
+  public void testGetRecursive() throws Exception {
     log.info("test method: testGetRecursive") ;
     DataStoreTestUtil.testGetEmployeeRecursive(employeeStore) ;
   }
@@ -246,7 +246,7 @@ public abstract class DataStoreTestBase {
    * @throws IOException
    * @throws Exception
    */
-  public void testGetDoubleRecursive() throws IOException, Exception {
+  public void testGetDoubleRecursive() throws Exception {
     log.info("test method: testGetDoubleRecursive") ;
     DataStoreTestUtil.testGetEmployeeDoubleRecursive(employeeStore) ;
   }
@@ -259,7 +259,7 @@ public abstract class DataStoreTestBase {
    * @throws IOException
    * @throws Exception
    */
-  public void testGetNested() throws IOException, Exception {
+  public void testGetNested() throws Exception {
     log.info("test method: testGetNested") ;
     DataStoreTestUtil.testGetEmployeeNested(employeeStore) ;
   }
@@ -271,97 +271,97 @@ public abstract class DataStoreTestBase {
    * @throws IOException
    * @throws Exception
    */
-  public void testGet3UnionField() throws IOException, Exception {
+  public void testGet3UnionField() throws Exception {
     log.info("test method: testGet3UnionField") ;
     DataStoreTestUtil.testGetEmployee3UnionField(employeeStore) ;
   }
 
   @Test
-  public void testGetWithFields() throws IOException, Exception {
+  public void testGetWithFields() throws Exception {
     log.info("test method: testGetWithFields");
     DataStoreTestUtil.testGetEmployeeWithFields(employeeStore);
   }
 
   @Test
-  public void testGetWebPage() throws IOException, Exception {
+  public void testGetWebPage() throws Exception {
     log.info("test method: testGetWebPage");
     DataStoreTestUtil.testGetWebPage(webPageStore);
   }
 
   @Test
-  public void testGetWebPageDefaultFields() throws IOException, Exception {
+  public void testGetWebPageDefaultFields() throws Exception {
     log.info("test method: testGetWebPageDefaultFields");
     DataStoreTestUtil.testGetWebPageDefaultFields(webPageStore);
   }
 
   @Test
-  public void testGetNonExisting() throws Exception, Exception {
+  public void testGetNonExisting() throws Exception {
     log.info("test method: testGetNonExisting");
     DataStoreTestUtil.testGetEmployeeNonExisting(employeeStore);
   }
 
  @Test
-  public void testQuery() throws IOException, Exception {
+  public void testQuery() throws Exception {
     log.info("test method: testQuery");
     DataStoreTestUtil.testQueryWebPages(webPageStore);
   }
 
   @Test
-  public void testQueryStartKey() throws IOException, Exception {
+  public void testQueryStartKey() throws Exception {
     log.info("test method: testQueryStartKey");
     DataStoreTestUtil.testQueryWebPageStartKey(webPageStore);
   }
 
   @Test
-  public void testQueryEndKey() throws IOException, Exception {
+  public void testQueryEndKey() throws Exception {
     log.info("test method: testQueryEndKey");
     DataStoreTestUtil.testQueryWebPageEndKey(webPageStore);
   }
 
   @Test
-  public void testQueryKeyRange() throws IOException, Exception {
+  public void testQueryKeyRange() throws Exception {
     log.info("test method: testQueryKetRange");
     DataStoreTestUtil.testQueryWebPageKeyRange(webPageStore);
   }
 
  @Test
-  public void testQueryWebPageSingleKey() throws IOException, Exception {
+  public void testQueryWebPageSingleKey() throws Exception {
    log.info("test method: testQueryWebPageSingleKey");
     DataStoreTestUtil.testQueryWebPageSingleKey(webPageStore);
   }
 
   @Test
-  public void testQueryWebPageSingleKeyDefaultFields() throws IOException, Exception {
+  public void testQueryWebPageSingleKeyDefaultFields() throws Exception {
     log.info("test method: testQuerySingleKeyDefaultFields");
     DataStoreTestUtil.testQueryWebPageSingleKeyDefaultFields(webPageStore);
   }
 
   @Test
-  public void testQueryWebPageQueryEmptyResults() throws IOException, Exception {
+  public void testQueryWebPageQueryEmptyResults() throws Exception {
     log.info("test method: testQueryEmptyResults");
     DataStoreTestUtil.testQueryWebPageEmptyResults(webPageStore);
   }
 
   @Test
-  public void testDelete() throws IOException, Exception {
+  public void testDelete() throws Exception {
     log.info("test method: testDelete");
     DataStoreTestUtil.testDelete(webPageStore);
   }
 
   @Test
-  public void testDeleteByQuery() throws IOException, Exception {
+  public void testDeleteByQuery() throws Exception {
     log.info("test method: testDeleteByQuery");
     DataStoreTestUtil.testDeleteByQuery(webPageStore);
   }
 
   @Test
-  public void testDeleteByQueryFields() throws IOException, Exception {
+  public void testDeleteByQueryFields() throws Exception {
     log.info("test method: testQueryByQueryFields");
     DataStoreTestUtil.testDeleteByQueryFields(webPageStore);
   }
 
   @Test
-  public void testGetPartitions() throws IOException, Exception {
+  public void testGetPartitions() throws Exception {
     log.info("test method: testGetPartitions");
     DataStoreTestUtil.testGetPartitions(webPageStore);
   }

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-core/src/test/java/org/apache/gora/store/DataStoreTestUtil.java
----------------------------------------------------------------------
diff --git a/gora-core/src/test/java/org/apache/gora/store/DataStoreTestUtil.java b/gora-core/src/test/java/org/apache/gora/store/DataStoreTestUtil.java
index 4513393..13ab390 100644
--- a/gora-core/src/test/java/org/apache/gora/store/DataStoreTestUtil.java
+++ b/gora-core/src/test/java/org/apache/gora/store/DataStoreTestUtil.java
@@ -80,7 +80,7 @@ public class DataStoreTestUtil {
   private static final int NUM_KEYS = 4;
 
   public static <K, T extends Persistent> void testNewPersistent(
-      DataStore<K,T> dataStore) throws IOException, Exception {
+      DataStore<K,T> dataStore) throws Exception {
 
     T obj1 = dataStore.newPersistent();
     T obj2 = dataStore.newPersistent();
@@ -93,7 +93,7 @@ public class DataStoreTestUtil {
   }
 
   public static <K> Employee createEmployee(
-      DataStore<K, Employee> dataStore) throws IOException, Exception {
+      DataStore<K, Employee> dataStore) throws Exception {
 
     Employee employee = Employee.newBuilder().build();
     employee.setName(new Utf8("Random Joe"));
@@ -114,7 +114,7 @@ public class DataStoreTestUtil {
   }
 
   public static <K> Employee createBoss(DataStore<K, Employee> dataStore)
-      throws IOException, Exception {
+      throws Exception {
 
     Employee employee = Employee.newBuilder().build();
     employee.setName(new Utf8("Random boss"));
@@ -125,13 +125,13 @@ public class DataStoreTestUtil {
   }
   
   public static void testAutoCreateSchema(DataStore<String,Employee> dataStore)
-  throws IOException, Exception {
+  throws Exception {
     //should not throw exception
     dataStore.put("foo", createEmployee(dataStore));
   }
 
   public static void testCreateEmployeeSchema(DataStore<String, Employee> dataStore)
-  throws IOException, Exception {
+  throws Exception {
     dataStore.createSchema();
 
     //should not throw exception
@@ -139,7 +139,7 @@ public class DataStoreTestUtil {
   }
 
   public static void testTruncateSchema(DataStore<String, WebPage> dataStore)
-  throws IOException, Exception {
+  throws Exception {
     dataStore.createSchema();
     WebPageDataCreator.createWebPageData(dataStore);
     dataStore.truncateSchema();
@@ -148,7 +148,7 @@ public class DataStoreTestUtil {
   }
 
   public static void testDeleteSchema(DataStore<String, WebPage> dataStore)
-  throws IOException, Exception {
+  throws Exception {
     dataStore.createSchema();
     WebPageDataCreator.createWebPageData(dataStore);
     dataStore.deleteSchema();
@@ -158,7 +158,7 @@ public class DataStoreTestUtil {
   }
 
   public static<K, T extends Persistent> void testSchemaExists(
-      DataStore<K, T> dataStore) throws IOException, Exception {
+      DataStore<K, T> dataStore) throws Exception {
     dataStore.createSchema();
 
     assertTrue(dataStore.schemaExists());
@@ -168,7 +168,7 @@ public class DataStoreTestUtil {
   }
 
   public static void testGetEmployee(DataStore<String, Employee> dataStore)
-    throws IOException, Exception {
+    throws Exception {
     dataStore.createSchema();
     Employee employee = DataStoreTestUtil.createEmployee(dataStore);
     String ssn = employee.getSsn().toString();
@@ -181,7 +181,7 @@ public class DataStoreTestUtil {
   }
 
   public static void testGetEmployeeRecursive(DataStore<String, Employee> dataStore)
-    throws IOException, Exception {
+    throws Exception {
 
     Employee employee = DataStoreTestUtil.createEmployee(dataStore);
     Employee boss = DataStoreTestUtil.createBoss(dataStore);
@@ -195,7 +195,7 @@ public class DataStoreTestUtil {
   }
 
   public static void testGetEmployeeDoubleRecursive(DataStore<String, Employee> dataStore)
-      throws IOException, Exception {
+      throws Exception {
 
       Employee employee = DataStoreTestUtil.createEmployee(dataStore);
       Employee boss = DataStoreTestUtil.createBoss(dataStore);
@@ -212,7 +212,7 @@ public class DataStoreTestUtil {
     }
   
   public static void testGetEmployeeNested(DataStore<String, Employee> dataStore)
-    throws IOException, Exception {
+    throws Exception {
 
     Employee employee = DataStoreTestUtil.createEmployee(dataStore);
     WebPage webpage = new BeanFactoryImpl<String,WebPage>(String.class,WebPage.class).newPersistent() ;
@@ -234,7 +234,7 @@ public class DataStoreTestUtil {
   }
   
   public static void testGetEmployee3UnionField(DataStore<String, Employee> dataStore)
-    throws IOException, Exception {
+    throws Exception {
 
     Employee employee = DataStoreTestUtil.createEmployee(dataStore);
     employee.setBoss(new Utf8("Real boss")) ;
@@ -244,17 +244,17 @@ public class DataStoreTestUtil {
     dataStore.flush();
     Employee after = dataStore.get(ssn, AvroUtils.getSchemaFieldNames(Employee.SCHEMA$));
     assertEqualEmployeeObjects(employee, after);
-    assertEquals("Real boss", ((Utf8)after.getBoss()).toString()) ;
+    assertEquals("Real boss", after.getBoss().toString()) ;
   }
   
   public static void testGetEmployeeNonExisting(DataStore<String, Employee> dataStore)
-    throws IOException, Exception {
+    throws Exception {
     Employee employee = dataStore.get("_NON_EXISTING_SSN_FOR_EMPLOYEE_");
     assertNull(employee);
   }
 
   public static void testGetEmployeeWithFields(DataStore<String, Employee> dataStore)
-    throws IOException, Exception {
+    throws Exception {
     Employee employee = DataStoreTestUtil.createEmployee(dataStore);
     WebPage webpage = createWebPage(dataStore);
     employee.setWebpage(webpage);
@@ -352,16 +352,16 @@ public class DataStoreTestUtil {
     ByteBuffer afterContent = afterWebPage.getContent();
     assertEquals(beforeContent, afterContent);
     //check parsedContent field
-    List<CharSequence> beforeParsedContent = 
-        (List<CharSequence>) beforeWebPage.getParsedContent();
-    List<CharSequence> afterParsedContent = 
-        (List<CharSequence>) afterWebPage.getParsedContent();
+    List<CharSequence> beforeParsedContent =
+            beforeWebPage.getParsedContent();
+    List<CharSequence> afterParsedContent =
+            afterWebPage.getParsedContent();
     assertEquals(beforeParsedContent, afterParsedContent);
     //check outlinks field
-    Map<CharSequence, CharSequence> beforeOutlinks = 
-        (Map<java.lang.CharSequence,java.lang.CharSequence>) beforeWebPage.getOutlinks();
-    Map<CharSequence, CharSequence> afterOutlinks = 
-        (Map<java.lang.CharSequence,java.lang.CharSequence>) afterWebPage.getOutlinks();
+    Map<CharSequence, CharSequence> beforeOutlinks =
+            beforeWebPage.getOutlinks();
+    Map<CharSequence, CharSequence> afterOutlinks =
+            afterWebPage.getOutlinks();
     assertEquals(beforeOutlinks, afterOutlinks);
     //check metadata field
     if (beforeWebPage.get(5) != null) {
@@ -390,14 +390,14 @@ public class DataStoreTestUtil {
   }
 
   public static Employee testPutEmployee(DataStore<String, Employee> dataStore)
-  throws IOException, Exception {
+  throws Exception {
     dataStore.createSchema();
     Employee employee = DataStoreTestUtil.createEmployee(dataStore);
     return employee;
   }
 
   public static void testEmptyUpdateEmployee(DataStore<String, Employee> dataStore)
-  throws IOException, Exception {
+  throws Exception {
     dataStore.createSchema();
     long ssn = 1234567890L;
     String ssnStr = Long.toString(ssn);
@@ -437,7 +437,7 @@ public class DataStoreTestUtil {
    * @throws Exception
    */
   public static void testUpdateEmployee(DataStore<String, Employee> dataStore)
-  throws IOException, Exception {
+  throws Exception {
     dataStore.createSchema();
     long ssn = 1234567890L;
     long now = System.currentTimeMillis();
@@ -487,7 +487,7 @@ public class DataStoreTestUtil {
    * @throws Exception
    */
   public static void testUpdateWebPagePutToArray(DataStore<String, WebPage> dataStore)
-  throws IOException, Exception {
+  throws Exception {
     dataStore.createSchema();
 
     String[] urls = {"http://a.com/a", "http://b.com/b", "http://c.com/c",
@@ -533,7 +533,7 @@ public class DataStoreTestUtil {
   }
 
   public static void testUpdateWebPagePutToNotNullableMap(DataStore<String, WebPage> dataStore)
-  throws IOException, Exception {
+  throws Exception {
     dataStore.createSchema();
 
     String[] urls = {"http://a.com/a", "http://b.com/b", "http://c.com/c",
@@ -580,7 +580,7 @@ public class DataStoreTestUtil {
   }
 
   public static void testUpdateWebPagePutToNullableMap(DataStore<String, WebPage> dataStore)
-  throws IOException, Exception {
+  throws Exception {
     dataStore.createSchema();
 
     String[] urls = {"http://a.com/a", "http://b.com/b", "http://c.com/c",
@@ -629,7 +629,7 @@ public class DataStoreTestUtil {
   }
 
   public static void testUpdateWebPageRemoveMapEntry(DataStore<String, WebPage> dataStore)
-  throws IOException, Exception {
+  throws Exception {
     dataStore.createSchema();
 
     String[] urls = {"http://a.com/a", "http://b.com/b", "http://c.com/c",
@@ -672,7 +672,7 @@ public class DataStoreTestUtil {
   }
 
   public static void testUpdateWebPageRemoveField(DataStore<String, WebPage> dataStore)
-  throws IOException, Exception {
+  throws Exception {
     dataStore.createSchema();
 
     String[] urls = {"http://a.com/a", "http://b.com/b", "http://c.com/c",
@@ -749,7 +749,7 @@ public class DataStoreTestUtil {
   }
 
   private static void testGetWebPage(DataStore<String, WebPage> store, String[] fields)
-    throws IOException, Exception {
+    throws Exception {
     createWebPageData(store);
 
     for(int i=0; i<URLS.length; i++) {
@@ -758,17 +758,17 @@ public class DataStoreTestUtil {
     }
   }
 
-  public static void testGetWebPage(DataStore<String, WebPage> store) throws IOException, Exception {
+  public static void testGetWebPage(DataStore<String, WebPage> store) throws Exception {
     testGetWebPage(store, getFields(WebPage.SCHEMA$.getFields()));
   }
 
   public static void testGetWebPageDefaultFields(DataStore<String, WebPage> store)
-  throws IOException, Exception {
+  throws Exception {
     testGetWebPage(store, null);
   }
 
   private static void testQueryWebPageSingleKey(DataStore<String, WebPage> store
-      , String[] fields) throws IOException, Exception {
+      , String[] fields) throws Exception {
 
     createWebPageData(store);
 
@@ -785,18 +785,18 @@ public class DataStoreTestUtil {
   }
 
   public static void testQueryWebPageSingleKey(DataStore<String, WebPage> store)
-  throws IOException, Exception {
+  throws Exception {
     testQueryWebPageSingleKey(store, getFields(WebPage.SCHEMA$.getFields()));
   }
 
   public static void testQueryWebPageSingleKeyDefaultFields(
-      DataStore<String, WebPage> store) throws IOException, Exception {
+      DataStore<String, WebPage> store) throws Exception {
     testQueryWebPageSingleKey(store, null);
   }
 
   public static void testQueryWebPageKeyRange(DataStore<String, WebPage> store,
       boolean setStartKeys, boolean setEndKeys)
-  throws IOException, Exception {
+  throws Exception {
     createWebPageData(store);
 
     //create sorted set of urls
@@ -835,27 +835,27 @@ public class DataStoreTestUtil {
   }
 
   public static void testQueryWebPages(DataStore<String, WebPage> store)
-  throws IOException, Exception {
+  throws Exception {
     testQueryWebPageKeyRange(store, false, false);
   }
 
   public static void testQueryWebPageStartKey(DataStore<String, WebPage> store)
-  throws IOException, Exception {
+  throws Exception {
     testQueryWebPageKeyRange(store, true, false);
   }
 
   public static void testQueryWebPageEndKey(DataStore<String, WebPage> store)
-  throws IOException, Exception {
+  throws Exception {
     testQueryWebPageKeyRange(store, false, true);
   }
 
   public static void testQueryWebPageKeyRange(DataStore<String, WebPage> store)
-  throws IOException, Exception {
+  throws Exception {
     testQueryWebPageKeyRange(store, true, true);
   }
 
   public static void testQueryWebPageEmptyResults(DataStore<String, WebPage> store)
-    throws IOException, Exception {
+    throws Exception {
     createWebPageData(store);
 
     //query empty results
@@ -871,12 +871,12 @@ public class DataStoreTestUtil {
   }
 
   public static<K,T extends Persistent> void assertEmptyResults(Query<K, T> query)
-    throws IOException, Exception {
+    throws Exception {
     assertNumResults(query, 0);
   }
 
   public static<K,T extends Persistent> void assertNumResults(Query<K, T>query
-      , long numResults) throws IOException, Exception {
+      , long numResults) throws Exception {
     Result<K, T> result = query.execute();
     int actualNumResults = 0;
     while(result.next()) {
@@ -887,13 +887,13 @@ public class DataStoreTestUtil {
   }
 
   public static void testGetPartitions(DataStore<String, WebPage> store)
-  throws IOException, Exception {
+  throws Exception {
     createWebPageData(store);
     testGetPartitions(store, store.newQuery());
   }
 
   public static void testGetPartitions(DataStore<String, WebPage> store
-      , Query<String, WebPage> query) throws IOException, Exception {
+      , Query<String, WebPage> query) throws Exception {
     List<PartitionQuery<String, WebPage>> partitions = store.getPartitions(query);
 
     assertNotNull(partitions);
@@ -908,7 +908,7 @@ public class DataStoreTestUtil {
 
   public static void assertPartitions(DataStore<String, WebPage> store,
       Query<String, WebPage> query, List<PartitionQuery<String,WebPage>> partitions)
-  throws IOException, Exception {
+  throws Exception {
 
     int count = 0, partitionsCount = 0;
     Map<String, Integer> results = new HashMap<String, Integer>();
@@ -956,7 +956,7 @@ public class DataStoreTestUtil {
     }
   }
 
-  public static void testDelete(DataStore<String, WebPage> store) throws IOException, Exception {
+  public static void testDelete(DataStore<String, WebPage> store) throws Exception {
     WebPageDataCreator.createWebPageData(store);
     //delete one by one
 
@@ -974,7 +974,7 @@ public class DataStoreTestUtil {
   }
 
   public static void testDeleteByQuery(DataStore<String, WebPage> store)
-    throws IOException, Exception {
+    throws Exception {
 
     Query<String, WebPage> query;
 
@@ -1028,7 +1028,7 @@ public class DataStoreTestUtil {
   }
 
   public static void testDeleteByQueryFields(DataStore<String, WebPage> store)
-  throws IOException, Exception {
+  throws Exception {
 
     Query<String, WebPage> query;
 
@@ -1107,7 +1107,7 @@ public class DataStoreTestUtil {
 
 
   public static void testPutNested(DataStore<String, WebPage> store)
-          throws IOException, Exception {
+          throws Exception {
     String revUrl = "foo.com:http/";
     String url = "http://foo.com/";
 
@@ -1131,7 +1131,7 @@ public class DataStoreTestUtil {
   }
 
   public static void testPutArray(DataStore<String, WebPage> store)
-          throws IOException, Exception {
+          throws Exception {
     store.createSchema();
     WebPage page = WebPage.newBuilder().build();
 
@@ -1147,7 +1147,7 @@ public class DataStoreTestUtil {
   }
 
   public static byte[] testPutBytes(DataStore<String, WebPage> store)
-          throws IOException, Exception {
+          throws Exception {
 
     store.createSchema();
     WebPage page = WebPage.newBuilder().build();
@@ -1163,7 +1163,7 @@ public class DataStoreTestUtil {
   }
 
   public static void testPutMap(DataStore<String, WebPage> store)
-          throws IOException, Exception {
+          throws Exception {
 
     store.createSchema();
 

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-core/src/test/java/org/apache/gora/store/WSDataStoreTestBase.java
----------------------------------------------------------------------
diff --git a/gora-core/src/test/java/org/apache/gora/store/WSDataStoreTestBase.java b/gora-core/src/test/java/org/apache/gora/store/WSDataStoreTestBase.java
index 475df09..d57a766 100644
--- a/gora-core/src/test/java/org/apache/gora/store/WSDataStoreTestBase.java
+++ b/gora-core/src/test/java/org/apache/gora/store/WSDataStoreTestBase.java
@@ -113,7 +113,7 @@ public abstract class WSDataStoreTestBase<K, T extends Persistent> {
   }
   
   @Test
-  public void testNewInstance() throws IOException, Exception {
+  public void testNewInstance() throws Exception {
     log.info("test method: testNewInstance");
     DataStoreTestUtil.testNewPersistent(dataStore);
   }
@@ -145,7 +145,7 @@ public abstract class WSDataStoreTestBase<K, T extends Persistent> {
   }
 
   @Test
-  public void testDeleteSchema() throws IOException, Exception {
+  public void testDeleteSchema() throws Exception {
     log.info("test method: testDeleteSchema");
     assertDeleteSchema();
   }
@@ -161,7 +161,7 @@ public abstract class WSDataStoreTestBase<K, T extends Persistent> {
   }
 
   @Test
-  public void testPut() throws IOException, Exception {
+  public void testPut() throws Exception {
     log.info("test method: testPut");
     assertPut();
   }
@@ -171,13 +171,13 @@ public abstract class WSDataStoreTestBase<K, T extends Persistent> {
   }
 
   @Test
-  public void testPutNested() throws IOException, Exception {
+  public void testPutNested() throws Exception {
     log.info("test method: testPutNested");
 
   }
 
   @Test
-  public void testPutArray() throws IOException, Exception {
+  public void testPutArray() throws Exception {
     log.info("test method: testPutArray");
     assertPutArray();
   }
@@ -187,7 +187,7 @@ public abstract class WSDataStoreTestBase<K, T extends Persistent> {
   }
 
   @Test
-  public void testPutBytes() throws IOException, Exception {
+  public void testPutBytes() throws Exception {
     log.info("test method: testPutBytes");
     byte[] contentBytes = "example content in example.com".getBytes(Charset.defaultCharset());
 
@@ -199,7 +199,7 @@ public abstract class WSDataStoreTestBase<K, T extends Persistent> {
   }
 
   @Test
-  public void testPutMap() throws IOException, Exception {
+  public void testPutMap() throws Exception {
     log.info("test method: testPutMap");
     assertPutMap();
   }
@@ -209,7 +209,7 @@ public abstract class WSDataStoreTestBase<K, T extends Persistent> {
   }
 
   @Test
-  public void testUpdate() throws IOException, Exception {
+  public void testUpdate() throws Exception {
     log.info("test method: testUpdate");
     assertTestUpdateDataStore();
   }
@@ -220,11 +220,11 @@ public abstract class WSDataStoreTestBase<K, T extends Persistent> {
 
   @Ignore
   @Test
-  public void testEmptyUpdate() throws IOException, Exception {
+  public void testEmptyUpdate() throws Exception {
   }
 
   @Test
-  public void testGet() throws IOException, Exception {
+  public void testGet() throws Exception {
     log.info("test method: testGet");
     assertTestGetDataStore();
   }
@@ -234,12 +234,12 @@ public abstract class WSDataStoreTestBase<K, T extends Persistent> {
   }
   
   @Test
-  public void testGetWithFields() throws IOException, Exception {
+  public void testGetWithFields() throws Exception {
     log.info("test method: testGetWithFields");
   }
 
  @Test
-  public void testQuery() throws IOException, Exception {
+  public void testQuery() throws Exception {
     log.info("test method: testQuery");
     assertTestQueryDataStore();
   }
@@ -249,17 +249,17 @@ public abstract class WSDataStoreTestBase<K, T extends Persistent> {
   }
 
   @Test
-  public void testQueryStartKey() throws IOException, Exception {
+  public void testQueryStartKey() throws Exception {
     log.info("test method: testQueryStartKey");
   }
 
   @Test
-  public void testQueryEndKey() throws IOException, Exception {
+  public void testQueryEndKey() throws Exception {
     log.info("test method: testQueryEndKey");
   }
 
   @Test
-  public void testQueryKeyRange() throws IOException, Exception {
+  public void testQueryKeyRange() throws Exception {
     log.info("test method: testQueryKetRange");
     assertTestQueryKeyRange();
   }
@@ -268,7 +268,7 @@ public abstract class WSDataStoreTestBase<K, T extends Persistent> {
   public void assertTestQueryKeyRange(){}
   
   @Test
-  public void testDelete() throws IOException, Exception {
+  public void testDelete() throws Exception {
     log.info("test method: testDelete");
     assertTestDeleteDataStore();
   }
@@ -277,7 +277,7 @@ public abstract class WSDataStoreTestBase<K, T extends Persistent> {
   public void assertTestDeleteDataStore(){}
   
   @Test
-  public void testDeleteByQuery() throws IOException, Exception {
+  public void testDeleteByQuery() throws Exception {
     log.info("test method: testDeleteByQuery");
     assertTestDeleteByQueryDataStore();
   }
@@ -287,7 +287,7 @@ public abstract class WSDataStoreTestBase<K, T extends Persistent> {
   }
   
   @Test
-  public void testDeleteByQueryFields() throws IOException, Exception {
+  public void testDeleteByQueryFields() throws Exception {
     log.info("test method: testQueryByQueryFields");
   }
 

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-goraci/src/main/java/org/apache/gora/goraci/Verify.java
----------------------------------------------------------------------
diff --git a/gora-goraci/src/main/java/org/apache/gora/goraci/Verify.java b/gora-goraci/src/main/java/org/apache/gora/goraci/Verify.java
index 582e2e9..2b41b0c 100644
--- a/gora-goraci/src/main/java/org/apache/gora/goraci/Verify.java
+++ b/gora-goraci/src/main/java/org/apache/gora/goraci/Verify.java
@@ -194,7 +194,7 @@ public class Verify extends Configured implements Tool {
     return success ? 0 : 1;
   }
   
-  public void start(Path outputDir, int numReducers, boolean concurrent) throws GoraException, IOException, Exception {
+  public void start(Path outputDir, int numReducers, boolean concurrent) throws Exception {
     LOG.info("Running Verify with outputDir=" + outputDir +", numReducers=" + numReducers);
     
     DataStore<Long,CINode> store = DataStoreFactory.getDataStore(Long.class, CINode.class, new Configuration());

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseTableConnection.java
----------------------------------------------------------------------
diff --git a/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseTableConnection.java b/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseTableConnection.java
index 8c52d6a..7699e7b 100644
--- a/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseTableConnection.java
+++ b/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseTableConnection.java
@@ -326,14 +326,14 @@ public class HBaseTableConnection implements HTableInterface {
 
   @Override
   public <T extends Service, R> Map<byte[], R> coprocessorService(Class<T> service,
-      byte[] startKey, byte[] endKey, Call<T, R> callable) throws ServiceException, Throwable {
+      byte[] startKey, byte[] endKey, Call<T, R> callable) throws Throwable {
     return getTable().coprocessorService(service, startKey, endKey, callable);
   }
 
   @Override
   public <T extends Service, R> void coprocessorService(Class<T> service, byte[] startKey,
-      byte[] endKey, Call<T, R> callable, Callback<R> callback) throws ServiceException, Throwable {
-    getTable().coprocessorService(service, startKey, endKey, callable, callback);;
+      byte[] endKey, Call<T, R> callable, Callback<R> callback) throws Throwable {
+    getTable().coprocessorService(service, startKey, endKey, callable, callback);
   }
 
   @Override
@@ -344,14 +344,14 @@ public class HBaseTableConnection implements HTableInterface {
   @Override
   public <R extends Message> Map<byte[], R> batchCoprocessorService(
       MethodDescriptor methodDescriptor, Message request, byte[] startKey, byte[] endKey,
-      R responsePrototype) throws ServiceException, Throwable {
+      R responsePrototype) throws Throwable {
     return getTable().batchCoprocessorService(methodDescriptor, request, startKey, endKey, responsePrototype);
   }
 
   @Override
   public <R extends Message> void batchCoprocessorService(MethodDescriptor methodDescriptor,
       Message request, byte[] startKey, byte[] endKey, R responsePrototype, Callback<R> callback)
-      throws ServiceException, Throwable {
+      throws Throwable {
     getTable().batchCoprocessorService(methodDescriptor, request, startKey, endKey, responsePrototype, callback);
     
   }

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-hbase/src/main/java/org/apache/gora/hbase/util/HBaseByteInterface.java
----------------------------------------------------------------------
diff --git a/gora-hbase/src/main/java/org/apache/gora/hbase/util/HBaseByteInterface.java b/gora-hbase/src/main/java/org/apache/gora/hbase/util/HBaseByteInterface.java
index ee19c4c..5256e37 100644
--- a/gora-hbase/src/main/java/org/apache/gora/hbase/util/HBaseByteInterface.java
+++ b/gora-hbase/src/main/java/org/apache/gora/hbase/util/HBaseByteInterface.java
@@ -125,7 +125,7 @@ public class HBaseByteInterface {
       // (key name in map will be "UNION-type-type-...")
       String schemaId = schema.getType().equals(Schema.Type.UNION) ? String.valueOf(schema.hashCode()) : schema.getFullName();      
       
-      SpecificDatumReader<?> reader = (SpecificDatumReader<?>)readerMap.get(schemaId);
+      SpecificDatumReader<?> reader = readerMap.get(schemaId);
       if (reader == null) {
         reader = new SpecificDatumReader(schema);// ignore dirty bits
         SpecificDatumReader localReader=null;
@@ -232,7 +232,7 @@ public class HBaseByteInterface {
     case ENUM:    return new byte[] { (byte)((Enum<?>) o).ordinal() };
     case UNION:
     case RECORD:
-      SpecificDatumWriter writer = (SpecificDatumWriter<?>) writerMap.get(schema.getFullName());
+      SpecificDatumWriter writer = writerMap.get(schema.getFullName());
       if (writer == null) {
         writer = new SpecificDatumWriter(schema);// ignore dirty bits
         writerMap.put(schema.getFullName(),writer);

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-hbase/src/test/java/org/apache/gora/hbase/store/TestHBaseStore.java
----------------------------------------------------------------------
diff --git a/gora-hbase/src/test/java/org/apache/gora/hbase/store/TestHBaseStore.java b/gora-hbase/src/test/java/org/apache/gora/hbase/store/TestHBaseStore.java
index 0564d43..23a3c94 100644
--- a/gora-hbase/src/test/java/org/apache/gora/hbase/store/TestHBaseStore.java
+++ b/gora-hbase/src/test/java/org/apache/gora/hbase/store/TestHBaseStore.java
@@ -167,7 +167,7 @@ public class TestHBaseStore extends DataStoreTestBase {
     WebPage page = webPageStore.newPersistent();
     
     // Write webpage data
-    page.setUrl((CharSequence) new Utf8("http://example.com"));
+    page.setUrl(new Utf8("http://example.com"));
     byte[] contentBytes = "example content in example.com".getBytes(Charset.defaultCharset());
     ByteBuffer buff = ByteBuffer.wrap(contentBytes);
     page.setContent(buff);
@@ -199,7 +199,7 @@ public class TestHBaseStore extends DataStoreTestBase {
     WebPage page = webPageStore.newPersistent();
     
     // Write webpage data
-    page.setUrl((CharSequence) new Utf8("http://example.com"));
+    page.setUrl(new Utf8("http://example.com"));
     page.setContent(null);     // This won't change internal field status to dirty, so
     page.setDirty("content") ; // need to change it manually
     webPageStore.put("com.example/http", page);

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-hbase/src/test/java/org/apache/gora/hbase/util/TestHBaseByteInterface.java
----------------------------------------------------------------------
diff --git a/gora-hbase/src/test/java/org/apache/gora/hbase/util/TestHBaseByteInterface.java b/gora-hbase/src/test/java/org/apache/gora/hbase/util/TestHBaseByteInterface.java
index 0ad0471..e25a267 100644
--- a/gora-hbase/src/test/java/org/apache/gora/hbase/util/TestHBaseByteInterface.java
+++ b/gora-hbase/src/test/java/org/apache/gora/hbase/util/TestHBaseByteInterface.java
@@ -51,10 +51,10 @@ public class TestHBaseByteInterface {
     for (int i=0; i < 1000; i++) {
     
       //employer
-      CharSequence name = (CharSequence) new Utf8("john");
+      CharSequence name = new Utf8("john");
       long dateOfBirth = System.currentTimeMillis();
       int salary = 1337;
-      CharSequence ssn = (CharSequence) new Utf8(String.valueOf(RANDOM.nextLong()));
+      CharSequence ssn = new Utf8(String.valueOf(RANDOM.nextLong()));
       
       Employee e = Employee.newBuilder().build();
       e.setName(name);
@@ -73,8 +73,8 @@ public class TestHBaseByteInterface {
       
       
       //metadata
-      CharSequence key = (CharSequence) new Utf8("theKey");
-      CharSequence value = (CharSequence) new Utf8("theValue " + RANDOM.nextLong());
+      CharSequence key = new Utf8("theKey");
+      CharSequence value = new Utf8("theValue " + RANDOM.nextLong());
       HashMap<CharSequence, CharSequence> data = new HashMap<CharSequence, CharSequence>();
       data.put(key, value);
       Metadata m = Metadata.newBuilder().build();

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-mongodb/src/test/java/org/apache/gora/mongodb/store/TestMongoStore.java
----------------------------------------------------------------------
diff --git a/gora-mongodb/src/test/java/org/apache/gora/mongodb/store/TestMongoStore.java b/gora-mongodb/src/test/java/org/apache/gora/mongodb/store/TestMongoStore.java
index f2cc6ce..20c52d5 100644
--- a/gora-mongodb/src/test/java/org/apache/gora/mongodb/store/TestMongoStore.java
+++ b/gora-mongodb/src/test/java/org/apache/gora/mongodb/store/TestMongoStore.java
@@ -77,13 +77,13 @@ public abstract class TestMongoStore extends DataStoreTestBase {
 
   @Ignore("Skip until GORA-66 is fixed: need better semantic for end/start keys")
   @Override
-  public void testQueryKeyRange() throws IOException, Exception {
+  public void testQueryKeyRange() throws Exception {
     // Skip until GORA-66 is fixed: need better semantic for end/start keys
   }
 
   @Ignore("MongoStore doesn't support 3 types union field yet")
   @Override
-  public void testGet3UnionField() throws IOException, Exception {
+  public void testGet3UnionField() throws Exception {
     // MongoStore doesn't support 3 types union field yet
   }
 

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-shims-hadoop/src/main/java/org/apache/gora/shims/hadoop/HadoopShimFactory.java
----------------------------------------------------------------------
diff --git a/gora-shims-hadoop/src/main/java/org/apache/gora/shims/hadoop/HadoopShimFactory.java b/gora-shims-hadoop/src/main/java/org/apache/gora/shims/hadoop/HadoopShimFactory.java
index 161f62e..b2c5213 100644
--- a/gora-shims-hadoop/src/main/java/org/apache/gora/shims/hadoop/HadoopShimFactory.java
+++ b/gora-shims-hadoop/src/main/java/org/apache/gora/shims/hadoop/HadoopShimFactory.java
@@ -42,7 +42,7 @@ public class HadoopShimFactory {
   // package private
   static class Singleton {
     public static final HadoopShimFactory INSTANCE = new HadoopShimFactory();
-  };
+  }
 
   /**
    * Access the {@link HadoopShimFactory} singleton.

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-solr/src/main/java/org/apache/gora/solr/store/SolrStore.java
----------------------------------------------------------------------
diff --git a/gora-solr/src/main/java/org/apache/gora/solr/store/SolrStore.java b/gora-solr/src/main/java/org/apache/gora/solr/store/SolrStore.java
index 3a83d78..d1b262a 100644
--- a/gora-solr/src/main/java/org/apache/gora/solr/store/SolrStore.java
+++ b/gora-solr/src/main/java/org/apache/gora/solr/store/SolrStore.java
@@ -210,7 +210,7 @@ public class SolrStore<K, T extends PersistentBase> extends DataStoreBase<K, T>
     LOG.info("Using Solr server at " + solrServerUrl);
     String solrJServerType = ((solrJServerImpl == null || solrJServerImpl.equals(""))?"http":solrJServerImpl);
     // HttpSolrServer - denoted by "http" in properties
-    if (solrJServerType.toString().toLowerCase(Locale.getDefault()).equals("http")) {
+    if (solrJServerType.toLowerCase(Locale.getDefault()).equals("http")) {
       LOG.info("Using HttpSolrServer Solrj implementation.");
       this.adminServer = new HttpSolrServer(solrServerUrl);
       this.server = new HttpSolrServer( solrServerUrl + "/" + mapping.getCoreName() );
@@ -223,7 +223,7 @@ public class SolrStore<K, T extends PersistentBase> extends DataStoreBase<K, T>
             serverUsername, serverPassword);
       }
       // CloudSolrServer - denoted by "cloud" in properties
-    } else if (solrJServerType.toString().toLowerCase(Locale.getDefault()).equals("cloud")) {
+    } else if (solrJServerType.toLowerCase(Locale.getDefault()).equals("cloud")) {
       LOG.info("Using CloudSolrServer Solrj implementation.");
       this.adminServer = new CloudSolrServer(solrServerUrl);
       this.server = new CloudSolrServer( solrServerUrl + "/" + mapping.getCoreName() );
@@ -235,12 +235,12 @@ public class SolrStore<K, T extends PersistentBase> extends DataStoreBase<K, T>
             (DefaultHttpClient) ((CloudSolrServer) server).getLbServer().getHttpClient(),
             serverUsername, serverPassword);
       }
-    } else if (solrJServerType.toString().toLowerCase(Locale.getDefault()).equals("concurrent")) {
+    } else if (solrJServerType.toLowerCase(Locale.getDefault()).equals("concurrent")) {
       LOG.info("Using ConcurrentUpdateSolrServer Solrj implementation.");
       this.adminServer = new ConcurrentUpdateSolrServer(solrServerUrl, 1000, 10);
       this.server = new ConcurrentUpdateSolrServer( solrServerUrl + "/" + mapping.getCoreName(), 1000, 10);
       // LBHttpSolrServer - denoted by "loadbalance" in properties
-    } else if (solrJServerType.toString().toLowerCase(Locale.getDefault()).equals("loadbalance")) {
+    } else if (solrJServerType.toLowerCase(Locale.getDefault()).equals("loadbalance")) {
       LOG.info("Using LBHttpSolrServer Solrj implementation.");
       String[] solrUrlElements = StringUtils.split(solrServerUrl);
       try {
@@ -430,7 +430,7 @@ public class SolrStore<K, T extends PersistentBase> extends DataStoreBase<K, T>
       switch (c) {
       case ':':
       case '*':
-        sb.append("\\" + c);
+        sb.append("\\").append(c);
         break;
       default:
         sb.append(c);
@@ -489,8 +489,7 @@ public class SolrStore<K, T extends PersistentBase> extends DataStoreBase<K, T>
 
   @SuppressWarnings("rawtypes")
   private SpecificDatumReader getDatumReader(String schemaId, Schema fieldSchema) {
-    SpecificDatumReader<?> reader = (SpecificDatumReader<?>) readerMap
-        .get(schemaId);
+    SpecificDatumReader<?> reader = readerMap.get(schemaId);
     if (reader == null) {
       reader = new SpecificDatumReader(fieldSchema);// ignore dirty bits
       SpecificDatumReader localReader = null;
@@ -503,8 +502,7 @@ public class SolrStore<K, T extends PersistentBase> extends DataStoreBase<K, T>
 
   @SuppressWarnings("rawtypes")
   private SpecificDatumWriter getDatumWriter(String schemaId, Schema fieldSchema) {
-    SpecificDatumWriter writer = (SpecificDatumWriter<?>) writerMap
-        .get(schemaId);
+    SpecificDatumWriter writer = writerMap.get(schemaId);
     if (writer == null) {
       writer = new SpecificDatumWriter(fieldSchema);// ignore dirty bits
       writerMap.put(schemaId, writer);

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/LogAnalytics.java
----------------------------------------------------------------------
diff --git a/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/LogAnalytics.java b/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/LogAnalytics.java
index e27eaba..5747346 100644
--- a/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/LogAnalytics.java
+++ b/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/LogAnalytics.java
@@ -71,8 +71,8 @@ public class LogAnalytics extends Configured implements Tool {
       tuple = new TextLong();
       tuple.setKey(new Text());
       tuple.setValue(new LongWritable());
-    };
-    
+    }
+
     @Override
     protected void map(Long key, Pageview pageview, Context context)
         throws IOException ,InterruptedException {
@@ -84,9 +84,9 @@ public class LogAnalytics extends Configured implements Tool {
       tuple.getValue().set(day);
       
       context.write(tuple, one);
-    };
-    
-    /** Rolls up the given timestamp to the day cardinality, so that 
+    }
+
+    /** Rolls up the given timestamp to the day cardinality, so that
      * data can be aggregated daily */
     private long getDay(long timeStamp) {
       return (timeStamp / DAY_MILIS) * DAY_MILIS; 
@@ -124,7 +124,7 @@ public class LogAnalytics extends Configured implements Tool {
       metricDatum.setMetric(sum);
       
       context.write(key, metricDatum);
-    };
+    }
   }
   
   /**

http://git-wip-us.apache.org/repos/asf/gora/blob/c6c087c9/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/LogManager.java
----------------------------------------------------------------------
diff --git a/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/LogManager.java b/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/LogManager.java
index cbc9d8e..4c3ebb1 100644
--- a/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/LogManager.java
+++ b/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/LogManager.java
@@ -82,7 +82,7 @@ public class LogManager {
    * Parses a log file and store the contents at the data store.
    * @param input the input file location
    */
-  private void parse(String input) throws IOException, ParseException, Exception {
+  private void parse(String input) throws Exception {
     log.info("Parsing file: {}", input);
     BufferedReader reader = new BufferedReader(new InputStreamReader(
       new FileInputStream(input), Charset.defaultCharset()));
@@ -142,19 +142,19 @@ public class LogManager {
   }
   
   /** Stores the pageview object with the given key */
-  private void storePageview(long key, Pageview pageview) throws IOException, Exception {
+  private void storePageview(long key, Pageview pageview) throws Exception {
 	log.info("Storing Pageview in: " + dataStore.toString());
     dataStore.put(key, pageview);
   }
   
   /** Fetches a single pageview object and prints it*/
-  private void get(long key) throws IOException, Exception {
+  private void get(long key) throws Exception {
     Pageview pageview = dataStore.get(key);
     printPageview(pageview);
   }
   
   /** Queries and prints a single pageview object */
-  private void query(long key) throws IOException, Exception {
+  private void query(long key) throws Exception {
     //Queries are constructed from the data store
     Query<Long, Pageview> query = dataStore.newQuery();
     query.setKey(key);
@@ -166,7 +166,7 @@ public class LogManager {
   }
   
   /** Queries and prints pageview object that have keys between startKey and endKey*/
-  private void query(long startKey, long endKey) throws IOException, Exception {
+  private void query(long startKey, long endKey) throws Exception {
     Query<Long, Pageview> query = dataStore.newQuery();
     //set the properties of query
     query.setStartKey(startKey);
@@ -187,7 +187,7 @@ public class LogManager {
   }
   
   /** This method illustrates delete by query call */
-  private void deleteByQuery(long startKey, long endKey) throws IOException, Exception {
+  private void deleteByQuery(long startKey, long endKey) throws Exception {
     //Constructs a query from the dataStore. The matching rows to this query will be deleted
     Query<Long, Pageview> query = dataStore.newQuery();
     //set the properties of query
@@ -198,7 +198,7 @@ public class LogManager {
     log.info("pageviews with keys between {} and {} are deleted.", startKey, endKey);
   }
   
-  private void printResult(Result<Long, Pageview> result) throws IOException, Exception {
+  private void printResult(Result<Long, Pageview> result) throws Exception {
     
     while(result.next()) { //advances the Result object and breaks if at end
       long resultKey = result.getKey(); //obtain current key
@@ -220,7 +220,7 @@ public class LogManager {
     }
   }
   
-  private void close() throws IOException, Exception {
+  private void close() throws Exception {
     //It is very important to close the datastore properly, otherwise
     //some data loss might occur.
     if(dataStore != null)


Mime
View raw message