Class SerializationUtil

java.lang.Object
org.apache.parquet.hadoop.util.SerializationUtil

public final class SerializationUtil extends Object
Serialization utils copied from: https://github.com/kevinweil/elephant-bird/blob/master/core/src/main/java/com/twitter/elephantbird/util/HadoopUtils.java

TODO: Refactor elephant-bird so that we can depend on utils like this without extra baggage.

  • Method Details

    • writeObjectToConfAsBase64

      public static void writeObjectToConfAsBase64(String key, Object obj, org.apache.hadoop.conf.Configuration conf) throws IOException
      Writes an object to a configuration.
      Parameters:
      key - for the configuration
      obj - the object to write
      conf - to read from
      Throws:
      IOException - if there is an error while writing
    • readObjectFromConfAsBase64

      public static <T> T readObjectFromConfAsBase64(String key, org.apache.hadoop.conf.Configuration conf) throws IOException
      Type Parameters:
      T - the Java type of the deserialized object
      Parameters:
      key - for the configuration
      conf - to read from
      Returns:
      the read object, or null if key is not present in conf
      Throws:
      IOException - if there is an error while reading
    • readObjectFromConfAsBase64

      public static <T> T readObjectFromConfAsBase64(String key, org.apache.parquet.conf.ParquetConfiguration conf) throws IOException
      Type Parameters:
      T - the Java type of the deserialized object
      Parameters:
      key - for the configuration
      conf - to read from
      Returns:
      the read object, or null if key is not present in conf
      Throws:
      IOException - if there is an error while reading