Class

com.hortonworks.spark.sql.hive.llap

JDBCWrapper

Related Doc: package llap

Permalink

class JDBCWrapper extends AnyRef

Shim which exposes some JDBC helper functions. Most of this code is copied from Spark SQL, with minor modifications for Redshift-specific features and limitations.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JDBCWrapper
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JDBCWrapper()

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def closeHS2ConnectionPool(): Unit

    Permalink
  7. def columnString(dataType: DataType, dataSize: Option[Long]): String

    Permalink
  8. def describeTable(conn: Connection, dbName: String, tableName: String): DescribeTableOutput

    Permalink

    Executes 'describe formatted' on given table As of now, only populates columns and partitioned columns.

    Executes 'describe formatted' on given table As of now, only populates columns and partitioned columns.

    conn

    JDBC connection

    dbName

    Database name

    tableName

    Table name

    returns

    DescribeTableOutput

  9. def dropTable(conn: Connection, dbName: String, tableName: String, ifExists: Boolean): Unit

    Permalink

    Drops the table.

    Drops the table.

    conn

    JDBC connection

    dbName

    Database name

    tableName

    Table name

    ifExists

    IF EXISTS option for DROP query

  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def executeStmt(conn: Connection, currentDatabase: String, query: String, maxExecResults: Long): DriverResultSet

    Permalink
  13. def executeUpdate(conn: Connection, currentDatabase: String, query: String, throwOnException: Boolean): Boolean

    Permalink
  14. def executeUpdate(conn: Connection, currentDatabase: String, query: String): Boolean

    Permalink
  15. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def getCatalystType(sqlType: Int, typeName: String, precision: Int, scale: Int, signed: Boolean): DataType

    Permalink

    Maps a JDBC type to a Catalyst type.

    Maps a JDBC type to a Catalyst type.

    sqlType

    - A field of java.sql.Types

    returns

    The Catalyst type corresponding to sqlType.

  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def getConnector(sessionState: HiveWarehouseSessionState): Connection

    Permalink
  19. def getConnector(userProvidedDriverClass: Option[String], url: String, userName: String, password: String, dbcp2Configs: String): Connection

    Permalink

    Given a driver string and a JDBC url, load the specified driver and return a DB connection.

    Given a driver string and a JDBC url, load the specified driver and return a DB connection.

    userProvidedDriverClass

    the class name of the JDBC driver for the given url. If this is None then spark-redshift will attempt to automatically discover the appropriate driver class.

    url

    the JDBC url to connect to.

  20. def getJDBCConnOutsideThePool(sessionState: HiveWarehouseSessionState): Connection

    Permalink
  21. def getTableColumns(conn: Connection, dbName: String, tableName: String): Array[String]

    Permalink

    Gets all the column names of specified table

    Gets all the column names of specified table

    conn

    JDBC connection

    dbName

    Database name

    tableName

    Table name

    returns

    array of column names

  22. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. def populateSchemaFields(ncols: Int, rsmd: ResultSetMetaData, fields: Array[StructField]): Unit

    Permalink
  28. def resolveQuery(conn: Connection, currentDatabase: String, query: String): StructType

    Permalink
  29. def resolveTable(conn: Connection, dbName: String, tableName: String): StructType

    Permalink

    Takes a (schema, table) specification and returns the table's Catalyst schema.

    Takes a (schema, table) specification and returns the table's Catalyst schema.

    conn

    A JDBC connection to the database.

    dbName

    The database name.

    tableName

    The table name of the desired table. This may also be a SQL query wrapped in parentheses.

    returns

    A StructType giving the table's Catalyst schema.

  30. def schemaString(schema: StructType): String

    Permalink

    Compute the SQL schema string for the given Spark SQL Schema.

  31. def setSessionLevelProps(conn: Connection, props: String*): Unit

    Permalink
    Annotations
    @varargs()
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  33. def tableExists(conn: Connection, dbName: String, tableName: String): Boolean

    Permalink

    Checks if table exists in database.

    Checks if table exists in database.

    conn

    JDBC connection

    dbName

    Database name

    tableName

    Name of the table for which existence is to be checked

    returns

    true if table exists in database, false otherwise.

  34. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  35. def truncateTable(conn: Connection, dbName: String, tableName: String): Unit

    Permalink

    Truncates the table.

    Truncates the table.

    conn

    JDBC connection

    dbName

    Database name

    tableName

    Table name

  36. def unsetTableProperties(conn: Connection, dbName: String, tableName: String, ifExists: Boolean, propertyKeys: String*): Unit

    Permalink

    Unsets table properties.

    Unsets table properties.

    conn

    JDBC connection

    dbName

    Database name

    tableName

    Table name

    ifExists

    IF EXISTS option, i.e. UNSET TBLPROPERTIES IF EXISTS...

    propertyKeys

    property keys to unset

    Annotations
    @varargs()
  37. def useDatabase(conn: Connection, currentDatabase: String): Unit

    Permalink
  38. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped