public class JavaUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
JavaUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> Class<? extends T> |
getClass(String className,
Class<T> clazz) |
static ClassLoader |
getClassLoader()
Standard way of getting classloader in Hive code (outside of Hadoop).
|
static String |
hostname() |
static String |
lockIdToString(long extLockId)
Utility method for ACID to normalize logging info.
|
static <T> T |
newInstance(Class<T> theClass)
Create an object of the given class using a no-args constructor
|
static <T> T |
newInstance(Class<T> theClass,
Class<?>[] parameterTypes,
Object[] initargs)
Create an object of the given class.
|
static String |
txnIdToString(long txnId)
Utility method for ACID to normalize logging info.
|
public static ClassLoader getClassLoader()
public static <T> Class<? extends T> getClass(String className, Class<T> clazz) throws org.apache.hadoop.hive.metastore.api.MetaException
org.apache.hadoop.hive.metastore.api.MetaExceptionpublic static <T> T newInstance(Class<T> theClass, Class<?>[] parameterTypes, Object[] initargs)
theClass - parameterTypes - an array of parameterTypes for the constructorinitargs - the list of arguments for the constructorpublic static <T> T newInstance(Class<T> theClass)
T - the type of the class to be returnedtheClass - class to return new object ofpublic static String hostname()
public static String lockIdToString(long extLockId)
public static String txnIdToString(long txnId)
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.