文件 | |
| 文件 | avro.hpp |
| 文件 | csv.hpp |
| 文件 | io/json.hpp |
| 文件 | orc.hpp |
| 文件 | parquet.hpp |
| 文件 | byte_range_info.hpp |
| 文件 | data_chunk_source.hpp |
| 文件 | multibyte_split.hpp |
枚举 | |
| 枚举类 | cudf::io::json_recovery_mode_t { cudf::io::FAIL , cudf::io::RECOVER_WITH_NULL } |
| 控制 json 解析器的错误恢复行为。 更多... | |
变量 | |
| constexpr size_t | cudf::io::default_stripe_size_bytes = 64 * 1024 * 1024 |
| 默认 ORC 条带大小 64MB | |
| constexpr size_type | cudf::io::default_stripe_size_rows = 1000000 |
| 默认 ORC 条带行数 100 万行 | |
| constexpr size_type | cudf::io::default_row_index_stride = 10000 |
| 默认 ORC 行索引步长 1 万行 | |
| constexpr size_t | cudf::io::default_row_group_size_bytes |
| 每个行组的字节数无限大。 更多... | |
| constexpr size_type | cudf::io::default_row_group_size_rows = 1'000'000 |
| 每个行组 100 万行 | |
| constexpr size_t | cudf::io::default_max_page_size_bytes = 512 * 1024 |
| 每页 512KB | |
| constexpr size_type | cudf::io::default_max_page_size_rows = 20000 |
| 每页 2 万行 | |
| constexpr int32_t | cudf::io::default_column_index_truncate_length = 64 |
| 截断至 64 字节 | |
| constexpr size_t | cudf::io::default_max_dictionary_size = 1024 * 1024 |
| 字典大小 1MB | |
| constexpr size_type | cudf::io::default_max_page_fragment_size = 5000 |
| 每个页面片段 5000 行 | |
控制 json 解析器的错误恢复行为。
| 枚举成员 | |
|---|---|
| FAIL | 遇到无效格式时不从错误中恢复。 |
| RECOVER_WITH_NULL | 从错误中恢复,将无效记录替换为 null。 |
定义于文件 io/json.hpp 第 67 行。
| byte_range_info cudf::io::text::create_byte_range_info_max | ( | ) |
创建一个 byte_range_info,它表示文件中尽可能多的部分。具体来说,是 [0, numeric_limits<int64_t>:\:max())。
[0, numeric_limits<int64_t>:\:max()) 的字节范围信息| std::vector<byte_range_info> cudf::io::text::create_byte_range_infos_consecutive | ( | int64_t | total_bytes, |
| int64_t | range_count | ||
| ) |
创建 [0, total_bytes) 之间的一系列连续范围。
每个范围的大小将相同,除非 total_bytes 不能被 range_count 整除,在这种情况下,最后一个范围的大小将是余数。
| total_bytes | 所有范围中的总字节数 |
| range_count | 将字节分割成的总范围数量 |
| std::unique_ptr<cudf::column> cudf::io::text::multibyte_split | ( | data_chunk_source const & | source, |
| std::string_view | delimiter, | ||
| parse_options | options = {}, |
||
| rmm::cuda_stream_view | stream = cudf::get_default_stream(), |
||
| rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
| ) |
使用多字节分隔符将源文本拆分为字符串列。
提供字节范围允许 multibyte_split 部分读取文件,仅返回在范围内部开始的分隔符的偏移量。如果按照“记录”来思考,其中每个分隔符决定了记录的结束,则将返回在提供的字节范围内部开始的所有记录,包括可能在范围内开始但在范围外结束的任何记录。在范围外开始的记录将被忽略,即使这些记录在范围内部结束也是如此。
| source | 源字符串 |
| delimiter | UTF-8 编码字符串,用于在源中查找偏移量 |
| 选项 | 要使用的解析选项(包括字节范围) |
| 流 | 用于设备内存操作和内核启动的 CUDA 流 |
| mr | 用于设备内存分配的内存资源 |
| table_with_metadata cudf::io::read_avro | ( | avro_reader_options const & | 选项, |
| rmm::cuda_stream_view | stream = cudf::get_default_stream(), |
||
| rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
| ) |
将 Avro 数据集读取到一组列中。
以下代码片段演示如何从文件读取数据集
| 选项 | 控制读取行为的设置 |
| 流 | 用于设备内存操作和内核启动的 CUDA 流 |
| mr | 用于分配返回的 table_with_metadata 中表的设备内存的设备内存资源 |
| table_with_metadata cudf::io::read_csv | ( | csv_reader_options | 选项, |
| rmm::cuda_stream_view | stream = cudf::get_default_stream(), |
||
| rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
| ) |
将 CSV 数据集读取到一组列中。
以下代码片段演示如何从文件读取数据集
| 选项 | 控制读取行为的设置 |
| 流 | 用于设备内存操作和内核启动的 CUDA 流 |
| mr | 用于分配返回的 table_with_metadata 中表的设备内存的设备内存资源 |
| table_with_metadata cudf::io::read_json | ( | json_reader_options | 选项, |
| rmm::cuda_stream_view | stream = cudf::get_default_stream(), |
||
| rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
| ) |
将 JSON 数据集读取到一组列中。
以下代码片段演示如何从文件读取数据集
| 选项 | 控制读取行为的设置 |
| 流 | 用于设备内存操作和内核启动的 CUDA 流 |
| mr | 用于分配返回的 table_with_metadata 中表的设备内存的设备内存资源。 |
| table_with_metadata cudf::io::read_orc | ( | orc_reader_options const & | 选项, |
| rmm::cuda_stream_view | stream = cudf::get_default_stream(), |
||
| rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
| ) |
将 ORC 数据集读取到一组列中。
以下代码片段演示如何从文件读取数据集
| 选项 | 控制读取行为的设置 |
| 流 | 用于设备内存操作和内核启动的 CUDA 流 |
| mr | 用于分配返回的 table_with_metadata 中表的设备内存的设备内存资源。 |
| orc_metadata cudf::io::read_orc_metadata | ( | source_info const & | src_info, |
| rmm::cuda_stream_view | stream = cudf::get_default_stream() |
||
| ) |
| table_with_metadata cudf::io::read_parquet | ( | parquet_reader_options const & | 选项, |
| rmm::cuda_stream_view | stream = cudf::get_default_stream(), |
||
| rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
| ) |
将 Parquet 数据集读取到一组列中。
以下代码片段演示如何从文件读取数据集
| 选项 | 控制读取行为的设置 |
| 流 | 用于设备内存操作和内核启动的 CUDA 流 |
| mr | 用于分配返回的 table_with_metadata 中表的设备内存的设备内存资源 |
| parquet_metadata cudf::io::read_parquet_metadata | ( | source_info const & | src_info | ) |
| parsed_orc_statistics cudf::io::read_parsed_orc_statistics | ( | source_info const & | src_info, |
| rmm::cuda_stream_view | stream = cudf::get_default_stream() |
||
| ) |
读取 ORC 数据集的文件级别和条带级别统计信息。
| src_info | 数据集源 |
| 流 | 用于设备内存操作和内核启动的 CUDA 流 |
| raw_orc_statistics cudf::io::read_raw_orc_statistics | ( | source_info const & | src_info, |
| rmm::cuda_stream_view | stream = cudf::get_default_stream() |
||
| ) |
读取 ORC 数据集的文件级别和条带级别统计信息。
以下代码片段演示如何从文件读取数据集的统计信息
| src_info | 数据集源 |
| 流 | 用于设备内存操作和内核启动的 CUDA 流 |
|
constexpr |