Skip to content

Commit

Permalink
Merge branch 'master' into wk_ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
Yang Ce authored Oct 9, 2016
2 parents c7482c4 + 37e3d44 commit e227750
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/nameserver/chunkserver_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,7 @@ void ChunkServerManager::RemoveBlock(int32_t id, int64_t block_id) {
cs_block_map->blocks.erase(block_id);
}

void ChunkServerManager::PickRecoverBlocks(int cs_id,
std::vector<std::pair<int64_t, std::vector<std::string> > >* recover_blocks,
void ChunkServerManager::PickRecoverBlocks(int cs_id, RecoverVec* recover_blocks,
int* hi_num, bool hi_only) {
ChunkServerInfo* cs = NULL;
{
Expand Down
5 changes: 2 additions & 3 deletions src/nameserver/chunkserver_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ namespace bfs {
const double kChunkServerLoadMax = 0.999999;

class BlockMappingManager;
typedef std::vector<std::pair<int64_t, std::vector<std::string> > > RecoverVec;

class ChunkServerManager {
public:
Expand Down Expand Up @@ -44,9 +45,7 @@ class ChunkServerManager {
void AddBlock(int32_t id, int64_t block_id, bool is_recover);
void RemoveBlock(int32_t id, int64_t block_id);
void CleanChunkServer(ChunkServerInfo* cs, const std::string& reason);
void PickRecoverBlocks(int cs_id,
std::vector<std::pair<int64_t, std::vector<std::string> > >* recover_blocks,
int* hi_num, bool hi_only);
void PickRecoverBlocks(int cs_id, RecoverVec* recover_blocks, int* hi_num, bool hi_only);
void GetStat(int32_t* w_qps, int64_t* w_speed, int32_t* r_qps,
int64_t* r_speed, int64_t* recover_speed);
StatusCode ShutdownChunkServer(const::google::protobuf::RepeatedPtrField<std::string>& chunkserver_address);
Expand Down
2 changes: 1 addition & 1 deletion src/nameserver/nameserver_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ void NameServerImpl::BlockReport(::google::protobuf::RpcController* controller,

// recover replica
if (recover_mode_ != kStopRecover) {
std::vector<std::pair<int64_t, std::vector<std::string> > > recover_blocks;
RecoverVec recover_blocks;
int hi_num = 0;
chunkserver_manager_->PickRecoverBlocks(cs_id, &recover_blocks,
&hi_num, recover_mode_ == kHiOnly);
Expand Down

0 comments on commit e227750

Please sign in to comment.