Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed consensus.thrift to raftex.thrift #16

Merged
merged 1 commit into from
Sep 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ add_custom_command(

add_custom_command(
OUTPUT
gen-cpp2/ConsensusService.cpp
gen-cpp2/ConsensusService_client.cpp
gen-cpp2/ConsensusService_processmap_binary.cpp
gen-cpp2/ConsensusService_processmap_compact.cpp
gen-cpp2/consensus_constants.cpp
gen-cpp2/consensus_data.cpp
gen-cpp2/consensus_types.cpp
COMMAND "${CMAKE_HOME_DIRECTORY}/third-party/fbthrift/_install/bin/thrift1" "--allow-neg-enum-vals" "--templates" "${CMAKE_HOME_DIRECTORY}/third-party/fbthrift/_install/include/thrift/templates" "--gen" "mstch_cpp2:include_prefix=\"interface\",process_in_event_base,stack_arguments" "--gen" "java:hashcode" "--gen" "go" "--gen" "py:new_style" "-o" "." "./consensus.thrift"
DEPENDS consensus.thrift
gen-cpp2/RaftexService.cpp
gen-cpp2/RaftexService_client.cpp
gen-cpp2/RaftexService_processmap_binary.cpp
gen-cpp2/RaftexService_processmap_compact.cpp
gen-cpp2/raftex_constants.cpp
gen-cpp2/raftex_data.cpp
gen-cpp2/raftex_types.cpp
COMMAND "${CMAKE_HOME_DIRECTORY}/third-party/fbthrift/_install/bin/thrift1" "--allow-neg-enum-vals" "--templates" "${CMAKE_HOME_DIRECTORY}/third-party/fbthrift/_install/include/thrift/templates" "--gen" "mstch_cpp2:include_prefix=\"interface\",process_in_event_base,stack_arguments" "--gen" "java:hashcode" "--gen" "go" "--gen" "py:new_style" "-o" "." "./raftex.thrift"
DEPENDS raftex.thrift
)


Expand All @@ -46,13 +46,13 @@ add_dependencies(vgraph_thrift_obj tgt_fbthrift)


add_library(
consensus_thrift_obj OBJECT
gen-cpp2/ConsensusService.cpp
gen-cpp2/ConsensusService_client.cpp
gen-cpp2/ConsensusService_processmap_binary.cpp
gen-cpp2/ConsensusService_processmap_compact.cpp
gen-cpp2/consensus_constants.cpp
gen-cpp2/consensus_data.cpp
gen-cpp2/consensus_types.cpp
raftex_thrift_obj OBJECT
gen-cpp2/RaftexService.cpp
gen-cpp2/RaftexService_client.cpp
gen-cpp2/RaftexService_processmap_binary.cpp
gen-cpp2/RaftexService_processmap_compact.cpp
gen-cpp2/raftex_constants.cpp
gen-cpp2/raftex_data.cpp
gen-cpp2/raftex_types.cpp
)
add_dependencies(consensus_thrift_obj tgt_fbthrift)
add_dependencies(raftex_thrift_obj tgt_fbthrift)
11 changes: 5 additions & 6 deletions interface/consensus.thrift → interface/raftex.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* (found in the LICENSE.Apache file in the root directory)
*/

namespace cpp vesoft.vgraph.consensus
namespace java vesoft.vgraph.consensus
namespace go vesoft.vgraph.consensus
namespace cpp vesoft.vgraph.raftex
namespace java vesoft.vgraph.raftex
namespace go vesoft.vgraph.raftex


enum ResultCode {
Expand Down Expand Up @@ -42,8 +42,7 @@ typedef i32 Port
// A request to ask for vote
struct AskForVoteRequest {
1: GraphSpaceID space; // My graph space id
2: PartitionID partition; // The data partition that the current
// replica represents
2: PartitionID partition; // The data partition
3: IPv4 candidateIp; // My IP
4: Port candidatePort; // My port
5: TermID term; // Proposed term (current term + 1)
Expand Down Expand Up @@ -108,7 +107,7 @@ struct AppendLogResponse {
}


service ConsensusService {
service RaftexService {
AskForVoteResponse askForVote(1: AskForVoteRequest req);
AppendLogResponse appendLog(1: AppendLogRequest req);
}
Expand Down