public Map < String , Map < String , List < String > > > getColumnDeletesMap ( ) { Map < String , Map < String , List < String > > > storeMap = new HashMap <> ( ) ; for ( ColumnDelete mutation : getColumnDeletes ( ) ) { String storeName = mutation . getStoreName ( ) ; String rowKey = mutation . getRowKey ( ) ; String column = mutation . getColumnName ( ) ; Map < String , List < String > > rowMap = storeMap . get ( storeName ) ; if ( rowMap == null ) { rowMap = new HashMap <> ( ) ; storeMap . put ( storeName , rowMap ) ; } List < String > columnsList = rowMap . get ( rowKey ) ; if ( columnsList == null ) { columnsList = new ArrayList <> ( ) ; rowMap . put ( rowKey , columnsList ) ; } columnsList . add ( column ) ; } return storeMap ; }
Get the map of the column deletes as storeName - > rowKey - > list of column names