}
@Override
public synchronized KeyValuesWriter getWriter() throws IOException {
Preconditions.checkState(isStarted.get(), "Cannot get writer before starting the Output");
return new KeyValuesWriter() {
@Override
public void write(Object key, Object value) throws IOException {
sorter.write(key, value);
}