mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix wrong column family
This commit is contained in:
parent
32955b04b8
commit
c4a202ec41
|
@ -22,7 +22,6 @@ type HbaseStore struct {
|
|||
table []byte
|
||||
cfKv string
|
||||
cfMetaDir string
|
||||
cfFlatDir string
|
||||
column string
|
||||
}
|
||||
|
||||
|
@ -42,7 +41,6 @@ func (store *HbaseStore) initialize(zkquorum, table string) (err error) {
|
|||
store.table = []byte(table)
|
||||
store.cfKv = "kv"
|
||||
store.cfMetaDir = "meta"
|
||||
store.cfFlatDir = "flat"
|
||||
store.column = "a"
|
||||
|
||||
// check table exists
|
||||
|
@ -59,7 +57,7 @@ func (store *HbaseStore) initialize(zkquorum, table string) (err error) {
|
|||
|
||||
// create table
|
||||
adminClient := gohbase.NewAdminClient(zkquorum)
|
||||
cFamilies := []string{store.cfKv, store.cfMetaDir, store.cfFlatDir}
|
||||
cFamilies := []string{store.cfKv, store.cfMetaDir}
|
||||
cf := make(map[string]map[string]string, len(cFamilies))
|
||||
for _, f := range cFamilies {
|
||||
cf[f] = nil
|
||||
|
|
|
@ -22,7 +22,7 @@ func (store *HbaseStore) KvDelete(ctx context.Context, key []byte) (err error) {
|
|||
}
|
||||
|
||||
func (store *HbaseStore) doPut(ctx context.Context, cf string, key, value []byte) (err error) {
|
||||
values := map[string]map[string][]byte{store.cfKv: map[string][]byte{}}
|
||||
values := map[string]map[string][]byte{cf: map[string][]byte{}}
|
||||
values[cf][COLUMN_NAME] = value
|
||||
putRequest, err := hrpc.NewPut(ctx, store.table, key, values)
|
||||
if err != nil {
|
||||
|
@ -53,7 +53,7 @@ func (store *HbaseStore) doGet(ctx context.Context, cf string, key []byte) (valu
|
|||
}
|
||||
|
||||
func (store *HbaseStore) doDelete(ctx context.Context, cf string, key []byte) (err error) {
|
||||
values := map[string]map[string][]byte{store.cfKv: map[string][]byte{}}
|
||||
values := map[string]map[string][]byte{cf: map[string][]byte{}}
|
||||
values[cf][COLUMN_NAME] = nil
|
||||
deleteRequest, err := hrpc.NewDel(ctx, store.table, key, values)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue