#pragma once #include #if USE_HDFS #include #include #include #include namespace DB { /** * This class represents table engine for external hdfs files. * Read method is supported for now. */ class StorageHDFS : public ext::shared_ptr_helper, public IStorage { friend struct ext::shared_ptr_helper; public: String getName() const override { return "HDFS"; } BlockInputStreams read(const Names & column_names, const SelectQueryInfo & query_info, const Context & context, QueryProcessingStage::Enum processed_stage, size_t max_block_size, unsigned num_streams) override; BlockOutputStreamPtr write(const ASTPtr & query, const Context & context) override; protected: StorageHDFS(const String & uri_, const StorageID & table_id_, const String & format_name_, const ColumnsDescription & columns_, const ConstraintsDescription & constraints_, Context & context_, const String & compression_method_); private: String uri; String format_name; Context & context; String compression_method; Logger * log = &Logger::get("StorageHDFS"); }; } #endif