GetTestingHiveURL reutrns Hive connection URL
()
| 97 | |
| 98 | // GetTestingHiveURL reutrns Hive connection URL |
| 99 | func 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 | |
| 111 | func createTestingHiveDB() *DB { |
| 112 | db, e := OpenAndConnectDB(GetTestingHiveURL()) |
no outgoing calls