public long getGap ( MultiLongWatermark highWatermark ) { Preconditions . checkNotNull ( highWatermark ) ; Preconditions . checkArgument ( this . values . size ( ) == highWatermark . values . size ( ) ) ; long diff = 0 ; for ( int i = 0 ; i < this . values . size ( ) ; i ++ ) { Preconditions . checkArgument ( this . values . get ( i ) <= highWatermark . values . get ( i ) ) ; diff += highWatermark . values . get ( i ) - this . values . get ( i ) ; } return diff ; }
Get the number of records that need to be pulled given the high watermark .