Turi Create  4.0
turi::sarray_group_format_writer_v2< T > Class Template Reference

#include <core/storage/sframe_data/sarray_file_format_v2.hpp>

Public Member Functions

void open (std::string index_file, size_t segments_to_create, size_t columns_to_create)
 
void set_options (const std::string &option, int64_t value)
 
group_index_file_informationget_index_info ()
 
void write_segment (size_t segmentid, const std::vector< T > &v)
 
void write_segment (size_t segmentid, std::vector< T > &&v)
 
void write_segment (size_t columnid, size_t segmentid, const T &t)
 
void write_column (size_t columnid, size_t segmentid, const std::vector< T > &t)
 
void write_column (size_t columnid, size_t segmentid, std::vector< T > &&t)
 
void write_segment (size_t columnid, size_t segmentid, T &&t)
 
void write_segment (size_t segmentid, const sframe_rows &rows)
 
void close ()
 
void flush_segment (size_t segmentid)
 
void write_index_file ()
 
size_t num_segments () const
 
size_t num_columns () const
 
template<>
void write_segment (size_t segmentid, const sframe_rows &rows)
 

Detailed Description

template<typename T>
class turi::sarray_group_format_writer_v2< T >

The array group writer which emits array v2 file formats.

Definition at line 578 of file sarray_file_format_v2.hpp.

Member Function Documentation

◆ close()

template<typename T >
void turi::sarray_group_format_writer_v2< T >::close ( )
inlinevirtual

Closes all writes

Implements turi::sarray_group_format_writer< T >.

Definition at line 720 of file sarray_file_format_v2.hpp.

◆ flush_segment()

template<typename T >
void turi::sarray_group_format_writer_v2< T >::flush_segment ( size_t  segmentid)
inlinevirtual

Flushes all writes for a particular segment

Reimplemented from turi::sarray_group_format_writer< T >.

Definition at line 742 of file sarray_file_format_v2.hpp.

◆ get_index_info()

template<typename T >
group_index_file_information& turi::sarray_group_format_writer_v2< T >::get_index_info ( )
inlinevirtual

Gets a modifiable reference to the index file information which will be written to the index file.

Implements turi::sarray_group_format_writer< T >.

Definition at line 613 of file sarray_file_format_v2.hpp.

◆ num_columns()

template<typename T >
size_t turi::sarray_group_format_writer_v2< T >::num_columns ( ) const
inlinevirtual

Returns the number of columns

Implements turi::sarray_group_format_writer< T >.

Definition at line 767 of file sarray_file_format_v2.hpp.

◆ num_segments()

template<typename T >
size_t turi::sarray_group_format_writer_v2< T >::num_segments ( ) const
inlinevirtual

Returns the number of segments

Implements turi::sarray_group_format_writer< T >.

Definition at line 759 of file sarray_file_format_v2.hpp.

◆ open()

template<typename T >
void turi::sarray_group_format_writer_v2< T >::open ( std::string  index_file,
size_t  segments_to_create,
size_t  columns_to_create 
)
inlinevirtual

Open has to be called before any of the other functions are called. No files are actually opened at this point.

Implements turi::sarray_group_format_writer< T >.

Definition at line 584 of file sarray_file_format_v2.hpp.

◆ set_options()

template<typename T >
void turi::sarray_group_format_writer_v2< T >::set_options ( const std::string &  option,
int64_t  value 
)
inlinevirtual

◆ write_column() [1/2]

template<typename T >
void turi::sarray_group_format_writer_v2< T >::write_column ( size_t  columnid,
size_t  segmentid,
const std::vector< T > &  t 
)
inlinevirtual

Writes a collection of rows to a column

Implements turi::sarray_group_format_writer< T >.

Definition at line 662 of file sarray_file_format_v2.hpp.

◆ write_column() [2/2]

template<typename T >
void turi::sarray_group_format_writer_v2< T >::write_column ( size_t  columnid,
size_t  segmentid,
std::vector< T > &&  t 
)
inlinevirtual

Writes a collection of rows to a column

Implements turi::sarray_group_format_writer< T >.

Definition at line 682 of file sarray_file_format_v2.hpp.

◆ write_index_file()

template<typename T >
void turi::sarray_group_format_writer_v2< T >::write_index_file ( )
inlinevirtual

Flushes the index_file_information to disk

Implements turi::sarray_group_format_writer< T >.

Definition at line 752 of file sarray_file_format_v2.hpp.

◆ write_segment() [1/6]

template<typename T >
void turi::sarray_group_format_writer_v2< T >::write_segment ( size_t  segmentid,
const std::vector< T > &  v 
)
inlinevirtual

Writes a row to the array group

Implements turi::sarray_group_format_writer< T >.

Definition at line 620 of file sarray_file_format_v2.hpp.

◆ write_segment() [2/6]

template<typename T >
void turi::sarray_group_format_writer_v2< T >::write_segment ( size_t  segmentid,
std::vector< T > &&  v 
)
inlinevirtual

Writes a row to the array group

Implements turi::sarray_group_format_writer< T >.

Definition at line 633 of file sarray_file_format_v2.hpp.

◆ write_segment() [3/6]

template<typename T >
void turi::sarray_group_format_writer_v2< T >::write_segment ( size_t  columnid,
size_t  segmentid,
const T &  t 
)
inlinevirtual

Writes a row to the array group

Implements turi::sarray_group_format_writer< T >.

Definition at line 646 of file sarray_file_format_v2.hpp.

◆ write_segment() [4/6]

template<typename T >
void turi::sarray_group_format_writer_v2< T >::write_segment ( size_t  columnid,
size_t  segmentid,
T &&  t 
)
inlinevirtual

Writes a row to the array group

Implements turi::sarray_group_format_writer< T >.

Definition at line 703 of file sarray_file_format_v2.hpp.

◆ write_segment() [5/6]

template<typename T >
void turi::sarray_group_format_writer_v2< T >::write_segment ( size_t  segmentid,
const sframe_rows rows 
)
inlinevirtual

Writes a bunch of rows to the array group

Implements turi::sarray_group_format_writer< T >.

Definition at line 900 of file sarray_file_format_v2.hpp.

◆ write_segment() [6/6]

template<>
void turi::sarray_group_format_writer_v2< flexible_type >::write_segment ( size_t  segmentid,
const sframe_rows rows 
)
inlinevirtual

Writes a bunch of rows to the array group

Implements turi::sarray_group_format_writer< T >.

Definition at line 881 of file sarray_file_format_v2.hpp.


The documentation for this class was generated from the following file: