This project has retired. For details please refer to its Attic page.
Protos (Apache Crunch 0.10.0 API)

org.apache.crunch.types
Class Protos

java.lang.Object
  extended by org.apache.crunch.types.Protos

public class Protos
extends Object

Utility functions for working with protocol buffers in Crunch.


Constructor Summary
Protos()
           
 
Method Summary
static
<M extends com.google.protobuf.Message,K>
MapFn<M,K>
extractKey(String fieldName)
           
static
<M extends com.google.protobuf.Message>
M
getDefaultInstance(Class<M> clazz)
          Utility function for creating a default PB Messgae from a Class object that works with both protoc 2.3.0 and 2.4.x.
static
<M extends com.google.protobuf.Message>
DoFn<String,M>
lineParser(String sep, Class<M> msgClass)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Protos

public Protos()
Method Detail

getDefaultInstance

public static <M extends com.google.protobuf.Message> M getDefaultInstance(Class<M> clazz)
Utility function for creating a default PB Messgae from a Class object that works with both protoc 2.3.0 and 2.4.x.

Parameters:
clazz - The class of the protocol buffer to create
Returns:
An instance of a protocol buffer

extractKey

public static <M extends com.google.protobuf.Message,K> MapFn<M,K> extractKey(String fieldName)

lineParser

public static <M extends com.google.protobuf.Message> DoFn<String,M> lineParser(String sep,
                                                                                Class<M> msgClass)


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.