PreComputedHyperUniquesSerde: Fix formatting. (#3932)

This commit is contained in:
Gian Merlino 2017-02-14 09:32:29 -08:00 committed by Fangjin Yang
parent a2875a4d91
commit af67e8904e
1 changed files with 6 additions and 9 deletions

View File

@ -51,18 +51,15 @@ public class PreComputedHyperUniquesSerde extends HyperUniquesSerde
{
Object rawValue = inputRow.getRaw(metricName);
if (rawValue == null)
{
if (rawValue == null) {
return HyperLogLogCollector.makeLatestCollector();
} else if (rawValue instanceof HyperLogLogCollector)
{
} else if (rawValue instanceof HyperLogLogCollector) {
return (HyperLogLogCollector) rawValue;
} else if (rawValue instanceof byte[])
{
} else if (rawValue instanceof byte[]) {
return HyperLogLogCollector.makeLatestCollector().fold(ByteBuffer.wrap((byte[]) rawValue));
} else if (rawValue instanceof String)
{
return HyperLogLogCollector.makeLatestCollector().fold(ByteBuffer.wrap(Base64.decodeBase64((String) rawValue)));
} else if (rawValue instanceof String) {
return HyperLogLogCollector.makeLatestCollector()
.fold(ByteBuffer.wrap(Base64.decodeBase64((String) rawValue)));
}
throw new ISE("Object is not of a type[%s] that can be deserialized to HyperLogLog.", rawValue.getClass());