data

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HbaseUpArchiveInfoPrefix archive info表
	HbaseUpArchiveInfoPrefix = "upcrm:up_influence"
	// HbaseUpArchiveTagInfoPrefix tag表
	HbaseUpArchiveTagInfoPrefix = "upcrm:up_archive_tag_info"
	// HbaseUpArchiveTypeInfoPrefix 分区表
	HbaseUpArchiveTypeInfoPrefix = "upcrm:up_archive_type_info"
)

这里是集群2的数据请求

Variables

View Source
var (
	//HBaseVideoTablePrefix 播放流失分布
	HBaseVideoTablePrefix = "video_play_churn_"
	//HBaseArchiveTablePrefix 分类分端播放
	HBaseArchiveTablePrefix = "video_play_category_"
	//HBaseAreaTablePrefix 地区播放
	HBaseAreaTablePrefix = "video_play_area_"
	//HBaseUpStatTablePrefix up主概况
	HBaseUpStatTablePrefix = "up_stats_"
	//HBaseUpViewerBase 观众数据,性别年龄分布 + 设备分布
	HBaseUpViewerBase = "up_viewer_base_"
	//HBaseUpViewerArea 地区分布
	HBaseUpViewerArea = "up_viewer_area_"
	//HBaseUpViewerTrend 内容倾向
	HBaseUpViewerTrend = "up_viewer_trend_"
	//HBaseUpViewerActionHour 行为时间分布
	HBaseUpViewerActionHour = "up_viewer_action_hour_"
	//HBaseUpRelationFansDay 日维度 最近30天 只保留31天
	HBaseUpRelationFansDay = "up_relation_fans_day"
	// HBaseUpRelationFansHistory 日维度 各月份每日数据,日更,永久保存
	HBaseUpRelationFansHistory = "up_relation_fans_history"
	//HBaseUpRelationFansMonth 年维度 2017.8月以后的数据永久保存
	HBaseUpRelationFansMonth = "up_relation_fans_month"
	//HBaseUpPlayInc 我的概况 播放相关
	HBaseUpPlayInc = "up_play_inc_"
	//HBaseUpDmInc 弹幕相关
	HBaseUpDmInc = "up_dm_inc_"
	//HBaseUpReplyInc 评论相关
	HBaseUpReplyInc = "up_reply_inc_"
	//HBaseUpShareInc 分享相关
	HBaseUpShareInc = "up_share_inc_"
	//HBaseUpCoinInc 投币相关
	HBaseUpCoinInc = "up_coin_inc_"
	//HBaseUpFavInc 收藏相关
	HBaseUpFavInc = "up_fav_inc_"
	//HBaseUpElecInc 充电相关
	HBaseUpElecInc = "up_elec_inc_"
	//HBaseUpFansAnalysis  粉丝管理
	HBaseUpFansAnalysis = "up_fans_analysis"
	//HBaseUpPlaySourceAnalysis  播放来源
	HBaseUpPlaySourceAnalysis = "up_play_analysis"
	//HBaseUpArcPlayAnalysis  平均观看时长、播放用户数、留存率
	HBaseUpArcPlayAnalysis = "up_archive_play_analysis"
	//HBaseUpArcQuery  稿件索引表
	HBaseUpArcQuery = "up_archive_query"

	//HBasePlayArc 播放相关 archive for 30 days
	HBasePlayArc = "up_play_trend"
	//HBaseDmArc 弹幕相关
	HBaseDmArc = "up_dm_trend"
	//HBaseReplyArc 评论相关
	HBaseReplyArc = "up_reply_trend"
	//HBaseShareArc 分享相关
	HBaseShareArc = "up_share_trend"
	//HBaseCoinArc 投币相关
	HBaseCoinArc = "up_coin_trend"
	//HBaseFavArc 收藏相关
	HBaseFavArc = "up_fav_trend"
	//HBaseElecArc 充电相关
	HBaseElecArc = "up_elec_trend"
	//HBaseLikeArc 点赞相关
	HBaseLikeArc = "up_like_trend"

	//HBaseFamilyPlat  family
	HBaseFamilyPlat = []byte("v")
	//HBaseColumnAid aid
	HBaseColumnAid = []byte("avid")
	//HBaseColumnWebPC pc
	HBaseColumnWebPC = []byte("plat0")
	//HBaseColumnWebH5 h5
	HBaseColumnWebH5 = []byte("plat1")
	//HBaseColumnOutsite out
	HBaseColumnOutsite = []byte("plat2")
	//HBaseColumnIOS ios
	HBaseColumnIOS = []byte("plat3")
	//HBaseColumnAndroid android
	HBaseColumnAndroid = []byte("plat4")
	//HBaseColumnElse else
	HBaseColumnElse = []byte("else")
	//HBaseColumnFans fans
	HBaseColumnFans = []byte("fans")
	//HBaseColumnGuest guest
	HBaseColumnGuest = []byte("guest")
	//HBaseColumnAll all
	HBaseColumnAll = []byte("all")
	//HBaseColumnCoin coin
	HBaseColumnCoin = []byte("coin")
	//HBaseColumnElec elec
	HBaseColumnElec = []byte("elec")
	//HBaseColumnFav fav
	HBaseColumnFav = []byte("fav")
	//HBaseColumnShare share
	HBaseColumnShare = []byte("share")
)
View Source
var (
	//ErrInvalidDataType invalid data type
	ErrInvalidDataType = fmt.Errorf("invalid data type")
)

Functions

This section is empty.

Types

type Dao

type Dao struct {
	// contains filtered or unexported fields
}

Dao is data dao.

func New

func New(c *conf.Config) (d *Dao)

New init dao

func (*Dao) ArchiveArea

func (d *Dao) ArchiveArea(c context.Context, aid int64) (res []*data.ArchiveArea, err error)

ArchiveArea get the count of area.

func (*Dao) ArchiveStat

func (d *Dao) ArchiveStat(c context.Context, aid int64) (stat *data.ArchiveData, err error)

ArchiveStat get the stat of archive.

func (*Dao) BaseUpStat

func (d *Dao) BaseUpStat(c context.Context, mid int64, date string) (stat *data.UpBaseStat, err error)

BaseUpStat get base up stat.

func (*Dao) Close

func (d *Dao) Close() (err error)

Close mc close

func (*Dao) Ping

func (d *Dao) Ping(c context.Context) (err error)

Ping ping success.

func (*Dao) RecommendCovers

func (d *Dao) RecommendCovers(c context.Context, mid int64, fns []string) (cvs []string, err error)

RecommendCovers get recommend covers from AI.

func (*Dao) RelationFansDay

func (d *Dao) RelationFansDay(c context.Context, mid int64) (res datamodel.RelationFanHistoryData, err error)

RelationFansDay up relation 30 days analysis.

func (*Dao) RelationFansHistory

func (d *Dao) RelationFansHistory(c context.Context, mid int64, month string) (res datamodel.RelationFanHistoryData, err error)

RelationFansHistory up relation history.

func (*Dao) RelationFansMonth

func (d *Dao) RelationFansMonth(c context.Context, mid int64) (res datamodel.RelationFanHistoryData, err error)

RelationFansMonth up relation 400 days analysis.

func (*Dao) Tags

func (d *Dao) Tags(c context.Context, mid int64, tid uint16, title, filename, desc, cover string) (t *data.Tags, err error)

Tags get predict tag.

func (*Dao) TagsWithChecked

func (d *Dao) TagsWithChecked(c context.Context, mid int64, tid uint16, title, filename, desc, cover string, tagFrom int8) (t []*data.CheckedTag, err error)

TagsWithChecked get predict tag with checked mark.

func (*Dao) ThirtyDayArchive

func (d *Dao) ThirtyDayArchive(c context.Context, mid int64, ty int8) (res []*data.ThirtyDay, err error)

ThirtyDayArchive for Play/Dm/Reply/Fav/Share/Elec/Coin for archive 30 days.

func (*Dao) UpArcQuery

func (d *Dao) UpArcQuery(c context.Context, mid int64, dt string, cp int) (res []int64, err error)

UpArcQuery for play aids by mid.

func (*Dao) UpArchiveInfo

func (d *Dao) UpArchiveInfo(c context.Context, mids []int64, dataType UpArchiveDataType) (result map[int64]*datamodel.UpArchiveData, err error)

UpArchiveInfo get up archive info

func (*Dao) UpArchiveTagInfo

func (d *Dao) UpArchiveTagInfo(c context.Context, mid int64) (result datamodel.UpArchiveTagData, err error)

UpArchiveTagInfo get up archive tag info

func (*Dao) UpArchiveTypeInfo

func (d *Dao) UpArchiveTypeInfo(c context.Context, mid int64) (result datamodel.UpArchiveTypeData, err error)

UpArchiveTypeInfo get up archive type info

func (*Dao) UpFansAnalysis

func (d *Dao) UpFansAnalysis(c context.Context, mid int64, ty int) (res *datamodel.FanInfo, err error)

UpFansAnalysis for web fans analysis.

func (*Dao) UpIncr

func (d *Dao) UpIncr(c context.Context, mid int64, ty int8, now string) (res *data.UpDataIncrMeta, err error)

UpIncr for Play/Dm/Reply/Fav/Share/Elec/Coin incr.

func (*Dao) VideoQuitPoints

func (d *Dao) VideoQuitPoints(c context.Context, cid int64) (res []int64, err error)

VideoQuitPoints get video quit points.

func (*Dao) ViewerActionHour

func (d *Dao) ViewerActionHour(c context.Context, mid int64, dt string) (res map[string]*data.ViewerActionHour, err error)

ViewerActionHour visitor action hour analysis.

func (*Dao) ViewerArea

func (d *Dao) ViewerArea(c context.Context, mid int64, dt time.Time) (res *datamodel.ViewerAreaInfo, err error)

ViewerArea visitor area data analysis.

func (*Dao) ViewerBase

func (d *Dao) ViewerBase(c context.Context, mid int64, dt time.Time) (res *datamodel.ViewerBaseInfo, err error)

ViewerBase visitor data analysis.

func (*Dao) ViewerTrend

func (d *Dao) ViewerTrend(c context.Context, mid int64, dt time.Time) (res map[string]*data.Trend, err error)

ViewerTrend visitor trend data analysis.

type UpArchiveDataType

type UpArchiveDataType int

UpArchiveDataType data type

const (
	//DataTypeDay7 7 day
	DataTypeDay7 UpArchiveDataType = 1
	//DataTypeDay30 30 day
	DataTypeDay30 UpArchiveDataType = 2
	//DataTypeDay90 90 day
	DataTypeDay90 UpArchiveDataType = 3
	//DataTypeDay180 180 day
	DataTypeDay180 UpArchiveDataType = 4
	//DataTypeDayAll accumulated
	DataTypeDayAll UpArchiveDataType = 5
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL