Esempio n. 1
0
File: url.go Progetto: 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
}
Esempio n. 2
0
File: other.go Progetto: 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
}