Skip to content

Commit b416af5

Browse files
Ly Caoachals
authored andcommitted
added goroutines to redis OnlineRead, getFeaturesToUse, getEntityMaps and entity struct
Signed-off-by: Felix Wang <wangfelix98@gmail.com> Signed-off-by: Achal Shah <achals@gmail.com>
1 parent a77a73b commit b416af5

10 files changed

Lines changed: 430 additions & 276 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ test-python-universal:
7979
FEAST_USAGE=False IS_TEST=True python -m pytest -n 8 --integration --universal sdk/python/tests
8080

8181
test-python-universal-go-server:
82-
FEAST_USAGE=False IS_TEST=True python -m pytest -n 8 --integration --universal --noodfv sdk/python/tests
82+
FEAST_USAGE=False IS_TEST=True FEAST_IS_GO_SERVER_TEST=True python -m pytest -n 8 --integration --universal --noodfv sdk/python/tests
8383

8484
format-python:
8585
# Sort

go/feast/connector.go

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ package feast
33
import (
44
"errors"
55
"fmt"
6-
"os"
6+
// "os"
77
"os/exec"
88
"github.com/hashicorp/go-plugin"
9-
"github.com/hashicorp/go-hclog"
9+
// "github.com/hashicorp/go-hclog"
10+
"log"
11+
"io/ioutil"
1012
)
1113

1214
func getOnlineStore(config *RepoConfig) (OnlineStore, error) {
@@ -26,24 +28,24 @@ func getOnlineStore(config *RepoConfig) (OnlineStore, error) {
2628

2729
func connectorClient(KV_PLUGIN string) (OnlineStore, error) {
2830
// We don't want to see the plugin logs.
29-
// log.SetOutput(ioutil.Discard)
31+
log.SetOutput(ioutil.Discard)
3032

3133
// We're a host. Start by launching the plugin process.
3234
cmd := exec.Command("sh", "-c", KV_PLUGIN )
3335

34-
logger := hclog.New(&hclog.LoggerOptions{
35-
Name: "plugin",
36-
Output: os.Stdout,
37-
Level: hclog.Debug,
38-
})
36+
// logger := hclog.New(&hclog.LoggerOptions{
37+
// Name: "plugin",
38+
// Output: os.Stdout,
39+
// Level: hclog.Debug,
40+
// })
3941

4042
client := plugin.NewClient(&plugin.ClientConfig{
4143
HandshakeConfig: Handshake,
4244
Plugins: PluginMap,
4345
Cmd: cmd,
4446
AllowedProtocols: []plugin.Protocol{
4547
plugin.ProtocolGRPC},
46-
Logger: logger,
48+
// Logger: logger,
4749
})
4850

4951
// Connect via RPC

go/feast/entity.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package feast
2+
3+
import (
4+
"github.com/feast-dev/feast/go/protos/feast/types"
5+
"github.com/feast-dev/feast/go/protos/feast/core"
6+
)
7+
8+
type Entity struct {
9+
name string
10+
valueType types.ValueType_Enum
11+
joinKey string
12+
13+
}
14+
15+
func NewEntityFromProto(proto *core.Entity) *Entity {
16+
return &Entity { name: proto.Spec.Name,
17+
valueType: proto.Spec.ValueType,
18+
joinKey: proto.Spec.JoinKey,
19+
}
20+
}

0 commit comments

Comments
 (0)