This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `ontime` ( | |
`Year` year(4) NOT NULL DEFAULT '0', | |
`Quarter` tinyint(4) NOT NULL DEFAULT '0', | |
`Month` tinyint(4) NOT NULL DEFAULT '0', | |
`DayofMonth` tinyint(4) NOT NULL DEFAULT '0', | |
`DayOfWeek` tinyint(4) NOT NULL DEFAULT '0', | |
`FlightDate` date DEFAULT NULL, | |
`UniqueCarrier` char(7) NOT NULL DEFAULT '', | |
`AirlineID` int(11) NOT NULL DEFAULT '0', | |
`Carrier` char(2) NOT NULL DEFAULT '', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.spark.sql.TiContext | |
// 这里写PD的IP 和 README中一样 | |
val ti = new TiContext(spark, List("127.0.0.1:" + 2379)) | |
ti.tidbMapDatabase("TPCH") // 你要用的TiDB数据库 | |
// 对TiSpark使用的查询语句 | |
val tablToDump = spark.sql("select count(*) from part") | |
val jdbcUsername = "root" | |
val jdbcHostname = "localhost" | |
val jdbcPort = 4000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gnu.trove.list.array.TIntArrayList; | |
import java.util.ArrayList; | |
public class Main { | |
public static void main(String[] args) throws Exception { | |
int n = 100000000; | |
for (int z = 0; z < 5; z++) { | |
TIntArrayList list = new TIntArrayList(); | |
list.add(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
"unsafe" | |
"math" | |
"math/rand" | |
) |