Skip to content

Instantly share code, notes, and snippets.

View awhogue's full-sized avatar

Andrew Hogue awhogue

View GitHub Profile

Keybase proof

I hereby claim:

  • I am awhogue on github.
  • I am ahogue (https://keybase.io/ahogue) on keybase.
  • I have a public key whose fingerprint is 68AF 1BD3 3274 D025 2537 CCF9 6BAC C20C 0F4E 5476

To claim this, I am signing this object:

/**
* Class that wraps a TSerializer.
*/
class ThriftSerializerWithClassName[T <: BoundedTBase] {
val protocolFactory = new TCompactProtocol.Factory()
// TSerializer reuses a ByteArrayOutputStream, but isn't threadsafe.
val serializer = new TSerializer(protocolFactory)
def serialize(t: T): Array[Byte] = {