> On 2012-06-02 21:11:53, Hari Shreedharan wrote: > > trunk/flume-ng-sdk/src/main/java/org/apache/flume/api/FailoverRpcClient.java, > > lines 215-216 > > <https://reviews.apache.org/r/5333/diff/1/?file=111427#file111427line215> > > > > You should be setting the batchSize of the localClient also. If this is > > not set the batchSize is never passed to the actual client that does the > > Rpc writes.
The underlying Rpc client will send multiple batches of size=batchSize, if the list has more events than batchSize. So the client need not check the batchSize during append. It can pass list of arbitrary size, and the client will send multiple batches till the list is empty. - Hari ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/5333/#review8300 ----------------------------------------------------------- On 2012-06-02 18:12:37, Mubarak Seyed wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/5333/ > ----------------------------------------------------------- > > (Updated 2012-06-02 18:12:37) > > > Review request for Flume. > > > Summary > ------- > > FailoverRpcClient uses batchSize as local variable and it breaks the contract > for getBatchSize(). Consumer of FailoverRpcClient checks for getBatchSize() > to send events using appendBatch(List<Event>), since batchSize is initialized > with null, clients gets NPE. > > The fix is to remove the batchSize local variable in configureHosts() > > > This addresses bug FLUME-1226. > https://issues.apache.org/jira/browse/FLUME-1226 > > > Diffs > ----- > > > trunk/flume-ng-sdk/src/main/java/org/apache/flume/api/FailoverRpcClient.java > 1342144 > > Diff: https://reviews.apache.org/r/5333/diff > > > Testing > ------- > > Tested in lab environment. > > > Thanks, > > Mubarak > >
