// multi and upsert 'options' JSON
boolean isUpsert = true;
boolean isMulti = false;
BasicBSONObject mu = toUpdate.length > 2 ? toUpdate[2] : null;
if (mu != null) {
isUpsert = !mu.containsField("upsert") || mu.getBoolean("upsert");
isMulti = mu.containsField("multi") && mu.getBoolean("multi");
}
recordWriter.write(null, new MongoUpdateWritable(q, u,
isUpsert,