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.
24 lines
375 B
24 lines
375 B
2 months ago
|
package hbaseHandle
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"github.com/tsuna/gohbase/hrpc"
|
||
|
)
|
||
|
|
||
|
func (c *HBaseClient) Put(table string, rowKey string, values map[string]map[string][]byte) error {
|
||
|
putReq, err := hrpc.NewPutStr(
|
||
|
context.Background(), table, rowKey, values,
|
||
|
)
|
||
|
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
if _, err := c.Client.Put(putReq); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|