revert changes to hyperUnique

This commit is contained in:
fjy 2014-05-07 12:33:42 -07:00
parent 9d35490cdf
commit 2709a8b0b6
1 changed files with 1 additions and 8 deletions

View File

@ -33,15 +33,12 @@ import io.druid.segment.serde.ComplexMetricExtractor;
import io.druid.segment.serde.ComplexMetricSerde;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.List;
/**
*/
public class HyperUniquesSerde extends ComplexMetricSerde
{
private final static byte[] NULL_BYTES = "\u0000".getBytes(Charsets.UTF_8);
private static Ordering<HyperLogLogCollector> comparator = new Ordering<HyperLogLogCollector>()
{
@Override
@ -96,11 +93,7 @@ public class HyperUniquesSerde extends ComplexMetricSerde
for (String dimensionValue : dimValues) {
collector.add(
hashFn.hashBytes(
dimensionValue == null
? NULL_BYTES
: dimensionValue.getBytes(Charsets.UTF_8)
).asBytes()
hashFn.hashBytes(dimensionValue.getBytes(Charsets.UTF_8)).asBytes()
);
}
return collector;