/Users/deen/code/yugabyte-db/src/yb/tools/ldb.cc
Line | Count | Source |
1 | | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. |
2 | | // This source code is licensed under the BSD-style license found in the |
3 | | // LICENSE file in the root directory of this source tree. An additional grant |
4 | | // of patent rights can be found in the PATENTS file in the same directory. |
5 | | // |
6 | | // The following only applies to changes made to this file as part of YugaByte development. |
7 | | // |
8 | | // Portions Copyright (c) YugaByte, Inc. |
9 | | // |
10 | | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
11 | | // in compliance with the License. You may obtain a copy of the License at |
12 | | // |
13 | | // http://www.apache.org/licenses/LICENSE-2.0 |
14 | | // |
15 | | // Unless required by applicable law or agreed to in writing, software distributed under the License |
16 | | // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
17 | | // or implied. See the License for the specific language governing permissions and limitations |
18 | | // under the License. |
19 | | // |
20 | | #ifndef ROCKSDB_LITE |
21 | | |
22 | | #include "yb/docdb/docdb_rocksdb_util.h" |
23 | | #include "yb/rocksdb/options.h" |
24 | | #include "yb/tablet/tablet_options.h" |
25 | | #include "yb/rocksdb/ldb_tool.h" |
26 | | |
27 | 13.2k | int main(int argc, char** argv) { |
28 | 13.2k | rocksdb::Options options; |
29 | 13.2k | yb::tablet::TabletOptions t_options; |
30 | 13.2k | yb::docdb::InitRocksDBOptions( |
31 | 13.2k | &options, "" /* log_prefix */, nullptr /* statistics */, t_options); |
32 | 13.2k | rocksdb::LDBTool tool; |
33 | 13.2k | tool.Run(argc, argv, options); |
34 | 13.2k | return 0; |
35 | 13.2k | } |
36 | | |
37 | | #else |
38 | | #include <stdio.h> |
39 | | int main(int argc, char** argv) { |
40 | | fprintf(stderr, "Not supported in lite mode.\n"); |
41 | | return 1; |
42 | | } |
43 | | #endif // ROCKSDB_LITE |