Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

small optimisation

  • Loading branch information...
commit b234046a9b5fd38cd35b13000a97dfad6518347c 1 parent ced8b67
@steeve steeve authored committed
Showing with 3 additions and 5 deletions.
  1. +3 −5 src/java/src/org/apache/cassandra/pig/CassandraStorage.java
View
8 src/java/src/org/apache/cassandra/pig/CassandraStorage.java
@@ -202,7 +202,7 @@ private CfDef getCfDef(String signature)
return marshallers;
}
- private Map<ByteBuffer,AbstractType> getValidatorMap(CfDef cfDef) throws IOException
+ private Map<ByteBuffer, AbstractType> getValidatorMap(CfDef cfDef) throws IOException
{
Map<ByteBuffer, AbstractType> validators = new HashMap<ByteBuffer, AbstractType>();
for (ColumnDef cd : cfDef.column_metadata)
@@ -242,9 +242,8 @@ public void prepareToRead(RecordReader reader, PigSplit split)
Map<String, String> map = new HashMap<String, String>();
for (String param : params)
{
- String name = param.split("=")[0];
- String value = param.split("=")[1];
- map.put(name, value);
+ String[] keyValue = param.split("=");
+ map.put(keyValue[0], keyValue[1]);
}
return map;
}
@@ -333,7 +332,6 @@ public ResourceSchema getSchema(String location, Job job) throws IOException
bagFieldSchema.setType(DataType.BAG);
ResourceSchema bagSchema = new ResourceSchema();
-
List<AbstractType> marshallers = getDefaultMarshallers(cfDef);
Map<ByteBuffer,AbstractType> validators = getValidatorMap(cfDef);
List<ResourceFieldSchema> tupleFields = new ArrayList<ResourceFieldSchema>();
Please sign in to comment.
Something went wrong with that request. Please try again.