From c4a202ec417554f170a21d7331b44f860ea72274 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 23 Dec 2020 23:23:05 -0800 Subject: [PATCH] fix wrong column family --- weed/filer/hbase/hbase_store.go | 4 +--- weed/filer/hbase/hbase_store_kv.go | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/weed/filer/hbase/hbase_store.go b/weed/filer/hbase/hbase_store.go index fea6004be..8a9ea7fc1 100644 --- a/weed/filer/hbase/hbase_store.go +++ b/weed/filer/hbase/hbase_store.go @@ -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 diff --git a/weed/filer/hbase/hbase_store_kv.go b/weed/filer/hbase/hbase_store_kv.go index b98eb3ed6..8f5794ac1 100644 --- a/weed/filer/hbase/hbase_store_kv.go +++ b/weed/filer/hbase/hbase_store_kv.go @@ -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 {