Package org.apache.pinot.common
Class Utils
- java.lang.Object
-
- org.apache.pinot.common.Utils
-
public class Utils extends Object
-
-
Method Summary
Modifier and Type Method Description static StringgetCallingMethodDetails()Obtains the name of the calling method and line number.static Map<String,String>getComponentVersions()Obtains the version numbers of the Pinot components.static longgetUniqueId()static voidlogVersions()Write the version of Pinot components to the log at info level.static voidrethrowException(Throwable t)Rethrows an exception, even if it is not in the method signature.static StringtoCamelCase(String text)Takes a string, removes all characters that are not letters or digits and capitalizes the next letter following a series of characters that are not letters or digits.
-
-
-
Method Detail
-
rethrowException
public static void rethrowException(Throwable t)
Rethrows an exception, even if it is not in the method signature.- Parameters:
t- The exception to rethrow.
-
getCallingMethodDetails
public static String getCallingMethodDetails()
Obtains the name of the calling method and line number. This is slow, only use this for debugging!
-
getUniqueId
public static long getUniqueId()
-
toCamelCase
public static String toCamelCase(String text)
Takes a string, removes all characters that are not letters or digits and capitalizes the next letter following a series of characters that are not letters or digits. For example, toCamelCase("Hello world!") returns "HelloWorld".- Parameters:
text- The text to camel case- Returns:
- The camel cased version of the string given
-
logVersions
public static void logVersions()
Write the version of Pinot components to the log at info level.
-
-