public void addEvents ( List < FlowEvent > events ) throws IOException { List < Put > puts = new ArrayList < Put > ( events . size ( ) ) ; for ( FlowEvent e : events ) { puts . add ( createPutForEvent ( e ) ) ; } Table eventTable = null ; try { eventTable = hbaseConnection . getTable ( TableName . valueOf ( Constants . FLOW_EVENT_TABLE ) ) ; eventTable . put ( puts ) ; } finally { if ( eventTable != null ) { eventTable . close ( ) ; } } }
Stores a batch of events