Skip to content

Commit b65a6a4

Browse files
committed
fix: Use a general string to represent the transformation service endpoint.
Signed-off-by: Shuchu Han <shuchu.han@gmail.com>
1 parent b228c52 commit b65a6a4

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

go/internal/feast/featurestore.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ package feast
33
import (
44
"context"
55
"errors"
6-
"fmt"
76
"os"
8-
"strings"
97

108
"github.com/apache/arrow/go/v17/arrow/memory"
119
//"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer"
@@ -62,10 +60,12 @@ func NewFeatureStore(config *registry.RepoConfig, callback transformation.Transf
6260
if err != nil {
6361
return nil, err
6462
}
65-
sanitizedProjectName := strings.Replace(config.Project, "_", "-", -1)
66-
productName := os.Getenv("PRODUCT")
67-
endpoint := fmt.Sprintf("%s-transformations.%s.svc.cluster.local:80", sanitizedProjectName, productName)
68-
transformationService, _ := transformation.NewGrpcTransformationService(config, endpoint)
63+
64+
// Use a scalable transformation service like Python Transformation Service as the Python version of transformation service is
65+
// better for data calculation than the Go version
66+
transformationServerEndpoint := os.Getenv("TRANSFORM_SERVER_ENDPOINT")
67+
68+
transformationService, _ := transformation.NewGrpcTransformationService(config, transformationServerEndpoint)
6969

7070
return &FeatureStore{
7171
config: config,

go/internal/feast/registry/registry.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ import (
1515

1616
var REGISTRY_SCHEMA_VERSION string = "1"
1717
var REGISTRY_STORE_CLASS_FOR_SCHEME map[string]string = map[string]string{
18-
"gs": "GCSRegistryStore",
19-
"s3": "S3RegistryStore",
20-
"file": "FileRegistryStore",
21-
"": "FileRegistryStore",
18+
"gs": "GCSRegistryStore",
19+
"s3": "S3RegistryStore",
20+
"file": "FileRegistryStore",
21+
"": "FileRegistryStore",
2222
}
2323

2424
/*

go/internal/feast/server/server_commons.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ func LogWithSpanContext(span tracer.Span) zerolog.Logger {
2828
2929
return logger
3030
}
31-
*/
31+
*/

go/internal/feast/transformation/transformation.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ TransformationCallback is a Python callback function's expected signature.
2222
The function should accept name of the on demand feature view and pointers to input & output record batches.
2323
Each record batch is being passed as two pointers: pointer to array (data) and pointer to schema.
2424
Python function is expected to return number of rows added to the output record batch.
25+
26+
[11-20-2024] Use a Transformation GRPC service, like the Python version one, for better scalability.
2527
*/
2628
type TransformationCallback func(ODFVName string, inputArrPtr, inputSchemaPtr, outArrPtr, outSchemaPtr uintptr, fullFeatureNames bool) int
2729

go/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
"google.golang.org/grpc"
1919
"google.golang.org/grpc/health"
2020
"google.golang.org/grpc/health/grpc_health_v1"
21-
2221
//grpctrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/google.golang.org/grpc"
2322
//"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer"
2423
)

0 commit comments

Comments
 (0)