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 columnString(dataType: DataType, dataSize: Option[Long]): String

    Permalink
  7. def databaseExists(conn: Connection, dbName: String): Boolean

    Permalink

    Checks if database exists.

    Checks if database exists.

    conn

    JDBC connection

    dbName

    Database name

    returns

    true if database exists, false otherwise.

  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, conf: String, query: String): Int

    Permalink

    Set confs and execute the query.

    Set confs and execute the query. Returns Updated row count.

    conn

    JDBC connection

    currentDatabase

    Database name

    conf

    Confs to be set

    query

    Query to execute

    returns

    Update Row Count

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

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

    Permalink
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. 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.

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

    Permalink
    Definition Classes
    AnyRef → Any
  19. def getConnector(url: String, user: String, password: String): Connection

    Permalink
  20. def getConnector(sessionState: HiveWarehouseSessionState): Connection

    Permalink
  21. def getJDBCConnection(url: String, user: String, password: String): Connection

    Permalink
  22. 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

  23. def hashCode(): Int

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

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

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

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

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

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

    Permalink
  30. 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.

  31. def schemaString(schema: StructType): String

    Permalink

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

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

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

    Permalink
    Definition Classes
    AnyRef
  34. 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.

  35. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  36. 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

  37. 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()
  38. def useDatabase(conn: Connection, currentDatabase: String): Unit

    Permalink
  39. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped