Package smile.io
Class Arrow
java.lang.Object
smile.io.Arrow
Apache Arrow is a cross-language development platform for in-memory data.
It specifies a standardized language-independent columnar memory format
for flat and hierarchical data, organized for efficient analytic
operations on modern hardware.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidallocate(long limit) Creates the root allocator.read(InputStream input, int limit) Reads a limited number of records from an arrow file.Reads a limited number of records from an arrow file.Reads a limited number of records from an arrow file.Reads an arrow file.Reads an arrow file.voidWrites the data frame to an arrow file.
-
Constructor Details
-
Arrow
public Arrow()Constructor. -
Arrow
public Arrow(int batch) Constructor.- Parameters:
batch- the number of records in a record batch.
-
-
Method Details
-
allocate
public static void allocate(long limit) Creates the root allocator. The RootAllocator is responsible for being the master bookeeper for memory allocations.- Parameters:
limit- the memory allocation limit in bytes.
-
read
Reads an arrow file.- Parameters:
path- the input file path.- Returns:
- the data frame.
- Throws:
IOException- when fails to read the file.
-
read
Reads an arrow file.- Parameters:
path- the input file path.limit- the number of records to read.- Returns:
- the data frame.
- Throws:
IOException- when fails to read the file.
-
read
Reads a limited number of records from an arrow file.- Parameters:
path- the input file path.- Returns:
- the data frame.
- Throws:
IOException- when fails to read the file.URISyntaxException- when the file path syntax is wrong.
-
read
Reads a limited number of records from an arrow file.- Parameters:
path- the input file path.limit- the number of records to read.- Returns:
- the data frame.
- Throws:
IOException- when fails to read the file.URISyntaxException- when the file path syntax is wrong.
-
read
Reads a limited number of records from an arrow file.- Parameters:
input- the input stream.limit- the number of records to read.- Returns:
- the data frame.
- Throws:
IOException- when fails to read the file.
-
write
Writes the data frame to an arrow file.- Parameters:
data- the data frame.path- the output file path.- Throws:
IOException- when fails to write the file.
-