diff --git a/configure.py b/configure.py index edfe481a7c..1f888636fd 100755 --- a/configure.py +++ b/configure.py @@ -288,6 +288,7 @@ urchin_core = (['database.cc', 'gms/failure_detector.cc', 'gms/gms.cc', 'gms/gossip_digest_syn.cc', + 'gms/gossip_digest_ack.cc', 'dht/i_partitioner.cc', 'dht/murmur3_partitioner.cc', 'dht/byte_ordered_partitioner.cc', diff --git a/gms/gms.cc b/gms/gms.cc index befd01062d..19c03da454 100644 --- a/gms/gms.cc +++ b/gms/gms.cc @@ -23,18 +23,6 @@ namespace gms { -std::ostream& operator<<(std::ostream& os, const gossip_digest_ack& ack) { - os << "digests:{"; - for (auto& d : ack._digests) { - os << d << " "; - } - os << "} "; - os << "endpoint_state:{"; - for (auto& d : ack._map) { - os << "[" << d.first << "->" << d.second << "]"; - } - return os << "}"; -} std::ostream& operator<<(std::ostream& os, const gossip_digest_ack2& ack2) { os << "endpoint_state:{"; diff --git a/gms/gossip_digest_ack.cc b/gms/gossip_digest_ack.cc new file mode 100644 index 0000000000..37f663792d --- /dev/null +++ b/gms/gossip_digest_ack.cc @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Modified by Cloudius Systems. + * Copyright 2015 Cloudius Systems. + */ + +#include "gms/gossip_digest_ack.hh" +#include + +namespace gms { + +std::ostream& operator<<(std::ostream& os, const gossip_digest_ack& ack) { + os << "digests:{"; + for (auto& d : ack._digests) { + os << d << " "; + } + os << "} "; + os << "endpoint_state:{"; + for (auto& d : ack._map) { + os << "[" << d.first << "->" << d.second << "]"; + } + return os << "}"; +} + +} // namespace gms