Exemplo n.º 1
0
Arquivo: url.go Projeto: qgweb/new
func newDomain() *Domain {
	d := &Domain{}
	d.hb = common.CommonHbase
	d.fname = "/tmp/" + timestamp.GetTimestamp() + ".txt"
	d.kvf = common.NewKVFile(d.fname)
	d.mg = common.CommonDataMongo
	conf := mongodb.MongodbQueryConf{Db: "data_source", Table: "urltrack_put"}
	d.mgb = mongodb.NewMongodbBufferWriter(d.mg, conf)

	return d
}
Exemplo n.º 2
0
Arquivo: other.go Projeto: qgweb/new
func newUserTrack() *UserTrack {
	d := &UserTrack{}
	d.hb = common.CommonHbase
	d.fname = "/tmp/" + timestamp.GetTimestamp() + ".txt"
	d.kvf = common.NewKVFile(d.fname)
	d.mg = common.CommonDataMongo
	conf := mongodb.MongodbQueryConf{Db: "data_source", Table: "useraction_put"}
	d.mgb = mongodb.NewMongodbBufferWriter(d.mg, conf)
	conf = mongodb.MongodbQueryConf{Db: "data_source", Table: "useraction_put_big"}
	d.mg_big, _ = d.mg.Get()
	d.mgb_big = mongodb.NewMongodbBufferWriter(d.mg_big, conf)
	d.bigCategoryMap = make(map[string]string)
	d.getBigCat()
	return d
}