DataFileWriter#append() is not synchronized. If you have multiple threads appending to the same file then you must synchronize. For example:
synchronized (writer) { writer.append(value); } Doug On Wed, Oct 9, 2013 at 4:16 AM, David Ginzburg <dav...@inner-active.com> wrote: > Hi, > I am writing a kafka consumer that persists messages into avro record files. > The consumer is a threaded application, but it is unclear to me if > DataFileWriter is thread safe, or I need to add some synchronization > code when appending messages ?