Documentation ¶
Index ¶
- Constants
- Variables
- type AppendChunkArg
- type AppendChunkReply
- type ApplyCopyArg
- type ApplyCopyReply
- type ApplyMutationArg
- type ApplyMutationReply
- type CheckVersionArg
- type CheckVersionReply
- type Checksum
- type ChunkHandle
- type ChunkIndex
- type ChunkVersion
- type CreateChunkArg
- type CreateChunkReply
- type CreateFileArg
- type CreateFileReply
- type DataBufferID
- type DeleteFileArg
- type DeleteFileReply
- type Error
- type ErrorCode
- type ExtendLeaseArg
- type ExtendLeaseReply
- type ForwardDataArg
- type ForwardDataReply
- type GetChunkHandleArg
- type GetChunkHandleReply
- type GetFileInfoArg
- type GetFileInfoReply
- type GetPrimaryAndSecondariesArg
- type GetPrimaryAndSecondariesReply
- type GetReplicasArg
- type GetReplicasReply
- type HeartbeatArg
- type HeartbeatReply
- type Lease
- type ListArg
- type ListReply
- type MkdirArg
- type MkdirReply
- type MutationType
- type Nouse
- type Offset
- type PadChunkArg
- type PadChunkReply
- type Path
- type PathInfo
- type PersistentChunkInfo
- type ReadChunkArg
- type ReadChunkReply
- type RenameFileArg
- type RenameFileReply
- type ReportSelfArg
- type ReportSelfReply
- type SendCopyArg
- type SendCopyReply
- type ServerAddress
- type WriteChunkArg
- type WriteChunkReply
Constants ¶
View Source
const ( MutationWrite = iota MutationAppend MutationPad )
View Source
const ( Success = iota UnknownError Timeout AppendExceedChunkSize WriteExceedChunkSize ReadEOF NotAvailableForCopy )
View Source
const ( // chunk LeaseExpire = 3 * time.Second //1 * time.Minute DefaultNumReplicas = 3 MinimumNumReplicas = 2 MaxChunkSize = 32 << 20 // 512KB DEBUG ONLY 64 << 20 MaxAppendSize = MaxChunkSize / 4 DeletedFilePrefix = "__del__" // master ServerCheckInterval = 400 * time.Millisecond // MasterStoreInterval = 30 * time.Hour // 30 * time.Minute ServerTimeout = 1 * time.Second // chunk server HeartbeatInterval = 200 * time.Millisecond MutationWaitTimeout = 4 * time.Second ServerStoreInterval = 40 * time.Hour // 30 * time.Minute GarbageCollectionInt = 30 * time.Hour // 1 * time.Day DownloadBufferExpire = 2 * time.Minute DownloadBufferTick = 30 * time.Second // client ClientTryTimeout = 2*LeaseExpire + 3*ServerTimeout LeaseBufferTick = 500 * time.Millisecond )
system config
Variables ¶
View Source
var (
Debug int
)
Functions ¶
This section is empty.
Types ¶
type AppendChunkArg ¶
type AppendChunkArg struct { DataID DataBufferID Secondaries []ServerAddress }
type AppendChunkReply ¶
type ApplyCopyArg ¶
type ApplyCopyArg struct { Handle ChunkHandle Data []byte Version ChunkVersion }
type ApplyCopyReply ¶
type ApplyCopyReply struct {
ErrorCode ErrorCode
}
type ApplyMutationArg ¶
type ApplyMutationArg struct { Mtype MutationType DataID DataBufferID Offset Offset }
type ApplyMutationReply ¶
type ApplyMutationReply struct {
ErrorCode ErrorCode
}
type CheckVersionArg ¶
type CheckVersionArg struct { Handle ChunkHandle Version ChunkVersion }
handshake
type CheckVersionReply ¶
type CheckVersionReply struct {
Stale bool
}
type ChunkHandle ¶
type ChunkHandle int64
type ChunkIndex ¶
type ChunkIndex int
type ChunkVersion ¶
type ChunkVersion int64
type CreateChunkArg ¶
type CreateChunkArg struct {
Handle ChunkHandle
}
type CreateChunkReply ¶
type CreateChunkReply struct {
ErrorCode ErrorCode
}
type CreateFileReply ¶
type CreateFileReply struct{}
type DataBufferID ¶
type DataBufferID struct { Handle ChunkHandle TimeStamp int }
type DeleteFileArg ¶
type DeleteFileArg struct {
Path Path
}
type DeleteFileReply ¶
type DeleteFileReply struct{}
type ExtendLeaseArg ¶
type ExtendLeaseArg struct { Handle ChunkHandle Address ServerAddress }
type ExtendLeaseReply ¶
type ForwardDataArg ¶
type ForwardDataArg struct { DataID DataBufferID Data []byte ChainOrder []ServerAddress }
chunk IO
type ForwardDataReply ¶
type ForwardDataReply struct {
ErrorCode ErrorCode
}
type GetChunkHandleArg ¶
type GetChunkHandleArg struct { Path Path Index ChunkIndex }
type GetChunkHandleReply ¶
type GetChunkHandleReply struct {
Handle ChunkHandle
}
type GetFileInfoArg ¶
type GetFileInfoArg struct {
Path Path
}
type GetFileInfoReply ¶
type GetPrimaryAndSecondariesArg ¶
type GetPrimaryAndSecondariesArg struct {
Handle ChunkHandle
}
chunk info
type GetPrimaryAndSecondariesReply ¶
type GetPrimaryAndSecondariesReply struct { Primary ServerAddress Expire time.Time Secondaries []ServerAddress }
type GetReplicasArg ¶
type GetReplicasArg struct {
Handle ChunkHandle
}
type GetReplicasReply ¶
type GetReplicasReply struct {
Locations []ServerAddress
}
type HeartbeatArg ¶
type HeartbeatArg struct { Address ServerAddress // chunkserver address LeaseExtensions []ChunkHandle // leases to be extended AbandondedChunks []ChunkHandle // unrecoverable chunks }
handshake
type HeartbeatReply ¶
type HeartbeatReply struct {
Garbage []ChunkHandle
}
type Lease ¶
type Lease struct { Primary ServerAddress Expire time.Time Secondaries []ServerAddress }
type MkdirReply ¶
type MkdirReply struct{}
type MutationType ¶
type MutationType int
type PadChunkArg ¶
type PadChunkArg struct {
Handle ChunkHandle
}
type PadChunkReply ¶
type PadChunkReply struct {
ErrorCode ErrorCode
}
type PersistentChunkInfo ¶
type PersistentChunkInfo struct { Handle ChunkHandle Length Offset Version ChunkVersion Checksum Checksum }
type ReadChunkArg ¶
type ReadChunkArg struct { Handle ChunkHandle Offset Offset Length int }
type ReadChunkReply ¶
type RenameFileArg ¶
type RenameFileReply ¶
type RenameFileReply struct{}
type ReportSelfArg ¶
type ReportSelfArg struct { }
type ReportSelfReply ¶
type ReportSelfReply struct {
Chunks []PersistentChunkInfo
}
type SendCopyArg ¶
type SendCopyArg struct { Handle ChunkHandle Address ServerAddress }
re-replication
type SendCopyReply ¶
type SendCopyReply struct {
ErrorCode ErrorCode
}
type ServerAddress ¶
type ServerAddress string
type WriteChunkArg ¶
type WriteChunkArg struct { DataID DataBufferID Offset Offset Secondaries []ServerAddress }
type WriteChunkReply ¶
type WriteChunkReply struct {
ErrorCode ErrorCode
}
Click to show internal directories.
Click to hide internal directories.