Module pachyderm_sdk.api.debug
Expand source code
# Generated by the protocol buffer compiler. DO NOT EDIT!
# sources: api/debug/debug.proto
# plugin: python-betterproto
# This file has been @generated
from dataclasses import dataclass
from datetime import timedelta
from typing import (
TYPE_CHECKING,
AsyncIterator,
Dict,
Iterator,
List,
Optional,
)
import betterproto
import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf
import grpc
from .. import (
pfs as _pfs__,
pps as _pps__,
)
if TYPE_CHECKING:
import grpc
class SetLogLevelRequestLogLevel(betterproto.Enum):
UNKNOWN = 0
DEBUG = 1
INFO = 2
ERROR = 3
OFF = 4
@dataclass(eq=False, repr=False)
class ProfileRequest(betterproto.Message):
profile: "Profile" = betterproto.message_field(1)
filter: "Filter" = betterproto.message_field(2)
@dataclass(eq=False, repr=False)
class Profile(betterproto.Message):
name: str = betterproto.string_field(1)
duration: timedelta = betterproto.message_field(2)
@dataclass(eq=False, repr=False)
class Filter(betterproto.Message):
pachd: bool = betterproto.bool_field(1, group="filter")
pipeline: "_pps__.Pipeline" = betterproto.message_field(2, group="filter")
worker: "Worker" = betterproto.message_field(3, group="filter")
database: bool = betterproto.bool_field(4, group="filter")
@dataclass(eq=False, repr=False)
class Worker(betterproto.Message):
pod: str = betterproto.string_field(1)
redirected: bool = betterproto.bool_field(2)
@dataclass(eq=False, repr=False)
class BinaryRequest(betterproto.Message):
filter: "Filter" = betterproto.message_field(1)
@dataclass(eq=False, repr=False)
class DumpRequest(betterproto.Message):
filter: "Filter" = betterproto.message_field(1)
limit: int = betterproto.int64_field(2)
"""
Limit sets the limit for the number of commits / jobs that are returned for
each repo / pipeline in the dump.
"""
@dataclass(eq=False, repr=False)
class SetLogLevelRequest(betterproto.Message):
pachyderm: "SetLogLevelRequestLogLevel" = betterproto.enum_field(1, group="level")
grpc: "SetLogLevelRequestLogLevel" = betterproto.enum_field(2, group="level")
duration: timedelta = betterproto.message_field(3)
recurse: bool = betterproto.bool_field(4)
@dataclass(eq=False, repr=False)
class SetLogLevelResponse(betterproto.Message):
affected_pods: List[str] = betterproto.string_field(1)
errored_pods: List[str] = betterproto.string_field(2)
@dataclass(eq=False, repr=False)
class GetDumpV2TemplateRequest(betterproto.Message):
filters: List[str] = betterproto.string_field(1)
@dataclass(eq=False, repr=False)
class GetDumpV2TemplateResponse(betterproto.Message):
request: "DumpV2Request" = betterproto.message_field(1)
@dataclass(eq=False, repr=False)
class Pipeline(betterproto.Message):
project: str = betterproto.string_field(1)
name: str = betterproto.string_field(2)
@dataclass(eq=False, repr=False)
class Pod(betterproto.Message):
name: str = betterproto.string_field(1)
ip: str = betterproto.string_field(2)
containers: List[str] = betterproto.string_field(3)
@dataclass(eq=False, repr=False)
class App(betterproto.Message):
name: str = betterproto.string_field(1)
pods: List["Pod"] = betterproto.message_field(2)
timeout: timedelta = betterproto.message_field(3)
pipeline: "Pipeline" = betterproto.message_field(4)
loki_args: "LokiArgs" = betterproto.message_field(5, group="extra_args")
profile_args: "ProfileArgs" = betterproto.message_field(6, group="extra_args")
@dataclass(eq=False, repr=False)
class ProfileArgs(betterproto.Message):
profiles: List["Profile"] = betterproto.message_field(1)
@dataclass(eq=False, repr=False)
class LokiArgs(betterproto.Message):
max_logs: int = betterproto.uint64_field(1)
@dataclass(eq=False, repr=False)
class System(betterproto.Message):
helm: bool = betterproto.bool_field(1)
database: bool = betterproto.bool_field(2)
version: bool = betterproto.bool_field(3)
describes: List["App"] = betterproto.message_field(4)
logs: List["App"] = betterproto.message_field(5)
loki_logs: List["App"] = betterproto.message_field(6)
binaries: List["App"] = betterproto.message_field(7)
profiles: List["App"] = betterproto.message_field(8)
@dataclass(eq=False, repr=False)
class StarlarkLiteral(betterproto.Message):
"""StarlarkLiteral is a custom Starlark script."""
name: str = betterproto.string_field(1)
"""
The name of the script; used for debug messages and to control where the
output goes.
"""
program_text: str = betterproto.string_field(2)
"""The text of the "debugdump" personality Starlark program."""
@dataclass(eq=False, repr=False)
class Starlark(betterproto.Message):
"""Starlark controls the running of a Starlark script."""
builtin: str = betterproto.string_field(1, group="source")
"""One built into the pachd binary."""
literal: "StarlarkLiteral" = betterproto.message_field(2, group="source")
"""Or a script supplied in this request."""
timeout: timedelta = betterproto.message_field(3)
"""
How long to allow the script to run for. If unset, defaults to 1 minute.
"""
@dataclass(eq=False, repr=False)
class DumpV2Request(betterproto.Message):
system: "System" = betterproto.message_field(1)
"""Which system-level information to include in the debug dump."""
pipelines: List["Pipeline"] = betterproto.message_field(2)
"""
Which pipelines to fetch information about and include in the debug dump.
"""
input_repos: bool = betterproto.bool_field(3)
"""If true, fetch information about non-output repos."""
timeout: timedelta = betterproto.message_field(4)
"""How long to run the dump for."""
defaults: "DumpV2RequestDefaults" = betterproto.message_field(5)
"""Which defaults to include in the debug dump."""
starlark_scripts: List["Starlark"] = betterproto.message_field(6)
"""A list of Starlark scripts to run."""
@dataclass(eq=False, repr=False)
class DumpV2RequestDefaults(betterproto.Message):
cluster_defaults: bool = betterproto.bool_field(1)
"""If true, include the cluster defaults."""
@dataclass(eq=False, repr=False)
class DumpContent(betterproto.Message):
content: bytes = betterproto.bytes_field(1)
@dataclass(eq=False, repr=False)
class DumpProgress(betterproto.Message):
task: str = betterproto.string_field(1)
total: int = betterproto.int64_field(2)
progress: int = betterproto.int64_field(3)
@dataclass(eq=False, repr=False)
class DumpChunk(betterproto.Message):
content: "DumpContent" = betterproto.message_field(1, group="chunk")
progress: "DumpProgress" = betterproto.message_field(2, group="chunk")
@dataclass(eq=False, repr=False)
class RunPfsLoadTestRequest(betterproto.Message):
spec: str = betterproto.string_field(1)
branch: "_pfs__.Branch" = betterproto.message_field(2)
seed: int = betterproto.int64_field(3)
state_id: str = betterproto.string_field(4)
@dataclass(eq=False, repr=False)
class RunPfsLoadTestResponse(betterproto.Message):
spec: str = betterproto.string_field(1)
branch: "_pfs__.Branch" = betterproto.message_field(2)
seed: int = betterproto.int64_field(3)
error: str = betterproto.string_field(4)
duration: timedelta = betterproto.message_field(5)
state_id: str = betterproto.string_field(6)
@dataclass(eq=False, repr=False)
class TraceRequest(betterproto.Message):
duration: timedelta = betterproto.message_field(1)
@dataclass(eq=False, repr=False)
class TraceChunk(betterproto.Message):
content: Optional[bytes] = betterproto.message_field(
1, wraps=betterproto.TYPE_BYTES, group="reply"
)
class DebugStub:
def __init__(self, channel: "grpc.Channel"):
self.__rpc_profile = channel.unary_stream(
"/debug_v2.Debug/Profile",
request_serializer=ProfileRequest.SerializeToString,
response_deserializer=betterproto_lib_google_protobuf.BytesValue.FromString,
)
self.__rpc_binary = channel.unary_stream(
"/debug_v2.Debug/Binary",
request_serializer=BinaryRequest.SerializeToString,
response_deserializer=betterproto_lib_google_protobuf.BytesValue.FromString,
)
self.__rpc_dump = channel.unary_stream(
"/debug_v2.Debug/Dump",
request_serializer=DumpRequest.SerializeToString,
response_deserializer=betterproto_lib_google_protobuf.BytesValue.FromString,
)
self.__rpc_set_log_level = channel.unary_unary(
"/debug_v2.Debug/SetLogLevel",
request_serializer=SetLogLevelRequest.SerializeToString,
response_deserializer=SetLogLevelResponse.FromString,
)
self.__rpc_get_dump_v2_template = channel.unary_unary(
"/debug_v2.Debug/GetDumpV2Template",
request_serializer=GetDumpV2TemplateRequest.SerializeToString,
response_deserializer=GetDumpV2TemplateResponse.FromString,
)
self.__rpc_dump_v2 = channel.unary_stream(
"/debug_v2.Debug/DumpV2",
request_serializer=DumpV2Request.SerializeToString,
response_deserializer=DumpChunk.FromString,
)
self.__rpc_trace = channel.unary_stream(
"/debug_v2.Debug/Trace",
request_serializer=TraceRequest.SerializeToString,
response_deserializer=TraceChunk.FromString,
)
self.__rpc_run_pfs_load_test = channel.unary_unary(
"/debug_v2.Debug/RunPFSLoadTest",
request_serializer=RunPfsLoadTestRequest.SerializeToString,
response_deserializer=RunPfsLoadTestResponse.FromString,
)
self.__rpc_run_pfs_load_test_default = channel.unary_unary(
"/debug_v2.Debug/RunPFSLoadTestDefault",
request_serializer=betterproto_lib_google_protobuf.Empty.SerializeToString,
response_deserializer=RunPfsLoadTestResponse.FromString,
)
def profile(
self, *, profile: "Profile" = None, filter: "Filter" = None
) -> Iterator["betterproto_lib_google_protobuf.BytesValue"]:
request = ProfileRequest()
if profile is not None:
request.profile = profile
if filter is not None:
request.filter = filter
for response in self.__rpc_profile(request):
yield response
def binary(
self, *, filter: "Filter" = None
) -> Iterator["betterproto_lib_google_protobuf.BytesValue"]:
request = BinaryRequest()
if filter is not None:
request.filter = filter
for response in self.__rpc_binary(request):
yield response
def dump(
self, *, filter: "Filter" = None, limit: int = 0
) -> Iterator["betterproto_lib_google_protobuf.BytesValue"]:
request = DumpRequest()
if filter is not None:
request.filter = filter
request.limit = limit
for response in self.__rpc_dump(request):
yield response
def set_log_level(
self,
*,
pachyderm: "SetLogLevelRequestLogLevel" = None,
grpc: "SetLogLevelRequestLogLevel" = None,
duration: timedelta = None,
recurse: bool = False
) -> "SetLogLevelResponse":
request = SetLogLevelRequest()
request.pachyderm = pachyderm
request.grpc = grpc
if duration is not None:
request.duration = duration
request.recurse = recurse
return self.__rpc_set_log_level(request)
def get_dump_v2_template(
self, *, filters: Optional[List[str]] = None
) -> "GetDumpV2TemplateResponse":
filters = filters or []
request = GetDumpV2TemplateRequest()
request.filters = filters
return self.__rpc_get_dump_v2_template(request)
def dump_v2(
self,
*,
system: "System" = None,
pipelines: Optional[List["Pipeline"]] = None,
input_repos: bool = False,
timeout: timedelta = None,
defaults: "DumpV2RequestDefaults" = None,
starlark_scripts: Optional[List["Starlark"]] = None
) -> Iterator["DumpChunk"]:
pipelines = pipelines or []
starlark_scripts = starlark_scripts or []
request = DumpV2Request()
if system is not None:
request.system = system
if pipelines is not None:
request.pipelines = pipelines
request.input_repos = input_repos
if timeout is not None:
request.timeout = timeout
if defaults is not None:
request.defaults = defaults
if starlark_scripts is not None:
request.starlark_scripts = starlark_scripts
for response in self.__rpc_dump_v2(request):
yield response
def trace(self, *, duration: timedelta = None) -> Iterator["TraceChunk"]:
request = TraceRequest()
if duration is not None:
request.duration = duration
for response in self.__rpc_trace(request):
yield response
def run_pfs_load_test(
self,
*,
spec: str = "",
branch: "_pfs__.Branch" = None,
seed: int = 0,
state_id: str = ""
) -> "RunPfsLoadTestResponse":
request = RunPfsLoadTestRequest()
request.spec = spec
if branch is not None:
request.branch = branch
request.seed = seed
request.state_id = state_id
return self.__rpc_run_pfs_load_test(request)
def run_pfs_load_test_default(self) -> "RunPfsLoadTestResponse":
request = betterproto_lib_google_protobuf.Empty()
return self.__rpc_run_pfs_load_test_default(request)
Sub-modules
pachyderm_sdk.api.debug.extension
-
Handwritten classes/methods that augment the existing Debug API.
Classes
class SetLogLevelRequestLogLevel (*args, **kwds)
-
The base class for protobuf enumerations, all generated enumerations will inherit from this. Bases :class:
enum.IntEnum
.Expand source code
class SetLogLevelRequestLogLevel(betterproto.Enum): UNKNOWN = 0 DEBUG = 1 INFO = 2 ERROR = 3 OFF = 4
Ancestors
- betterproto.Enum
- enum.IntEnum
- builtins.int
- enum.ReprEnum
- enum.Enum
Class variables
var UNKNOWN
var DEBUG
var INFO
var ERROR
var OFF
class ProfileRequest (profile: Profile = None, filter: Filter = None)
-
ProfileRequest(profile: 'Profile' = None, filter: 'Filter' = None)
Expand source code
@dataclass(eq=False, repr=False) class ProfileRequest(betterproto.Message): profile: "Profile" = betterproto.message_field(1) filter: "Filter" = betterproto.message_field(2)
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var profile : Profile
var filter : Filter
class Profile (name: str = None, duration: datetime.timedelta = None)
-
Profile(name: str = None, duration: datetime.timedelta = None)
Expand source code
@dataclass(eq=False, repr=False) class Profile(betterproto.Message): name: str = betterproto.string_field(1) duration: timedelta = betterproto.message_field(2)
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var name : str
var duration : datetime.timedelta
class Filter (pachd: bool = None, pipeline: _pps__.Pipeline = None, worker: Worker = None, database: bool = None)
-
Filter(pachd: bool = None, pipeline: '_pps__.Pipeline' = None, worker: 'Worker' = None, database: bool = None)
Expand source code
@dataclass(eq=False, repr=False) class Filter(betterproto.Message): pachd: bool = betterproto.bool_field(1, group="filter") pipeline: "_pps__.Pipeline" = betterproto.message_field(2, group="filter") worker: "Worker" = betterproto.message_field(3, group="filter") database: bool = betterproto.bool_field(4, group="filter")
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var pachd : bool
var pipeline : Pipeline
var worker : Worker
var database : bool
class Worker (pod: str = None, redirected: bool = None)
-
Worker(pod: str = None, redirected: bool = None)
Expand source code
@dataclass(eq=False, repr=False) class Worker(betterproto.Message): pod: str = betterproto.string_field(1) redirected: bool = betterproto.bool_field(2)
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var pod : str
var redirected : bool
class BinaryRequest (filter: Filter = None)
-
BinaryRequest(filter: 'Filter' = None)
Expand source code
@dataclass(eq=False, repr=False) class BinaryRequest(betterproto.Message): filter: "Filter" = betterproto.message_field(1)
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var filter : Filter
class DumpRequest (filter: Filter = None, limit: int = None)
-
DumpRequest(filter: 'Filter' = None, limit: int = None)
Expand source code
@dataclass(eq=False, repr=False) class DumpRequest(betterproto.Message): filter: "Filter" = betterproto.message_field(1) limit: int = betterproto.int64_field(2) """ Limit sets the limit for the number of commits / jobs that are returned for each repo / pipeline in the dump. """
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var filter : Filter
var limit : int
-
Limit sets the limit for the number of commits / jobs that are returned for each repo / pipeline in the dump.
class SetLogLevelRequest (pachyderm: SetLogLevelRequestLogLevel = None, grpc: SetLogLevelRequestLogLevel = None, duration: datetime.timedelta = None, recurse: bool = None)
-
SetLogLevelRequest(pachyderm: 'SetLogLevelRequestLogLevel' = None, grpc: 'SetLogLevelRequestLogLevel' = None, duration: datetime.timedelta = None, recurse: bool = None)
Expand source code
@dataclass(eq=False, repr=False) class SetLogLevelRequest(betterproto.Message): pachyderm: "SetLogLevelRequestLogLevel" = betterproto.enum_field(1, group="level") grpc: "SetLogLevelRequestLogLevel" = betterproto.enum_field(2, group="level") duration: timedelta = betterproto.message_field(3) recurse: bool = betterproto.bool_field(4)
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var pachyderm : SetLogLevelRequestLogLevel
var grpc : SetLogLevelRequestLogLevel
var duration : datetime.timedelta
var recurse : bool
class SetLogLevelResponse (affected_pods: List[str] = None, errored_pods: List[str] = None)
-
SetLogLevelResponse(affected_pods: List[str] = None, errored_pods: List[str] = None)
Expand source code
@dataclass(eq=False, repr=False) class SetLogLevelResponse(betterproto.Message): affected_pods: List[str] = betterproto.string_field(1) errored_pods: List[str] = betterproto.string_field(2)
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var affected_pods : List[str]
var errored_pods : List[str]
class GetDumpV2TemplateRequest (filters: List[str] = None)
-
GetDumpV2TemplateRequest(filters: List[str] = None)
Expand source code
@dataclass(eq=False, repr=False) class GetDumpV2TemplateRequest(betterproto.Message): filters: List[str] = betterproto.string_field(1)
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var filters : List[str]
class GetDumpV2TemplateResponse (request: DumpV2Request = None)
-
GetDumpV2TemplateResponse(request: 'DumpV2Request' = None)
Expand source code
@dataclass(eq=False, repr=False) class GetDumpV2TemplateResponse(betterproto.Message): request: "DumpV2Request" = betterproto.message_field(1)
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var request : DumpV2Request
class Pipeline (project: str = None, name: str = None)
-
Pipeline(project: str = None, name: str = None)
Expand source code
@dataclass(eq=False, repr=False) class Pipeline(betterproto.Message): project: str = betterproto.string_field(1) name: str = betterproto.string_field(2)
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var project : str
var name : str
class Pod (name: str = None, ip: str = None, containers: List[str] = None)
-
Pod(name: str = None, ip: str = None, containers: List[str] = None)
Expand source code
@dataclass(eq=False, repr=False) class Pod(betterproto.Message): name: str = betterproto.string_field(1) ip: str = betterproto.string_field(2) containers: List[str] = betterproto.string_field(3)
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var name : str
var ip : str
var containers : List[str]
class App (name: str = None, pods: List[ForwardRef('Pod')] = None, timeout: datetime.timedelta = None, pipeline: Pipeline = None, loki_args: LokiArgs = None, profile_args: ProfileArgs = None)
-
App(name: str = None, pods: List[ForwardRef('Pod')] = None, timeout: datetime.timedelta = None, pipeline: 'Pipeline' = None, loki_args: 'LokiArgs' = None, profile_args: 'ProfileArgs' = None)
Expand source code
@dataclass(eq=False, repr=False) class App(betterproto.Message): name: str = betterproto.string_field(1) pods: List["Pod"] = betterproto.message_field(2) timeout: timedelta = betterproto.message_field(3) pipeline: "Pipeline" = betterproto.message_field(4) loki_args: "LokiArgs" = betterproto.message_field(5, group="extra_args") profile_args: "ProfileArgs" = betterproto.message_field(6, group="extra_args")
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var name : str
var pods : List[Pod]
var timeout : datetime.timedelta
var pipeline : Pipeline
var loki_args : LokiArgs
var profile_args : ProfileArgs
class ProfileArgs (profiles: List[ForwardRef('Profile')] = None)
-
ProfileArgs(profiles: List[ForwardRef('Profile')] = None)
Expand source code
@dataclass(eq=False, repr=False) class ProfileArgs(betterproto.Message): profiles: List["Profile"] = betterproto.message_field(1)
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var profiles : List[Profile]
class LokiArgs (max_logs: int = None)
-
LokiArgs(max_logs: int = None)
Expand source code
@dataclass(eq=False, repr=False) class LokiArgs(betterproto.Message): max_logs: int = betterproto.uint64_field(1)
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var max_logs : int
class System (helm: bool = None, database: bool = None, version: bool = None, describes: List[ForwardRef('App')] = None, logs: List[ForwardRef('App')] = None, loki_logs: List[ForwardRef('App')] = None, binaries: List[ForwardRef('App')] = None, profiles: List[ForwardRef('App')] = None)
-
System(helm: bool = None, database: bool = None, version: bool = None, describes: List[ForwardRef('App')] = None, logs: List[ForwardRef('App')] = None, loki_logs: List[ForwardRef('App')] = None, binaries: List[ForwardRef('App')] = None, profiles: List[ForwardRef('App')] = None)
Expand source code
@dataclass(eq=False, repr=False) class System(betterproto.Message): helm: bool = betterproto.bool_field(1) database: bool = betterproto.bool_field(2) version: bool = betterproto.bool_field(3) describes: List["App"] = betterproto.message_field(4) logs: List["App"] = betterproto.message_field(5) loki_logs: List["App"] = betterproto.message_field(6) binaries: List["App"] = betterproto.message_field(7) profiles: List["App"] = betterproto.message_field(8)
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var helm : bool
var database : bool
var version : bool
var describes : List[App]
var logs : List[App]
var loki_logs : List[App]
var binaries : List[App]
var profiles : List[App]
class StarlarkLiteral (name: str = None, program_text: str = None)
-
StarlarkLiteral is a custom Starlark script.
Expand source code
@dataclass(eq=False, repr=False) class StarlarkLiteral(betterproto.Message): """StarlarkLiteral is a custom Starlark script.""" name: str = betterproto.string_field(1) """ The name of the script; used for debug messages and to control where the output goes. """ program_text: str = betterproto.string_field(2) """The text of the "debugdump" personality Starlark program."""
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var name : str
-
The name of the script; used for debug messages and to control where the output goes.
var program_text : str
-
The text of the "debugdump" personality Starlark program.
class Starlark (builtin: str = None, literal: StarlarkLiteral = None, timeout: datetime.timedelta = None)
-
Starlark controls the running of a Starlark script.
Expand source code
@dataclass(eq=False, repr=False) class Starlark(betterproto.Message): """Starlark controls the running of a Starlark script.""" builtin: str = betterproto.string_field(1, group="source") """One built into the pachd binary.""" literal: "StarlarkLiteral" = betterproto.message_field(2, group="source") """Or a script supplied in this request.""" timeout: timedelta = betterproto.message_field(3) """ How long to allow the script to run for. If unset, defaults to 1 minute. """
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var builtin : str
-
One built into the pachd binary.
var literal : StarlarkLiteral
-
Or a script supplied in this request.
var timeout : datetime.timedelta
-
How long to allow the script to run for. If unset, defaults to 1 minute.
class DumpV2Request (system: System = None, pipelines: List[ForwardRef('Pipeline')] = None, input_repos: bool = None, timeout: datetime.timedelta = None, defaults: DumpV2RequestDefaults = None, starlark_scripts: List[ForwardRef('Starlark')] = None)
-
DumpV2Request(system: 'System' = None, pipelines: List[ForwardRef('Pipeline')] = None, input_repos: bool = None, timeout: datetime.timedelta = None, defaults: 'DumpV2RequestDefaults' = None, starlark_scripts: List[ForwardRef('Starlark')] = None)
Expand source code
@dataclass(eq=False, repr=False) class DumpV2Request(betterproto.Message): system: "System" = betterproto.message_field(1) """Which system-level information to include in the debug dump.""" pipelines: List["Pipeline"] = betterproto.message_field(2) """ Which pipelines to fetch information about and include in the debug dump. """ input_repos: bool = betterproto.bool_field(3) """If true, fetch information about non-output repos.""" timeout: timedelta = betterproto.message_field(4) """How long to run the dump for.""" defaults: "DumpV2RequestDefaults" = betterproto.message_field(5) """Which defaults to include in the debug dump.""" starlark_scripts: List["Starlark"] = betterproto.message_field(6) """A list of Starlark scripts to run."""
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var system : System
-
Which system-level information to include in the debug dump.
var pipelines : List[Pipeline]
-
Which pipelines to fetch information about and include in the debug dump.
var input_repos : bool
-
If true, fetch information about non-output repos.
var timeout : datetime.timedelta
-
How long to run the dump for.
var defaults : DumpV2RequestDefaults
-
Which defaults to include in the debug dump.
var starlark_scripts : List[Starlark]
-
A list of Starlark scripts to run.
class DumpV2RequestDefaults (cluster_defaults: bool = None)
-
DumpV2RequestDefaults(cluster_defaults: bool = None)
Expand source code
@dataclass(eq=False, repr=False) class DumpV2RequestDefaults(betterproto.Message): cluster_defaults: bool = betterproto.bool_field(1) """If true, include the cluster defaults."""
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var cluster_defaults : bool
-
If true, include the cluster defaults.
class DumpContent (content: bytes = None)
-
DumpContent(content: bytes = None)
Expand source code
@dataclass(eq=False, repr=False) class DumpContent(betterproto.Message): content: bytes = betterproto.bytes_field(1)
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var content : bytes
class DumpProgress (task: str = None, total: int = None, progress: int = None)
-
DumpProgress(task: str = None, total: int = None, progress: int = None)
Expand source code
@dataclass(eq=False, repr=False) class DumpProgress(betterproto.Message): task: str = betterproto.string_field(1) total: int = betterproto.int64_field(2) progress: int = betterproto.int64_field(3)
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var task : str
var total : int
var progress : int
class DumpChunk (content: DumpContent = None, progress: DumpProgress = None)
-
DumpChunk(content: 'DumpContent' = None, progress: 'DumpProgress' = None)
Expand source code
@dataclass(eq=False, repr=False) class DumpChunk(betterproto.Message): content: "DumpContent" = betterproto.message_field(1, group="chunk") progress: "DumpProgress" = betterproto.message_field(2, group="chunk")
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var content : DumpContent
var progress : DumpProgress
class RunPfsLoadTestRequest (spec: str = None, branch: _pfs__.Branch = None, seed: int = None, state_id: str = None)
-
RunPfsLoadTestRequest(spec: str = None, branch: '_pfs__.Branch' = None, seed: int = None, state_id: str = None)
Expand source code
@dataclass(eq=False, repr=False) class RunPfsLoadTestRequest(betterproto.Message): spec: str = betterproto.string_field(1) branch: "_pfs__.Branch" = betterproto.message_field(2) seed: int = betterproto.int64_field(3) state_id: str = betterproto.string_field(4)
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var spec : str
var branch : Branch
var seed : int
var state_id : str
class RunPfsLoadTestResponse (spec: str = None, branch: _pfs__.Branch = None, seed: int = None, error: str = None, duration: datetime.timedelta = None, state_id: str = None)
-
RunPfsLoadTestResponse(spec: str = None, branch: '_pfs__.Branch' = None, seed: int = None, error: str = None, duration: datetime.timedelta = None, state_id: str = None)
Expand source code
@dataclass(eq=False, repr=False) class RunPfsLoadTestResponse(betterproto.Message): spec: str = betterproto.string_field(1) branch: "_pfs__.Branch" = betterproto.message_field(2) seed: int = betterproto.int64_field(3) error: str = betterproto.string_field(4) duration: timedelta = betterproto.message_field(5) state_id: str = betterproto.string_field(6)
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var spec : str
var branch : Branch
var seed : int
var error : str
var duration : datetime.timedelta
var state_id : str
class TraceRequest (duration: datetime.timedelta = None)
-
TraceRequest(duration: datetime.timedelta = None)
Expand source code
@dataclass(eq=False, repr=False) class TraceRequest(betterproto.Message): duration: timedelta = betterproto.message_field(1)
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var duration : datetime.timedelta
class TraceChunk (content: Optional[bytes] = None)
-
TraceChunk(content: Optional[bytes] = None)
Expand source code
@dataclass(eq=False, repr=False) class TraceChunk(betterproto.Message): content: Optional[bytes] = betterproto.message_field( 1, wraps=betterproto.TYPE_BYTES, group="reply" )
Ancestors
- betterproto.Message
- abc.ABC
Class variables
var content : Optional[bytes]
class DebugStub (channel: grpc.Channel)
-
Expand source code
class DebugStub: def __init__(self, channel: "grpc.Channel"): self.__rpc_profile = channel.unary_stream( "/debug_v2.Debug/Profile", request_serializer=ProfileRequest.SerializeToString, response_deserializer=betterproto_lib_google_protobuf.BytesValue.FromString, ) self.__rpc_binary = channel.unary_stream( "/debug_v2.Debug/Binary", request_serializer=BinaryRequest.SerializeToString, response_deserializer=betterproto_lib_google_protobuf.BytesValue.FromString, ) self.__rpc_dump = channel.unary_stream( "/debug_v2.Debug/Dump", request_serializer=DumpRequest.SerializeToString, response_deserializer=betterproto_lib_google_protobuf.BytesValue.FromString, ) self.__rpc_set_log_level = channel.unary_unary( "/debug_v2.Debug/SetLogLevel", request_serializer=SetLogLevelRequest.SerializeToString, response_deserializer=SetLogLevelResponse.FromString, ) self.__rpc_get_dump_v2_template = channel.unary_unary( "/debug_v2.Debug/GetDumpV2Template", request_serializer=GetDumpV2TemplateRequest.SerializeToString, response_deserializer=GetDumpV2TemplateResponse.FromString, ) self.__rpc_dump_v2 = channel.unary_stream( "/debug_v2.Debug/DumpV2", request_serializer=DumpV2Request.SerializeToString, response_deserializer=DumpChunk.FromString, ) self.__rpc_trace = channel.unary_stream( "/debug_v2.Debug/Trace", request_serializer=TraceRequest.SerializeToString, response_deserializer=TraceChunk.FromString, ) self.__rpc_run_pfs_load_test = channel.unary_unary( "/debug_v2.Debug/RunPFSLoadTest", request_serializer=RunPfsLoadTestRequest.SerializeToString, response_deserializer=RunPfsLoadTestResponse.FromString, ) self.__rpc_run_pfs_load_test_default = channel.unary_unary( "/debug_v2.Debug/RunPFSLoadTestDefault", request_serializer=betterproto_lib_google_protobuf.Empty.SerializeToString, response_deserializer=RunPfsLoadTestResponse.FromString, ) def profile( self, *, profile: "Profile" = None, filter: "Filter" = None ) -> Iterator["betterproto_lib_google_protobuf.BytesValue"]: request = ProfileRequest() if profile is not None: request.profile = profile if filter is not None: request.filter = filter for response in self.__rpc_profile(request): yield response def binary( self, *, filter: "Filter" = None ) -> Iterator["betterproto_lib_google_protobuf.BytesValue"]: request = BinaryRequest() if filter is not None: request.filter = filter for response in self.__rpc_binary(request): yield response def dump( self, *, filter: "Filter" = None, limit: int = 0 ) -> Iterator["betterproto_lib_google_protobuf.BytesValue"]: request = DumpRequest() if filter is not None: request.filter = filter request.limit = limit for response in self.__rpc_dump(request): yield response def set_log_level( self, *, pachyderm: "SetLogLevelRequestLogLevel" = None, grpc: "SetLogLevelRequestLogLevel" = None, duration: timedelta = None, recurse: bool = False ) -> "SetLogLevelResponse": request = SetLogLevelRequest() request.pachyderm = pachyderm request.grpc = grpc if duration is not None: request.duration = duration request.recurse = recurse return self.__rpc_set_log_level(request) def get_dump_v2_template( self, *, filters: Optional[List[str]] = None ) -> "GetDumpV2TemplateResponse": filters = filters or [] request = GetDumpV2TemplateRequest() request.filters = filters return self.__rpc_get_dump_v2_template(request) def dump_v2( self, *, system: "System" = None, pipelines: Optional[List["Pipeline"]] = None, input_repos: bool = False, timeout: timedelta = None, defaults: "DumpV2RequestDefaults" = None, starlark_scripts: Optional[List["Starlark"]] = None ) -> Iterator["DumpChunk"]: pipelines = pipelines or [] starlark_scripts = starlark_scripts or [] request = DumpV2Request() if system is not None: request.system = system if pipelines is not None: request.pipelines = pipelines request.input_repos = input_repos if timeout is not None: request.timeout = timeout if defaults is not None: request.defaults = defaults if starlark_scripts is not None: request.starlark_scripts = starlark_scripts for response in self.__rpc_dump_v2(request): yield response def trace(self, *, duration: timedelta = None) -> Iterator["TraceChunk"]: request = TraceRequest() if duration is not None: request.duration = duration for response in self.__rpc_trace(request): yield response def run_pfs_load_test( self, *, spec: str = "", branch: "_pfs__.Branch" = None, seed: int = 0, state_id: str = "" ) -> "RunPfsLoadTestResponse": request = RunPfsLoadTestRequest() request.spec = spec if branch is not None: request.branch = branch request.seed = seed request.state_id = state_id return self.__rpc_run_pfs_load_test(request) def run_pfs_load_test_default(self) -> "RunPfsLoadTestResponse": request = betterproto_lib_google_protobuf.Empty() return self.__rpc_run_pfs_load_test_default(request)
Subclasses
Methods
def profile(self, *, profile: Profile = None, filter: Filter = None) ‑> Iterator[betterproto.lib.google.protobuf.BytesValue]
-
Expand source code
def profile( self, *, profile: "Profile" = None, filter: "Filter" = None ) -> Iterator["betterproto_lib_google_protobuf.BytesValue"]: request = ProfileRequest() if profile is not None: request.profile = profile if filter is not None: request.filter = filter for response in self.__rpc_profile(request): yield response
def binary(self, *, filter: Filter = None) ‑> Iterator[betterproto.lib.google.protobuf.BytesValue]
-
Expand source code
def binary( self, *, filter: "Filter" = None ) -> Iterator["betterproto_lib_google_protobuf.BytesValue"]: request = BinaryRequest() if filter is not None: request.filter = filter for response in self.__rpc_binary(request): yield response
def dump(self, *, filter: Filter = None, limit: int = 0) ‑> Iterator[betterproto.lib.google.protobuf.BytesValue]
-
Expand source code
def dump( self, *, filter: "Filter" = None, limit: int = 0 ) -> Iterator["betterproto_lib_google_protobuf.BytesValue"]: request = DumpRequest() if filter is not None: request.filter = filter request.limit = limit for response in self.__rpc_dump(request): yield response
def set_log_level(self, *, pachyderm: SetLogLevelRequestLogLevel = None, grpc: SetLogLevelRequestLogLevel = None, duration: datetime.timedelta = None, recurse: bool = False) ‑> SetLogLevelResponse
-
Expand source code
def set_log_level( self, *, pachyderm: "SetLogLevelRequestLogLevel" = None, grpc: "SetLogLevelRequestLogLevel" = None, duration: timedelta = None, recurse: bool = False ) -> "SetLogLevelResponse": request = SetLogLevelRequest() request.pachyderm = pachyderm request.grpc = grpc if duration is not None: request.duration = duration request.recurse = recurse return self.__rpc_set_log_level(request)
def get_dump_v2_template(self, *, filters: Optional[List[str]] = None) ‑> GetDumpV2TemplateResponse
-
Expand source code
def get_dump_v2_template( self, *, filters: Optional[List[str]] = None ) -> "GetDumpV2TemplateResponse": filters = filters or [] request = GetDumpV2TemplateRequest() request.filters = filters return self.__rpc_get_dump_v2_template(request)
def dump_v2(self, *, system: System = None, pipelines: Optional[List[ForwardRef('Pipeline')]] = None, input_repos: bool = False, timeout: datetime.timedelta = None, defaults: DumpV2RequestDefaults = None, starlark_scripts: Optional[List[ForwardRef('Starlark')]] = None) ‑> Iterator[DumpChunk]
-
Expand source code
def dump_v2( self, *, system: "System" = None, pipelines: Optional[List["Pipeline"]] = None, input_repos: bool = False, timeout: timedelta = None, defaults: "DumpV2RequestDefaults" = None, starlark_scripts: Optional[List["Starlark"]] = None ) -> Iterator["DumpChunk"]: pipelines = pipelines or [] starlark_scripts = starlark_scripts or [] request = DumpV2Request() if system is not None: request.system = system if pipelines is not None: request.pipelines = pipelines request.input_repos = input_repos if timeout is not None: request.timeout = timeout if defaults is not None: request.defaults = defaults if starlark_scripts is not None: request.starlark_scripts = starlark_scripts for response in self.__rpc_dump_v2(request): yield response
def trace(self, *, duration: datetime.timedelta = None) ‑> Iterator[TraceChunk]
-
Expand source code
def trace(self, *, duration: timedelta = None) -> Iterator["TraceChunk"]: request = TraceRequest() if duration is not None: request.duration = duration for response in self.__rpc_trace(request): yield response
def run_pfs_load_test(self, *, spec: str = '', branch: _pfs__.Branch = None, seed: int = 0, state_id: str = '') ‑> RunPfsLoadTestResponse
-
Expand source code
def run_pfs_load_test( self, *, spec: str = "", branch: "_pfs__.Branch" = None, seed: int = 0, state_id: str = "" ) -> "RunPfsLoadTestResponse": request = RunPfsLoadTestRequest() request.spec = spec if branch is not None: request.branch = branch request.seed = seed request.state_id = state_id return self.__rpc_run_pfs_load_test(request)
def run_pfs_load_test_default(self) ‑> RunPfsLoadTestResponse
-
Expand source code
def run_pfs_load_test_default(self) -> "RunPfsLoadTestResponse": request = betterproto_lib_google_protobuf.Empty() return self.__rpc_run_pfs_load_test_default(request)