Skip to content

Commit

Permalink
PreComputedHyperUniquesSerde: Fix formatting. (apache#3932)
Browse files Browse the repository at this point in the history
  • Loading branch information
gianm authored and fjy committed Feb 14, 2017
1 parent a2875a4 commit af67e89
Showing 1 changed file with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,15 @@ public HyperLogLogCollector extractValue(InputRow inputRow, String metricName)
{
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());
Expand Down

0 comments on commit af67e89

Please sign in to comment.