gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fe...@apache.org
Subject svn commit: r1363274 - /gora/trunk/gora-core/src/main/java/org/apache/gora/store/impl/DataStoreBase.java
Date Thu, 19 Jul 2012 09:53:39 GMT
Author: ferdy
Date: Thu Jul 19 09:53:38 2012
New Revision: 1363274

URL: http://svn.apache.org/viewvc?rev=1363274&view=rev
Log:
revert GORA-150

Modified:
    gora/trunk/gora-core/src/main/java/org/apache/gora/store/impl/DataStoreBase.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=1363274&r1=1363273&r2=1363274&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 Thu Jul
19 09:53:38 2012
@@ -22,6 +22,7 @@ import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.Properties;
 
 import org.apache.avro.Schema;
@@ -39,7 +40,9 @@ import org.apache.gora.util.ClassLoading
 import org.apache.gora.util.StringUtils;
 import org.apache.gora.util.WritableUtils;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.io.MapWritable;
 import org.apache.hadoop.io.Text;
+import org.apache.hadoop.io.Writable;
 
 /**
  * A Base class for {@link DataStore}s.
@@ -195,7 +198,7 @@ implements DataStore<K, T> {
   public boolean equals(Object obj) {
     if(obj instanceof DataStoreBase) {
       @SuppressWarnings("rawtypes")
-      DataStoreBase that = (DataStoreBase) obj;
+	  DataStoreBase that = (DataStoreBase) obj;
       EqualsBuilder builder = new EqualsBuilder();
       builder.append(this.keyClass, that.keyClass);
       builder.append(this.persistentClass, that.persistentClass);
@@ -214,19 +217,13 @@ implements DataStore<K, T> {
   /**
    * Returns the name of the schema to use for the persistent class. 
    * 
-   * First the schema name in the {@link Configuration} is used. If null,
-   * the schema name in the defined properties is returned. If null then
+   * First the schema name in the defined properties is returned. If null then
    * the provided mappingSchemaName is returned. If this is null too,
    * the class name, without the package, of the persistent class is returned.
    * @param mappingSchemaName the name of the schema as read from the mapping file
    * @param persistentClass persistent class
    */
   protected String getSchemaName(String mappingSchemaName, Class<?> persistentClass)
{
-    String confSchemaName = getOrCreateConf().get("preferred.schema.name");
-    if (confSchemaName != null) {
-      return confSchemaName;
-    }
-    
     String schemaName = DataStoreFactory.getDefaultSchemaName(properties, this);
     if(schemaName != null) {
       return schemaName;



Mime
View raw message