Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultExecutorOptions(executor *ExecuteModular, cfg *gfspconfig.GfSpConfig) error
- func NewExecuteModular(app *gfspapp.GfSpBaseApp, cfg *gfspconfig.GfSpConfig) (coremodule.Modular, error)
- type ExecuteModular
- func (e *ExecuteModular) AskReplicatePieceApproval(ctx context.Context, task coretask.ApprovalReplicatePieceTask, low, high int, ...) ([]*gfsptask.GfSpReplicatePieceApprovalTask, error)
- func (e *ExecuteModular) AskTask(ctx context.Context, limit corercmgr.Limit)
- func (e *ExecuteModular) HandleGCMetaTask(ctx context.Context, task coretask.GCMetaTask)
- func (e *ExecuteModular) HandleGCObjectTask(ctx context.Context, task coretask.GCObjectTask)
- func (e *ExecuteModular) HandleGCZombiePieceTask(ctx context.Context, task coretask.GCZombiePieceTask)
- func (e *ExecuteModular) HandleReceivePieceTask(ctx context.Context, task coretask.ReceivePieceTask)
- func (e *ExecuteModular) HandleReplicatePieceTask(ctx context.Context, task coretask.ReplicatePieceTask)
- func (e *ExecuteModular) HandleSealObjectTask(ctx context.Context, task coretask.SealObjectTask)
- func (e *ExecuteModular) Name() string
- func (e *ExecuteModular) ReleaseResource(ctx context.Context, span corercmgr.ResourceScopeSpan)
- func (e *ExecuteModular) ReportTask(ctx context.Context, task coretask.Task) error
- func (e *ExecuteModular) ReserveResource(ctx context.Context, st *corercmgr.ScopeStat) (corercmgr.ResourceScopeSpan, error)
- func (e *ExecuteModular) Start(ctx context.Context) error
- func (e *ExecuteModular) Statistics() string
- func (e *ExecuteModular) Stop(ctx context.Context) error
Constants ¶
View Source
const ( // DefaultExecutorMaxExecuteNum defines the default max parallel execute task number. DefaultExecutorMaxExecuteNum int64 = 1024 // DefaultExecutorAskTaskInterval defines the default ask task interval from manager. DefaultExecutorAskTaskInterval int = 1 // DefaultExecutorAskReplicateApprovalTimeout defines the ask replicate piece approval // timeout that send the request to the p2p node, DefaultExecutorAskReplicateApprovalTimeout int64 = 10 // DefaultExecutorAskReplicateApprovalExFactor defines the expanded factor for asking // secondary SP. // Example: need data chunk + data parity chunk numbers SPs as secondary, consider fault // tolerance, should collect (data chunk + data parity chunk) * factor numbers SPs as // backup secondary, if some of these are failed to replicate can pick up again from // backups. So it is always bigger than 1.0. DefaultExecutorAskReplicateApprovalExFactor float64 = 1.0 // DefaultExecutorListenSealTimeoutHeight defines the default listen seal object on // greenfield timeout height, if after current block height + timeout height, the object // is not sealed, it is judged failed to seal object on greenfield. DefaultExecutorListenSealTimeoutHeight int = 10 // DefaultExecutorListenSealRetryTimeout defines the sleep time when listen seal object // fail, until retry ExecutorMaxListenSealRetry times, the task is set error. DefaultExecutorListenSealRetryTimeout int = 2 // DefaultExecutorMaxListenSealRetry defines the default max retry number for listening // object. DefaultExecutorMaxListenSealRetry int = 3 // DefaultStatisticsOutputInterval defines the default interval for output statistics info, // it is used to log and debug. DefaultStatisticsOutputInterval int = 60 )
Variables ¶
View Source
var ( ErrDanglingPointer = gfsperrors.Register(module.ExecuteModularName, http.StatusBadRequest, 40001, "OoooH.... request lost") ErrInsufficientApproval = gfsperrors.Register(module.ExecuteModularName, http.StatusNotFound, 40002, "insufficient approvals from p2p") ErrUnsealed = gfsperrors.Register(module.ExecuteModularName, http.StatusInternalServerError, 40003, "seal object on chain failed") ErrExhaustedApproval = gfsperrors.Register(module.ExecuteModularName, http.StatusNotFound, 40004, "approvals exhausted") ErrInvalidIntegrity = gfsperrors.Register(module.ExecuteModularName, http.StatusNotAcceptable, 40005, "secondary integrity hash verification failed") ErrSecondaryMismatch = gfsperrors.Register(module.ExecuteModularName, http.StatusNotAcceptable, 40006, "secondary sp mismatch") ErrReplicateIdsOutOfBounds = gfsperrors.Register(module.ExecuteModularName, http.StatusNotAcceptable, 40007, "replicate idx out of bounds") ErrGfSpDB = gfsperrors.Register(module.ExecuteModularName, http.StatusInternalServerError, 45201, "server slipped away, try again later") )
Functions ¶
func DefaultExecutorOptions ¶
func DefaultExecutorOptions(executor *ExecuteModular, cfg *gfspconfig.GfSpConfig) error
func NewExecuteModular ¶
func NewExecuteModular(app *gfspapp.GfSpBaseApp, cfg *gfspconfig.GfSpConfig) (coremodule.Modular, error)
Types ¶
type ExecuteModular ¶
type ExecuteModular struct {
// contains filtered or unexported fields
}
func (*ExecuteModular) AskReplicatePieceApproval ¶
func (e *ExecuteModular) AskReplicatePieceApproval(ctx context.Context, task coretask.ApprovalReplicatePieceTask, low, high int, timeout int64) ( []*gfsptask.GfSpReplicatePieceApprovalTask, error)
func (*ExecuteModular) AskTask ¶
func (e *ExecuteModular) AskTask(ctx context.Context, limit corercmgr.Limit)
func (*ExecuteModular) HandleGCMetaTask ¶
func (e *ExecuteModular) HandleGCMetaTask(ctx context.Context, task coretask.GCMetaTask)
func (*ExecuteModular) HandleGCObjectTask ¶
func (e *ExecuteModular) HandleGCObjectTask(ctx context.Context, task coretask.GCObjectTask)
func (*ExecuteModular) HandleGCZombiePieceTask ¶
func (e *ExecuteModular) HandleGCZombiePieceTask(ctx context.Context, task coretask.GCZombiePieceTask)
func (*ExecuteModular) HandleReceivePieceTask ¶
func (e *ExecuteModular) HandleReceivePieceTask(ctx context.Context, task coretask.ReceivePieceTask)
func (*ExecuteModular) HandleReplicatePieceTask ¶
func (e *ExecuteModular) HandleReplicatePieceTask(ctx context.Context, task coretask.ReplicatePieceTask)
func (*ExecuteModular) HandleSealObjectTask ¶
func (e *ExecuteModular) HandleSealObjectTask(ctx context.Context, task coretask.SealObjectTask)
func (*ExecuteModular) Name ¶
func (e *ExecuteModular) Name() string
func (*ExecuteModular) ReleaseResource ¶
func (e *ExecuteModular) ReleaseResource( ctx context.Context, span corercmgr.ResourceScopeSpan)
func (*ExecuteModular) ReportTask ¶
func (*ExecuteModular) ReserveResource ¶
func (e *ExecuteModular) ReserveResource( ctx context.Context, st *corercmgr.ScopeStat) ( corercmgr.ResourceScopeSpan, error)
func (*ExecuteModular) Statistics ¶
func (e *ExecuteModular) Statistics() string
Click to show internal directories.
Click to hide internal directories.