hadoop-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Schlaikjer <andrew.schlaik...@gmail.com>
Subject Re: specification of type params in org.apache.hadoop.io.*Writable impls
Date Tue, 30 Mar 2010 14:01:43 GMT
I've received a number of responses from helpful Hadoop list members. Thanks!

But I should clarify here; I'm not looking for workarounds for my Pair
declaration or explanations of Java's generics facilities. I'm looking
for justifications for Hadoop's approach.

Looking at Java's core library, there are 86 classes which implement
java.lang.Comparable<T> [1]. 80 of these specify T = the type being
declared, or some parent of the type being declared.

[1] http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html

So, I'm curious, are there specific use cases the Hadoop community has
run into which support the current design of the primitive *Writable
types which excludes specification of Comparable<T>'s T param? If not
I'll try and find time to work on a patch to push more conventional
use of generics into Hadoop Common.

Best,

Mime
View raw message