MCPcopy Create free account
hub / github.com/sql-machine-learning/sqlflow / GetTestingHiveURL

Function GetTestingHiveURL

go/database/testing.go:99–109  ·  view source on GitHub ↗

GetTestingHiveURL reutrns Hive connection URL

()

Source from the content-addressed store, hash-verified

97
98// GetTestingHiveURL reutrns Hive connection URL
99func GetTestingHiveURL() string {
100 // NOTE: sample dataset is written in
101 // https://github.com/sql-machine-learning/gohive/blob/develop/docker/entrypoint.sh#L123
102 namenodeAddr := os.Getenv("SQLFLOW_TEST_HDFS_NAMENODE_ADDR")
103 hiveLocation := os.Getenv("SQLFLOW_HIVE_LOCATION")
104 if hiveLocation == "" {
105 hiveLocation = "/sqlflow"
106 }
107 return fmt.Sprintf("hive://root:root@localhost:10000/iris?"+
108 "hdfs_namenode_addr=%s&hive_location=%s", namenodeAddr, hiveLocation)
109}
110
111func createTestingHiveDB() *DB {
112 db, e := OpenAndConnectDB(GetTestingHiveURL())

Callers 6

TestEnd2EndHiveFunction · 0.92
TestTrainCodegenFunction · 0.92
TestTrainAndPredictFunction · 0.92
createTestingHiveDBFunction · 0.85

Calls

no outgoing calls

Tested by 5

TestEnd2EndHiveFunction · 0.74
TestTrainCodegenFunction · 0.74
TestTrainAndPredictFunction · 0.74