Interface VertexPropertyWriter
-
- All Superinterfaces:
com.alibaba.fastffi.CXXPointer
,com.alibaba.fastffi.FFIPointer
,com.alibaba.fastffi.FFIType
public interface VertexPropertyWriter extends com.alibaba.fastffi.CXXPointer
The writer for vertex property group chunks.Notes: For each writing operation, a validate_level could be set, which will be used to validate the data before writing. The validate_level could be:
ValidateLevel::default_validate: to use the validate_level of the writer, which set through the constructor or the SetValidateLevel method;
ValidateLevel::no_validate: without validation;
ValidateLevel::weak_validate: to validate if the vertex count or vertex chunk index is non-negative, the property group exists and the size of input_table is not larger than the vertex chunk size;
ValidateLevel::strong_validate: besides weak_validate, also validate the schema of input_table is consistent with that of property group; for writing operations without input_table, such as writing vertices number or copying file, the strong_validate is same as weak_validate.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
VertexPropertyWriter.Factory
-
Field Summary
Fields Modifier and Type Field Description static VertexPropertyWriter.Factory
factory
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ValidateLevel
getValidateLevel()
Get the validate level.void
setValidateLevel(ValidateLevel validateLevel)
Set the validate level.Status
writeChunk(StdSharedPtr<ArrowTable> inputTable, @com.alibaba.fastffi.CXXValue,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long chunkIndex)
Write all property groups of a single vertex chunk to corresponding files.Status
writeChunk(StdSharedPtr<ArrowTable> inputTable, @com.alibaba.fastffi.CXXValue,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long chunkIndex, ValidateLevel validateLevel)
Write all property groups of a single vertex chunk to corresponding files.Status
writeChunk(StdSharedPtr<ArrowTable> inputTable, StdSharedPtr<PropertyGroup> propertyGroup, @com.alibaba.fastffi.CXXValue,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long chunkIndex, ValidateLevel validateLevel)
Validate and write a single property group for a single vertex chunk.Status
writeChunk(StdString fileName, StdSharedPtr<PropertyGroup> propertyGroup, @com.alibaba.fastffi.CXXValue,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long chunkIndex, ValidateLevel validateLevel)
Copy a file as a vertex property group chunk.Status
writeTable(StdSharedPtr<ArrowTable> inputTable, @com.alibaba.fastffi.CXXValue,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long startChunkIndex)
Write all property groups for multiple vertex chunks to corresponding files.Status
writeTable(StdSharedPtr<ArrowTable> inputTable, @com.alibaba.fastffi.CXXValue,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long startChunkIndex, ValidateLevel validateLevel)
Write all property groups for multiple vertex chunks to corresponding files.Status
writeTable(StdSharedPtr<ArrowTable> inputTable, StdSharedPtr<PropertyGroup> propertyGroup, @com.alibaba.fastffi.CXXValue,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long startChunkIndex, ValidateLevel validateLevel)
Write a single property group for multiple vertex chunks to corresponding files.Status
writeVerticesNum(@com.alibaba.fastffi.CXXReference,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long count)
Write the number of vertices into the file.Status
writeVerticesNum(@com.alibaba.fastffi.CXXReference,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long count, ValidateLevel validateLevel)
Write the number of vertices into the file.
-
-
-
Field Detail
-
factory
static final VertexPropertyWriter.Factory factory
-
-
Method Detail
-
setValidateLevel
void setValidateLevel(ValidateLevel validateLevel)
Set the validate level.- Parameters:
validateLevel
- The validate level to set.
-
getValidateLevel
ValidateLevel getValidateLevel()
Get the validate level.- Returns:
- The validate level of this writer.
-
writeVerticesNum
Status writeVerticesNum(@com.alibaba.fastffi.CXXReference,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long count, ValidateLevel validateLevel)
Write the number of vertices into the file.- Parameters:
count
- The number of vertices.validateLevel
- The validate level for this operation, which is the writer's validate level by default.- Returns:
- Status: ok or error.
-
writeVerticesNum
Status writeVerticesNum(@com.alibaba.fastffi.CXXReference,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long count)
Write the number of vertices into the file.- Parameters:
count
- The number of vertices.- Returns:
- Status: ok or error.
-
writeChunk
Status writeChunk(StdString fileName, StdSharedPtr<PropertyGroup> propertyGroup, @com.alibaba.fastffi.CXXValue,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long chunkIndex, ValidateLevel validateLevel)
Copy a file as a vertex property group chunk.- Parameters:
fileName
- The file to copy.propertyGroup
- The property group.chunkIndex
- The index of the vertex chunk.validateLevel
- The validate level for this operation, which is the writer's validate level by default.- Returns:
- Status: ok or error.
-
writeChunk
Status writeChunk(StdSharedPtr<ArrowTable> inputTable, StdSharedPtr<PropertyGroup> propertyGroup, @com.alibaba.fastffi.CXXValue,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long chunkIndex, ValidateLevel validateLevel)
Validate and write a single property group for a single vertex chunk.- Parameters:
inputTable
- The table containing data.propertyGroup
- The property group.chunkIndex
- The index of the vertex chunk.validateLevel
- The validate level for this operation, which is the writer's validate level by default.- Returns:
- Status: ok or error.
-
writeChunk
Status writeChunk(StdSharedPtr<ArrowTable> inputTable, @com.alibaba.fastffi.CXXValue,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long chunkIndex, ValidateLevel validateLevel)
Write all property groups of a single vertex chunk to corresponding files.- Parameters:
inputTable
- The table containing data.chunkIndex
- The index of the vertex chunk.validateLevel
- The validate level for this operation, which is the writer's validate level by default.- Returns:
- Status: ok or error.
-
writeChunk
Status writeChunk(StdSharedPtr<ArrowTable> inputTable, @com.alibaba.fastffi.CXXValue,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long chunkIndex)
Write all property groups of a single vertex chunk to corresponding files.- Parameters:
inputTable
- The table containing data.chunkIndex
- The index of the vertex chunk.- Returns:
- Status: ok or error.
-
writeTable
Status writeTable(StdSharedPtr<ArrowTable> inputTable, StdSharedPtr<PropertyGroup> propertyGroup, @com.alibaba.fastffi.CXXValue,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long startChunkIndex, ValidateLevel validateLevel)
Write a single property group for multiple vertex chunks to corresponding files.- Parameters:
inputTable
- The table containing data.propertyGroup
- The property group.startChunkIndex
- The start index of the vertex chunks.validateLevel
- The validate level for this operation, which is the writer's validate level by default.- Returns:
- Status: ok or error.
-
writeTable
Status writeTable(StdSharedPtr<ArrowTable> inputTable, @com.alibaba.fastffi.CXXValue,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long startChunkIndex, ValidateLevel validateLevel)
Write all property groups for multiple vertex chunks to corresponding files.- Parameters:
inputTable
- The table containing data.startChunkIndex
- The start index of the vertex chunks.validateLevel
- The validate level for this operation, which is the writer's validate level by default.- Returns:
- Status: ok or error.
-
writeTable
Status writeTable(StdSharedPtr<ArrowTable> inputTable, @com.alibaba.fastffi.CXXValue,@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long startChunkIndex)
Write all property groups for multiple vertex chunks to corresponding files.- Parameters:
inputTable
- The table containing data.startChunkIndex
- The start index of the vertex chunks.- Returns:
- Status: ok or error.
-
-