示例#1
0
// Helper function. Given a client, key, columnFamily, value inserts into the table under column 'a'
func insertKeyValue(c *gohbase.Client, key, columnFamily string, value []byte) error {
	values := map[string]map[string][]byte{columnFamily: map[string][]byte{}}
	values[columnFamily]["a"] = value
	putRequest, err := hrpc.NewPutStr(context.Background(), table, key, values)
	_, err = c.SendRPC(putRequest)
	return err
}