public class UDTRegistration
extends java.lang.Object
SQLUserDefinedType
to register UDTs for user classes.
However, by doing this, we add SparkSQL dependency on user classes. This object provides
alterntive approach to register UDTs for user classes.Constructor and Description |
---|
UDTRegistration() |
Modifier and Type | Method and Description |
---|---|
static boolean |
exists(java.lang.String userClassName)
Queries if a given user class is already registered or not.
|
static scala.Option<java.lang.Class<?>> |
getUDTFor(java.lang.String userClass)
Returns the Class of UserDefinedType for the name of a given user class.
|
protected static void |
initializeLogIfNecessary(boolean isInterpreter) |
protected static boolean |
isTraceEnabled() |
protected static org.slf4j.Logger |
log() |
protected static void |
logDebug(scala.Function0<java.lang.String> msg) |
protected static void |
logDebug(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
protected static void |
logError(scala.Function0<java.lang.String> msg) |
protected static void |
logError(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
protected static void |
logInfo(scala.Function0<java.lang.String> msg) |
protected static void |
logInfo(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
protected static java.lang.String |
logName() |
protected static void |
logTrace(scala.Function0<java.lang.String> msg) |
protected static void |
logTrace(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
protected static void |
logWarning(scala.Function0<java.lang.String> msg) |
protected static void |
logWarning(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
static void |
register(java.lang.String userClass,
java.lang.String udtClass)
Registers an UserDefinedType to an user class.
|
public static boolean exists(java.lang.String userClassName)
userClassName
- the name of user classpublic static void register(java.lang.String userClass, java.lang.String udtClass)
userClass
- the name of user classudtClass
- the name of UserDefinedType class for the given userClasspublic static scala.Option<java.lang.Class<?>> getUDTFor(java.lang.String userClass)
userClass
- class name of user classprotected static java.lang.String logName()
protected static org.slf4j.Logger log()
protected static void logInfo(scala.Function0<java.lang.String> msg)
protected static void logDebug(scala.Function0<java.lang.String> msg)
protected static void logTrace(scala.Function0<java.lang.String> msg)
protected static void logWarning(scala.Function0<java.lang.String> msg)
protected static void logError(scala.Function0<java.lang.String> msg)
protected static void logInfo(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static void logDebug(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static void logTrace(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static void logWarning(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static void logError(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static boolean isTraceEnabled()
protected static void initializeLogIfNecessary(boolean isInterpreter)