Permalink
Browse files

Updated Thrift to 0.5.0 + Added the thrift file of MockMessage for ot…

…hers to understand
  • Loading branch information...
1 parent 7f8473d commit d3985cdf2a8030499e9beef851148aa6f3d91b41 @rsumbaly rsumbaly committed Mar 2, 2011
View
@@ -41,7 +41,6 @@
<classpathentry kind="lib" path="lib/commons-pool-1.5.2.jar"/>
<classpathentry kind="lib" path="lib/protobuf-java-2.3.0.jar"/>
<classpathentry kind="lib" path="contrib/ec2-testing/lib/typica.jar"/>
- <classpathentry kind="lib" path="lib/libthrift-0.2.0.jar"/>
<classpathentry kind="lib" path="lib/google-collect-1.0.jar"/>
<classpathentry kind="lib" path="lib/je-4.0.103.jar"/>
<classpathentry kind="lib" path="lib/paranamer-2.1.jar"/>
@@ -52,5 +51,6 @@
<classpathentry kind="lib" path="lib/jna.jar"/>
<classpathentry kind="lib" path="lib/mockito-all-1.8.5.jar"/>
<classpathentry kind="lib" path="lib/avro-1.4.0.jar"/>
+ <classpathentry kind="lib" path="lib/libthrift-0.5.0.jar"/>
<classpathentry kind="output" path="classes"/>
</classpath>
View
Binary file not shown.
View
Binary file not shown.
@@ -72,7 +72,7 @@
} else if(name.equals(PROTO_BUF_TYPE_NAME)) {
return new ProtoBufSerializer<Message>(serializerDef.getCurrentSchemaInfo());
} else if(name.equals(THRIFT_TYPE_NAME)) {
- return new ThriftSerializer<TBase<?>>(serializerDef.getCurrentSchemaInfo());
+ return new ThriftSerializer<TBase<?,?>>(serializerDef.getCurrentSchemaInfo());
} else if(name.equals(AVRO_GENERIC_TYPE_NAME)) {
return new AvroGenericSerializer(serializerDef.getCurrentSchemaInfo());
} else if(name.equals(AVRO_SPECIFIC_TYPE_NAME)) {
@@ -26,15 +26,15 @@
private static final Logger logger = Logger.getLogger(SerializationUtils.class);
- private static final String ONLY_JAVA_CLIENTS_SUPPORTED = "Only Java clients are supported currently, so the format of the schema-info should be: <schema-info>java=foo.Bar</schema-info> where foo.Bar is the fully qualified name of the message.";
-
/**
* Extracts the java class name from the schema info
*
* @param schemaInfo the schema info, a string like: java=java.lang.String
* @return the name of the class extracted from the schema info
*/
public static String getJavaClassFromSchemaInfo(String schemaInfo) {
+ final String ONLY_JAVA_CLIENTS_SUPPORTED = "Only Java clients are supported currently, so the format of the schema-info should be: <schema-info>java=foo.Bar</schema-info> where foo.Bar is the fully qualified name of the message.";
+
if(StringUtils.isEmpty(schemaInfo))
throw new IllegalArgumentException("This serializer requires a non-empty schema-info.");
@@ -30,7 +30,7 @@
* languages is available, a semi-colon separated list will be accepted for the
* schema-info element (one for each language).
*/
-public class ThriftSerializer<T extends TBase<?>> implements Serializer<T> {
+public class ThriftSerializer<T extends TBase<?, ?>> implements Serializer<T> {
private static final String ONLY_JAVA_CLIENTS_SUPPORTED = "Only Java clients are supported currently, so the format of the schema-info should be: <schema-info>java=com.xyz.Foo,protocol=binary</schema-info> where com.xyz.Foo is the fully qualified name of the message.";
Oops, something went wrong.

0 comments on commit d3985cd

Please sign in to comment.