@Override
        public void addLong(final long value) {
          if (value >= ((ETypeConverter.isUnsignedInteger(type)) ? 0 : Long.MIN_VALUE)) {
            parent.set(index, new LongWritable(value));
          } else {
            parent.set(index, null);
          }
        }
ETypeConverter is an easy way to set the converter for the right type.
ql/src/java/org/apache/hadoop/hive/ql/io/parquet/convert/ETypeConverter.java