crunch-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandy Ryza <sandy.r...@cloudera.com>
Subject emitting the same object with different internals
Date Mon, 10 Jun 2013 00:06:56 GMT
Will the following code work in Crunch?

---
private SomeMutableObject smo;

public void process(Integer input, Emitter<SomeMutableObject> emitter) {
  smo.mutate(input);
  emitter.emit(smo);
}
---

i.e. will the object be written/copied when emit is called is called so
that changes to it in a later call of the process function won't change
what was emitted in an earlier one?


thanks for any help!
Sandy

Mime
View raw message