You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by sj...@apache.org on 2021/08/17 20:12:07 UTC

[flink-statefun] branch master updated: [hotfix] fix typo in log statement

This is an automated email from the ASF dual-hosted git repository.

sjwiesman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-statefun.git


The following commit(s) were added to refs/heads/master by this push:
     new 78889b9  [hotfix] fix typo in log statement
78889b9 is described below

commit 78889b981d6085bb9384b7c2f88693b1334eb9aa
Author: sjwiesman <sj...@gmail.com>
AuthorDate: Tue Aug 17 15:10:37 2021 -0500

    [hotfix] fix typo in log statement
---
 statefun-sdk-go/v3/pkg/statefun/egress.go  |  2 --
 statefun-sdk-go/v3/pkg/statefun/handler.go | 10 +++++-----
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/statefun-sdk-go/v3/pkg/statefun/egress.go b/statefun-sdk-go/v3/pkg/statefun/egress.go
index 20e7644..a266efd 100644
--- a/statefun-sdk-go/v3/pkg/statefun/egress.go
+++ b/statefun-sdk-go/v3/pkg/statefun/egress.go
@@ -58,8 +58,6 @@ type KafkaEgressBuilder struct {
 	ValueType SimpleType
 }
 
-func (k KafkaEgressBuilder) isEnvelope() {}
-
 func (k KafkaEgressBuilder) toEgressMessage() (*protocol.FromFunction_EgressMessage, error) {
 	if k.Target == nil {
 		return nil, errors.New("an egress record requires a Target")
diff --git a/statefun-sdk-go/v3/pkg/statefun/handler.go b/statefun-sdk-go/v3/pkg/statefun/handler.go
index 92e6f91..b86a609 100644
--- a/statefun-sdk-go/v3/pkg/statefun/handler.go
+++ b/statefun-sdk-go/v3/pkg/statefun/handler.go
@@ -70,16 +70,16 @@ type handler struct {
 }
 
 func (h *handler) WithSpec(spec StatefulFunctionSpec) error {
-	log.Printf("registering Stateful Function %v]n", spec.FunctionType)
+	log.Printf("registering Stateful Function %v\n", spec.FunctionType)
 	if _, exists := h.module[spec.FunctionType]; exists {
 		err := fmt.Errorf("failed to register Stateful Function %s, there is already a spec registered under that type", spec.FunctionType)
-		log.Printf(err.Error())
+		log.Println(err.Error())
 		return err
 	}
 
 	if spec.Function == nil {
 		err := fmt.Errorf("failed to register Stateful Function %s, the Function instance cannot be nil", spec.FunctionType)
-		log.Printf(err.Error())
+		log.Println(err.Error())
 		return err
 	}
 
@@ -89,7 +89,7 @@ func (h *handler) WithSpec(spec StatefulFunctionSpec) error {
 		log.Printf("registering state specification %v\n", state)
 		if err := validateValueSpec(state); err != nil {
 			err := fmt.Errorf("failed to register Stateful Function %s: %w", spec.FunctionType, err)
-			log.Printf(err.Error())
+			log.Println(err.Error())
 			return err
 		}
 
@@ -147,7 +147,7 @@ func (h *handler) ServeHTTP(writer http.ResponseWriter, request *http.Request) {
 
 	response, err := h.Invoke(request.Context(), buffer.Bytes())
 	if err != nil {
-		log.Printf(err.Error())
+		log.Println(err.Error())
 		http.Error(writer, err.Error(), http.StatusInternalServerError)
 		return
 	}