ASF GitHub Bot logged work on BEAM-3355:

                Author: ASF GitHub Bot
            Created on: 06/Apr/18 17:37
            Start Date: 06/Apr/18 17:37
    Worklog Time Spent: 10m 
      Work Description: wcn3 commented on a change in pull request #4311: 
[BEAM-3355] Diagnostic interfaces
URL: https://github.com/apache/beam/pull/4311#discussion_r179826856

 File path: sdks/go/pkg/beam/core/util/hooks/hooks.go
 @@ -0,0 +1,182 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//    http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// Package hooks allows runners to tailor execution of the worker harness.
+// Examples of customization:
+// gRPC integration
+// session recording
+// profile recording
+// Registration methods for hooks must be called prior to calling beam.Init()
+// Request methods for hooks must be called as part of building the pipeline
+// request for the runner's Execute method.
+package hooks
+import (
+       "bytes"
+       "context"
+       "encoding/csv"
+       "encoding/json"
+       "fmt"
+       "os"
+       "strings"
+       "github.com/apache/beam/sdks/go/pkg/beam/core/runtime"
+       "github.com/apache/beam/sdks/go/pkg/beam/log"
+       fnpb "github.com/apache/beam/sdks/go/pkg/beam/model/fnexecution_v1"
+var (
+       hookRegistry = make(map[string]HookFactory)
+       enabledHooks = make(map[string][]string)
+       activeHooks  = make(map[string]Hook)
+// A Hook is a set of hooks to run at various stages of executing a
+// pipelne.
+type Hook struct {
+       // Init is called once at the startup of the worker.
 Review comment:

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

Issue Time Tracking

    Worklog Id:     (was: 88528)
    Time Spent: 8h 20m  (was: 8h 10m)

> Make Go SDK runtime harness hooks pluggable
> -------------------------------------------
>                 Key: BEAM-3355
>                 URL: https://issues.apache.org/jira/browse/BEAM-3355
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-go
>            Reporter: Henning Rohde
>            Assignee: Bill Neubauer
>            Priority: Minor
>          Time Spent: 8h 20m
>  Remaining Estimate: 0h
> We currently hardcode cpu profiling and session recording in the harness. We 
> should make it pluggable instead.

This message was sent by Atlassian JIRA

Reply via email to