HEX
Server: Apache/2.4.59 (Debian)
System: Linux keymana 4.19.0-21-cloud-amd64 #1 SMP Debian 4.19.249-2 (2022-06-30) x86_64
User: lijunjie (1003)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //proc/thread-self/root/lib/google-cloud-sdk/bin/bootstrapping/dataflow_sql.py
# Copyright 2017 Google Inc. All Rights Reserved.
#
"""A convenience wrapper for starting Dataflow SQL shell."""

import os

import bootstrapping
from googlecloudsdk.command_lib.util import java
from googlecloudsdk.core.updater import update_manager

# Path to the unpacked component
_COMPONENT_DIR = os.path.join('platform', 'dataflow-sql')

# Path to the directory of unpacked jars relative to the SDK root
_JAR_DIR = os.path.join(_COMPONENT_DIR, 'lib')

# The main jar in the _JAR_DIR, must be first for precedence
_MAIN_JAR = 'dataflow_sql_shell.jar'

# Name of the main class
_CLASSNAME = 'org.apache.beam.sdk.extensions.sql.jdbc.BeamSqlLine'


def main():
  """Launches the Dataflow SQL shell."""
  bootstrapping.CommandStart('dataflow-sql', component_id='dataflow-sql')
  bootstrapping.CheckUpdates('dataflow-sql')
  update_manager.UpdateManager.EnsureInstalledAndRestart(
      ['dataflow-sql'], command=__file__)
  java_bin = java.RequireJavaInstalled('Dataflow SQL')
  bootstrapping.ExecuteJavaClass(
      java_bin,
      jar_dir=_JAR_DIR,
      main_jar=_MAIN_JAR,
      main_class=_CLASSNAME,
      main_args=['-nn', 'DFSQL', '-u', 'jdbc:beam:userAgent=DataflowSQL'])


if __name__ == '__main__':
  main()