This patch adds to Alternator an implementation of the BatchGetItem operation, which allows to start a number of GetItem requests in parallel in a single request. The implementation is almost complete - the only missing feature is the ability to ask only for non-top-level attributes in ProjectionExpression. Everything else should work, and this patch also includes tests which, as usual, pass on DynamoDB and now also on Alternator. Signed-off-by: Nadav Har'El <nyh@scylladb.com>
54 lines
1.7 KiB
C++
54 lines
1.7 KiB
C++
/*
|
|
* Copyright 2019 ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* This file is part of Scylla.
|
|
*
|
|
* See the LICENSE.PROPRIETARY file in the top-level directory for licensing information.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <seastar/core/future.hh>
|
|
#include <seastar/http/httpd.hh>
|
|
#include "seastarx.hh"
|
|
#include <seastar/json/json_elements.hh>
|
|
|
|
#include "service/storage_proxy.hh"
|
|
#include "service/migration_manager.hh"
|
|
|
|
#include "stats.hh"
|
|
|
|
namespace alternator {
|
|
|
|
class executor {
|
|
service::storage_proxy& _proxy;
|
|
service::migration_manager& _mm;
|
|
public:
|
|
stats _stats;
|
|
static constexpr auto ATTRS_COLUMN_NAME = "attrs";
|
|
static constexpr auto KEYSPACE_NAME = "alternator";
|
|
|
|
executor(service::storage_proxy& proxy, service::migration_manager& mm) : _proxy(proxy), _mm(mm) {}
|
|
|
|
future<json::json_return_type> create_table(std::string content);
|
|
future<json::json_return_type> describe_table(std::string content);
|
|
future<json::json_return_type> delete_table(std::string content);
|
|
future<json::json_return_type> put_item(std::string content);
|
|
future<json::json_return_type> get_item(std::string content);
|
|
future<json::json_return_type> delete_item(std::string content);
|
|
future<json::json_return_type> update_item(std::string content);
|
|
future<json::json_return_type> list_tables(std::string content);
|
|
future<json::json_return_type> scan(std::string content);
|
|
future<json::json_return_type> describe_endpoints(std::string content, std::string host_header);
|
|
future<json::json_return_type> batch_write_item(std::string content);
|
|
future<json::json_return_type> batch_get_item(std::string content);
|
|
future<json::json_return_type> query(std::string content);
|
|
|
|
future<> start();
|
|
future<> stop() { return make_ready_future<>(); }
|
|
};
|
|
|
|
}
|