1 #ifndef HAVE_HDFS_STREAM_H
2 #define HAVE_HDFS_STREAM_H 1
9 #define HDFS_DEFAULT_ADDRESS "localhost"
10 #define HDFS_DEFAULT_PORT 8020
11 #define DEFAULT_BUFFER_SIZE 128 * 1024
22 FILE_MODE_READ, FILE_MODE_WRITE
45 HDFSStreambuf(
const char* path, FileMode mode,
const char* address, uint16_t port,
int bufsize = DEFAULT_BUFFER_SIZE);
79 HDFSIStream(
const char* path,
const char* address, uint16_t port);
97 std::streambuf::int_type underflow();
104 std::streampos seekoff(std::streamoff off, std::ios_base::seekdir way, std::ios_base::openmode which = std::ios_base::in);
111 std::streampos seekpos(std::streampos pos, std::ios_base::openmode which = std::ios_base::in);
116 std::streamsize file_size = -1;
132 HDFSOStream(
const char* path,
const char* address, uint16_t port);
150 std::streambuf::int_type overflow(std::streambuf::int_type c);
178 hdfs_istream(
const char* path,
const char* address, uint16_t port) : std::istream(
new HDFSIStream(path, address, port)) {};
179 hdfs_istream(std::string path, std::string address, uint16_t port) :
hdfs_istream(path.c_str(), address.c_str(), port) {};
191 hdfs_ostream(
const char* path,
const char* address, uint16_t port) : std::ostream(
new HDFSOStream(path, address, port)) {};
192 hdfs_ostream(std::string path, std::string address, uint16_t port) :
hdfs_ostream(path.c_str(), address.c_str(), port) {};
193 ~
hdfs_ostream() { rdbuf()->pubsync();
delete rdbuf(); };
196 int removeHdfsFile(
const char* path,
const char* address, uint16_t port);
197 int removeHdfsFile(
const char* path);
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in c...
Definition: http_client.cpp:23
Definition: HDFSStream.hpp:122
Definition: HDFSStream.hpp:187
Definition: HDFSStream.hpp:69
Definition: HDFSStream.hpp:31
Definition: HDFSStream.hpp:174