Packages

object DataGenerator

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

Type Members

  1. type TiRow = Row

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 allDataTypes: List[ReflectedDataType]
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. val baseDataTypes: List[ReflectedDataType]
  7. val binaries: List[Val]
  8. val binaryCharset: List[ReflectedDataType]
  9. val bits: List[Val]
  10. val booleans: List[Val]
  11. val bytes: List[Val]
  12. val charCharset: List[ReflectedDataType]
  13. def checkUnique(value: Any, set: Set[String]): Boolean
  14. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  15. val dateAndDateTime: List[ReflectedDataType]
  16. val dates: List[Val]
  17. val decimals: List[Val]
  18. val doubles: List[Val]
  19. val durations: List[Val]
  20. val enumAndSets: List[ReflectedDataType]
  21. val enums: List[Val]
  22. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  24. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. def generateColumnName(dataType: ReflectedDataType, num: Int): String
  26. def generateColumnName(dataType: ReflectedDataType): String
  27. def generateIndexName(columns: List[String]): String
  28. def generateRandomRows(schema: Schema, n: Long, r: Random): List[TiRow]
  29. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  30. def getDecimal(dataType: TiDataType): Int
  31. def getLength(dataType: TiDataType): Long
  32. def hash(value: Any, len: Int = -1): String
  33. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  34. val integers: List[Val]
  35. def isBinaryCharset(dataType: ReflectedDataType): Boolean
  36. def isCharCharset(dataType: ReflectedDataType): Boolean
  37. def isCharOrBinary(dataType: ReflectedDataType): Boolean
  38. def isDecimals(dataType: ReflectedDataType): Boolean
  39. def isDoubles(dataType: ReflectedDataType): Boolean
  40. def isEnumOrSet(dataType: ReflectedDataType): Boolean
  41. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  42. def isNumeric(dataType: ReflectedDataType): Boolean
  43. def isStringType(dataType: ReflectedDataType): Boolean
  44. def isVarString(dataType: ReflectedDataType): Boolean
  45. val jsons: List[Val]
  46. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  47. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  48. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  49. val numeric: List[ReflectedDataType]
  50. def randomDataGenerator(schema: Schema, rowCount: Long, directory: String, r: Random): SchemaAndData
  51. def schemaGenerator(database: String, table: String, r: Random, dataTypesWithDesc: List[(ReflectedDataType, String, String)], indices: List[Index]): Schema

    SchemaGenerator generates a schema from input info.

    SchemaGenerator generates a schema from input info.

    code example for schema

    CREATE TABLE `tispark_test`.`test_table` (
      `col_int0` int not null,
      `col_int1` int default null,
      `col_double` double not null default 0.2,
      `col_varchar` varchar(50) default null,
      `col_decimal` decimal(20,3) default null,
      PRIMARY KEY (`col_int0`),
      KEY `idx_col_int1_col_double`(`col_int1`,`col_double`),
      KEY `idx_col_varchar`(`col_varchar`(20)),
      KEY `idx_col_double_col_decimal`(`col_double`,`col_decimal`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin

    will be

    schemaGenerator(
      "tispark_test",
      "test_table",
      List(
        (INT, "", "not null"),
        (INT, "", "default null"),
        (DOUBLE, "", "not null default 0.2"),
        (VARCHAR, "50", "default null"),
        (DECIMAL, "20,3", "default null")
      ),
      List(
        PrimaryKey(List(DefaultColumn(1)))
        Key(List(DefaultColumn(2), DefaultColumn(3))),
        Key(List(PrefixColumn(4, 20))),
        Key(List(DefaultColumn(3), DefaultColumn(5)))
      ))
    database

    database name

    table

    table name

    r

    random

    dataTypesWithDesc

    (typeName, lengthDescriptions, extraDescriptions)

    indices

    index info, list of column ids chosen (start from 1)

    returns

    Generated Schema

  52. val sets: List[Val]
  53. val stringAndBinaries: List[ReflectedDataType]
  54. val stringType: List[ReflectedDataType]
  55. val strings: List[Val]
  56. val supportedDataTypes: List[ReflectedDataType]
  57. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  58. val texts: List[Val]
  59. val timestamps: List[Val]
  60. def toString(): String
    Definition Classes
    AnyRef → Any
  61. val tpchDataTypes: List[ReflectedDataType]
  62. val unsignedType: List[ReflectedDataType]
  63. val varString: List[ReflectedDataType]
  64. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  65. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  66. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  67. val withD: List[ReflectedDataType]
  68. val withF: List[ReflectedDataType]
  69. val withM: List[ReflectedDataType]
  70. val withU: List[ReflectedDataType]
  71. val years: List[Val]

Inherited from AnyRef

Inherited from Any

Ungrouped