Class/Object

org.apache.spark.aliyun.utils

OdpsUtils

Related Docs: object OdpsUtils | package utils

Permalink

class OdpsUtils extends Logging

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

Instance Constructors

  1. new OdpsUtils(odps: Odps)

    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 checkTableAndPartition(project: String, table: String, pname: String): (Boolean, Boolean)

    Permalink

    Check if specific ODPS table and partition exist or else.

    Check if specific ODPS table and partition exist or else.

    Examples

    Type of ODPS table Table exist Partition exist Return
    Non-partitioned false - (false, false)
    Non-partitioned true - (true, false)
    Partitioned true false (true, false)
    Partitioned true true (true, true)
    Partitioned false - (false, false)

    project

    The name of ODPS project.

    table

    The name of ODPS table.

    pname

    The name of ODPS table partition, if partitioned table.

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def createPartition(project: String, table: String, pname: String): Boolean

    Permalink

    Create specific partition of ODPS table.

    Create specific partition of ODPS table.

    project

    The name of ODPS project.

    table

    The name of ODPS table.

    pname

    The name of ODPS table partition, if partitioned table.

    returns

    Success or not.

  8. def createTable(project: String, table: String, schema: TableSchema, ifNotExists: Boolean): Unit

    Permalink

    Create ODPS table.

    Create ODPS table.

    project

    Name of odps project.

    table

    Name of odps table.

    schema

    refer to {{TableSchema}}.

    ifNotExists

    Fail or not if target table exists.

  9. def dropPartition(project: String, table: String, pname: String): Boolean

    Permalink

    Drop specific partition of ODPS table.

    Drop specific partition of ODPS table.

    project

    The name of ODPS project.

    table

    The name of ODPS table.

    pname

    The name of ODPS table partition, if partitioned table.

    returns

    Success or not.

  10. def dropTable(project: String, table: String): Boolean

    Permalink

    Drop specific ODPS table.

    Drop specific ODPS table.

    project

    The name of ODPS project.

    table

    The name of ODPS table.

    returns

    Success or not.

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def getAllPartitionSpecs(table: String, project: String = null): Iterator[PartitionSpec]

    Permalink

    Get all partition PartitionSpec of specific ODPS table.

    Get all partition PartitionSpec of specific ODPS table.

    table

    The name of ODPS table.

    project

    The name of ODPS project.

    returns

    All partition PartitionSpec

  15. def getCatalystType(columnName: String, columnType: TypeInfo, nullable: Boolean): StructField

    Permalink
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def getColumnByIdx(project: String, table: String, idx: Int): (String, String)

    Permalink

    Get information of specific column via column index.

    Get information of specific column via column index.

    project

    The name of ODPS project.

    table

    The name of ODPS table.

    idx

    The index of specific column.

    returns

    Column name and type.

  18. def getColumnByName(project: String, table: String, name: String): (String, String)

    Permalink

    Get information of specific column via column name.

    Get information of specific column via column name.

    project

    The name of ODPS project.

    table

    The name of ODPS table.

    name

    The name of specific column.

    returns

    Column index and type.

  19. def getTableSchema(project: String, table: String, isPartition: Boolean): Array[(String, TypeInfo)]

    Permalink

    Get the table schema of ODPS table.

    Get the table schema of ODPS table.

    project

    The name of ODPS project.

    table

    The name of ODPS table.

    isPartition

    Is partition column or not.

  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  21. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  22. def initializeLogIfNecessary(isInterpreter: Boolean): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. def isPartitionTable(table: String, project: String = null): Boolean

    Permalink

    Check if the table is a partition table

    Check if the table is a partition table

    table

    The name of ODPS table.

    project

    The name of ODPS project.

  25. def isTraceEnabled(): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  26. def log: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  27. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  28. def logDebug(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  29. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  30. def logError(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  31. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  32. def logInfo(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  33. def logName: String

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  34. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  35. def logTrace(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  36. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  37. def logWarning(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  38. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  41. def partitionExist(partitionSpec: String, table: String, project: String = null): Boolean

    Permalink

    Check if the partition exists in the table,

    Check if the partition exists in the table,

    partitionSpec like pt='xxx',ds='yyy'

    table

    The name of ODPS table.

    project

    The name of ODPS project.

  42. def runSQL(project: String, sqlCmd: String, hints: Map[String, String] = Map.empty): Instance

    Permalink

    Run sql on ODPS.

    Run sql on ODPS.

    project

    The name of ODPS project.

    sqlCmd

    An ODPS sql

    returns

    An instance of ODPS.

  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  44. def tableExist(table: String, project: String = null): Boolean

    Permalink

    Check if the table exists

    Check if the table exists

    table

    The name of ODPS table.

    project

    The name of ODPS project.

  45. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  46. final def wait(): Unit

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

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

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

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped