#include <dfs.hh>

Public Member Functions | |
| DFS () | |
| uint64_t | write (std::string &file_name, const char *buf, uint64_t off, uint64_t len) |
| Write the contents into a remote file. More... | |
| uint64_t | write (std::string &file_name, const char *buf, uint64_t off, uint64_t len, uint64_t block_size) |
| uint64_t | read (std::string &file_name, char *buf, uint64_t off, uint64_t len) |
| Download a remote file's section into a buffer. More... | |
| std::string | read_all (std::string file_name) |
| Read remote logical blocks into a buffer. More... | |
| int | append (std::string file_name, std::string buf) |
| Append a string to the end of a remote file. More... | |
| int | upload (std::string file_name, bool is_binary, uint64_t block_size=0) |
| Upload a local file to a the veloxdfs intance. More... | |
| int | download (std::string file_name) |
| Download a remote file to your current local directory. More... | |
| bool | exists (std::string) |
| }}} More... | |
| bool | touch (std::string) |
| int | remove (std::string) |
| bool | rename (std::string, std::string) |
| int | format () |
| model::metadata | get_metadata (std::string &fname) |
| model::metadata | get_metadata_optimized (std::string &fname, int type=0) |
| std::vector< model::metadata > | get_metadata_all () |
| void | file_metadata_append (std::string, size_t, model::metadata &) |
| std::string | dump_metadata (std::string &fname) |
| Dump all the metadata for the give file. More... | |
| uint64_t | read_chunk (std::string &fname, std::string host, char *buf, uint64_t buffer_offset, uint64_t off, uint64_t len) |
| Read a chunk directly. More... | |
| velox::DFS::DFS | ( | ) |
| int velox::DFS::append | ( | std::string | file_name, |
| std::string | buf | ||
| ) |
Append a string to the end of a remote file.
| int velox::DFS::download | ( | std::string | file_name | ) |
Download a remote file to your current local directory.
| file_name | File to peform the operation. |
| 0 | SUCCESS |
| 1 | FAILURE |
Does the file exists
No buffer
| std::string velox::DFS::dump_metadata | ( | std::string & | fname | ) |
Dump all the metadata for the give file.
| bool velox::DFS::exists | ( | std::string | name | ) |
}}}
| void velox::DFS::file_metadata_append | ( | std::string | name, |
| size_t | size, | ||
| model::metadata & | blocks | ||
| ) |
| int velox::DFS::format | ( | ) |
| model::metadata velox::DFS::get_metadata | ( | std::string & | fname | ) |
| vector< model::metadata > velox::DFS::get_metadata_all | ( | ) |
| model::metadata velox::DFS::get_metadata_optimized | ( | std::string & | fname, |
| int | type = 0 |
||
| ) |
| uint64_t velox::DFS::read | ( | std::string & | file_name, |
| char * | buf, | ||
| uint64_t | off, | ||
| uint64_t | len | ||
| ) |
Download a remote file's section into a buffer.
| file_name | File to peform the operation. | |
| [out] | buffer | Destination buffer. |
| off | offset from where to read. | |
| len | size of segment to read. |
| >0 | bytes successfully uploaded. |
| 0 | The operation failed. |
| std::string velox::DFS::read_all | ( | std::string | file_name | ) |
Read remote logical blocks into a buffer.
| file_name | File to peform the operation. | |
| [out] | buffer | Destination buffer. |
| off | offset from where to read. | |
| len | size of segment to read. |
| >0 | bytes successfully uploaded. |
| 0 | The operation failed. Load all the file into a string. |
| file_name | File to peform the operation. |
| "" | The file did not exists. |
| uint64_t velox::DFS::read_chunk | ( | std::string & | fname, |
| std::string | host, | ||
| char * | buf, | ||
| uint64_t | buffer_offset, | ||
| uint64_t | off, | ||
| uint64_t | len | ||
| ) |
Read a chunk directly.
| int velox::DFS::remove | ( | std::string | file_name | ) |
| bool velox::DFS::rename | ( | std::string | src, |
| std::string | dst | ||
| ) |
| bool velox::DFS::touch | ( | std::string | file_name | ) |
Insert the file
Send file to be submitted;
Get information of where to send the file
| int velox::DFS::upload | ( | std::string | file_name, |
| bool | is_binary, | ||
| uint64_t | block_size = 0 |
||
| ) |
Upload a local file to a the veloxdfs intance.
| file_name | File to peform the operation. |
| is_binary | Whether to broadcast the file to all the nodes. |
| block_size | Intended block size (Overrides .eclipse.json blocksize) |
| 0 | SUCCESS |
| 1 | FAILURE |
Does the file exists
Insert the file
Send file to be submitted;
Get information of where to send the file
Insert the blocks
Load block metadata info
| uint64_t velox::DFS::write | ( | std::string & | file_name, |
| const char * | buf, | ||
| uint64_t | off, | ||
| uint64_t | len | ||
| ) |
Write the contents into a remote file.
| file_name | File to peform the operation if the file does not exists it will create it. |
| buf | contents to be copied. |
| off | offset to append the buffer. |
| len | size of the content. |
| block_size | size of block size to write. (default: by configuration) |
| >0 | bytes successfully uploaded. |
| 0 | The operation failed. |
| uint64_t velox::DFS::write | ( | std::string & | file_name, |
| const char * | buf, | ||
| uint64_t | off, | ||
| uint64_t | len, | ||
| uint64_t | block_size | ||
| ) |
Insert the blocks
Load block metadata info
1.8.6