[#41] object: Support erasure codes
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
4c68d92468
commit
f56ccf36b1
2 changed files with 41 additions and 0 deletions
|
@ -319,6 +319,9 @@ message GetResponse {
|
||||||
|
|
||||||
// Meta information of split hierarchy for object assembly.
|
// Meta information of split hierarchy for object assembly.
|
||||||
SplitInfo split_info = 3;
|
SplitInfo split_info = 3;
|
||||||
|
|
||||||
|
// Meta information for EC object assembly.
|
||||||
|
ECInfo ec_info = 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Body of get object response message.
|
// Body of get object response message.
|
||||||
|
@ -503,6 +506,9 @@ message HeadResponse {
|
||||||
|
|
||||||
// Meta information of split hierarchy.
|
// Meta information of split hierarchy.
|
||||||
SplitInfo split_info = 3;
|
SplitInfo split_info = 3;
|
||||||
|
|
||||||
|
// Meta information for EC object assembly.
|
||||||
|
ECInfo ec_info = 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Body of head object response message.
|
// Body of head object response message.
|
||||||
|
@ -678,6 +684,9 @@ message GetRangeResponse {
|
||||||
|
|
||||||
// Meta information of split hierarchy.
|
// Meta information of split hierarchy.
|
||||||
SplitInfo split_info = 2;
|
SplitInfo split_info = 2;
|
||||||
|
|
||||||
|
// Meta information for EC object assembly.
|
||||||
|
ECInfo ec_info = 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -193,6 +193,24 @@ message Header {
|
||||||
}
|
}
|
||||||
// Position of the object in the split hierarchy
|
// Position of the object in the split hierarchy
|
||||||
Split split = 11 [ json_name = "split" ];
|
Split split = 11 [ json_name = "split" ];
|
||||||
|
|
||||||
|
// Erasure code can be applied to any object.
|
||||||
|
// Information about encoded object structure is stored in `EC` header.
|
||||||
|
// All objects belonging to a single EC group have the same `parent` field.
|
||||||
|
message EC {
|
||||||
|
// Identifier of the origin object. Known to all chunks.
|
||||||
|
neo.fs.v2.refs.ObjectID parent = 1 [ json_name = "parent" ];
|
||||||
|
// Index of this chunk.
|
||||||
|
uint32 index = 2 [ json_name = "index" ];
|
||||||
|
// Total number of chunks in this split.
|
||||||
|
uint32 total = 3 [ json_name = "total" ];
|
||||||
|
// Total length of a parent header. Used to trim padding zeroes.
|
||||||
|
uint32 header_length = 4 [ json_name = "headerLength" ];
|
||||||
|
// Chunk of a parent header.
|
||||||
|
bytes header = 5 [ json_name = "header" ];
|
||||||
|
}
|
||||||
|
// Erasure code chunk information.
|
||||||
|
EC ec = 12 [ json_name = "ec" ];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Object structure. Object is immutable and content-addressed. It means
|
// Object structure. Object is immutable and content-addressed. It means
|
||||||
|
@ -232,3 +250,17 @@ message SplitInfo {
|
||||||
// object parts.
|
// object parts.
|
||||||
neo.fs.v2.refs.ObjectID link = 3;
|
neo.fs.v2.refs.ObjectID link = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Meta information for the erasure-encoded object.
|
||||||
|
message ECInfo {
|
||||||
|
message Chunk {
|
||||||
|
// Object ID of the chunk.
|
||||||
|
neo.fs.v2.refs.ObjectID id = 1;
|
||||||
|
// Index of the chunk.
|
||||||
|
uint32 index = 2;
|
||||||
|
// Total number of chunks in this split.
|
||||||
|
uint32 total = 3;
|
||||||
|
}
|
||||||
|
// Chunk stored on the node.
|
||||||
|
repeated Chunk chunks = 1;
|
||||||
|
}
|
Loading…
Reference in a new issue