object DataGenerator
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- DataGenerator
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Type Members
- type TiRow = Row
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val allDataTypes: List[ReflectedDataType]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val baseDataTypes: List[ReflectedDataType]
- val binaries: List[Val]
- val binaryCharset: List[ReflectedDataType]
- val bits: List[Val]
- val booleans: List[Val]
- val bytes: List[Val]
- val charCharset: List[ReflectedDataType]
- def checkUnique(value: Any, set: Set[String]): Boolean
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val dateAndDateTime: List[ReflectedDataType]
- val dates: List[Val]
- val decimals: List[Val]
- val doubles: List[Val]
- val durations: List[Val]
- val enumAndSets: List[ReflectedDataType]
- val enums: List[Val]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def generateColumnName(dataType: ReflectedDataType, num: Int): String
- def generateColumnName(dataType: ReflectedDataType): String
- def generateIndexName(columns: List[String]): String
- def generateRandomRows(schema: Schema, n: Long, r: Random): List[TiRow]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getDecimal(dataType: TiDataType): Int
- def getLength(dataType: TiDataType): Long
- def hash(value: Any, len: Int = -1): String
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val integers: List[Val]
- def isBinaryCharset(dataType: ReflectedDataType): Boolean
- def isCharCharset(dataType: ReflectedDataType): Boolean
- def isCharOrBinary(dataType: ReflectedDataType): Boolean
- def isDecimals(dataType: ReflectedDataType): Boolean
- def isDoubles(dataType: ReflectedDataType): Boolean
- def isEnumOrSet(dataType: ReflectedDataType): Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isNumeric(dataType: ReflectedDataType): Boolean
- def isStringType(dataType: ReflectedDataType): Boolean
- def isVarString(dataType: ReflectedDataType): Boolean
- val jsons: List[Val]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val numeric: List[ReflectedDataType]
- def randomDataGenerator(schema: Schema, rowCount: Long, directory: String, r: Random): SchemaAndData
-
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
- val sets: List[Val]
- val stringAndBinaries: List[ReflectedDataType]
- val stringType: List[ReflectedDataType]
- val strings: List[Val]
- val supportedDataTypes: List[ReflectedDataType]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val texts: List[Val]
- val timestamps: List[Val]
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- val tpchDataTypes: List[ReflectedDataType]
- val unsignedType: List[ReflectedDataType]
- val varString: List[ReflectedDataType]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val withD: List[ReflectedDataType]
- val withF: List[ReflectedDataType]
- val withM: List[ReflectedDataType]
- val withU: List[ReflectedDataType]
- val years: List[Val]