You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
530 B
28 lines
530 B
package hbaseHandle
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/TremblingV5/DouTok/config/configStruct"
|
|
"github.com/TremblingV5/DouTok/pkg/configurator"
|
|
"github.com/sirupsen/logrus"
|
|
)
|
|
|
|
func TestPut(t *testing.T) {
|
|
logrus.SetLevel(logrus.DebugLevel)
|
|
var config configStruct.HBaseConfig
|
|
configurator.InitConfig(
|
|
&config, "hbase.yaml",
|
|
)
|
|
|
|
client := InitHB(config.Host)
|
|
|
|
values := map[string]map[string][]byte{
|
|
"d": {
|
|
"title": []byte("test video"),
|
|
"time": []byte("1998"),
|
|
},
|
|
}
|
|
|
|
client.Put("test", "00030005", values)
|
|
}
|
|
|