PARQUET-108: Parquet Memory Management in Java

PARQUET-108: Parquet Memory Management in Java.
When Parquet tries to write very large "row groups", it may causes tasks to run out of memory during dynamic partitions when a reducer may have many Parquet files open at a given time.

This patch implements a memory manager to control the total memory size used by writers and balance their memory usage, which ensures that we don't run out of memory due to writing too many row groups within a single JVM.
use parquet.Ints.checkedCast or you could get a negative value out of this cast.
https://github.com/apache/incubator-parquet-mr/blob/ad06e61143d6ad3d883907e75100014b9554c357/parquet-common/src/main/java/parquet/Ints.java#L34