private static Calendar getGMTCalendar() {
    //Calendar.getInstance calculates the current-time needlessly, so cache an instance.
    if (parquetGMTCalendar.get() == null) {
      GregorianCalendar calendar = new GregorianCalendar();
      calendar.setTimeZone(TimeZone.getTimeZone("GMT"));
      calendar.setGregorianChange(new Date(Long.MIN_VALUE));
      parquetGMTCalendar.set(calendar);
    }
    parquetGMTCalendar.get().clear();
    return parquetGMTCalendar.get();
  }
Utilities for converting from java.sql.Timestamp to parquet timestamp.
This utilizes the Jodd library.
ql/src/java/org/apache/hadoop/hive/ql/io/parquet/timestamp/NanoTimeUtils.java