Hi,
I was going through the hbase code (HConnectionManager class)
public void processBatch(List<Row> list,
final byte[] tableName,
ExecutorService pool,
Object[] results) throws IOException, InterruptedException {
// results must be the same size as list
if (results.length != list.size()) {
throw new IllegalArgumentException("argument results must be
the same size as argument list");
}
processBatchCallback(list, tableName, pool, results, null);
}
and in processBatchCallback we are checking the list sizes again
public <R> void processBatchCallback(
List<? extends Row> list,
byte[] tableName,
ExecutorService pool,
Object[] results,
Batch.Callback<R> callback)
throws IOException, InterruptedException {
// results must be the same size as list
if (results.length != list.size()) {
throw new IllegalArgumentException(
"argument results must be the same size as argument list");
}
I did not find any other calls for the method processBatchCallback.
Isn't this a redundant check ? or is there any specific reason for the
check being made again ?
Cheers,
Karthik