com.ning.metrics.serialization.hadoop
Class HadoopSmileOutputStreamSerialization

java.lang.Object
  extended by com.ning.metrics.serialization.hadoop.HadoopSmileOutputStreamSerialization
All Implemented Interfaces:
org.apache.hadoop.io.serializer.Serialization<SmileOutputStream>

public class HadoopSmileOutputStreamSerialization
extends Object
implements org.apache.hadoop.io.serializer.Serialization<SmileOutputStream>

Hadoop serializer for Smile.

It's really similar to a SmileOutputStream (i.e. raw Smile), but we have to serialize the event name as well.


Constructor Summary
HadoopSmileOutputStreamSerialization()
           
 
Method Summary
 boolean accept(Class<?> c)
           
static int byteArrayToInt(byte[] b)
           
static byte[] concat(byte[] first, byte[] second)
           
 org.apache.hadoop.io.serializer.Deserializer<SmileOutputStream> getDeserializer(Class<SmileOutputStream> c)
           
 org.apache.hadoop.io.serializer.Serializer<SmileOutputStream> getSerializer(Class<SmileOutputStream> c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HadoopSmileOutputStreamSerialization

public HadoopSmileOutputStreamSerialization()
Method Detail

accept

public boolean accept(Class<?> c)
Specified by:
accept in interface org.apache.hadoop.io.serializer.Serialization<SmileOutputStream>

getDeserializer

public org.apache.hadoop.io.serializer.Deserializer<SmileOutputStream> getDeserializer(Class<SmileOutputStream> c)
Specified by:
getDeserializer in interface org.apache.hadoop.io.serializer.Serialization<SmileOutputStream>

getSerializer

public org.apache.hadoop.io.serializer.Serializer<SmileOutputStream> getSerializer(Class<SmileOutputStream> c)
Specified by:
getSerializer in interface org.apache.hadoop.io.serializer.Serialization<SmileOutputStream>

concat

public static byte[] concat(byte[] first,
                            byte[] second)

byteArrayToInt

public static int byteArrayToInt(byte[] b)


Copyright © 2011. All Rights Reserved.