2013-10-16 23:59:46 +02: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 23:37:00 +01: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 07:32:05 +02:00
|
|
|
#pragma once
|
2013-08-23 17:38:13 +02:00
|
|
|
#include "rocksdb/comparator.h"
|
|
|
|
#include "rocksdb/status.h"
|
|
|
|
#include "rocksdb/types.h"
|
2013-10-30 18:52:33 +01:00
|
|
|
#include "rocksdb/options.h"
|
2011-03-18 23:37:00 +01:00
|
|
|
|
2013-10-04 06:49:15 +02:00
|
|
|
namespace rocksdb {
|
2011-03-18 23:37:00 +01:00
|
|
|
|
|
|
|
struct Options;
|
|
|
|
struct FileMetaData;
|
|
|
|
|
|
|
|
class Env;
|
2013-11-13 05:05:28 +01:00
|
|
|
struct EnvOptions;
|
2011-03-18 23:37:00 +01:00
|
|
|
class Iterator;
|
|
|
|
class TableCache;
|
|
|
|
class VersionEdit;
|
2013-10-29 01:54:09 +01:00
|
|
|
class TableBuilder;
|
|
|
|
class WritableFile;
|
|
|
|
|
2014-01-27 22:53:22 +01:00
|
|
|
extern TableBuilder* NewTableBuilder(
|
|
|
|
const Options& options, const InternalKeyComparator& internal_comparator,
|
|
|
|
WritableFile* file, CompressionType compression_type);
|
2011-03-18 23:37:00 +01:00
|
|
|
|
|
|
|
// Build a Table file from the contents of *iter. The generated file
|
2014-06-14 00:54:19 +02:00
|
|
|
// will be named according to number specified in meta. On success, the rest of
|
2011-06-22 04:36:45 +02: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.
|
2014-01-27 22:53:22 +01:00
|
|
|
extern Status BuildTable(const std::string& dbname, Env* env,
|
|
|
|
const Options& options, const EnvOptions& soptions,
|
|
|
|
TableCache* table_cache, Iterator* iter,
|
2013-02-28 23:09:30 +01:00
|
|
|
FileMetaData* meta,
|
2014-01-27 22:53:22 +01:00
|
|
|
const InternalKeyComparator& internal_comparator,
|
2013-02-28 23:09:30 +01:00
|
|
|
const SequenceNumber newest_snapshot,
|
2013-10-17 22:33:39 +02:00
|
|
|
const SequenceNumber earliest_seqno_in_memtable,
|
2013-12-19 19:02:53 +01:00
|
|
|
const CompressionType compression);
|
2011-03-18 23:37:00 +01:00
|
|
|
|
2013-10-04 06:49:15 +02:00
|
|
|
} // namespace rocksdb
|