Package net.sansa_stack.hadoop.util
Class ConfigurationUtils
java.lang.Object
net.sansa_stack.hadoop.util.ConfigurationUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TgetJson(org.apache.hadoop.conf.Configuration conf, com.google.gson.Gson gson, String key, Class<T> clz, T defaultValue) static <T> TgetSerializable(org.apache.hadoop.conf.Configuration conf, String key, T defaultValue) Get a (non-null) string as a base64 url encoded serialized object Obviously results in non-human-readable configuration objects and should thus be avoided.static voidsetJson(org.apache.hadoop.conf.Configuration conf, com.google.gson.Gson gson, String key, Object obj) static voidsetSerializable(org.apache.hadoop.conf.Configuration conf, String key, Serializable serializable) Set a serializable object as a base64 url encoded string
-
Constructor Details
-
ConfigurationUtils
public ConfigurationUtils()
-
-
Method Details
-
getSerializable
public static <T> T getSerializable(org.apache.hadoop.conf.Configuration conf, String key, T defaultValue) Get a (non-null) string as a base64 url encoded serialized object Obviously results in non-human-readable configuration objects and should thus be avoided. Useful for rapid prototyping though. -
setSerializable
public static void setSerializable(org.apache.hadoop.conf.Configuration conf, String key, Serializable serializable) Set a serializable object as a base64 url encoded string -
getJson
-
setJson
-