cp file can work

1. consolidate to filer_pb.FileChunk
2. dir add file, mkdir
3. file flush, write

updates having issue
This commit is contained in:
Chris Lu
2018-05-16 00:08:44 -07:00
parent c7a71d35b0
commit b303a02461
14 changed files with 619 additions and 102 deletions

View File

@@ -18,9 +18,18 @@ service SeaweedFiler {
rpc GetFileContent (GetFileContentRequest) returns (GetFileContentResponse) {
}
rpc CreateEntry (CreateEntryRequest) returns (CreateEntryResponse) {
}
rpc AppendFileChunks (AppendFileChunksRequest) returns (AppendFileChunksResponse) {
}
rpc DeleteEntry (DeleteEntryRequest) returns (DeleteEntryResponse) {
}
rpc AssignVolume (AssignVolumeRequest) returns (AssignVolumeResponse) {
}
}
//////////////////////////////////////////////////
@@ -45,10 +54,16 @@ message ListEntriesResponse {
message Entry {
string name = 1;
bool is_directory = 2;
string file_id = 3;
repeated FileChunk chunks = 3;
FuseAttributes attributes = 4;
}
message FileChunk {
string file_id = 1;
int64 offset = 2;
uint64 size = 3;
}
message FuseAttributes {
uint64 file_size = 1;
int64 mtime = 2;
@@ -75,6 +90,14 @@ message GetFileContentResponse {
bytes content = 1;
}
message CreateEntryRequest {
string directory = 1;
Entry entry = 2;
}
message CreateEntryResponse {
}
message DeleteEntryRequest {
string directory = 1;
string name = 2;
@@ -83,3 +106,23 @@ message DeleteEntryRequest {
message DeleteEntryResponse {
}
message AssignVolumeRequest {
int32 count = 1;
string collection = 2;
string replication = 3;
}
message AssignVolumeResponse {
string file_id = 1;
string url = 2;
string public_url = 3;
int32 count = 4;
}
message AppendFileChunksRequest {
string directory = 1;
Entry entry = 2;
}
message AppendFileChunksResponse {
}