Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoApp = errors.New("metrics: application to register can not be nil") ErrNoAppID = errors.New("metrics: application to register has to have an application id specified") )
View Source
var ErrApiNotAvailable = errors.New("spark api not available")
View Source
var GetManager = func(clientSet kubernetes.Interface, driverPod *corev1.Pod, logger logr.Logger) (Manager, error) { client, err := getSparkApiClient(clientSet, driverPod, logger) if err != nil { return nil, fmt.Errorf("could not get spark api client, %w", err) } return manager{ client: client, logger: logger, }, nil }
Functions ¶
func IsApiNotAvailableError ¶
func IsNotFoundError ¶
Types ¶
type ApplicationInfo ¶
type ApplicationInfo struct { ID string ApplicationName string SparkProperties map[string]string TotalNewInputBytes int64 TotalNewOutputBytes int64 TotalNewExecutorCpuTime int64 Attempts []sparkapiclient.Attempt Executors []sparkapiclient.Executor WorkloadType WorkloadType Metrics sparkapiclient.Metrics }
type ApplicationRegistry ¶
type ApplicationRegistry struct {
// contains filtered or unexported fields
}
ApplicationRegistry contains all registered application collectors indexed by ID
func NewApplicationRegistry ¶
func NewApplicationRegistry(timeProvider func() time.Time) *ApplicationRegistry
func (*ApplicationRegistry) Register ¶
func (ar *ApplicationRegistry) Register(app *ApplicationInfo) (prometheus.Collector, error)
Register creates a prometheus metrics collector for the specified application in the case the application has already been registered the collector is updated with the current application information
type Manager ¶
type Manager interface {
GetApplicationInfo(applicationID string) (*ApplicationInfo, error)
}
type WorkloadType ¶
type WorkloadType string
const ( SparkDriverContainerName = "spark-kubernetes-driver" SparkStreaming WorkloadType = "spark-streaming" )
Directories ¶
Path | Synopsis |
---|---|
mock_client
Package mock_client is a generated GoMock package.
|
Package mock_client is a generated GoMock package. |
transport/mock_transport
Package mock_transport is a generated GoMock package.
|
Package mock_transport is a generated GoMock package. |
Package mock_sparkapi is a generated GoMock package.
|
Package mock_sparkapi is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.