2013-10-16 21:59:46 +00:00
|
|
|
// Copyright (c) 2013, Facebook, Inc. All rights reserved.
|
|
|
|
// This source code is licensed under the BSD-style license found in the
|
|
|
|
// LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
// of patent rights can be found in the PATENTS file in the same directory.
|
2011-03-18 22:37:00 +00:00
|
|
|
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file. See the AUTHORS file for names of contributors.
|
2013-10-05 05:32:05 +00:00
|
|
|
#pragma once
|
2013-08-23 15:38:13 +00:00
|
|
|
#include "rocksdb/comparator.h"
|
|
|
|
#include "rocksdb/status.h"
|
|
|
|
#include "rocksdb/types.h"
|
2011-03-18 22:37:00 +00:00
|
|
|
|
2013-10-04 04:49:15 +00:00
|
|
|
namespace rocksdb {
|
2011-03-18 22:37:00 +00:00
|
|
|
|
|
|
|
struct Options;
|
|
|
|
struct FileMetaData;
|
|
|
|
|
|
|
|
class Env;
|
2013-09-16 06:01:26 +00:00
|
|
|
class EnvOptions;
|
2011-03-18 22:37:00 +00:00
|
|
|
class Iterator;
|
|
|
|
class TableCache;
|
|
|
|
class VersionEdit;
|
|
|
|
|
|
|
|
// Build a Table file from the contents of *iter. The generated file
|
|
|
|
// will be named according to meta->number. On success, the rest of
|
2011-06-22 02:36:45 +00:00
|
|
|
// *meta will be filled with metadata about the generated table.
|
|
|
|
// If no data is present in *iter, meta->file_size will be set to
|
|
|
|
// zero, and no Table file will be produced.
|
2011-03-18 22:37:00 +00:00
|
|
|
extern Status BuildTable(const std::string& dbname,
|
|
|
|
Env* env,
|
|
|
|
const Options& options,
|
2013-06-07 22:35:17 +00:00
|
|
|
const EnvOptions& soptions,
|
2011-03-18 22:37:00 +00:00
|
|
|
TableCache* table_cache,
|
|
|
|
Iterator* iter,
|
2013-02-28 22:09:30 +00:00
|
|
|
FileMetaData* meta,
|
|
|
|
const Comparator* user_comparator,
|
|
|
|
const SequenceNumber newest_snapshot,
|
2013-10-17 20:33:39 +00:00
|
|
|
const SequenceNumber earliest_seqno_in_memtable,
|
|
|
|
const bool enable_compression);
|
2011-03-18 22:37:00 +00:00
|
|
|
|
2013-10-04 04:49:15 +00:00
|
|
|
} // namespace rocksdb
|