They are going to be used for diagnostic.
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
return os;
}
+std::ostream &operator<<(std::ostream &os, const Client &client) {
+ os << "[id=" << client.id << ", description=" << client.description
+ << ", commit_position=" << client.commit_position << "]";
+ return os;
+}
+
} // namespace journal
} // namespace cls
const EntryPosition &entry_position);
std::ostream &operator<<(std::ostream &os,
const ObjectSetPosition &object_set_position);
+std::ostream &operator<<(std::ostream &os,
+ const Client &client);
} // namespace journal
} // namespace cls
ldout(m_cct, 10) << "notified journal header update: r=" << r << dendl;
}
+std::ostream &operator<<(std::ostream &os,
+ const JournalMetadata::RegisteredClients &clients) {
+ os << "[";
+ for (JournalMetadata::RegisteredClients::const_iterator c = clients.begin();
+ c != clients.end(); c++) {
+ os << (c == clients.begin() ? "" : ", " ) << *c;
+ }
+ os << "]";
+ return os;
+}
+
+std::ostream &operator<<(std::ostream &os,
+ const JournalMetadata &jm) {
+ Mutex::Locker locker(jm.m_lock);
+ os << "[oid=" << jm.m_oid << ", "
+ << "initialized=" << jm.m_initialized << ", "
+ << "order=" << (int)jm.m_order << ", "
+ << "splay_width=" << (int)jm.m_splay_width << ", "
+ << "minimum_set=" << jm.m_minimum_set << ", "
+ << "active_set=" << jm.m_active_set << ", "
+ << "client_id=" << jm.m_client_id << ", "
+ << "commit_tid=" << jm.m_commit_tid << ", "
+ << "commit_interval=" << jm.m_commit_interval << ", "
+ << "commit_position=" << jm.m_commit_position << ", "
+ << "registered_clients=" << jm.m_registered_clients << "]";
+ return os;
+}
+
} // namespace journal
void handle_watch_notify(uint64_t notify_id, uint64_t cookie);
void handle_watch_error(int err);
void handle_notified(int r);
+
+ friend std::ostream &operator<<(std::ostream &os,
+ const JournalMetadata &journal_metadata);
};
+std::ostream &operator<<(std::ostream &os,
+ const JournalMetadata::RegisteredClients &clients);
+
+std::ostream &operator<<(std::ostream &os,
+ const JournalMetadata &journal_metadata);
+
} // namespace journal
#endif // CEPH_JOURNAL_JOURNAL_METADATA_H
replay_handler);
}
+std::ostream &operator<<(std::ostream &os,
+ const Journaler &journaler) {
+ os << "[metadata=";
+ if (journaler.m_metadata != NULL) {
+ os << *journaler.m_metadata;
+ } else {
+ os << "NULL";
+ }
+ os << "]";
+ return os;
+}
+
} // namespace journal
JournalTrimmer *m_trimmer;
void create_player(ReplayHandler *replay_handler);
+
+ friend std::ostream &operator<<(std::ostream &os,
+ const Journaler &journaler);
};
+std::ostream &operator<<(std::ostream &os,
+ const Journaler &journaler);
+
} // namespace journal
#endif // CEPH_JOURNAL_JOURNALER_H