]> git.proxmox.com Git - ceph.git/blob - ceph/src/crimson/os/seastore/omap_manager.cc
import quincy beta 17.1.0
[ceph.git] / ceph / src / crimson / os / seastore / omap_manager.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 #include <experimental/iterator>
4 #include <iostream>
5
6 #include "crimson/os/seastore/transaction_manager.h"
7 #include "crimson/os/seastore/omap_manager.h"
8 #include "crimson/os/seastore/omap_manager/btree/btree_omap_manager.h"
9
10 namespace crimson::os::seastore::omap_manager {
11
12 OMapManagerRef create_omap_manager(TransactionManager &trans_manager) {
13 return OMapManagerRef(new BtreeOMapManager(trans_manager));
14 }
15
16 }
17
18 namespace std {
19 std::ostream &operator<<(std::ostream &out, const std::pair<std::string, std::string> &rhs)
20 {
21 return out << "key_value_map (" << rhs.first<< "->" << rhs.second << ")";
22 }
23 }
24
25 namespace crimson::os::seastore {
26
27 std::ostream &operator<<(std::ostream &out, const std::list<std::string> &rhs)
28 {
29 out << '[';
30 std::copy(std::begin(rhs), std::end(rhs), std::experimental::make_ostream_joiner(out, ", "));
31 return out << ']';
32 }
33
34 std::ostream &operator<<(std::ostream &out, const std::vector<std::pair<std::string, std::string>> &rhs)
35 {
36 out << '[';
37 std::ostream_iterator<std::pair<std::string, std::string>> out_it(out, ", ");
38 std::copy(rhs.begin(), rhs.end(), out_it);
39 return out << ']';
40 }
41
42 }