1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #pragma once
- #include <yt/cpp/mapreduce/interface/io.h>
- namespace NYT {
- namespace NDetail {
- ////////////////////////////////////////////////////////////////////////////////
- class TInputStreamProxy
- : public TRawTableReader
- {
- public:
- TInputStreamProxy(IInputStream* stream)
- : Stream_(stream)
- { }
- bool Retry(const TMaybe<ui32>& /* rangeIndex */, const TMaybe<ui64>& /* rowIndex */) override
- {
- return false;
- }
- void ResetRetries() override
- { }
- bool HasRangeIndices() const override
- {
- return false;
- }
- protected:
- size_t DoRead(void* buf, size_t len) override
- {
- return Stream_->Read(buf, len);
- }
- private:
- IInputStream* Stream_;
- };
- ////////////////////////////////////////////////////////////////////////////////
- ::TIntrusivePtr<IProtoReaderImpl> CreateProtoReader(
- IInputStream* stream,
- const TTableReaderOptions& /* options */,
- const ::google::protobuf::Descriptor* descriptor);
- ::TIntrusivePtr<IProtoReaderImpl> CreateProtoReader(
- IInputStream* stream,
- const TTableReaderOptions& /* options */,
- TVector<const ::google::protobuf::Descriptor*> descriptors);
- ////////////////////////////////////////////////////////////////////////////////
- } // namespace NDetail
- template <>
- TTableReaderPtr<TNode> CreateTableReader<TNode>(
- IInputStream* stream, const TTableReaderOptions& options);
- template <>
- TTableReaderPtr<TYaMRRow> CreateTableReader<TYaMRRow>(
- IInputStream* stream, const TTableReaderOptions& /*options*/);
- } // namespace NYT
|