Commit 8bd4051c authored by caidaojin's avatar caidaojin

remove KetamaHash()

parent f76d338f
......@@ -39,10 +39,6 @@ uint32_t MD5Hash32(const void* key, size_t len) {
| (results[0] & 0xFF);
}
uint32_t KetamaHash(const void* key, size_t len) {
return MD5Hash32(key, len);
}
uint32_t MD5Hash32V(const butil::StringPiece* keys, size_t num_keys) {
MD5_CTX ctx;
MD5_Init(&ctx);
......@@ -165,9 +161,6 @@ const char *GetHashName(HashFunc hasher) {
if (hasher == CRCHash32) {
return "crc32";
}
if (hasher == KetamaHash) {
return "ketama";
}
return "user_defined";
}
......
......@@ -34,8 +34,6 @@ uint32_t MD5Hash32V(const butil::StringPiece* keys, size_t num_keys);
uint32_t MurmurHash32(const void* key, size_t len);
uint32_t MurmurHash32V(const butil::StringPiece* keys, size_t num_keys);
uint32_t KetamaHash(const void* key, size_t len);
} // namespace policy
} // namespace brpc
......
......@@ -488,7 +488,7 @@ TEST_F(LoadBalancerTest, consistent_hashing) {
::brpc::policy::HashFunc hashs[::brpc::policy::CONS_HASH_LB_LAST] = {
::brpc::policy::MurmurHash32,
::brpc::policy::MD5Hash32,
::brpc::policy::KetamaHash
::brpc::policy::MD5Hash32
// ::brpc::policy::CRCHash32 crc is a bad hash function in test
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment