@Override
    public void setDictionary(Dictionary dictionary) {
      int length = dictionary.getMaxId() + 1;
      lookupTable = new ArrayList<T>();
      for (int i = 0; i < length; i++) {
        lookupTable.add(convert(dictionary.decodeToBinary(i)));
      }
    }
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