Packages

object Utils extends Logging

Linear Supertypes
Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Utils
  2. Logging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val DEFAULT_SHUTDOWN_PRIORITY: Int
  5. val FLINK_ENGINE_SHUTDOWN_PRIORITY: Int
  6. val JDBC_ENGINE_SHUTDOWN_PRIORITY: Int
  7. val REDACTION_REPLACEMENT_TEXT: String
  8. val SERVER_SHUTDOWN_PRIORITY: Int
  9. val SPARK_CONTEXT_SHUTDOWN_PRIORITY: Int
  10. val TRINO_ENGINE_SHUTDOWN_PRIORITY: Int
  11. def addShutdownHook(hook: Runnable, priority: Int = DEFAULT_SHUTDOWN_PRIORITY): Unit

    Add some operations that you want into ShutdownHook

  12. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  13. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  14. def createDirectory(root: String, namePrefix: String = "kyuubi"): Path

    Create a directory inside the given parent directory.

    Create a directory inside the given parent directory. The directory is guaranteed to be newly created, and is not marked for automatic deletion.

  15. def createTempDir(prefix: String = "kyuubi", root: String = ...): Path

    Create a temporary directory inside the given parent directory.

    Create a temporary directory inside the given parent directory. The directory will be automatically deleted when the VM shuts down.

  16. def currentUser: String
  17. def debug(message: ⇒ Any, t: Throwable): Unit
    Definition Classes
    Logging
  18. def debug(message: ⇒ Any): Unit
    Definition Classes
    Logging
  19. def deleteDirectoryRecursively(f: File): Boolean

    Delete a directory recursively.

  20. def doAs[T](proxyUser: String, realUser: UserGroupInformation = UserGroupInformation.getCurrentUser)(f: () ⇒ T): T
  21. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  23. def error(message: ⇒ Any): Unit
    Definition Classes
    Logging
  24. def error(message: ⇒ Any, t: Throwable): Unit
    Definition Classes
    Logging
  25. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. def findLocalInetAddress: InetAddress

    This block of code is based on Spark's Utils.findLocalInetAddress()

  27. def fromCommandLineArgs(args: Array[String], conf: KyuubiConf): Unit
  28. def getAbsolutePathFromWork(pathStr: String, env: Map[String, String] = sys.env): Path
  29. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  30. def getCodeSourceLocation(clazz: Class[_]): String
  31. def getContextOrKyuubiClassLoader: ClassLoader

    Get the Context ClassLoader on this thread or, if not present, the ClassLoader that loaded Kyuubi.

    Get the Context ClassLoader on this thread or, if not present, the ClassLoader that loaded Kyuubi.

    This should be used whenever passing a ClassLoader to Class.ForName or finding the currently active loader when setting up ClassLoader delegation chains.

  32. def getDateFromTimestamp(time: Long): String

    return date of format yyyyMMdd

  33. def getDefaultPropertiesFile(env: Map[String, String] = sys.env): Option[File]
  34. def getKyuubiClassLoader: ClassLoader

    Get the ClassLoader which loaded Kyuubi.

  35. def getPropertiesFile(fileName: String, env: Map[String, String] = sys.env): Option[File]
  36. def getPropertiesFromFile(file: Option[File]): Map[String, String]
  37. def getSystemProperties: Map[String, String]
  38. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  39. def info(message: ⇒ Any, t: Throwable): Unit
    Definition Classes
    Logging
  40. def info(message: ⇒ Any): Unit
    Definition Classes
    Logging
  41. def initializeLoggerIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  42. def isCommandAvailable(cmd: String): Boolean
  43. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  44. val isMac: Boolean

    Whether the underlying operating system is MacOS.

  45. def isOnK8s: Boolean
  46. def isTesting: Boolean

    Indicates whether Kyuubi is currently running unit tests.

  47. val isWindows: Boolean

    Whether the underlying operating system is Windows.

  48. def logger: Logger
    Attributes
    protected
    Definition Classes
    Logging
  49. def loggerName: String
    Attributes
    protected
    Definition Classes
    Logging
  50. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  51. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  52. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  53. def prettyPrint(e: Throwable): String

    Return a nice string representation of the exception.

    Return a nice string representation of the exception. It will call "printStackTrace" to recursively generate the stack trace including the exception and its causes.

  54. def redact[K, V](regex: Option[Regex], kvs: Seq[(K, V)]): Seq[(K, V)]

    Redact the sensitive values in the given map.

    Redact the sensitive values in the given map. If a map key matches the redaction pattern then its value is replaced with a dummy text.

  55. def redactCommandLineArgs(conf: KyuubiConf, commands: Array[String]): Array[String]
  56. def shortVersion(version: String): String

    Given a Kyuubi/Spark/Hive version string, return the short version string.

    Given a Kyuubi/Spark/Hive version string, return the short version string. E.g., for 3.0.0-SNAPSHOT, return '3.0.0'.

  57. def strToSeq(s: String, sp: String = ","): Seq[String]
  58. def stringifyException(e: Throwable): String

    Make a string representation of the exception.

  59. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  60. def terminateProcess(process: Process, gracefulPeriod: Long): Option[Int]

    Try killing the process gracefully first, then forcibly if process does not exit in graceful period.

    Try killing the process gracefully first, then forcibly if process does not exit in graceful period.

    process

    the being killed process

    gracefulPeriod

    the graceful killing period, in milliseconds

    returns

    the exit code if process exit normally, None if the process finally was killed forcibly

  61. def toString(): String
    Definition Classes
    AnyRef → Any
  62. def tryLogNonFatalError(block: ⇒ Unit): Unit
  63. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  64. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  65. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  66. def warn(message: ⇒ Any, t: Throwable): Unit
    Definition Classes
    Logging
  67. def warn(message: ⇒ Any): Unit
    Definition Classes
    Logging
  68. def withLockRequired[T](lock: Lock)(block: ⇒ T): T
  69. def writeToTempFile(source: InputStream, dir: Path, fileName: String): File

    Copies bytes from an InputStream source to a newly created temporary file created in the directory destination.

    Copies bytes from an InputStream source to a newly created temporary file created in the directory destination. The temporary file will be created with new name by adding random identifiers before original file name's suffix, and the file will be deleted on JVM exit. The directories up to destination will be created if they don't already exist. destination will be overwritten if it already exists. The source stream is closed.

    source

    the InputStream to copy bytes from, must not be null, will be closed

    dir

    the directory path for temp file creation

    fileName

    original file name with suffix

    returns

    the created temp file in dir

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped