@ Override public void write ( T record ) { recordConsumer . startMessage ( ) ; try { messageWriter . writeTopLevelMessage ( record ) ; } catch ( RuntimeException e ) { Message m = ( record instanceof Message . Builder ) ? ( ( Message . Builder ) record ) . build ( ) : ( Message ) record ; LOG . error ( "Cannot write message " + e . getMessage ( ) + " : " + m ) ; throw e ; } recordConsumer . endMessage ( ) ; }
Writes Protocol buffer to parquet file .