Class SerializationUtil

java.lang.Object
org.apache.iceberg.util.SerializationUtil

public class SerializationUtil extends Object
  • Method Details

    • serializeToBytes

      public static byte[] serializeToBytes(Object obj)
      Serialize an object to bytes. If the object implements HadoopConfigurable, its Hadoop configuration will be serialized into a SerializableConfiguration.
      Parameters:
      obj - object to serialize
      Returns:
      serialized bytes
    • serializeToBytes

      public static byte[] serializeToBytes(Object obj, Function<org.apache.hadoop.conf.Configuration,SerializableSupplier<org.apache.hadoop.conf.Configuration>> confSerializer)
      Serialize an object to bytes. If the object implements HadoopConfigurable, the confSerializer will be used to serialize Hadoop configuration used by the object.
      Parameters:
      obj - object to serialize
      confSerializer - serializer for the Hadoop configuration
      Returns:
      serialized bytes
    • deserializeFromBytes

      public static <T> T deserializeFromBytes(byte[] bytes)
    • serializeToBase64

      public static String serializeToBase64(Object obj)
    • deserializeFromBase64

      public static <T> T deserializeFromBase64(String base64)