synchronized void addWriter(InternalParquetRecordWriter writer, Long allocation) {
    Long oldValue = writerList.get(writer);
    if (oldValue == null) {
      writerList.put(writer, allocation);
    } else {
      throw new IllegalArgumentException("[BUG] The Parquet Memory Manager should not add an " +
          "instance of InternalParquetRecordWriter more than once. The Manager already contains " +
          "the writer: " + writer);
    }
    updateAllocation();
  }
synchronized void addWriter(InternalParquetRecordWriter writer, Long allocation) {
    Long oldValue = writerList.get(writer);
    if (oldValue == null) {
      writerList.put(writer, allocation);
    } else {
      throw new IllegalArgumentException("[BUG] The Parquet Memory Manager should not add an " +
          "instance of InternalParquetRecordWriter more than once. The Manager already contains " +
          "the writer: " + writer);
    }
    updateAllocation();
  }
synchronized void addWriter ( InternalParquetRecordWriter writer , Long allocation ) { Long oldValue = writerList . get ( writer ) ; if ( oldValue == null ) { writerList . put ( writer , allocation ) ; } else { throw new IllegalArgumentException ( "[BUG] The Parquet Memory Manager should not add an " + "instance of InternalParquetRecordWriter more than once. The Manager already contains " + "the writer: " + writer ) ; } updateAllocation ( ) ; }
Add a new writer and its memory allocation to the memory manager.
@param writer the new created writer
@param allocation the requested buffer size
Add a new writer and its memory allocation to the memory manager .