diff --git a/java/adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/JdbcToArrow.java b/java/adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/JdbcToArrow.java index f99509651b213..14e4368368dda 100644 --- a/java/adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/JdbcToArrow.java +++ b/java/adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/JdbcToArrow.java @@ -34,10 +34,10 @@ /** * Utility class to convert JDBC objects to columnar Arrow format objects. - *

- * This utility uses following data mapping to map JDBC/SQL datatype to Arrow data types. - *

- * CHAR --> ArrowType.Utf8 + * + *

This utility uses following data mapping to map JDBC/SQL datatype to Arrow data types. + * + *

CHAR --> ArrowType.Utf8 * NCHAR --> ArrowType.Utf8 * VARCHAR --> ArrowType.Utf8 * NVARCHAR --> ArrowType.Utf8 @@ -61,8 +61,8 @@ * TIMESTAMP --> ArrowType.Timestamp(TimeUnit.MILLISECOND, timezone=null) * CLOB --> ArrowType.Utf8 * BLOB --> ArrowType.Binary - *

- * TODO: At this time, SQL Data type java.sql.Types.ARRAY is still not supported. + * + *

TODO: At this time, SQL Data type java.sql.Types.ARRAY is still not supported. * * @since 0.10.0 */ @@ -124,9 +124,9 @@ public static VectorSchemaRoot sqlToArrow( * For the given JDBC {@link ResultSet}, fetch the data from Relational DB and convert it to Arrow objects. This * method uses the default RootAllocator and Calendar object. * - * @param resultSet + * @param resultSet ResultSet to use to fetch the data from underlying database * @return Arrow Data Objects {@link VectorSchemaRoot} - * @throws SQLException + * @throws SQLException on error */ public static VectorSchemaRoot sqlToArrow(ResultSet resultSet) throws SQLException, IOException { Preconditions.checkNotNull(resultSet, "JDBC ResultSet object can not be null"); @@ -137,10 +137,10 @@ public static VectorSchemaRoot sqlToArrow(ResultSet resultSet) throws SQLExcepti /** * For the given JDBC {@link ResultSet}, fetch the data from Relational DB and convert it to Arrow objects. * - * @param resultSet + * @param resultSet ResultSet to use to fetch the data from underlying database * @param allocator Memory allocator * @return Arrow Data Objects {@link VectorSchemaRoot} - * @throws SQLException + * @throws SQLException on error */ public static VectorSchemaRoot sqlToArrow(ResultSet resultSet, BaseAllocator allocator) throws SQLException, IOException { @@ -153,10 +153,10 @@ public static VectorSchemaRoot sqlToArrow(ResultSet resultSet, BaseAllocator all /** * For the given JDBC {@link ResultSet}, fetch the data from Relational DB and convert it to Arrow objects. * - * @param resultSet + * @param resultSet ResultSet to use to fetch the data from underlying database * @param calendar Calendar instance to use for Date, Time and Timestamp datasets. * @return Arrow Data Objects {@link VectorSchemaRoot} - * @throws SQLException + * @throws SQLException on error */ public static VectorSchemaRoot sqlToArrow(ResultSet resultSet, Calendar calendar) throws SQLException, IOException { Preconditions.checkNotNull(resultSet, "JDBC ResultSet object can not be null"); @@ -171,11 +171,11 @@ public static VectorSchemaRoot sqlToArrow(ResultSet resultSet, Calendar calendar /** * For the given JDBC {@link ResultSet}, fetch the data from Relational DB and convert it to Arrow objects. * - * @param resultSet + * @param resultSet ResultSet to use to fetch the data from underlying database * @param allocator Memory allocator to use. * @param calendar Calendar instance to use for Date, Time and Timestamp datasets. * @return Arrow Data Objects {@link VectorSchemaRoot} - * @throws SQLException + * @throws SQLException on error */ public static VectorSchemaRoot sqlToArrow(ResultSet resultSet, BaseAllocator allocator, Calendar calendar) throws SQLException, IOException { diff --git a/java/adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/JdbcToArrowUtils.java b/java/adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/JdbcToArrowUtils.java index 3fcded5b1ceff..3425fa6471e87 100644 --- a/java/adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/JdbcToArrowUtils.java +++ b/java/adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/JdbcToArrowUtils.java @@ -92,10 +92,10 @@ public class JdbcToArrowUtils { /** * Create Arrow {@link Schema} object for the given JDBC {@link ResultSetMetaData}. - *

- * This method currently performs following type mapping for JDBC SQL data types to corresponding Arrow data types. - *

- * CHAR --> ArrowType.Utf8 + * + *

This method currently performs following type mapping for JDBC SQL data types to corresponding Arrow data types. + * + *

CHAR --> ArrowType.Utf8 * NCHAR --> ArrowType.Utf8 * VARCHAR --> ArrowType.Utf8 * NVARCHAR --> ArrowType.Utf8 @@ -122,7 +122,7 @@ public class JdbcToArrowUtils { * * @param rsmd ResultSetMetaData * @return {@link Schema} - * @throws SQLException + * @throws SQLException on error */ public static Schema jdbcToArrowSchema(ResultSetMetaData rsmd, Calendar calendar) throws SQLException { @@ -224,7 +224,7 @@ private static void allocateVectors(VectorSchemaRoot root, int size) { * * @param rs ResultSet to use to fetch the data from underlying database * @param root Arrow {@link VectorSchemaRoot} object to populate - * @throws SQLException + * @throws SQLException on error */ public static void jdbcToArrowVectors(ResultSet rs, VectorSchemaRoot root, Calendar calendar) throws SQLException, IOException { diff --git a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/AbstractJdbcToArrowTest.java b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/AbstractJdbcToArrowTest.java index eb4e1520f2c2b..a147babc4524d 100644 --- a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/AbstractJdbcToArrowTest.java +++ b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/AbstractJdbcToArrowTest.java @@ -39,11 +39,11 @@ public abstract class AbstractJdbcToArrowTest { protected Table table; /** - * This method creates Table object after reading YAML file + * This method creates Table object after reading YAML file. * - * @param ymlFilePath - * @return - * @throws IOException + * @param ymlFilePath path to file + * @return Table object + * @throws IOException on error */ protected static Table getTable(String ymlFilePath, Class clss) throws IOException { return new ObjectMapper(new YAMLFactory()).readValue( @@ -52,10 +52,10 @@ protected static Table getTable(String ymlFilePath, Class clss) throws IOExcepti /** - * This method creates Connection object and DB table and also populate data into table for test + * This method creates Connection object and DB table and also populate data into table for test. * - * @throws SQLException - * @throws ClassNotFoundException + * @throws SQLException on error + * @throws ClassNotFoundException on error */ @Before public void setUp() throws SQLException, ClassNotFoundException { @@ -72,9 +72,9 @@ public void setUp() throws SQLException, ClassNotFoundException { } /** - * Clean up method to close connection after test completes + * Clean up method to close connection after test completes. * - * @throws SQLException + * @throws SQLException on error */ @After public void destroy() throws SQLException { @@ -85,12 +85,14 @@ public void destroy() throws SQLException { } /** - * This method returns collection of Table object for each test iteration + * Prepares test data and returns collection of Table object for each test iteration. * - * @return - * @throws SQLException - * @throws ClassNotFoundException - * @throws IOException + * @param testFiles files for test + * @param clss Class type + * @return Collection of Table objects + * @throws SQLException on error + * @throws ClassNotFoundException on error + * @throws IOException on error */ public static Object[][] prepareTestData(String[] testFiles, Class clss) throws SQLException, ClassNotFoundException, IOException { @@ -103,18 +105,18 @@ public static Object[][] prepareTestData(String[] testFiles, Class clss) } /** - * Abstract method to implement test Functionality to test JdbcToArrow methods + * Abstract method to implement test Functionality to test JdbcToArrow methods. * - * @throws SQLException - * @throws IOException + * @throws SQLException on error + * @throws IOException on error */ @Test public abstract void testJdbcToArroValues() throws SQLException, IOException; /** - * Abstract method to implement logic to assert test various datatype values + * Abstract method to implement logic to assert test various datatype values. * - * @param root + * @param root VectorSchemaRoot for test */ public abstract void testDataSets(VectorSchemaRoot root); diff --git a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/JdbcToArrowTestHelper.java b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/JdbcToArrowTestHelper.java index dafea32d3fedb..ec8e61bc8ce87 100644 --- a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/JdbcToArrowTestHelper.java +++ b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/JdbcToArrowTestHelper.java @@ -41,7 +41,7 @@ import org.apache.arrow.vector.VarCharVector; /** - * This is a Helper class which has functionalities to read and assert the values from the given FieldVector object + * This is a Helper class which has functionalities to read and assert the values from the given FieldVector object. */ public class JdbcToArrowTestHelper { diff --git a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowCharSetTest.java b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowCharSetTest.java index 14f195df5eb25..c7dff431da650 100644 --- a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowCharSetTest.java +++ b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowCharSetTest.java @@ -43,7 +43,7 @@ /** * JUnit Test Class which contains methods to test JDBC to Arrow data conversion functionality with UTF-8 Charset, - * including the multi-byte CJK characters for H2 database + * including the multi-byte CJK characters for H2 database. */ @RunWith(Parameterized.class) public class JdbcToArrowCharSetTest extends AbstractJdbcToArrowTest { @@ -59,19 +59,19 @@ public class JdbcToArrowCharSetTest extends AbstractJdbcToArrowTest { }; /** - * Constructor which populate table object for each test iteration + * Constructor which populate table object for each test iteration. * - * @param table + * @param table Table oject */ public JdbcToArrowCharSetTest(Table table) { this.table = table; } /** - * This method creates Connection object and DB table and also populate data into table for test + * This method creates Connection object and DB table and also populate data into table for test. * - * @throws SQLException - * @throws ClassNotFoundException + * @throws SQLException on error + * @throws ClassNotFoundException on error */ @Before public void setUp() throws SQLException, ClassNotFoundException { @@ -88,12 +88,12 @@ public void setUp() throws SQLException, ClassNotFoundException { } /** - * This method returns collection of Table object for each test iteration + * Get the test data as a collection of Table objects for each test iteration. * - * @return - * @throws SQLException - * @throws ClassNotFoundException - * @throws IOException + * @return Collection of Table objects + * @throws SQLException on error + * @throws ClassNotFoundException on error + * @throws IOException on error */ @Parameters public static Collection getTestData() throws SQLException, ClassNotFoundException, IOException { @@ -102,7 +102,7 @@ public static Collection getTestData() throws SQLException, ClassNotFo /** * Test Method to test JdbcToArrow Functionality for various H2 DB based datatypes with UTF-8 Charset, including - * the multi-byte CJK characters + * the multi-byte CJK characters. */ @Test public void testJdbcToArroValues() throws SQLException, IOException { @@ -119,9 +119,9 @@ public void testJdbcToArroValues() throws SQLException, IOException { } /** - * This method calls the assert methods for various DataSets + * This method calls the assert methods for various DataSets. * - * @param root + * @param root VectorSchemaRoot for test */ public void testDataSets(VectorSchemaRoot root) { assertVarcharVectorValues((VarCharVector) root.getVector(CLOB), table.getRowCount(), diff --git a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowDataTypesTest.java b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowDataTypesTest.java index e391056cbe88e..f6cd7645e0cac 100644 --- a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowDataTypesTest.java +++ b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowDataTypesTest.java @@ -63,7 +63,7 @@ /** * JUnit Test Class which contains methods to test JDBC to Arrow data conversion functionality with various data types - * for H2 database using multiple test data files + * for H2 database using multiple test data files. */ @RunWith(Parameterized.class) public class JdbcToArrowDataTypesTest extends AbstractJdbcToArrowTest { @@ -107,21 +107,21 @@ public class JdbcToArrowDataTypesTest extends AbstractJdbcToArrowTest { }; /** - * Constructor which populate table object for each test iteration + * Constructor which populate table object for each test iteration. * - * @param table + * @param table Table object */ public JdbcToArrowDataTypesTest(Table table) { this.table = table; } /** - * This method returns collection of Table object for each test iteration + * Get the test data as a collection of Table objects for each test iteration. * - * @return - * @throws SQLException - * @throws ClassNotFoundException - * @throws IOException + * @return Collection of Table objects + * @throws SQLException on error + * @throws ClassNotFoundException on error + * @throws IOException on error */ @Parameters public static Collection getTestData() throws SQLException, ClassNotFoundException, IOException { @@ -129,7 +129,7 @@ public static Collection getTestData() throws SQLException, ClassNotFo } /** - * Test Method to test JdbcToArrow Functionality for various H2 DB based datatypes + * Test Method to test JdbcToArrow Functionality for various H2 DB based datatypes. */ @Test public void testJdbcToArroValues() throws SQLException, IOException { @@ -145,9 +145,9 @@ public void testJdbcToArroValues() throws SQLException, IOException { } /** - * This method calls the assert methods for various DataSets + * This method calls the assert methods for various DataSets. * - * @param root + * @param root VectorSchemaRoot for test */ public void testDataSets(VectorSchemaRoot root) { switch (table.getType()) { diff --git a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowNullTest.java b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowNullTest.java index 07d313cf9b68e..7933732f014b0 100644 --- a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowNullTest.java +++ b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowNullTest.java @@ -50,7 +50,7 @@ /** * JUnit Test Class which contains methods to test JDBC to Arrow data conversion functionality with null values for - * H2 database + * H2 database. */ @RunWith(Parameterized.class) public class JdbcToArrowNullTest extends AbstractJdbcToArrowTest { @@ -64,21 +64,21 @@ public class JdbcToArrowNullTest extends AbstractJdbcToArrowTest { }; /** - * Constructor which populate table object for each test iteration + * Constructor which populate table object for each test iteration. * - * @param table + * @param table Table object */ public JdbcToArrowNullTest(Table table) { this.table = table; } /** - * This method returns collection of Table object for each test iteration + * Get the test data as a collection of Table objects for each test iteration. * - * @return - * @throws SQLException - * @throws ClassNotFoundException - * @throws IOException + * @return Collection of Table objects + * @throws SQLException on error + * @throws ClassNotFoundException on error + * @throws IOException on error */ @Parameters public static Collection getTestData() throws SQLException, ClassNotFoundException, IOException { @@ -86,7 +86,7 @@ public static Collection getTestData() throws SQLException, ClassNotFo } /** - * Test Method to test JdbcToArrow Functionality for various H2 DB based datatypes with null values + * Test Method to test JdbcToArrow Functionality for various H2 DB based datatypes with null values. */ @Test public void testJdbcToArroValues() throws SQLException, IOException { @@ -103,9 +103,9 @@ public void testJdbcToArroValues() throws SQLException, IOException { /** - * This method calls the assert methods for various DataSets + * This method calls the assert methods for various DataSets. * - * @param root + * @param root VectorSchemaRoot for test */ public void testDataSets(VectorSchemaRoot root) { switch (table.getType()) { @@ -122,11 +122,11 @@ public void testDataSets(VectorSchemaRoot root) { } /** - * This method assert tests null values in vectors for all the datatypes + * This method assert tests null values in vectors for all the datatypes. * - * @param vectors - * @param root - * @param rowCount + * @param vectors Vectors to test + * @param root VectorSchemaRoot for test + * @param rowCount number of rows */ public void sqlToArrowTestNullValues(String[] vectors, VectorSchemaRoot root, int rowCount) { assertNullValues((IntVector) root.getVector(vectors[0]), rowCount); @@ -149,11 +149,11 @@ public void sqlToArrowTestNullValues(String[] vectors, VectorSchemaRoot root, in } /** - * This method assert tests null values in vectors for some selected datatypes + * This method assert tests null values in vectors for some selected datatypes. * - * @param vectors - * @param root - * @param rowCount + * @param vectors Vectors to test + * @param root VectorSchemaRoot for test + * @param rowCount number of rows */ public void sqlToArrowTestSelectedNullColumnsValues(String[] vectors, VectorSchemaRoot root, int rowCount) { assertNullValues((BigIntVector) root.getVector(vectors[0]), rowCount); diff --git a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowTest.java b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowTest.java index ecf4e621eabf4..4cbfeafb0a531 100644 --- a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowTest.java +++ b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowTest.java @@ -71,7 +71,7 @@ /** * JUnit Test Class which contains methods to test JDBC to Arrow data conversion functionality with various data types - * for H2 database using single test data file + * for H2 database using single test data file. */ @RunWith(Parameterized.class) public class JdbcToArrowTest extends AbstractJdbcToArrowTest { @@ -97,21 +97,21 @@ public class JdbcToArrowTest extends AbstractJdbcToArrowTest { private static final String[] testFiles = {"h2/test1_all_datatypes_h2.yml"}; /** - * Constructor which populate table object for each test iteration + * Constructor which populate table object for each test iteration. * - * @param table + * @param table Table object */ public JdbcToArrowTest(Table table) { this.table = table; } /** - * This method returns collection of Table object for each test iteration + * Get the test data as a collection of Table objects for each test iteration. * - * @return - * @throws SQLException - * @throws ClassNotFoundException - * @throws IOException + * @return Collection of Table objects + * @throws SQLException on error + * @throws ClassNotFoundException on error + * @throws IOException on error */ @Parameters public static Collection getTestData() throws SQLException, ClassNotFoundException, IOException { @@ -119,7 +119,7 @@ public static Collection getTestData() throws SQLException, ClassNotFo } /** - * Test Method to test JdbcToArrow Functionality for various H2 DB based datatypes with only one test data file + * Test Method to test JdbcToArrow Functionality for various H2 DB based datatypes with only one test data file. */ @Test public void testJdbcToArroValues() throws SQLException, IOException { @@ -136,9 +136,9 @@ public void testJdbcToArroValues() throws SQLException, IOException { } /** - * This method calls the assert methods for various DataSets + * This method calls the assert methods for various DataSets. * - * @param root + * @param root VectorSchemaRoot for test */ public void testDataSets(VectorSchemaRoot root) { assertBigIntVectorValues((BigIntVector) root.getVector(BIGINT), table.getRowCount(), diff --git a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowTimeZoneTest.java b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowTimeZoneTest.java index 780b65c93b75c..93dc10477f697 100644 --- a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowTimeZoneTest.java +++ b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowTimeZoneTest.java @@ -43,7 +43,7 @@ /** * JUnit Test Class which contains methods to test JDBC to Arrow data conversion functionality with TimeZone based Date, - * Time and Timestamp datatypes for H2 database + * Time and Timestamp datatypes for H2 database. */ @RunWith(Parameterized.class) @@ -72,21 +72,21 @@ public class JdbcToArrowTimeZoneTest extends AbstractJdbcToArrowTest { }; /** - * Constructor which populate table object for each test iteration + * Constructor which populate table object for each test iteration. * - * @param table + * @param table Table object */ public JdbcToArrowTimeZoneTest(Table table) { this.table = table; } /** - * This method returns collection of Table object for each test iteration + * Get the test data as a collection of Table objects for each test iteration. * - * @return - * @throws SQLException - * @throws ClassNotFoundException - * @throws IOException + * @return Collection of Table objects + * @throws SQLException on error + * @throws ClassNotFoundException on error + * @throws IOException on error */ @Parameters public static Collection getTestData() throws SQLException, ClassNotFoundException, IOException { @@ -95,7 +95,7 @@ public static Collection getTestData() throws SQLException, ClassNotFo /** * Test Method to test JdbcToArrow Functionality for various H2 DB based datatypes with TimeZone based Date, - * Time and Timestamp datatype + * Time and Timestamp datatype. */ @Test public void testJdbcToArroValues() throws SQLException, IOException { @@ -108,9 +108,9 @@ public void testJdbcToArroValues() throws SQLException, IOException { } /** - * This method calls the assert methods for various DataSets + * This method calls the assert methods for various DataSets. * - * @param root + * @param root VectorSchemaRoot for test */ public void testDataSets(VectorSchemaRoot root) { switch (table.getType()) { diff --git a/java/dev/checkstyle/checkstyle.xml b/java/dev/checkstyle/checkstyle.xml index 508257c735b4c..0c1cadf9669c9 100644 --- a/java/dev/checkstyle/checkstyle.xml +++ b/java/dev/checkstyle/checkstyle.xml @@ -16,8 +16,8 @@ --> + "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" + "https://checkstyle.org/dtds/configuration_1_3.dtd"> + "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" + "https://checkstyle.org/dtds/suppressions_1_2.dtd"> @@ -32,10 +32,10 @@ - - + + - + diff --git a/java/flight/src/main/java/org/apache/arrow/flight/ArrowMessage.java b/java/flight/src/main/java/org/apache/arrow/flight/ArrowMessage.java index b652e16778c84..9764ff39a4a19 100644 --- a/java/flight/src/main/java/org/apache/arrow/flight/ArrowMessage.java +++ b/java/flight/src/main/java/org/apache/arrow/flight/ArrowMessage.java @@ -222,7 +222,7 @@ private static int readRawVarint32(InputStream is) throws IOException { /** * Convert the ArrowMessage to an InputStream. - * @return + * @return InputStream */ private InputStream asInputStream(BufferAllocator allocator) { try { diff --git a/java/flight/src/main/java/org/apache/arrow/flight/FlightClient.java b/java/flight/src/main/java/org/apache/arrow/flight/FlightClient.java index 7f3daa4316cba..ad7c7e28da242 100644 --- a/java/flight/src/main/java/org/apache/arrow/flight/FlightClient.java +++ b/java/flight/src/main/java/org/apache/arrow/flight/FlightClient.java @@ -64,7 +64,9 @@ public class FlightClient implements AutoCloseable { private final MethodDescriptor doGetDescriptor; private final MethodDescriptor doPutDescriptor; - /** Construct client for accessing RouteGuide server using the existing channel. */ + /** + * Construct client for accessing RouteGuide server using the existing channel. + */ public FlightClient(BufferAllocator incomingAllocator, Location location) { final ManagedChannelBuilder channelBuilder = ManagedChannelBuilder.forAddress(location.getHost(), location.getPort()).maxTraceEvents(0).usePlaintext(); @@ -77,9 +79,9 @@ public FlightClient(BufferAllocator incomingAllocator, Location location) { } /** - * Get a list of available flights - * @param criteria - * @return + * Get a list of available flights. + * @param criteria Critera for selecting flights + * @return FlightInfo Iterable */ public Iterable listFlights(Criteria criteria) { return ImmutableList.copyOf(blockingStub.listFlights(criteria.asCriteria())) @@ -111,9 +113,9 @@ public void authenticate(ClientAuthHandler handler) { /** * Create or append a descriptor with another stream. - * @param descriptor - * @param root - * @return + * @param descriptor FlightDescriptor + * @param root VectorSchemaRoot + * @return ClientStreamListener */ public ClientStreamListener startPut(FlightDescriptor descriptor, VectorSchemaRoot root) { Preconditions.checkNotNull(descriptor); diff --git a/java/flight/src/main/java/org/apache/arrow/flight/StreamPipe.java b/java/flight/src/main/java/org/apache/arrow/flight/StreamPipe.java index 94d065d2571bc..3563277b7b2b4 100644 --- a/java/flight/src/main/java/org/apache/arrow/flight/StreamPipe.java +++ b/java/flight/src/main/java/org/apache/arrow/flight/StreamPipe.java @@ -26,7 +26,8 @@ /** * Shim listener to avoid exposing GRPC internals. - * @param + * @param From Type + * @param To Type */ class StreamPipe implements StreamListener { diff --git a/java/flight/src/main/java/org/apache/arrow/flight/auth/ServerAuthWrapper.java b/java/flight/src/main/java/org/apache/arrow/flight/auth/ServerAuthWrapper.java index 28f278934491c..d07ac945d3830 100644 --- a/java/flight/src/main/java/org/apache/arrow/flight/auth/ServerAuthWrapper.java +++ b/java/flight/src/main/java/org/apache/arrow/flight/auth/ServerAuthWrapper.java @@ -36,10 +36,10 @@ public class ServerAuthWrapper { /** * Wrap the auth handler for handshake purposes. * - * @param authHandler - * @param responseObserver - * @param executors - * @return + * @param authHandler Authentication handler + * @param responseObserver Observer for handshake response + * @param executors ExecutorService + * @return AuthObserver */ public static StreamObserver wrapHandshake(ServerAuthHandler authHandler, StreamObserver responseObserver, ExecutorService executors) { diff --git a/java/flight/src/main/java/org/apache/arrow/flight/example/ExampleFlightServer.java b/java/flight/src/main/java/org/apache/arrow/flight/example/ExampleFlightServer.java index 6974e469c6690..2a73269bcc1d8 100644 --- a/java/flight/src/main/java/org/apache/arrow/flight/example/ExampleFlightServer.java +++ b/java/flight/src/main/java/org/apache/arrow/flight/example/ExampleFlightServer.java @@ -27,7 +27,7 @@ import org.apache.arrow.util.AutoCloseables; /** - * An Example Flight Server that provides access to the InMemoryStore + * An Example Flight Server that provides access to the InMemoryStore. */ public class ExampleFlightServer implements AutoCloseable { diff --git a/java/flight/src/main/java/org/apache/arrow/flight/grpc/AddWritableBuffer.java b/java/flight/src/main/java/org/apache/arrow/flight/grpc/AddWritableBuffer.java index 25e2da7bb0190..80158d7babcef 100644 --- a/java/flight/src/main/java/org/apache/arrow/flight/grpc/AddWritableBuffer.java +++ b/java/flight/src/main/java/org/apache/arrow/flight/grpc/AddWritableBuffer.java @@ -88,7 +88,7 @@ public class AddWritableBuffer { * @param buf The buffer to add. * @param stream The Candidate OutputStream to add to. * @return True if added. False if not possible. - * @throws IOException + * @throws IOException on error */ public static boolean add(ByteBuf buf, OutputStream stream) throws IOException { buf.readBytes(stream, buf.readableBytes()); diff --git a/java/flight/src/main/java/org/apache/arrow/flight/grpc/GetReadableBuffer.java b/java/flight/src/main/java/org/apache/arrow/flight/grpc/GetReadableBuffer.java index 66aa2b84b0500..70a9a371cc346 100644 --- a/java/flight/src/main/java/org/apache/arrow/flight/grpc/GetReadableBuffer.java +++ b/java/flight/src/main/java/org/apache/arrow/flight/grpc/GetReadableBuffer.java @@ -28,7 +28,7 @@ * Enable access to ReadableBuffer directly to copy data from an BufferInputStream into a target * ByteBuffer/ByteBuf. * - * This could be solved by BufferInputStream exposing Drainable. + *

This could be solved by BufferInputStream exposing Drainable. */ public class GetReadableBuffer { diff --git a/java/gandiva/src/main/java/org/apache/arrow/gandiva/evaluator/Filter.java b/java/gandiva/src/main/java/org/apache/arrow/gandiva/evaluator/Filter.java index f9be871d79b8e..25904d3dc1d76 100644 --- a/java/gandiva/src/main/java/org/apache/arrow/gandiva/evaluator/Filter.java +++ b/java/gandiva/src/main/java/org/apache/arrow/gandiva/evaluator/Filter.java @@ -58,7 +58,7 @@ private Filter(long moduleId, Schema schema) { * Filter::Evaluate() against a RecordBatch to evaluate the filter on this record batch * * @param schema Table schema. The field names in the schema should match the fields used to - * create the TreeNodes + * create the TreeNodes * @param condition condition to be evaluated against data * @return A native filter object that can be used to invoke on a RecordBatch */ @@ -71,7 +71,7 @@ public static Filter make(Schema schema, Condition condition) throws GandivaExce * Filter::Evaluate() against a RecordBatch to evaluate the filter on this record batch * * @param schema Table schema. The field names in the schema should match the fields used to - * create the TreeNodes + * create the TreeNodes * @param condition condition to be evaluated against data * @param configurationId Custom configuration created through config builder. * @return A native evaluator object that can be used to invoke these projections on a RecordBatch diff --git a/java/memory/src/main/java/io/netty/buffer/ArrowBuf.java b/java/memory/src/main/java/io/netty/buffer/ArrowBuf.java index 509a8aebd6b6c..bfe97015f1218 100644 --- a/java/memory/src/main/java/io/netty/buffer/ArrowBuf.java +++ b/java/memory/src/main/java/io/netty/buffer/ArrowBuf.java @@ -141,8 +141,8 @@ private final void checkIndexD(int index, int fieldLength) { /** * Allows a function to determine whether not reading a particular string of bytes is valid. - *

- * Will throw an exception if the memory is not readable for some reason. Only doesn't + * + *

Will throw an exception if the memory is not readable for some reason. Only doesn't * something in the case that * AssertionUtil.BOUNDS_CHECKING_ENABLED is true. * @@ -173,8 +173,8 @@ private void ensure(int width) { * accounting. This has no impact on the reference counting for the current ArrowBuf except in * the situation where the * passed in Allocator is the same as the current buffer. - *

- * This operation has no impact on the reference count of this ArrowBuf. The newly created + * + *

This operation has no impact on the reference count of this ArrowBuf. The newly created * ArrowBuf with either have a * reference count of 1 (in the case that this is the first time this memory is being * associated with the new @@ -211,16 +211,16 @@ public ArrowBuf retain(BufferAllocator target) { * this ArrowBuf does not currently own the memory underlying it (and is only associated with * it), this does not * transfer any ownership to the newly created ArrowBuf. - *

- * This operation has no impact on the reference count of this ArrowBuf. The newly created + * + *

This operation has no impact on the reference count of this ArrowBuf. The newly created * ArrowBuf with either have a * reference count of 1 (in the case that this is the first time this memory is being * associated with the new * allocator) or the current value of the reference count for the other * AllocationManager/BufferLedger combination in * the case that the provided allocator already had an association to this underlying memory. - *

- * Transfers will always succeed, even if that puts the other allocator into an overlimit + * + *

Transfers will always succeed, even if that puts the other allocator into an overlimit * situation. This is possible * due to the fact that the original owning allocator may have allocated this memory out of a * local reservation @@ -234,7 +234,7 @@ public ArrowBuf retain(BufferAllocator target) { * * @param target The allocator to transfer ownership to. * @return A new transfer result with the impact of the transfer (whether it was overlimit) as - * well as the newly created ArrowBuf. + * well as the newly created ArrowBuf. */ public TransferResult transferOwnership(BufferAllocator target) { @@ -790,7 +790,9 @@ protected short _getShort(int index) { return getShort(index); } - /** @see {@link #getShortLE(int)} */ + /** + * @see {@link #getShortLE(int)}. + */ @Override protected short _getShortLE(int index) { return getShortLE(index); @@ -801,19 +803,25 @@ protected int _getInt(int index) { return getInt(index); } - /** @see {@link #getIntLE(int)} */ + /** + * @see {@link #getIntLE(int)}. + */ @Override protected int _getIntLE(int index) { return getIntLE(index); } - /** @see {@link #getUnsignedMedium(int)} */ + /** + * @see {@link #getUnsignedMedium(int)}. + */ @Override protected int _getUnsignedMedium(int index) { return getUnsignedMedium(index); } - /** @see {@link #getUnsignedMediumLE(int)} */ + /** + * @see {@link #getUnsignedMediumLE(int)}. + */ @Override protected int _getUnsignedMediumLE(int index) { return getUnsignedMediumLE(index); @@ -824,7 +832,9 @@ protected long _getLong(int index) { return getLong(index); } - /** @see {@link #getLongLE(int)} */ + /** + * @see {@link #getLongLE(int)}. + */ @Override protected long _getLongLE(int index) { return getLongLE(index); @@ -840,7 +850,9 @@ protected void _setShort(int index, int value) { setShort(index, value); } - /** @see {@link #setShortLE(int, int)} */ + /** + * @see {@link #setShortLE(int, int)}. + */ @Override protected void _setShortLE(int index, int value) { setShortLE(index, value); @@ -851,7 +863,9 @@ protected void _setMedium(int index, int value) { setMedium(index, value); } - /** @see {@link #setMediumLE(int, int)} */ + /** + * @see {@link #setMediumLE(int, int)}. + */ @Override protected void _setMediumLE(int index, int value) { setMediumLE(index, value); @@ -862,7 +876,9 @@ protected void _setInt(int index, int value) { setInt(index, value); } - /** @see {@link #setIntLE(int, int)} */ + /** + * @see {@link #setIntLE(int, int)}. + */ @Override protected void _setIntLE(int index, int value) { setIntLE(index, value); @@ -873,7 +889,9 @@ protected void _setLong(int index, long value) { setLong(index, value); } - /** @see {@link #setLongLE(int, long)} */ + /** + * @see {@link #setLongLE(int, long)}. + */ @Override public void _setLongLE(int index, long value) { setLongLE(index, value); diff --git a/java/memory/src/main/java/org/apache/arrow/memory/Accountant.java b/java/memory/src/main/java/org/apache/arrow/memory/Accountant.java index 28aeaf299261e..36c0ac412cad8 100644 --- a/java/memory/src/main/java/org/apache/arrow/memory/Accountant.java +++ b/java/memory/src/main/java/org/apache/arrow/memory/Accountant.java @@ -32,7 +32,7 @@ class Accountant implements AutoCloseable { /** - * The parent allocator + * The parent allocator. */ protected final Accountant parent; @@ -53,7 +53,7 @@ class Accountant implements AutoCloseable { private final AtomicLong allocationLimit = new AtomicLong(); /** - * Currently allocated amount of memory; + * Currently allocated amount of memory. */ private final AtomicLong locallyHeldMemory = new AtomicLong(); @@ -87,8 +87,8 @@ public Accountant(Accountant parent, long reservation, long maxAllocation) { * Attempt to allocate the requested amount of memory. Either completely succeeds or completely * fails. Constructs a a * log of delta - *

- * If it fails, no changes are made to accounting. + * + *

If it fails, no changes are made to accounting. * * @param size The amount of memory to reserve in bytes. * @return True if the allocation was successful, false if the allocation failed. diff --git a/java/memory/src/main/java/org/apache/arrow/memory/AllocationListener.java b/java/memory/src/main/java/org/apache/arrow/memory/AllocationListener.java index 4d86ca6294bac..4fd5330042bc1 100644 --- a/java/memory/src/main/java/org/apache/arrow/memory/AllocationListener.java +++ b/java/memory/src/main/java/org/apache/arrow/memory/AllocationListener.java @@ -19,8 +19,8 @@ /** * An allocation listener being notified for allocation/deallocation - *

- * It might be called from multiple threads if the allocator hierarchy shares a listener, in which + * + *

It might be called from multiple threads if the allocator hierarchy shares a listener, in which * case, the provider should take care of making the implementation thread-safe. */ public interface AllocationListener { @@ -45,7 +45,7 @@ public void onChildRemoved(BufferAllocator parentAllocator, BufferAllocator chil }; /** - * Called each time a new buffer is allocated + * Called each time a new buffer is allocated. * * @param size the buffer size being allocated */ @@ -63,14 +63,16 @@ public void onChildRemoved(BufferAllocator parentAllocator, BufferAllocator chil boolean onFailedAllocation(long size, AllocationOutcome outcome); /** - * Called immediately after a child allocator was added to the parent allocator + * Called immediately after a child allocator was added to the parent allocator. + * * @param parentAllocator The parent allocator to which a child was added * @param childAllocator The child allocator that was just added */ void onChildAdded(BufferAllocator parentAllocator, BufferAllocator childAllocator); /** - * Called immediately after a child allocator was removed from the parent allocator + * Called immediately after a child allocator was removed from the parent allocator. + * * @param parentAllocator The parent allocator from which a child was removed * @param childAllocator The child allocator that was just removed */ diff --git a/java/memory/src/main/java/org/apache/arrow/memory/AllocationManager.java b/java/memory/src/main/java/org/apache/arrow/memory/AllocationManager.java index a313f53c86171..aaa1f506fb5c2 100644 --- a/java/memory/src/main/java/org/apache/arrow/memory/AllocationManager.java +++ b/java/memory/src/main/java/org/apache/arrow/memory/AllocationManager.java @@ -42,12 +42,12 @@ * This class is also responsible for managing when memory is allocated and returned to the * Netty-based * PooledByteBufAllocatorL. - *

- * The only reason that this isn't package private is we're forced to put ArrowBuf in Netty's + * + *

The only reason that this isn't package private is we're forced to put ArrowBuf in Netty's * package which need access * to these objects or methods. - *

- * Threading: AllocationManager manages thread-safety internally. Operations within the context + * + *

Threading: AllocationManager manages thread-safety internally. Operations within the context * of a single BufferLedger * are lockless in nature and can be leveraged by multiple threads. Operations that cross the * context of two ledgers @@ -215,7 +215,7 @@ private BufferLedger(BaseAllocator allocator) { } /** - * Get the allocator for this ledger + * Get the allocator for this ledger. * @return allocator */ private BaseAllocator getAllocator() { @@ -368,8 +368,7 @@ public BufferLedger getLedgerForAllocator(BufferAllocator allocator) { * * @param offset The offset in bytes to start this new ArrowBuf. * @param length The length in bytes that this ArrowBuf will provide access to. - * @return A new ArrowBuf that shares references with all ArrowBufs associated with this - * BufferLedger + * @return A new ArrowBuf that shares references with all ArrowBufs associated with this BufferLedger */ public ArrowBuf newArrowBuf(int offset, int length) { allocator.assertOpen(); @@ -383,8 +382,7 @@ public ArrowBuf newArrowBuf(int offset, int length) { * @param length The length in bytes that this ArrowBuf will provide access to. * @param manager An optional BufferManager argument that can be used to manage expansion of * this ArrowBuf - * @return A new ArrowBuf that shares references with all ArrowBufs associated with this - * BufferLedger + * @return A new ArrowBuf that shares references with all ArrowBufs associated with this BufferLedger */ public ArrowBuf newArrowBuf(int offset, int length, BufferManager manager) { allocator.assertOpen(); diff --git a/java/memory/src/main/java/org/apache/arrow/memory/AllocatorClosedException.java b/java/memory/src/main/java/org/apache/arrow/memory/AllocatorClosedException.java index 1631155704421..39c2ef82e0994 100644 --- a/java/memory/src/main/java/org/apache/arrow/memory/AllocatorClosedException.java +++ b/java/memory/src/main/java/org/apache/arrow/memory/AllocatorClosedException.java @@ -25,6 +25,8 @@ public class AllocatorClosedException extends RuntimeException { /** + * Constructs a new allocator closed exception with a given message. + * * @param message string associated with the cause */ public AllocatorClosedException(String message) { diff --git a/java/memory/src/main/java/org/apache/arrow/memory/BaseAllocator.java b/java/memory/src/main/java/org/apache/arrow/memory/BaseAllocator.java index ce74690459dd6..857f6c98437ff 100644 --- a/java/memory/src/main/java/org/apache/arrow/memory/BaseAllocator.java +++ b/java/memory/src/main/java/org/apache/arrow/memory/BaseAllocator.java @@ -153,6 +153,13 @@ public static long nextPowerOfTwo(long val) { } } + /** + * Specify an indentation amount when using a StringBuilder. + * + * @param sb StringBuilder to use + * @param indent Indentation amount + * @return the StringBuilder object with indentation applied + */ public static StringBuilder indent(StringBuilder sb, int indent) { final char[] indentation = new char[indent * 2]; Arrays.fill(indentation, ' '); @@ -478,12 +485,10 @@ void verifyAllocator() { /** * Verifies the accounting state of the allocator. Only works for DEBUG. - *

- *

- * This overload is used for recursive calls, allowing for checking that ArrowBufs are unique + * + *

This overload is used for recursive calls, allowing for checking that ArrowBufs are unique * across all allocators * that are checked. - *

* * @param buffersSeen a map of buffers that have already been seen when walking a tree of * allocators @@ -805,9 +810,8 @@ public boolean reserve(int nBytes) { /** * Allocate a buffer of the requested size. - *

- *

- * The implementation of the allocator's inner class provides this. + * + *

The implementation of the allocator's inner class provides this. * * @param nBytes the size of the buffer requested * @return the buffer, or null, if the request cannot be satisfied diff --git a/java/memory/src/main/java/org/apache/arrow/memory/ChildAllocator.java b/java/memory/src/main/java/org/apache/arrow/memory/ChildAllocator.java index 3ec3784ed13b1..98c316cc3c664 100644 --- a/java/memory/src/main/java/org/apache/arrow/memory/ChildAllocator.java +++ b/java/memory/src/main/java/org/apache/arrow/memory/ChildAllocator.java @@ -22,7 +22,7 @@ * Child allocator class. Only slightly different from the {@see RootAllocator}, * in that these can't be created directly, but must be obtained from * {@see BufferAllocator#newChildAllocator(AllocatorOwner, long, long, int)}. - *

+ * *

Child allocators can only be created by the root, or other children, so * this class is package private.

*/ diff --git a/java/memory/src/main/java/org/apache/arrow/memory/LowCostIdentityHashMap.java b/java/memory/src/main/java/org/apache/arrow/memory/LowCostIdentityHashMap.java index c59e28e6c6ffb..0537a52f2f11e 100644 --- a/java/memory/src/main/java/org/apache/arrow/memory/LowCostIdentityHashMap.java +++ b/java/memory/src/main/java/org/apache/arrow/memory/LowCostIdentityHashMap.java @@ -22,11 +22,13 @@ /** * Highly specialized IdentityHashMap that implements only partial - * Map APIs - * It incurs low initial cost (just two elements by default) + * Map APIs. + * It incurs low initial cost (just two elements by default). * It assumes Value includes the Key - Implements @ValueWithKeyIncluded iface - * that provides "getKey" method - * @param + * that provides "getKey" method. + * + * @param Key type + * @param Value type */ public class LowCostIdentityHashMap> { @@ -87,7 +89,7 @@ private int computeElementArraySize() { } /** - * Create a new element array + * Create a new element array. * * @param s * the number of elements @@ -147,8 +149,7 @@ public boolean containsValue(V value) { /** * Returns the value of the mapping with the specified key. * - * @param key - * the key. + * @param key the key. * @return the value of the mapping with the specified key. */ public V get(K key) { @@ -190,8 +191,7 @@ static int getModuloHash(Object key, int length) { /** * Maps the specified key to the specified value. * - * @param value - * the value. + * @param value the value. * @return the value of any previous mapping with the specified key or * {@code null} if there was no such mapping. */ @@ -246,8 +246,7 @@ private void computeMaxSize() { /** * Removes the mapping with the specified key from this map. * - * @param key - * the key of the mapping to remove. + * @param key the key of the mapping to remove. * @return the value of the removed mapping, or {@code null} if no mapping * for the specified key was found. */ @@ -322,7 +321,8 @@ public int size() { } /** - * Special API to return next value - substitute of regular Map.values.iterator().next() + * Special API to return next value - substitute of regular Map.values.iterator().next(). + * * @return next available value or null if none available */ public V getNextValue() { diff --git a/java/memory/src/main/java/org/apache/arrow/memory/ValueWithKeyIncluded.java b/java/memory/src/main/java/org/apache/arrow/memory/ValueWithKeyIncluded.java index 7af202dd02b1b..20ab77031b8b6 100644 --- a/java/memory/src/main/java/org/apache/arrow/memory/ValueWithKeyIncluded.java +++ b/java/memory/src/main/java/org/apache/arrow/memory/ValueWithKeyIncluded.java @@ -19,7 +19,7 @@ /** * Helper Iface to generify a value to be included in the map where - * key is part of the value + * key is part of the value. */ public interface ValueWithKeyIncluded { K getKey(); diff --git a/java/memory/src/main/java/org/apache/arrow/memory/util/HistoricalLog.java b/java/memory/src/main/java/org/apache/arrow/memory/util/HistoricalLog.java index dba45ab28d3a1..f02539a8a3d79 100644 --- a/java/memory/src/main/java/org/apache/arrow/memory/util/HistoricalLog.java +++ b/java/memory/src/main/java/org/apache/arrow/memory/util/HistoricalLog.java @@ -50,14 +50,13 @@ public HistoricalLog(final String idStringFormat, Object... args) { /** * Constructor. The format string will be formatted and have its arguments * substituted at the time this is called. - *

+ * *

This form supports the specification of a limit that will limit the * number of historical entries kept (which keeps down the amount of memory * used). With the limit, the first entry made is always kept (under the * assumption that this is the creation site of the object, which is usually * interesting), and then up to the limit number of entries are kept after that. * Each time a new entry is made, the oldest that is not the first is dropped. - *

* * @param limit the maximum number of historical entries that will be kept, not including * the first entry made @@ -104,7 +103,7 @@ public void buildHistory(final StringBuilder sb, boolean includeStackTrace) { } /** - * build the history and write it to sb + * Build the history and write it to sb. * * @param sb output * @param indent starting indent (usually "") diff --git a/java/memory/src/main/java/org/apache/arrow/util/Preconditions.java b/java/memory/src/main/java/org/apache/arrow/util/Preconditions.java index 48b845c5514bb..8fbdd823f8151 100644 --- a/java/memory/src/main/java/org/apache/arrow/util/Preconditions.java +++ b/java/memory/src/main/java/org/apache/arrow/util/Preconditions.java @@ -56,7 +56,7 @@ * double d = sqrt(-1.0); * }} * - * In this example, {@code checkArgument} throws an {@code IllegalArgumentException} to indicate + *

In this example, {@code checkArgument} throws an {@code IllegalArgumentException} to indicate * that {@code exampleBadCaller} made an error in its call to {@code sqrt}. * *

Warning about performance

diff --git a/java/memory/src/test/java/org/apache/arrow/memory/TestLowCostIdentityHashMap.java b/java/memory/src/test/java/org/apache/arrow/memory/TestLowCostIdentityHashMap.java index 1c10a6ecb8024..c6d63a0ee4861 100644 --- a/java/memory/src/test/java/org/apache/arrow/memory/TestLowCostIdentityHashMap.java +++ b/java/memory/src/test/java/org/apache/arrow/memory/TestLowCostIdentityHashMap.java @@ -25,7 +25,7 @@ import org.junit.Test; /** - * To test simplified implementation of IdentityHashMap + * To test simplified implementation of IdentityHashMap. */ public class TestLowCostIdentityHashMap { diff --git a/java/plasma/src/main/java/org/apache/arrow/plasma/ObjectStoreLink.java b/java/plasma/src/main/java/org/apache/arrow/plasma/ObjectStoreLink.java index ad94dcea87840..3b67bc08ecfdc 100644 --- a/java/plasma/src/main/java/org/apache/arrow/plasma/ObjectStoreLink.java +++ b/java/plasma/src/main/java/org/apache/arrow/plasma/ObjectStoreLink.java @@ -20,7 +20,7 @@ import java.util.List; /** - * Object store interface, which provides the capabilities to put and get raw byte array, and serves + * Object store interface, which provides the capabilities to put and get raw byte array, and serves. */ public interface ObjectStoreLink { @@ -49,7 +49,7 @@ class ObjectStoreData { * * @param objectId The object ID used to identify the object. * @param timeoutMs The number of milliseconds that the get call should block before timing out - * and returning. Pass -1 if the call should block and 0 if the call should return immediately. + * and returning. Pass -1 if the call should block and 0 if the call should return immediately. * @param isMetadata false if get data, otherwise get metadata. * @return A PlasmaBuffer wrapping the object. */ @@ -63,7 +63,7 @@ default byte[] get(byte[] objectId, int timeoutMs, boolean isMetadata) { * * @param objectIds List of object IDs used to identify some objects. * @param timeoutMs The number of milliseconds that the get call should block before timing out - * and returning. Pass -1 if the call should block and 0 if the call should return immediately. + * and returning. Pass -1 if the call should block and 0 if the call should return immediately. * @param isMetadata false if get data, otherwise get metadata. * @return List of PlasmaBuffers wrapping objects. */ @@ -74,7 +74,7 @@ default byte[] get(byte[] objectId, int timeoutMs, boolean isMetadata) { * * @param objectIds List of object IDs used to identify some objects. * @param timeoutMs The number of milliseconds that the get call should block before timing out - * and returning. Pass -1 if the call should block and 0 if the call should return immediately. + * and returning. Pass -1 if the call should block and 0 if the call should return immediately. * @return List of Pairs of PlasmaBuffer wrapping objects and its metadata. */ List get(byte[][] objectIds, int timeoutMs); @@ -94,7 +94,7 @@ default byte[] get(byte[] objectId, int timeoutMs, boolean isMetadata) { * * @param objectId The object ID used to identify the object. * @return A digest byte array contains object's SHA256 hash. null means that the object - * isn't in the object store. + * isn't in the object store. */ byte[] hash(byte[] objectId); diff --git a/java/plasma/src/main/java/org/apache/arrow/plasma/PlasmaClient.java b/java/plasma/src/main/java/org/apache/arrow/plasma/PlasmaClient.java index 02e8b03501774..db1f35e1641bb 100644 --- a/java/plasma/src/main/java/org/apache/arrow/plasma/PlasmaClient.java +++ b/java/plasma/src/main/java/org/apache/arrow/plasma/PlasmaClient.java @@ -26,7 +26,7 @@ /** * The PlasmaClient is used to interface with a plasma store and manager. * - * The PlasmaClient can ask the PlasmaStore to allocate a new buffer, seal a buffer, and get a + *

The PlasmaClient can ask the PlasmaStore to allocate a new buffer, seal a buffer, and get a * buffer. Buffers are referred to by object IDs. */ public class PlasmaClient implements ObjectStoreLink { diff --git a/java/plasma/src/main/java/org/apache/arrow/plasma/PlasmaClientJNI.java b/java/plasma/src/main/java/org/apache/arrow/plasma/PlasmaClientJNI.java index dd60c2940ceac..4f7598eae2283 100644 --- a/java/plasma/src/main/java/org/apache/arrow/plasma/PlasmaClientJNI.java +++ b/java/plasma/src/main/java/org/apache/arrow/plasma/PlasmaClientJNI.java @@ -20,7 +20,7 @@ import java.nio.ByteBuffer; /** - * JNI static methods for PlasmaClient + * JNI static methods for PlasmaClient. */ public class PlasmaClientJNI { diff --git a/java/tools/src/test/java/org/apache/arrow/tools/TestIntegration.java b/java/tools/src/test/java/org/apache/arrow/tools/TestIntegration.java index 774a485348bd8..6f14a15f83f6c 100644 --- a/java/tools/src/test/java/org/apache/arrow/tools/TestIntegration.java +++ b/java/tools/src/test/java/org/apache/arrow/tools/TestIntegration.java @@ -219,7 +219,7 @@ private BufferedReader readNormalized(File f) throws IOException { } /** - * the test should not be sensitive to small variations in float representation + * The test should not be sensitive to small variations in float representation. */ @Test public void testFloat() throws Exception { diff --git a/java/vector/src/main/java/org/apache/arrow/util/AutoCloseables.java b/java/vector/src/main/java/org/apache/arrow/util/AutoCloseables.java index 99617788869f1..d89478ecc709c 100644 --- a/java/vector/src/main/java/org/apache/arrow/util/AutoCloseables.java +++ b/java/vector/src/main/java/org/apache/arrow/util/AutoCloseables.java @@ -199,6 +199,8 @@ public void close() { }; /** + * Get an AutoCloseable that does nothing. + * * @return A do-nothing autocloseable */ public static AutoCloseable noop() { diff --git a/java/vector/src/main/java/org/apache/arrow/vector/BaseFixedWidthVector.java b/java/vector/src/main/java/org/apache/arrow/vector/BaseFixedWidthVector.java index 19be69a93234f..bc0b77a0aeb0a 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/BaseFixedWidthVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/BaseFixedWidthVector.java @@ -222,7 +222,7 @@ public void close() { } /** - * Same as {@link #close()} + * Same as {@link #close()}. */ @Override public void clear() { @@ -292,7 +292,7 @@ public boolean allocateNewSafe() { * elements in the vector. This method must be called prior to using the ValueVector. * * @param valueCount the desired number of elements in the vector - * @throws org.apache.arrow.memory.OutOfMemoryException + * @throws org.apache.arrow.memory.OutOfMemoryException on error */ public void allocateNew(int valueCount) { long valueBufferSize = valueCount * typeWidth; @@ -365,7 +365,7 @@ public int getBufferSizeFor(final int count) { /** * Get the size (number of bytes) of underlying buffers used by this - * vector + * vector. * @return size of underlying buffers. */ @Override @@ -482,8 +482,7 @@ public void initializeChildrenFromFields(List children) { /** * Get the inner child vectors. - * @return list of child vectors for complex types, empty list for scalar vector - * types + * @return list of child vectors for complex types, empty list for scalar vector types */ @Override public List getChildrenFromFields() { @@ -554,7 +553,7 @@ private void setReaderAndWriterIndex() { * Construct a transfer pair of this vector and another vector of same type. * @param ref name of the target vector * @param allocator allocator for the target vector - * @param callBack + * @param callBack not used * @return TransferPair */ @Override @@ -685,15 +684,15 @@ private void splitAndTransferValidityBuffer(int startIndex, int length, } - /****************************************************************** - * * - * common getters and setters * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | common getters and setters | + | | + *----------------------------------------------------------------*/ /** - * Get the number of elements that are null in the vector + * Get the number of elements that are null in the vector. * * @return the number of null elements. */ @@ -763,7 +762,7 @@ public void setValueCount(int valueCount) { /** * Check if the given index is within the current value capacity - * of the vector + * of the vector. * * @param index position to check * @return true if index is within the current value capacity @@ -824,11 +823,11 @@ public void setSafe(int index, ByteBuffer value, int start, int length) { } - /****************************************************************** - * * - * helper methods for setters * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | helper methods for setters | + | | + *----------------------------------------------------------------*/ protected void handleSafe(int index) { diff --git a/java/vector/src/main/java/org/apache/arrow/vector/BaseVariableWidthVector.java b/java/vector/src/main/java/org/apache/arrow/vector/BaseVariableWidthVector.java index 24583aeffb732..390dfe955b6ce 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/BaseVariableWidthVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/BaseVariableWidthVector.java @@ -189,7 +189,7 @@ public void setInitialCapacity(int valueCount, double density) { } /** - * Get the density of this ListVector + * Get the density of this ListVector. * @return density */ public double getDensity() { @@ -203,7 +203,7 @@ public double getDensity() { } /** - * Get the current value capacity for the vector + * Get the current value capacity for the vector. * @return number of elements that vector can hold. */ @Override @@ -258,7 +258,7 @@ public void close() { } /** - * Same as {@link #close()} + * Same as {@link #close()}. */ @Override public void clear() { @@ -291,8 +291,7 @@ public void initializeChildrenFromFields(List children) { /** * Get the inner child vectors. - * @return list of child vectors for complex types, empty list for scalar vector - * types + * @return list of child vectors for complex types, empty list for scalar vector types */ @Override public List getChildrenFromFields() { @@ -325,7 +324,7 @@ public void loadFieldBuffers(ArrowFieldNode fieldNode, List ownBuffers } /** - * Get the buffers belonging to this vector + * Get the buffers belonging to this vector. * @return the inner buffers. */ public List getFieldBuffers() { @@ -405,7 +404,7 @@ public boolean allocateNewSafe() { * * @param totalBytes desired total memory capacity * @param valueCount the desired number of elements in the vector - * @throws org.apache.arrow.memory.OutOfMemoryException + * @throws org.apache.arrow.memory.OutOfMemoryException if memory allocation fails */ @Override public void allocateNew(int totalBytes, int valueCount) { @@ -505,11 +504,11 @@ public void reallocDataBuffer() { * the vector and offset buffer is used to store the lengths of variable * width elements in the vector. * - * Note that data buffer for variable length vectors moves independent + *

Note that data buffer for variable length vectors moves independent * of the companion validity and offset buffers. This is in * contrast to what we have for fixed width vectors. * - * So even though we may have setup an initial capacity of 1024 + *

So even though we may have setup an initial capacity of 1024 * elements in the vector, it is quite possible * that we need to reAlloc() the data buffer when we are setting * the 5th element in the vector simply because previous @@ -561,7 +560,7 @@ private ArrowBuf reallocBufferHelper(ArrowBuf buffer, final boolean offsetBuffer /** * Get the size (number of bytes) of underlying data buffer. - * @return + * @return number of bytes in the data buffer */ @Override public int getByteCapacity() { @@ -576,7 +575,7 @@ public int getCurrentSizeInBytes() { /** * Get the size (number of bytes) of underlying buffers used by this - * vector + * vector. * @return size of underlying buffers. */ @Override @@ -648,7 +647,7 @@ public ArrowBuf[] getBuffers(boolean clear) { * Construct a transfer pair of this vector and another vector of same type. * @param ref name of the target vector * @param allocator allocator for the target vector - * @param callBack + * @param callBack not used * @return TransferPair */ @Override @@ -712,7 +711,7 @@ public void splitAndTransferTo(int startIndex, int length, } } - /* + /** * Transfer the offsets along with data. Unlike the data buffer, we cannot simply * slice the offset buffer for split and transfer. The reason is that offsets * in the target vector have to be adjusted and made relative to the staring @@ -792,15 +791,15 @@ private void splitAndTransferValidityBuffer(int startIndex, int length, } - /****************************************************************** - * * - * common getters and setters * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | common getters and setters | + | | + *----------------------------------------------------------------*/ /** - * Get the number of elements that are null in the vector + * Get the number of elements that are null in the vector. * * @return the number of null elements. */ @@ -810,7 +809,7 @@ public int getNullCount() { /** * Check if the given index is within the current value capacity - * of the vector + * of the vector. * * @param index position to check * @return true if index is within the current value capacity @@ -853,7 +852,7 @@ public int getValueCount() { } /** - * Sets the value count for the vector + * Sets the value count for the vector. * * @param valueCount value count */ @@ -1028,7 +1027,7 @@ public void setSafe(int index, byte[] value, int start, int length) { /** * Set the variable length element at the specified index to the - * content in supplied ByteBuffer + * content in supplied ByteBuffer. * * @param index position of the element to set * @param value ByteBuffer with data @@ -1165,11 +1164,11 @@ public void setSafe(int index, int start, int length, ArrowBuf buffer) { } - /****************************************************************** - * * - * helper methods for setters * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | helper methods for setters | + | | + *----------------------------------------------------------------*/ protected final void fillHoles(int index) { @@ -1228,7 +1227,7 @@ protected final void handleSafe(int index, int dataLength) { * Method used by Json Writer to read a variable width element from * the variable width vector and write to Json. * - * This method should not be used externally. + *

This method should not be used externally. * * @param data buffer storing the variable width vector elements * @param offset buffer storing the offsets of variable width vector elements @@ -1249,7 +1248,7 @@ public static byte[] get(final ArrowBuf data, final ArrowBuf offset, int index) * width vector data. The method takes care of allocating the memory for * offsets if the caller hasn't done so. * - * This method should not be used externally. + *

This method should not be used externally. * * @param buffer ArrowBuf to store offsets for variable width elements * @param allocator memory allocator diff --git a/java/vector/src/main/java/org/apache/arrow/vector/BigIntVector.java b/java/vector/src/main/java/org/apache/arrow/vector/BigIntVector.java index 9cbc0b8df4696..fb8b24179da01 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/BigIntVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/BigIntVector.java @@ -40,6 +40,7 @@ public class BigIntVector extends BaseFixedWidthVector { /** * Instantiate a BigIntVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -50,6 +51,7 @@ public BigIntVector(String name, BufferAllocator allocator) { /** * Instantiate a BigIntVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -60,7 +62,8 @@ public BigIntVector(String name, FieldType fieldType, BufferAllocator allocator) } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -79,11 +82,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** * Get the element at the given index from the vector. @@ -130,7 +133,8 @@ public Long getObject(int index) { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -145,6 +149,7 @@ public void copyFrom(int fromIndex, int thisIndex, BigIntVector from) { * Same as {@link #copyFrom(int, int, BigIntVector)} except that * it handles the case when the capacity of the vector needs to be expanded * before copy. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -155,11 +160,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, BigIntVector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ private void setValue(int index, long value) { @@ -290,7 +295,7 @@ public void setSafe(int index, int isSet, long value) { * Given a data buffer, get the value stored at a particular position * in the vector. * - * This method should not be used externally. + *

This method should not be used externally. * * @param buffer data buffer * @param index position of the element. @@ -301,16 +306,17 @@ public static long get(final ArrowBuf buffer, final int index) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -322,6 +328,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/BitVector.java b/java/vector/src/main/java/org/apache/arrow/vector/BitVector.java index 94d2f29391fe1..7aac28cbf1fc4 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/BitVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/BitVector.java @@ -62,7 +62,7 @@ public BitVector(String name, FieldType fieldType, BufferAllocator allocator) { } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. * * @return Field Reader for this vector */ @@ -113,7 +113,7 @@ public int getValueCapacity() { * * @param count desired number of elements in the vector * @return estimated size of underlying buffers if the vector holds - * a given number of elements + * a given number of elements */ @Override public int getBufferSizeFor(final int count) { @@ -219,11 +219,11 @@ private ArrowBuf splitAndTransferBuffer( } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ private int getBit(int index) { final int byteIndex = index >> 3; @@ -277,7 +277,7 @@ public Boolean getObject(int index) { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector @@ -303,11 +303,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, BitVector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ /** @@ -466,7 +466,7 @@ public void setSafeToOne(int index) { } /** - * Set count bits to 1 in data starting at firstBitIndex + * Set count bits to 1 in data starting at firstBitIndex. * * @param firstBitIndex the index of the first bit to set * @param count the number of bits to set @@ -511,11 +511,11 @@ public void setRangeToOne(int firstBitIndex, int count) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** diff --git a/java/vector/src/main/java/org/apache/arrow/vector/BitVectorHelper.java b/java/vector/src/main/java/org/apache/arrow/vector/BitVectorHelper.java index 6496bbf933d32..2fb3f6b94c9cb 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/BitVectorHelper.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/BitVectorHelper.java @@ -29,14 +29,14 @@ public class BitVectorHelper { /** - * Get the index of byte corresponding to bit index in validity buffer + * Get the index of byte corresponding to bit index in validity buffer. */ public static int byteIndex(int absoluteBitIndex) { return absoluteBitIndex >> 3; } /** - * Get the relative index of bit within the byte in validity buffer + * Get the relative index of bit within the byte in validity buffer. */ public static int bitIndex(int absoluteBitIndex) { return absoluteBitIndex & 7; @@ -45,8 +45,8 @@ public static int bitIndex(int absoluteBitIndex) { /** * Set the bit at provided index to 1. * - * @param validityBuffer - * @param index + * @param validityBuffer validity buffer of the vector + * @param index index to be set */ public static void setValidityBitToOne(ArrowBuf validityBuffer, int index) { final int byteIndex = byteIndex(index); @@ -58,11 +58,11 @@ public static void setValidityBitToOne(ArrowBuf validityBuffer, int index) { } /** - * Set the bit at a given index to provided value (1 or 0) + * Set the bit at a given index to provided value (1 or 0). * - * @param validityBuffer - * @param index - * @param value + * @param validityBuffer validity buffer of the vector + * @param index index to be set + * @param value value to set */ public static void setValidityBit(ArrowBuf validityBuffer, int index, int value) { final int byteIndex = byteIndex(index); @@ -81,11 +81,11 @@ public static void setValidityBit(ArrowBuf validityBuffer, int index, int value) * Set the bit at a given index to provided value (1 or 0). Internally * takes care of allocating the buffer if the caller didn't do so. * - * @param validityBuffer - * @param allocator - * @param valueCount - * @param index - * @param value + * @param validityBuffer validity buffer of the vector + * @param allocator allocator for the buffer + * @param valueCount number of values to allocate/set + * @param index index to be set + * @param value value to set * @return ArrowBuf */ public static ArrowBuf setValidityBit(ArrowBuf validityBuffer, BufferAllocator allocator, @@ -104,8 +104,8 @@ public static ArrowBuf setValidityBit(ArrowBuf validityBuffer, BufferAllocator a /** * Check if a bit at a given index is set or not. * - * @param buffer - * @param index + * @param buffer buffer to check + * @param index index of the buffer * @return 1 if bit is set, 0 otherwise. */ public static int get(final ArrowBuf buffer, int index) { @@ -119,7 +119,7 @@ public static int get(final ArrowBuf buffer, int index) { * Compute the size of validity buffer required to manage a given number * of elements in a vector. * - * @param valueCount + * @param valueCount number of elements in the vector * @return buffer size */ public static int getValidityBufferSize(int valueCount) { @@ -130,8 +130,8 @@ public static int getValidityBufferSize(int valueCount) { * Given a validity buffer, find the number of bits that are not set. * This is used to compute the number of null elements in a nullable vector. * - * @param validityBuffer - * @param valueCount + * @param validityBuffer validity buffer of the vector + * @param valueCount number of values in the vector * @return number of bits not set. */ public static int getNullCount(final ArrowBuf validityBuffer, final int valueCount) { @@ -206,9 +206,9 @@ public static ArrowBuf loadValidityBuffer(final ArrowFieldNode fieldNode, * Set the byte of the given index in the data buffer by applying a bit mask to * the current byte at that index. * - * @param data - * @param byteIndex - * @param bitMask + * @param data buffer to set + * @param byteIndex byteIndex within the buffer + * @param bitMask bit mask to be set */ static void setBitMaskedByte(ArrowBuf data, int byteIndex, byte bitMask) { byte currentByte = data.getByte(byteIndex); diff --git a/java/vector/src/main/java/org/apache/arrow/vector/BufferBacked.java b/java/vector/src/main/java/org/apache/arrow/vector/BufferBacked.java index 8b0f98dd01188..7c527c71fce0a 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/BufferBacked.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/BufferBacked.java @@ -22,7 +22,7 @@ import io.netty.buffer.ArrowBuf; /** - * Content is backed by a buffer and can be loaded/unloaded + * Content is backed by a buffer and can be loaded/unloaded. */ public interface BufferBacked { diff --git a/java/vector/src/main/java/org/apache/arrow/vector/DateDayVector.java b/java/vector/src/main/java/org/apache/arrow/vector/DateDayVector.java index 29e296038e10f..2e92ff1363429 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/DateDayVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/DateDayVector.java @@ -40,6 +40,7 @@ public class DateDayVector extends BaseFixedWidthVector { /** * Instantiate a DateDayVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -50,6 +51,7 @@ public DateDayVector(String name, BufferAllocator allocator) { /** * Instantiate a DateDayVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -60,7 +62,8 @@ public DateDayVector(String name, FieldType fieldType, BufferAllocator allocator } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -79,11 +82,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -131,7 +134,8 @@ public Integer getObject(int index) { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -146,6 +150,7 @@ public void copyFrom(int fromIndex, int thisIndex, DateDayVector from) { * Same as {@link #copyFrom(int, int, DateDayVector)} except that * it handles the case when the capacity of the vector needs to be expanded * before copy. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -156,11 +161,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, DateDayVector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ private void setValue(int index, int value) { @@ -262,6 +267,7 @@ public void setNull(int index) { /** * Store the given value at a particular position in the vector. isSet indicates * whether the value is NULL or not. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -278,6 +284,7 @@ public void set(int index, int isSet, int value) { * Same as {@link #set(int, int, int)} except that it handles the case * when index is greater than or equal to current value capacity of the * vector. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -291,7 +298,7 @@ public void setSafe(int index, int isSet, int value) { * Given a data buffer, get the value stored at a particular position * in the vector. * - * This method should not be used externally. + *

This method should not be used externally. * * @param buffer data buffer * @param index position of the element. @@ -302,16 +309,17 @@ public static int get(final ArrowBuf buffer, final int index) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -323,6 +331,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/DateMilliVector.java b/java/vector/src/main/java/org/apache/arrow/vector/DateMilliVector.java index 7a2ef04fa989c..4736fbaf00295 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/DateMilliVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/DateMilliVector.java @@ -41,6 +41,7 @@ public class DateMilliVector extends BaseFixedWidthVector { /** * Instantiate a DateMilliVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -51,6 +52,7 @@ public DateMilliVector(String name, BufferAllocator allocator) { /** * Instantiate a DateMilliVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -61,7 +63,8 @@ public DateMilliVector(String name, FieldType fieldType, BufferAllocator allocat } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -80,11 +83,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -135,7 +138,8 @@ public LocalDateTime getObject(int index) { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -150,6 +154,7 @@ public void copyFrom(int fromIndex, int thisIndex, DateMilliVector from) { * Same as {@link #copyFrom(int, int, DateMilliVector)} except that * it handles the case when the capacity of the vector needs to be expanded * before copy. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -160,11 +165,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, DateMilliVector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ private void setValue(int index, long value) { @@ -266,6 +271,7 @@ public void setNull(int index) { /** * Store the given value at a particular position in the vector. isSet indicates * whether the value is NULL or not. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -282,6 +288,7 @@ public void set(int index, int isSet, long value) { * Same as {@link #set(int, int, long)} except that it handles the case * when index is greater than or equal to current value capacity of the * vector. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -295,7 +302,7 @@ public void setSafe(int index, int isSet, long value) { * Given a data buffer, get the value stored at a particular position * in the vector. * - * This method should not be used externally. + *

This method should not be used externally. * * @param buffer data buffer * @param index position of the element. @@ -306,16 +313,17 @@ public static long get(final ArrowBuf buffer, final int index) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -327,6 +335,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/DecimalVector.java b/java/vector/src/main/java/org/apache/arrow/vector/DecimalVector.java index 36550262914a4..091c9061b7ac5 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/DecimalVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/DecimalVector.java @@ -47,6 +47,7 @@ public class DecimalVector extends BaseFixedWidthVector { /** * Instantiate a DecimalVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -59,6 +60,7 @@ public DecimalVector(String name, BufferAllocator allocator, /** * Instantiate a DecimalVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -72,7 +74,8 @@ public DecimalVector(String name, FieldType fieldType, BufferAllocator allocator } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -83,6 +86,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -91,11 +95,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -146,7 +150,8 @@ public BigDecimal getObject(int index) { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -161,6 +166,7 @@ public void copyFrom(int fromIndex, int thisIndex, DecimalVector from) { * Same as {@link #copyFrom(int, int, DecimalVector)} except that * it handles the case when the capacity of the vector needs to be expanded * before copy. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -171,18 +177,18 @@ public void copyFromSafe(int fromIndex, int thisIndex, DecimalVector from) { } /** - * Return scale for the decimal value + * Return scale for the decimal value. */ public int getScale() { return scale; } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ /** @@ -201,11 +207,11 @@ public void set(int index, ArrowBuf buffer) { * Decimal is now implemented as Little Endian. This API allows the user * to pass a decimal value in the form of byte array in BE byte order. * - * Consumers of Arrow code can use this API instead of first swapping + *

Consumers of Arrow code can use this API instead of first swapping * the source bytes (doing a write and read) and then finally writing to * ArrowBuf of decimal vector. * - * This method takes care of adding the necessary padding if the length + *

This method takes care of adding the necessary padding if the length * of byte array is less then 16 (length of decimal type). * * @param index position of element @@ -396,6 +402,7 @@ public void setNull(int index) { /** * Store the given value at a particular position in the vector. isSet indicates * whether the value is NULL or not. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param start start position of the value in the buffer @@ -413,6 +420,7 @@ public void set(int index, int isSet, int start, ArrowBuf buffer) { * Same as {@link #setSafe(int, int, int, ArrowBuf)} except that it handles * the case when the position of new value is beyond the current value * capacity of the vector. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param start start position of the value in the buffer @@ -424,16 +432,17 @@ public void setSafe(int index, int isSet, int start, ArrowBuf buffer) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -445,6 +454,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/DensityAwareVector.java b/java/vector/src/main/java/org/apache/arrow/vector/DensityAwareVector.java index 29990d238668e..c16db40f779e4 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/DensityAwareVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/DensityAwareVector.java @@ -22,14 +22,14 @@ * We use this for ListVector and VarCharVector as of now to * control the memory allocated. * - * For ListVector, we have been using a multiplier of 5 + *

For ListVector, we have been using a multiplier of 5 * to compute the initial capacity of the inner data vector. * For deeply nested lists and lists with lots of NULL values, * this is over-allocation upfront. So density helps to be * conservative when computing the value capacity of the * inner vector. * - * For example, a density value of 10 implies each position in the + *

For example, a density value of 10 implies each position in the * list vector has a list of 10 values. So we will provision * an initial capacity of (valuecount * 10) for the inner vector. * A density value of 0.1 implies out of 10 positions in the list vector, @@ -37,20 +37,21 @@ * null (no lists) or empty lists. This helps in tightly controlling * the memory we provision for inner data vector. * - * Similar analogy is applicable for VarCharVector where the capacity + *

Similar analogy is applicable for VarCharVector where the capacity * of the data buffer can be controlled using density multiplier * instead of default multiplier of 8 (default size of average * varchar length). * - * Also from container vectors, we propagate the density down + *

Also from container vectors, we propagate the density down * the inner vectors so that they can use it appropriately. */ public interface DensityAwareVector { /** - * Set value with density - * @param valueCount - * @param density + * Set value with density. + * + * @param valueCount the number of values in this vector + * @param density the density of the vector */ void setInitialCapacity(int valueCount, double density); } diff --git a/java/vector/src/main/java/org/apache/arrow/vector/FieldVector.java b/java/vector/src/main/java/org/apache/arrow/vector/FieldVector.java index 5ad35a34215b2..04274a2602d8b 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/FieldVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/FieldVector.java @@ -25,28 +25,28 @@ import io.netty.buffer.ArrowBuf; /** - * A vector corresponding to a Field in the schema + * A vector corresponding to a Field in the schema. * It has inner vectors backed by buffers (validity, offsets, data, ...) */ public interface FieldVector extends ValueVector { /** * Initializes the child vectors - * to be later loaded with loadBuffers + * to be later loaded with loadBuffers. * * @param children the schema */ void initializeChildrenFromFields(List children); /** - * the returned list is the same size as the list passed to initializeChildrenFromFields + * The returned list is the same size as the list passed to initializeChildrenFromFields. * * @return the children according to schema (empty for primitive types) */ List getChildrenFromFields(); /** - * loads data in the vectors + * Loads data in the vectors. * (ownBuffers must be the same size as getFieldVectors()) * * @param fieldNode the fieldNode @@ -55,33 +55,35 @@ public interface FieldVector extends ValueVector { void loadFieldBuffers(ArrowFieldNode fieldNode, List ownBuffers); /** - * (same size as getFieldVectors() since it is their content) + * Get the buffers of the fields, (same size as getFieldVectors() since it is their content). * * @return the buffers containing the data for this vector (ready for reading) */ List getFieldBuffers(); /** + * Get the inner vectors. + * * @return the inner vectors for this field as defined by the TypeLayout */ List getFieldInnerVectors(); /** - * Gets the starting address of the underlying buffer associated with validity vector + * Gets the starting address of the underlying buffer associated with validity vector. * * @return buffer address */ public long getValidityBufferAddress(); /** - * Gets the starting address of the underlying buffer associated with data vector + * Gets the starting address of the underlying buffer associated with data vector. * * @return buffer address */ public long getDataBufferAddress(); /** - * Gets the starting address of the underlying buffer associated with offset vector + * Gets the starting address of the underlying buffer associated with offset vector. * * @return buffer address */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/FixedSizeBinaryVector.java b/java/vector/src/main/java/org/apache/arrow/vector/FixedSizeBinaryVector.java index 96012c6d7c8c2..8221fe419d353 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/FixedSizeBinaryVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/FixedSizeBinaryVector.java @@ -65,7 +65,7 @@ public FixedSizeBinaryVector(String name, FieldType fieldType, BufferAllocator a } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. * * @return Field Reader for this vector */ @@ -86,11 +86,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** * Get the element at the given index from the vector. @@ -146,7 +146,7 @@ public byte[] getObject(int index) { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector @@ -177,11 +177,11 @@ public int getByteWidth() { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ public void set(int index, byte[] value) { assert index >= 0; @@ -263,7 +263,7 @@ public void setSafe(int index, int isSet, ArrowBuf buffer) { /** * Set the variable length element at the specified index to the data - * buffer supplied in the holder + * buffer supplied in the holder. * * @param index position of the element to set * @param holder holder that carries data buffer. @@ -288,7 +288,7 @@ public void setSafe(int index, FixedSizeBinaryHolder holder) { /** * Set the variable length element at the specified index to the data - * buffer supplied in the holder + * buffer supplied in the holder. * * @param index position of the element to set * @param holder holder that carries data buffer. @@ -326,7 +326,7 @@ public void setNull(int index) { * Given a data buffer, get the value stored at a particular position * in the vector. * - * This method should not be used externally. + *

This method should not be used externally. * * @param buffer data buffer * @param index position of the element. @@ -338,11 +338,11 @@ public static byte[] get(final ArrowBuf buffer, final int index, final int byteW return dst; } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** diff --git a/java/vector/src/main/java/org/apache/arrow/vector/Float4Vector.java b/java/vector/src/main/java/org/apache/arrow/vector/Float4Vector.java index 0cfe61054c03c..c20d500b9f753 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/Float4Vector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/Float4Vector.java @@ -40,6 +40,7 @@ public class Float4Vector extends BaseFixedWidthVector { /** * Instantiate a Float4Vector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -50,6 +51,7 @@ public Float4Vector(String name, BufferAllocator allocator) { /** * Instantiate a Float4Vector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -60,7 +62,8 @@ public Float4Vector(String name, FieldType fieldType, BufferAllocator allocator) } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -71,6 +74,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -79,11 +83,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -131,7 +135,8 @@ public Float getObject(int index) { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -146,6 +151,7 @@ public void copyFrom(int fromIndex, int thisIndex, Float4Vector from) { * Same as {@link #copyFrom(int, int, Float4Vector)} except that * it handles the case when the capacity of the vector needs to be expanded * before copy. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -156,11 +162,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, Float4Vector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ private void setValue(int index, float value) { @@ -262,6 +268,7 @@ public void setNull(int index) { /** * Store the given value at a particular position in the vector. isSet indicates * whether the value is NULL or not. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -278,6 +285,7 @@ public void set(int index, int isSet, float value) { * Same as {@link #set(int, int, float)} except that it handles the case * when index is greater than or equal to current value capacity of the * vector. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -291,7 +299,7 @@ public void setSafe(int index, int isSet, float value) { * Given a data buffer, get the value stored at a particular position * in the vector. * - * This method should not be used externally. + *

This method should not be used externally. * * @param buffer data buffer * @param index position of the element. @@ -302,16 +310,17 @@ public static float get(final ArrowBuf buffer, final int index) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -323,6 +332,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/Float8Vector.java b/java/vector/src/main/java/org/apache/arrow/vector/Float8Vector.java index 5ff719b0ca2b2..fd7e3db572b63 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/Float8Vector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/Float8Vector.java @@ -40,6 +40,7 @@ public class Float8Vector extends BaseFixedWidthVector { /** * Instantiate a Float8Vector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -50,6 +51,7 @@ public Float8Vector(String name, BufferAllocator allocator) { /** * Instantiate a Float8Vector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -60,7 +62,8 @@ public Float8Vector(String name, FieldType fieldType, BufferAllocator allocator) } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -71,6 +74,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -79,11 +83,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -131,7 +135,8 @@ public Double getObject(int index) { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -146,6 +151,7 @@ public void copyFrom(int fromIndex, int thisIndex, Float8Vector from) { * Same as {@link #copyFrom(int, int, Float8Vector)} except that * it handles the case when the capacity of the vector needs to be expanded * before copy. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -156,11 +162,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, Float8Vector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ private void setValue(int index, double value) { @@ -262,6 +268,7 @@ public void setNull(int index) { /** * Store the given value at a particular position in the vector. isSet indicates * whether the value is NULL or not. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -278,6 +285,7 @@ public void set(int index, int isSet, double value) { * Same as {@link #set(int, int, double)} except that it handles the case * when index is greater than or equal to current value capacity of the * vector. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -291,7 +299,7 @@ public void setSafe(int index, int isSet, double value) { * Given a data buffer, get the value stored at a particular position * in the vector. * - * This method should not be used externally. + *

This method should not be used externally. * * @param buffer data buffer * @param index position of the element. @@ -302,16 +310,17 @@ public static double get(final ArrowBuf buffer, final int index) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -323,6 +332,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/IntVector.java b/java/vector/src/main/java/org/apache/arrow/vector/IntVector.java index 37ec692c6d602..9c585f5e5cd9a 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/IntVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/IntVector.java @@ -62,7 +62,7 @@ public IntVector(String name, FieldType fieldType, BufferAllocator allocator) { } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. * * @return Field Reader for this vector */ @@ -83,11 +83,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -135,7 +135,7 @@ public Integer getObject(int index) { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector @@ -162,11 +162,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, IntVector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ private void setValue(int index, int value) { @@ -298,8 +298,8 @@ public void setSafe(int index, int isSet, int value) { /** * Given a data buffer, get the value stored at a particular position * in the vector. - *

- * This method should not be used externally. + * + *

This method should not be used externally. * * @param buffer data buffer * @param index position of the element. @@ -310,11 +310,11 @@ public static int get(final ArrowBuf buffer, final int index) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** diff --git a/java/vector/src/main/java/org/apache/arrow/vector/IntervalDayVector.java b/java/vector/src/main/java/org/apache/arrow/vector/IntervalDayVector.java index cd4e6bb47dab0..4c654278e3241 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/IntervalDayVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/IntervalDayVector.java @@ -43,6 +43,7 @@ public class IntervalDayVector extends BaseFixedWidthVector { /** * Instantiate a IntervalDayVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -53,6 +54,7 @@ public IntervalDayVector(String name, BufferAllocator allocator) { /** * Instantiate a IntervalDayVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -63,7 +65,8 @@ public IntervalDayVector(String name, FieldType fieldType, BufferAllocator alloc } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -74,6 +77,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -82,11 +86,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -139,7 +143,8 @@ public Period getObject(int index) { } /** - * Get the Interval value at a given index as a {@link StringBuilder} object + * Get the Interval value at a given index as a {@link StringBuilder} object. + * * @param index position of the element * @return String Builder object with Interval value as * [days, hours, minutes, seconds, millis] @@ -179,7 +184,8 @@ private StringBuilder getAsStringBuilderHelper(int index) { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -194,6 +200,7 @@ public void copyFrom(int fromIndex, int thisIndex, IntervalDayVector from) { * Same as {@link #copyFrom(int, int, IntervalDayVector)} except that * it handles the case when the capacity of the vector needs to be expanded * before copy. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -204,11 +211,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, IntervalDayVector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ /** @@ -332,6 +339,7 @@ public void setNull(int index) { /** * Store the given value at a particular position in the vector. isSet indicates * whether the value is NULL or not. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param days days component of interval @@ -349,6 +357,7 @@ public void set(int index, int isSet, int days, int milliseconds) { * Same as {@link #set(int, int, int, int)} except that it handles the case * when index is greater than or equal to current value capacity of the * vector. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param days days component of interval @@ -360,16 +369,17 @@ public void setSafe(int index, int isSet, int days, int milliseconds) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -381,6 +391,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/IntervalYearVector.java b/java/vector/src/main/java/org/apache/arrow/vector/IntervalYearVector.java index aa91df33a84f1..8562e1259955a 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/IntervalYearVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/IntervalYearVector.java @@ -39,6 +39,7 @@ public class IntervalYearVector extends BaseFixedWidthVector { /** * Instantiate a IntervalYearVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -49,6 +50,7 @@ public IntervalYearVector(String name, BufferAllocator allocator) { /** * Instantiate a IntervalYearVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -59,7 +61,8 @@ public IntervalYearVector(String name, FieldType fieldType, BufferAllocator allo } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -70,6 +73,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -78,11 +82,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -133,7 +137,8 @@ public Period getObject(int index) { } /** - * Get the Interval value at a given index as a {@link StringBuilder} object + * Get the Interval value at a given index as a {@link StringBuilder} object. + * * @param index position of the element * @return String Builder object with Interval value as * [years, months] @@ -164,7 +169,8 @@ private StringBuilder getAsStringBuilderHelper(int index) { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -179,6 +185,7 @@ public void copyFrom(int fromIndex, int thisIndex, IntervalYearVector from) { * Same as {@link #copyFrom(int, int, IntervalYearVector)} except that * it handles the case when the capacity of the vector needs to be expanded * before copy. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -189,11 +196,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, IntervalYearVector from) } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ private void setValue(int index, int value) { @@ -295,6 +302,7 @@ public void setNull(int index) { /** * Store the given value at a particular position in the vector. isSet indicates * whether the value is NULL or not. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -311,6 +319,7 @@ public void set(int index, int isSet, int value) { * Same as {@link #set(int, int, int)} except that it handles the case * when index is greater than or equal to current value capacity of the * vector. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -321,16 +330,17 @@ public void setSafe(int index, int isSet, int value) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -342,6 +352,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/SmallIntVector.java b/java/vector/src/main/java/org/apache/arrow/vector/SmallIntVector.java index 1f9a265a92435..8e9eb4476a4d6 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/SmallIntVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/SmallIntVector.java @@ -40,6 +40,7 @@ public class SmallIntVector extends BaseFixedWidthVector { /** * Instantiate a SmallIntVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -50,6 +51,7 @@ public SmallIntVector(String name, BufferAllocator allocator) { /** * Instantiate a SmallIntVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -60,7 +62,8 @@ public SmallIntVector(String name, FieldType fieldType, BufferAllocator allocato } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -71,6 +74,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -79,11 +83,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -131,7 +135,8 @@ public Short getObject(int index) { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -146,6 +151,7 @@ public void copyFrom(int fromIndex, int thisIndex, SmallIntVector from) { * Same as {@link #copyFrom(int, int, SmallIntVector)} except that * it handles the case when the capacity of the vector needs to be expanded * before copy. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -156,11 +162,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, SmallIntVector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ private void setValue(int index, int value) { @@ -290,6 +296,7 @@ public void setNull(int index) { /** * Store the given value at a particular position in the vector. isSet indicates * whether the value is NULL or not. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -306,6 +313,7 @@ public void set(int index, int isSet, short value) { * Same as {@link #set(int, int, short)} except that it handles the case * when index is greater than or equal to current value capacity of the * vector. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -319,7 +327,7 @@ public void setSafe(int index, int isSet, short value) { * Given a data buffer, get the value stored at a particular position * in the vector. * - * This method should not be used externally. + *

This method should not be used externally. * * @param buffer data buffer * @param index position of the element. @@ -330,15 +338,16 @@ public static short get(final ArrowBuf buffer, final int index) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -350,6 +359,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/TimeMicroVector.java b/java/vector/src/main/java/org/apache/arrow/vector/TimeMicroVector.java index 15c2acab01170..6d9b4fc8b23c6 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/TimeMicroVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/TimeMicroVector.java @@ -41,6 +41,7 @@ public class TimeMicroVector extends BaseFixedWidthVector { /** * Instantiate a TimeMicroVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -51,6 +52,7 @@ public TimeMicroVector(String name, BufferAllocator allocator) { /** * Instantiate a TimeMicroVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -61,7 +63,8 @@ public TimeMicroVector(String name, FieldType fieldType, BufferAllocator allocat } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -72,6 +75,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -80,11 +84,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** * Get the element at the given index from the vector. @@ -131,7 +135,8 @@ public Long getObject(int index) { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -146,6 +151,7 @@ public void copyFrom(int fromIndex, int thisIndex, TimeMicroVector from) { * Same as {@link #copyFrom(int, int, TimeMicroVector)} except that * it handles the case when the capacity of the vector needs to be expanded * before copy. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -156,11 +162,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, TimeMicroVector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ private void setValue(int index, long value) { @@ -262,6 +268,7 @@ public void setNull(int index) { /** * Store the given value at a particular position in the vector. isSet indicates * whether the value is NULL or not. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -278,6 +285,7 @@ public void set(int index, int isSet, long value) { * Same as {@link #set(int, int, long)} except that it handles the case * when index is greater than or equal to current value capacity of the * vector. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -291,7 +299,7 @@ public void setSafe(int index, int isSet, long value) { * Given a data buffer, get the value stored at a particular position * in the vector. * - * This method should not be used externally. + *

This method should not be used externally. * * @param buffer data buffer * @param index position of the element. @@ -302,16 +310,17 @@ public static long get(final ArrowBuf buffer, int index) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -323,6 +332,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/TimeMilliVector.java b/java/vector/src/main/java/org/apache/arrow/vector/TimeMilliVector.java index 416860b2a14ea..83cde52155d3b 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/TimeMilliVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/TimeMilliVector.java @@ -41,6 +41,7 @@ public class TimeMilliVector extends BaseFixedWidthVector { /** * Instantiate a TimeMilliVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -51,6 +52,7 @@ public TimeMilliVector(String name, BufferAllocator allocator) { /** * Instantiate a TimeMilliVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -61,7 +63,8 @@ public TimeMilliVector(String name, FieldType fieldType, BufferAllocator allocat } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -72,6 +75,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -80,11 +84,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** * Get the element at the given index from the vector. @@ -132,7 +136,8 @@ public LocalDateTime getObject(int index) { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -147,6 +152,7 @@ public void copyFrom(int fromIndex, int thisIndex, TimeMilliVector from) { * Same as {@link #copyFrom(int, int, TimeMilliVector)} except that * it handles the case when the capacity of the vector needs to be expanded * before copy. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -157,11 +163,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, TimeMilliVector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ private void setValue(int index, int value) { @@ -263,6 +269,7 @@ public void setNull(int index) { /** * Store the given value at a particular position in the vector. isSet indicates * whether the value is NULL or not. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -279,6 +286,7 @@ public void set(int index, int isSet, int value) { * Same as {@link #set(int, int, int)} except that it handles the case * when index is greater than or equal to current value capacity of the * vector. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -293,7 +301,7 @@ public void setSafe(int index, int isSet, int value) { * Given a data buffer, get the value stored at a particular position * in the vector. * - * This method should not be used externally. + *

This method should not be used externally. * * @param buffer data buffer * @param index position of the element. @@ -304,15 +312,16 @@ public static int get(final ArrowBuf buffer, final int index) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -324,6 +333,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/TimeNanoVector.java b/java/vector/src/main/java/org/apache/arrow/vector/TimeNanoVector.java index 6c19a65503f28..50e7d8e0e8bf1 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/TimeNanoVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/TimeNanoVector.java @@ -40,6 +40,7 @@ public class TimeNanoVector extends BaseFixedWidthVector { /** * Instantiate a TimeNanoVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -50,6 +51,7 @@ public TimeNanoVector(String name, BufferAllocator allocator) { /** * Instantiate a TimeNanoVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -60,7 +62,8 @@ public TimeNanoVector(String name, FieldType fieldType, BufferAllocator allocato } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -71,6 +74,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -79,11 +83,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -131,7 +135,8 @@ public Long getObject(int index) { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -146,6 +151,7 @@ public void copyFrom(int fromIndex, int thisIndex, TimeNanoVector from) { * Same as {@link #copyFrom(int, int, TimeNanoVector)} except that * it handles the case when the capacity of the vector needs to be expanded * before copy. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -156,11 +162,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, TimeNanoVector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ private void setValue(int index, long value) { @@ -262,6 +268,7 @@ public void setNull(int index) { /** * Store the given value at a particular position in the vector. isSet indicates * whether the value is NULL or not. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -278,6 +285,7 @@ public void set(int index, int isSet, long value) { * Same as {@link #set(int, int, long)} except that it handles the case * when index is greater than or equal to current value capacity of the * vector. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -291,7 +299,7 @@ public void setSafe(int index, int isSet, long value) { * Given a data buffer, get the value stored at a particular position * in the vector. * - * This method should not be used externally. + *

This method should not be used externally. * * @param buffer data buffer * @param index position of the element. @@ -302,15 +310,16 @@ public static long get(final ArrowBuf buffer, final int index) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -322,6 +331,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/TimeSecVector.java b/java/vector/src/main/java/org/apache/arrow/vector/TimeSecVector.java index 520b69353499b..df444e48979bf 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/TimeSecVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/TimeSecVector.java @@ -40,6 +40,7 @@ public class TimeSecVector extends BaseFixedWidthVector { /** * Instantiate a TimeSecVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -50,6 +51,7 @@ public TimeSecVector(String name, BufferAllocator allocator) { /** * Instantiate a TimeSecVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -60,7 +62,8 @@ public TimeSecVector(String name, FieldType fieldType, BufferAllocator allocator } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -71,6 +74,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -79,11 +83,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -131,7 +135,8 @@ public Integer getObject(int index) { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -146,6 +151,7 @@ public void copyFrom(int fromIndex, int thisIndex, TimeSecVector from) { * Same as {@link #copyFrom(int, int, TimeSecVector)} except that * it handles the case when the capacity of the vector needs to be expanded * before copy. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -156,11 +162,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, TimeSecVector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ private void setValue(int index, int value) { @@ -262,6 +268,7 @@ public void setNull(int index) { /** * Store the given value at a particular position in the vector. isSet indicates * whether the value is NULL or not. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -278,6 +285,7 @@ public void set(int index, int isSet, int value) { * Same as {@link #set(int, int, int)} except that it handles the case * when index is greater than or equal to current value capacity of the * vector. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -291,7 +299,7 @@ public void setSafe(int index, int isSet, int value) { * Given a data buffer, get the value stored at a particular position * in the vector. * - * This method should not be used externally. + *

This method should not be used externally. * * @param buffer data buffer * @param index position of the element. @@ -302,16 +310,17 @@ public static int get(final ArrowBuf buffer, final int index) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -323,6 +332,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/TimeStampMicroTZVector.java b/java/vector/src/main/java/org/apache/arrow/vector/TimeStampMicroTZVector.java index 7a42b4ae6b069..7027f4f1aca83 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/TimeStampMicroTZVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/TimeStampMicroTZVector.java @@ -40,6 +40,7 @@ public class TimeStampMicroTZVector extends TimeStampVector { /** * Instantiate a TimeStampMicroTZVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -50,6 +51,7 @@ public TimeStampMicroTZVector(String name, BufferAllocator allocator, String tim /** * Instantiate a TimeStampMicroTZVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -62,7 +64,8 @@ public TimeStampMicroTZVector(String name, FieldType fieldType, BufferAllocator } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -73,6 +76,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -81,11 +85,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -119,11 +123,11 @@ public Long getObject(int index) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ /** @@ -183,16 +187,17 @@ public void setSafe(int index, TimeStampMicroTZHolder holder) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -206,6 +211,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/TimeStampMicroVector.java b/java/vector/src/main/java/org/apache/arrow/vector/TimeStampMicroVector.java index dd3d140fbd6ed..3e0273cf24b50 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/TimeStampMicroVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/TimeStampMicroVector.java @@ -38,6 +38,7 @@ public class TimeStampMicroVector extends TimeStampVector { /** * Instantiate a TimeStampMicroVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -48,6 +49,7 @@ public TimeStampMicroVector(String name, BufferAllocator allocator) { /** * Instantiate a TimeStampMicroVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -58,7 +60,8 @@ public TimeStampMicroVector(String name, FieldType fieldType, BufferAllocator al } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -69,6 +72,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -77,11 +81,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -120,11 +124,11 @@ public LocalDateTime getObject(int index) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ /** @@ -184,16 +188,17 @@ public void setSafe(int index, TimeStampMicroHolder holder) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -207,6 +212,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/TimeStampMilliTZVector.java b/java/vector/src/main/java/org/apache/arrow/vector/TimeStampMilliTZVector.java index 63315ab831eb4..7cb83bed7ea49 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/TimeStampMilliTZVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/TimeStampMilliTZVector.java @@ -40,6 +40,7 @@ public class TimeStampMilliTZVector extends TimeStampVector { /** * Instantiate a TimeStampMilliTZVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -50,6 +51,7 @@ public TimeStampMilliTZVector(String name, BufferAllocator allocator, String tim /** * Instantiate a TimeStampMilliTZVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -62,7 +64,8 @@ public TimeStampMilliTZVector(String name, FieldType fieldType, BufferAllocator } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -73,6 +76,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -81,11 +85,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -119,11 +123,11 @@ public Long getObject(int index) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ /** @@ -183,15 +187,16 @@ public void setSafe(int index, TimeStampMilliTZHolder holder) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -205,6 +210,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/TimeStampMilliVector.java b/java/vector/src/main/java/org/apache/arrow/vector/TimeStampMilliVector.java index 17477d540b4d5..d28b7354f45f2 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/TimeStampMilliVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/TimeStampMilliVector.java @@ -38,6 +38,7 @@ public class TimeStampMilliVector extends TimeStampVector { /** * Instantiate a TimeStampMilliVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -48,6 +49,7 @@ public TimeStampMilliVector(String name, BufferAllocator allocator) { /** * Instantiate a TimeStampMilliVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -58,7 +60,8 @@ public TimeStampMilliVector(String name, FieldType fieldType, BufferAllocator al } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -69,6 +72,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -77,11 +81,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -118,11 +122,11 @@ public LocalDateTime getObject(int index) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ /** @@ -182,16 +186,17 @@ public void setSafe(int index, TimeStampMilliHolder holder) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -205,6 +210,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/TimeStampNanoTZVector.java b/java/vector/src/main/java/org/apache/arrow/vector/TimeStampNanoTZVector.java index 43b91e17ce03f..eacc891358ba2 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/TimeStampNanoTZVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/TimeStampNanoTZVector.java @@ -40,6 +40,7 @@ public class TimeStampNanoTZVector extends TimeStampVector { /** * Instantiate a TimeStampNanoTZVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -50,6 +51,7 @@ public TimeStampNanoTZVector(String name, BufferAllocator allocator, String time /** * Instantiate a TimeStampNanoTZVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -62,7 +64,8 @@ public TimeStampNanoTZVector(String name, FieldType fieldType, BufferAllocator a } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -73,6 +76,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -81,11 +85,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -119,11 +123,11 @@ public Long getObject(int index) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ /** @@ -185,16 +189,17 @@ public void setSafe(int index, TimeStampNanoTZHolder holder) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -208,6 +213,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/TimeStampNanoVector.java b/java/vector/src/main/java/org/apache/arrow/vector/TimeStampNanoVector.java index f0616bd3369c5..77ba527006146 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/TimeStampNanoVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/TimeStampNanoVector.java @@ -38,6 +38,7 @@ public class TimeStampNanoVector extends TimeStampVector { /** * Instantiate a TimeStampNanoVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -48,6 +49,7 @@ public TimeStampNanoVector(String name, BufferAllocator allocator) { /** * Instantiate a TimeStampNanoVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -58,7 +60,8 @@ public TimeStampNanoVector(String name, FieldType fieldType, BufferAllocator all } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -69,6 +72,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -77,11 +81,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -119,11 +123,11 @@ public LocalDateTime getObject(int index) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ /** @@ -183,16 +187,17 @@ public void setSafe(int index, TimeStampNanoHolder holder) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -206,6 +211,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/TimeStampSecTZVector.java b/java/vector/src/main/java/org/apache/arrow/vector/TimeStampSecTZVector.java index 4ec0ed70068e6..3f24c18de0358 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/TimeStampSecTZVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/TimeStampSecTZVector.java @@ -40,6 +40,7 @@ public class TimeStampSecTZVector extends TimeStampVector { /** * Instantiate a TimeStampSecTZVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -50,6 +51,7 @@ public TimeStampSecTZVector(String name, BufferAllocator allocator, String timeZ /** * Instantiate a TimeStampSecTZVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -62,7 +64,8 @@ public TimeStampSecTZVector(String name, FieldType fieldType, BufferAllocator al } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -73,6 +76,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -81,11 +85,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -119,11 +123,11 @@ public Long getObject(int index) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ /** @@ -183,15 +187,16 @@ public void setSafe(int index, TimeStampSecTZHolder holder) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -205,6 +210,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/TimeStampSecVector.java b/java/vector/src/main/java/org/apache/arrow/vector/TimeStampSecVector.java index 36a6cc5085d08..51e1f70631352 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/TimeStampSecVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/TimeStampSecVector.java @@ -38,6 +38,7 @@ public class TimeStampSecVector extends TimeStampVector { /** * Instantiate a TimeStampSecVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -48,6 +49,7 @@ public TimeStampSecVector(String name, BufferAllocator allocator) { /** * Instantiate a TimeStampSecVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -58,7 +60,8 @@ public TimeStampSecVector(String name, FieldType fieldType, BufferAllocator allo } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -69,6 +72,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -77,11 +81,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -119,11 +123,11 @@ public LocalDateTime getObject(int index) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ /** @@ -183,16 +187,17 @@ public void setSafe(int index, TimeStampSecHolder holder) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -206,6 +211,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/TimeStampVector.java b/java/vector/src/main/java/org/apache/arrow/vector/TimeStampVector.java index bd35d954604ef..a84a96266a039 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/TimeStampVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/TimeStampVector.java @@ -34,6 +34,7 @@ public abstract class TimeStampVector extends BaseFixedWidthVector { /** * Instantiate a TimeStampVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -43,11 +44,11 @@ public TimeStampVector(String name, FieldType fieldType, BufferAllocator allocat } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** * Get the element at the given index from the vector. @@ -64,7 +65,8 @@ public long get(int index) throws IllegalStateException { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -79,6 +81,7 @@ public void copyFrom(int fromIndex, int thisIndex, TimeStampVector from) { * Same as {@link #copyFromSafe(int, int, TimeStampVector)} except that * it handles the case when the capacity of the vector needs to be expanded * before copy. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -89,11 +92,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, TimeStampVector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ protected void setValue(int index, long value) { @@ -139,6 +142,7 @@ public void setNull(int index) { /** * Store the given value at a particular position in the vector. isSet indicates * whether the value is NULL or not. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -155,6 +159,7 @@ public void set(int index, int isSet, long value) { * Same as {@link #set(int, int, long)} except that it handles the case * when index is greater than or equal to current value capacity of the * vector. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -168,7 +173,7 @@ public void setSafe(int index, int isSet, long value) { * Given a data buffer, get the value stored at a particular position * in the vector. * - * This method should not be used externally. + *

This method should not be used externally. * * @param buffer data buffer * @param index position of the element. @@ -179,11 +184,11 @@ public static long get(final ArrowBuf buffer, final int index) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ public class TransferImpl implements TransferPair { diff --git a/java/vector/src/main/java/org/apache/arrow/vector/TinyIntVector.java b/java/vector/src/main/java/org/apache/arrow/vector/TinyIntVector.java index 51963ced83014..d5c0beff499b4 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/TinyIntVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/TinyIntVector.java @@ -40,6 +40,7 @@ public class TinyIntVector extends BaseFixedWidthVector { /** * Instantiate a TinyIntVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -50,6 +51,7 @@ public TinyIntVector(String name, BufferAllocator allocator) { /** * Instantiate a TinyIntVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -60,7 +62,8 @@ public TinyIntVector(String name, FieldType fieldType, BufferAllocator allocator } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -71,6 +74,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -79,11 +83,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -131,7 +135,8 @@ public Byte getObject(int index) { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -146,6 +151,7 @@ public void copyFrom(int fromIndex, int thisIndex, TinyIntVector from) { * Same as {@link #copyFrom(int, int, TinyIntVector)} except that * it handles the case when the capacity of the vector needs to be expanded * before copy. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -156,11 +162,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, TinyIntVector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ private void setValue(int index, int value) { valueBuffer.setByte(index * TYPE_WIDTH, value); @@ -289,6 +295,7 @@ public void setNull(int index) { /** * Store the given value at a particular position in the vector. isSet indicates * whether the value is NULL or not. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -305,6 +312,7 @@ public void set(int index, int isSet, byte value) { * Same as {@link #set(int, int, byte)} except that it handles the case * when index is greater than or equal to current value capacity of the * vector. + * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value @@ -318,7 +326,7 @@ public void setSafe(int index, int isSet, byte value) { * Given a data buffer, get the value stored at a particular position * in the vector. * - * This method should not be used externally. + *

This method should not be used externally. * * @param buffer data buffer * @param index position of the element. @@ -329,16 +337,17 @@ public static byte get(final ArrowBuf buffer, final int index) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -350,6 +359,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/TypeLayout.java b/java/vector/src/main/java/org/apache/arrow/vector/TypeLayout.java index 9423f8fe861da..1a639ce2438bc 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/TypeLayout.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/TypeLayout.java @@ -44,7 +44,7 @@ import org.apache.arrow.vector.types.pojo.ArrowType.Utf8; /** - * The buffer layout of vectors for a given type + * The buffer layout of vectors for a given type. * It defines its own buffers followed by the buffers for the children * if it is a nested type (Struct_, List, Union) */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/UInt1Vector.java b/java/vector/src/main/java/org/apache/arrow/vector/UInt1Vector.java index 6c7899af9b7ac..8b19cdf85805e 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/UInt1Vector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/UInt1Vector.java @@ -55,11 +55,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -117,11 +117,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, UInt1Vector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ private void setValue(int index, int value) { @@ -262,11 +262,11 @@ public void setSafe(int index, int isSet, byte value) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ @Override diff --git a/java/vector/src/main/java/org/apache/arrow/vector/UInt2Vector.java b/java/vector/src/main/java/org/apache/arrow/vector/UInt2Vector.java index 589261ef04734..5e1237e02e695 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/UInt2Vector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/UInt2Vector.java @@ -55,11 +55,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -117,11 +117,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, UInt2Vector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ private void setValue(int index, int value) { @@ -262,11 +262,11 @@ public void setSafe(int index, int isSet, char value) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ @Override diff --git a/java/vector/src/main/java/org/apache/arrow/vector/UInt4Vector.java b/java/vector/src/main/java/org/apache/arrow/vector/UInt4Vector.java index 921dbb4ecbb5d..edaef22ef3d09 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/UInt4Vector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/UInt4Vector.java @@ -55,11 +55,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -117,11 +117,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, UInt4Vector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ private void setValue(int index, int value) { @@ -234,11 +234,11 @@ public void setSafe(int index, int isSet, int value) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ @Override diff --git a/java/vector/src/main/java/org/apache/arrow/vector/UInt8Vector.java b/java/vector/src/main/java/org/apache/arrow/vector/UInt8Vector.java index 66c55341f4786..cab162b55c1de 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/UInt8Vector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/UInt8Vector.java @@ -55,11 +55,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value retrieval methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -117,11 +117,11 @@ public void copyFromSafe(int fromIndex, int thisIndex, UInt8Vector from) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ private void setValue(int index, long value) { @@ -234,11 +234,11 @@ public void setSafe(int index, int isSet, long value) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ @Override diff --git a/java/vector/src/main/java/org/apache/arrow/vector/ValueVector.java b/java/vector/src/main/java/org/apache/arrow/vector/ValueVector.java index 6d3cc9e371fc3..86a381a0aec89 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/ValueVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/ValueVector.java @@ -32,12 +32,12 @@ /** * An abstraction that is used to store a sequence of values in an individual column. * - * A {@link ValueVector value vector} stores underlying data in-memory in a columnar fashion that is compact and + *

A {@link ValueVector value vector} stores underlying data in-memory in a columnar fashion that is compact and * efficient. The column whose data is stored, is referred by {@link #getField()}. * - * It is important that vector is allocated before attempting to read or write. + *

It is important that vector is allocated before attempting to read or write. * - * There are a few "rules" around vectors: + *

There are a few "rules" around vectors: * *

    *
  • values need to be written in order (e.g. index 0, 1, 2, 5)
  • @@ -47,10 +47,10 @@ *
  • you should never write to a vector once it has been read.
  • *
* - * Please note that the current implementation doesn't enforce those rules, hence we may find few places that + *

Please note that the current implementation doesn't enforce those rules, hence we may find few places that * deviate from these rules (e.g. offset vectors in Variable Length and Repeated vector) * - * This interface "should" strive to guarantee this order of operation: + *

This interface "should" strive to guarantee this order of operation: *

* allocate > mutate > setvaluecount > access > clear (or allocate to start the process over). *
@@ -79,7 +79,7 @@ public interface ValueVector extends Closeable, Iterable { BufferAllocator getAllocator(); /** - * Set the initial record capacity + * Set the initial record capacity. * * @param numRecords the initial record capacity. */ @@ -122,11 +122,11 @@ public interface ValueVector extends Closeable, Iterable { MinorType getMinorType(); /** - * to transfer quota responsibility + * To transfer quota responsibility. * * @param allocator the target allocator * @return a {@link org.apache.arrow.vector.util.TransferPair transfer pair}, creating a new target vector of - * the same type. + * the same type. */ TransferPair getTransferPair(BufferAllocator allocator); @@ -135,21 +135,25 @@ public interface ValueVector extends Closeable, Iterable { TransferPair getTransferPair(String ref, BufferAllocator allocator, CallBack callBack); /** - * makes a new transfer pair used to transfer underlying buffers + * Makes a new transfer pair used to transfer underlying buffers. * * @param target the target for the transfer * @return a new {@link org.apache.arrow.vector.util.TransferPair transfer pair} that is used to transfer underlying - * buffers into the target vector. + * buffers into the target vector. */ TransferPair makeTransferPair(ValueVector target); /** + * Get a reader for this vector. + * * @return a {@link org.apache.arrow.vector.complex.reader.FieldReader field reader} that supports reading values - * from this vector. + * from this vector. */ FieldReader getReader(); /** + * Get the number of bytes used by this vector. + * * @return the number of bytes that is used by this vector instance. */ int getBufferSize(); @@ -179,55 +183,58 @@ public interface ValueVector extends Closeable, Iterable { ArrowBuf[] getBuffers(boolean clear); /** - * Gets the underlying buffer associated with validity vector + * Gets the underlying buffer associated with validity vector. * * @return buffer */ ArrowBuf getValidityBuffer(); /** - * Gets the underlying buffer associated with data vector + * Gets the underlying buffer associated with data vector. * * @return buffer */ ArrowBuf getDataBuffer(); /** - * Gets the underlying buffer associated with offset vector + * Gets the underlying buffer associated with offset vector. * * @return buffer */ ArrowBuf getOffsetBuffer(); /** - * Gets the number of values - * @return + * Gets the number of values. + * + * @return number of values in the vector */ int getValueCount(); /** - * Set number of values in the vector - * @return + * Set number of values in the vector. */ void setValueCount(int valueCount); /** - * Get friendly type object from the vector - * @param index - * @return + * Get friendly type object from the vector. + * + * @param index index of object to get + * @return friendly type object */ Object getObject(int index); /** - * Returns number of null elements in the vector - * @return + * Returns number of null elements in the vector. + * + * @return number of null elements */ int getNullCount(); /** - * Check whether an element in the vector is null - * @param index - * @return + * Check whether an element in the vector is null. + * + * @param index index to check for null + * @return true if element is null */ boolean isNull(int index); } diff --git a/java/vector/src/main/java/org/apache/arrow/vector/VarBinaryVector.java b/java/vector/src/main/java/org/apache/arrow/vector/VarBinaryVector.java index 74ea42b34de33..a0f4e7b0c1fa0 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/VarBinaryVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/VarBinaryVector.java @@ -37,6 +37,7 @@ public class VarBinaryVector extends BaseVariableWidthVector { /** * Instantiate a VarBinaryVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param allocator allocator for memory management. */ @@ -47,6 +48,7 @@ public VarBinaryVector(String name, BufferAllocator allocator) { /** * Instantiate a VarBinaryVector. This doesn't allocate any memory for * the data in vector. + * * @param name name of the vector * @param fieldType type of Field materialized by this vector * @param allocator allocator for memory management. @@ -57,7 +59,8 @@ public VarBinaryVector(String name, FieldType fieldType, BufferAllocator allocat } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. + * * @return Field Reader for this vector */ @Override @@ -68,6 +71,7 @@ public FieldReader getReader() { /** * Get minor type for this vector. The vector holds values belonging * to a particular type. + * * @return {@link org.apache.arrow.vector.types.Types.MinorType} */ @Override @@ -76,11 +80,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value getter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -138,16 +142,17 @@ public void get(int index, NullableVarBinaryHolder holder) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -168,6 +173,7 @@ public void copyFrom(int fromIndex, int thisIndex, VarBinaryVector from) { * Same as {@link #copyFrom(int, int, VarBinaryVector)} except that * it handles the case when the capacity of the vector needs to be expanded * before copy. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -187,7 +193,7 @@ public void copyFromSafe(int fromIndex, int thisIndex, VarBinaryVector from) { /** * Set the variable length element at the specified index to the data - * buffer supplied in the holder + * buffer supplied in the holder. * * @param index position of the element to set * @param holder holder that carries data buffer. @@ -225,7 +231,7 @@ public void setSafe(int index, VarBinaryHolder holder) { /** * Set the variable length element at the specified index to the data - * buffer supplied in the holder + * buffer supplied in the holder. * * @param index position of the element to set * @param holder holder that carries data buffer. @@ -262,15 +268,16 @@ public void setSafe(int index, NullableVarBinaryHolder holder) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -282,6 +289,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/VarCharVector.java b/java/vector/src/main/java/org/apache/arrow/vector/VarCharVector.java index 347fe92a76777..a6a23eaf77f9f 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/VarCharVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/VarCharVector.java @@ -58,7 +58,7 @@ public VarCharVector(String name, FieldType fieldType, BufferAllocator allocator } /** - * Get a reader that supports reading values from this vector + * Get a reader that supports reading values from this vector. * @return Field Reader for this vector */ @Override @@ -77,11 +77,11 @@ public MinorType getMinorType() { } - /****************************************************************** - * * - * vector value getter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value retrieval methods | + | | + *----------------------------------------------------------------*/ /** @@ -141,16 +141,17 @@ public void get(int index, NullableVarCharHolder holder) { } - /****************************************************************** - * * - * vector value setter methods * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector value setter methods | + | | + *----------------------------------------------------------------*/ /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -171,6 +172,7 @@ public void copyFrom(int fromIndex, int thisIndex, VarCharVector from) { * Same as {@link #copyFrom(int, int, VarCharVector)} except that * it handles the case when the capacity of the vector needs to be expanded * before copy. + * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector @@ -190,7 +192,7 @@ public void copyFromSafe(int fromIndex, int thisIndex, VarCharVector from) { /** * Set the variable length element at the specified index to the data - * buffer supplied in the holder + * buffer supplied in the holder. * * @param index position of the element to set * @param holder holder that carries data buffer. @@ -228,7 +230,7 @@ public void setSafe(int index, VarCharHolder holder) { /** * Set the variable length element at the specified index to the data - * buffer supplied in the holder + * buffer supplied in the holder. * * @param index position of the element to set * @param holder holder that carries data buffer. @@ -266,7 +268,7 @@ public void setSafe(int index, NullableVarCharHolder holder) { /** * Set the variable length element at the specified index to the - * content in supplied Text + * content in supplied Text. * * @param index position of the element to set * @param text Text object with data @@ -288,15 +290,16 @@ public void setSafe(int index, Text text) { } - /****************************************************************** - * * - * vector transfer * - * * - ******************************************************************/ + /*----------------------------------------------------------------* + | | + | vector transfer | + | | + *----------------------------------------------------------------*/ /** * Construct a TransferPair comprising of this and and a target vector of * the same type. + * * @param ref name of the target vector * @param allocator allocator for the target vector * @return {@link TransferPair} @@ -308,6 +311,7 @@ public TransferPair getTransferPair(String ref, BufferAllocator allocator) { /** * Construct a TransferPair with a desired target vector of the same type. + * * @param to target vector * @return {@link TransferPair} */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/VectorLoader.java b/java/vector/src/main/java/org/apache/arrow/vector/VectorLoader.java index dd4c5e3d4326b..0f249c71ca514 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/VectorLoader.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/VectorLoader.java @@ -31,14 +31,14 @@ import io.netty.buffer.ArrowBuf; /** - * Loads buffers into vectors + * Loads buffers into vectors. */ public class VectorLoader { private final VectorSchemaRoot root; /** - * will create children in root based on schema + * Construct with a root to load and will create children in root based on schema. * * @param root the root to add vectors to based on schema */ @@ -47,7 +47,7 @@ public VectorLoader(VectorSchemaRoot root) { } /** - * Loads the record batch in the vectors + * Loads the record batch in the vectors. * will not close the record batch * * @param recordBatch the batch to load diff --git a/java/vector/src/main/java/org/apache/arrow/vector/VectorSchemaRoot.java b/java/vector/src/main/java/org/apache/arrow/vector/VectorSchemaRoot.java index 4ef205a3eaebd..ca5a07107f0e9 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/VectorSchemaRoot.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/VectorSchemaRoot.java @@ -31,7 +31,7 @@ import org.apache.arrow.vector.types.pojo.Schema; /** - * Holder for a set of vectors to be loaded/unloaded + * Holder for a set of vectors to be loaded/unloaded. */ public class VectorSchemaRoot implements AutoCloseable { diff --git a/java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractContainerVector.java b/java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractContainerVector.java index 27025da1b91c3..00c1b6d392015 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractContainerVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractContainerVector.java @@ -31,7 +31,7 @@ /** * Base class for composite vectors. * - * This class implements common functionality of composite vectors. + *

This class implements common functionality of composite vectors. */ public abstract class AbstractContainerVector implements ValueVector, DensityAwareVector { static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(AbstractContainerVector.class); diff --git a/java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractStructVector.java b/java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractStructVector.java index 87c71ca67956c..321ad8a9171eb 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractStructVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractStructVector.java @@ -33,7 +33,7 @@ import io.netty.buffer.ArrowBuf; -/* +/** * Base class for StructVectors. Currently used by NonNullableStructVector */ public abstract class AbstractStructVector extends AbstractContainerVector { @@ -90,7 +90,7 @@ public void reAlloc() { * Adds a new field with the given parameters or replaces the existing one and consequently returns the resultant * {@link org.apache.arrow.vector.ValueVector}. * - * Execution takes place in the following order: + *

Execution takes place in the following order: *

    *
  • * if field is new, create and insert a new vector of desired type. @@ -191,7 +191,7 @@ protected ValueVector add(String childName, FieldType fieldType) { /** * Inserts the vector with the given name if it does not exist else replaces it with the new value. * - * Note that this method does not enforce any vector type check nor throws a schema change exception. + *

    Note that this method does not enforce any vector type check nor throws a schema change exception. * * @param name the name of the child to add * @param vector the vector to add as a child @@ -201,7 +201,7 @@ protected void putChild(String name, FieldVector vector) { } /** - * Inserts the input vector into the map if it does not exist, replaces if it exists already + * Inserts the input vector into the map if it does not exist, replaces if it exists already. * * @param name field name * @param vector vector to be inserted @@ -218,6 +218,7 @@ protected void putVector(String name, FieldVector vector) { } /** + * Get child vectors. * @return a sequence of underlying child vectors. */ protected List getChildren() { @@ -236,6 +237,7 @@ protected List getChildFieldNames() { } /** + * Get the number of child vectors. * @return the number of underlying child vectors. */ @Override @@ -249,6 +251,7 @@ public Iterator iterator() { } /** + * Get primitive child vectors. * @return a list of scalar child vectors recursing the entire vector hierarchy. */ public List getPrimitiveVectors() { @@ -265,6 +268,7 @@ public List getPrimitiveVectors() { } /** + * Get a child vector by name. * @param name the name of the child to return * @return a vector with its corresponding ordinal mapping if field exists or null. */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/complex/BaseRepeatedValueVector.java b/java/vector/src/main/java/org/apache/arrow/vector/complex/BaseRepeatedValueVector.java index 7aff2abbec179..4c61dfb493cf9 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/complex/BaseRepeatedValueVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/complex/BaseRepeatedValueVector.java @@ -255,6 +255,7 @@ public ArrowBuf[] getBuffers(boolean clear) { } /** + * Get value indicating if inner vector is set. * @return 1 if inner vector is explicitly set via #addOrGetVector else 0 */ public int size() { diff --git a/java/vector/src/main/java/org/apache/arrow/vector/complex/FixedSizeListVector.java b/java/vector/src/main/java/org/apache/arrow/vector/complex/FixedSizeListVector.java index dd08415caa391..31bdf14f4ba70 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/complex/FixedSizeListVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/complex/FixedSizeListVector.java @@ -313,6 +313,7 @@ public ArrowBuf[] getBuffers(boolean clear) { } /** + * Get value indicating if inner vector is set. * @return 1 if inner vector is explicitly set via #addOrGetVector else 0 */ public int size() { diff --git a/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java b/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java index e1b049baddf33..067060a4f7fa7 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java @@ -137,7 +137,7 @@ public void setInitialCapacity(int numRecords, double density) { } /** - * Get the density of this ListVector + * Get the density of this ListVector. * @return density */ public double getDensity() { @@ -184,7 +184,7 @@ public void loadFieldBuffers(ArrowFieldNode fieldNode, List ownBuffers } /** - * Get the buffers belonging to this vector + * Get the buffers belonging to this vector. * @return the inner buffers. */ @Override @@ -320,7 +320,7 @@ public void copyFromSafe(int inIndex, int outIndex, ListVector from) { /** * Copy a cell value from a particular index in source vector to a particular - * position in this vector + * position in this vector. * @param inIndex position to copy from in source vector * @param outIndex position to copy to in this vector * @param from source vector @@ -334,7 +334,7 @@ public void copyFrom(int inIndex, int outIndex, ListVector from) { } /** - * Get the inner data vector for this list vector + * Get the inner data vector for this list vector. * @return data vector */ @Override @@ -531,7 +531,7 @@ public AddOrGetResult addOrGetVector(FieldType fieldT /** * Get the size (number of bytes) of underlying buffers used by this - * vector + * vector. * @return size of underlying buffers. */ @Override @@ -613,7 +613,7 @@ public UnionVector promoteToUnion() { } /** - * Get the element in the list vector at a particular index + * Get the element in the list vector at a particular index. * @param index position of the element * @return Object at given position */ @@ -658,7 +658,7 @@ public int isSet(int index) { } /** - * Get the number of elements that are null in the vector + * Get the number of elements that are null in the vector. * * @return the number of null elements. */ @@ -668,7 +668,7 @@ public int getNullCount() { } /** - * Get the current value capacity for the vector + * Get the current value capacity for the vector. * @return number of elements that vector can hold. */ @Override @@ -694,7 +694,7 @@ public void setNotNull(int index) { } /** - * Start a new value in the list vector + * Start a new value in the list vector. * * @param index index of the value to start */ @@ -713,7 +713,7 @@ public int startNewValue(int index) { } /** - * End the current value + * End the current value. * * @param index index of the value to end * @param size number of elements in the list that was written @@ -724,7 +724,7 @@ public void endValue(int index, int size) { } /** - * Sets the value count for the vector + * Sets the value count for the vector. * * @param valueCount value count */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/complex/RepeatedValueVector.java b/java/vector/src/main/java/org/apache/arrow/vector/complex/RepeatedValueVector.java index d6f0942250a92..054a3392e9562 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/complex/RepeatedValueVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/complex/RepeatedValueVector.java @@ -24,7 +24,7 @@ /** * An abstraction representing repeated value vectors. * - * A repeated vector contains values that may either be flat or nested. A value consists of zero or more + *

    A repeated vector contains values that may either be flat or nested. A value consists of zero or more * cells(inner values). Current design maintains data and offsets vectors. Each cell is stored in the data vector. * Repeated vector uses the offset vector to determine the sequence of cells pertaining to an individual value. */ @@ -33,11 +33,13 @@ public interface RepeatedValueVector extends ValueVector, DensityAwareVector { static final int DEFAULT_REPEAT_PER_RECORD = 5; /** + * Get the offset vector. * @return the underlying offset vector or null if none exists. */ UInt4Vector getOffsetVector(); /** + * Get the data vector. * @return the underlying data vector or null if none exists. */ ValueVector getDataVector(); diff --git a/java/vector/src/main/java/org/apache/arrow/vector/complex/StructVector.java b/java/vector/src/main/java/org/apache/arrow/vector/complex/StructVector.java index 1136a33ae6314..bc281df59739a 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/complex/StructVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/complex/StructVector.java @@ -249,7 +249,7 @@ private int getValidityBufferValueCapacity() { } /** - * Get the current value capacity for the vector + * Get the current value capacity for the vector. * @return number of elements that vector can hold. */ @Override @@ -301,7 +301,7 @@ public void close() { } /** - * Same as {@link #close()} + * Same as {@link #close()}. */ @Override public void clear() { @@ -310,7 +310,7 @@ public void clear() { } /** - * Reset this vector to empty, does not release buffers + * Reset this vector to empty, does not release buffers. */ @Override public void reset() { @@ -319,7 +319,7 @@ public void reset() { } /** - * Release the validity buffer + * Release the validity buffer. */ private void clearValidityBuffer() { validityBuffer.release(); @@ -327,8 +327,8 @@ private void clearValidityBuffer() { } /** - * Get the size (number of bytes) of underlying buffers used by this - * vector + * Get the size (number of bytes) of underlying buffers used by this vector. + * * @return size of underlying buffers. */ @Override @@ -342,6 +342,7 @@ public int getBufferSize() { /** * Get the potential buffer size for a particular number of records. + * * @param valueCount desired number of elements in the vector * @return estimated size of underlying buffers if the vector holds * a given number of elements diff --git a/java/vector/src/main/java/org/apache/arrow/vector/complex/impl/UnionFixedSizeListReader.java b/java/vector/src/main/java/org/apache/arrow/vector/complex/impl/UnionFixedSizeListReader.java index c101463391288..d81c3689f5db6 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/complex/impl/UnionFixedSizeListReader.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/complex/impl/UnionFixedSizeListReader.java @@ -26,7 +26,7 @@ import org.apache.arrow.vector.types.Types.MinorType; /** - * Reader for fixed size list vectors + * Reader for fixed size list vectors. */ public class UnionFixedSizeListReader extends AbstractFieldReader { diff --git a/java/vector/src/main/java/org/apache/arrow/vector/holders/ValueHolder.java b/java/vector/src/main/java/org/apache/arrow/vector/holders/ValueHolder.java index 9036e3603d3b4..a809e6bb8c419 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/holders/ValueHolder.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/holders/ValueHolder.java @@ -20,7 +20,7 @@ /** * Wrapper object for an individual value in Arrow. * - * ValueHolders are designed to be mutable wrapper objects for defining clean + *

    ValueHolders are designed to be mutable wrapper objects for defining clean * APIs that access data in Arrow. For performance, object creation is avoided * at all costs throughout execution. For this reason, ValueHolders are * disallowed from implementing any methods, this allows for them to be diff --git a/java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowReader.java b/java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowReader.java index b7366409d814b..a80fd82a0bca5 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowReader.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowReader.java @@ -93,7 +93,7 @@ public Dictionary lookup(long id) { * Load the next ArrowRecordBatch to the vector schema root if available. * * @return true if a batch was read, false on EOS - * @throws IOException + * @throws IOException on error */ public abstract boolean loadNextBatch() throws IOException; @@ -108,7 +108,7 @@ public Dictionary lookup(long id) { * Close resources, including vector schema root and dictionary vectors, and the * underlying read source. * - * @throws IOException + * @throws IOException on error */ @Override public void close() throws IOException { @@ -120,7 +120,7 @@ public void close() throws IOException { * closeReadChannel is true then close the underlying read source, otherwise leave it open. * * @param closeReadSource Flag to control if closing the underlying read source - * @throws IOException + * @throws IOException on error */ public void close(boolean closeReadSource) throws IOException { if (initialized) { @@ -138,7 +138,7 @@ public void close(boolean closeReadSource) throws IOException { /** * Close the underlying read source. * - * @throws IOException + * @throws IOException on error */ protected abstract void closeReadSource() throws IOException; @@ -146,7 +146,7 @@ public void close(boolean closeReadSource) throws IOException { * Read the Schema from the source, will be invoked at the beginning the initialization. * * @return the read Schema - * @throws IOException + * @throws IOException on error */ protected abstract Schema readSchema() throws IOException; @@ -155,14 +155,14 @@ public void close(boolean closeReadSource) throws IOException { * called N times, where N is the number of dictionaries indicated by the schema Fields. * * @return the read ArrowDictionaryBatch - * @throws IOException + * @throws IOException on error */ protected abstract ArrowDictionaryBatch readDictionary() throws IOException; /** * Initialize if not done previously. * - * @throws IOException + * @throws IOException on error */ protected void ensureInitialized() throws IOException { if (!initialized) { @@ -172,7 +172,7 @@ protected void ensureInitialized() throws IOException { } /** - * Reads the schema and initializes the vectors + * Reads the schema and initializes the vectors. */ private void initialize() throws IOException { Schema originalSchema = readSchema(); @@ -202,7 +202,7 @@ private void initialize() throws IOException { /** * Ensure the reader has been initialized and reset the VectorSchemaRoot row count to 0. * - * @throws IOException + * @throws IOException on error */ protected void prepareLoadNextBatch() throws IOException { ensureInitialized(); @@ -225,7 +225,7 @@ protected void loadRecordBatch(ArrowRecordBatch batch) { /** * Load an ArrowDictionaryBatch to the readers dictionary vectors. * - * @param dictionaryBatch + * @param dictionaryBatch dictionary batch to load */ protected void loadDictionary(ArrowDictionaryBatch dictionaryBatch) { long id = dictionaryBatch.getDictionaryId(); diff --git a/java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowStreamReader.java b/java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowStreamReader.java index 3b9efc3eee778..a5e6d5071a3a9 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowStreamReader.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowStreamReader.java @@ -84,7 +84,7 @@ public long bytesRead() { /** * Closes the underlying read source. * - * @throws IOException + * @throws IOException on error */ @Override protected void closeReadSource() throws IOException { @@ -95,7 +95,7 @@ protected void closeReadSource() throws IOException { * Load the next ArrowRecordBatch to the vector schema root if available. * * @return true if a batch was read, false on EOS - * @throws IOException + * @throws IOException on error */ public boolean loadNextBatch() throws IOException { prepareLoadNextBatch(); @@ -147,7 +147,7 @@ protected Schema readSchema() throws IOException { * batches are read. * * @return the deserialized dictionary batch - * @throws IOException + * @throws IOException on error */ @Override protected ArrowDictionaryBatch readDictionary() throws IOException { diff --git a/java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowStreamWriter.java b/java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowStreamWriter.java index b3f79532053ac..ec0f42e0d78ab 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowStreamWriter.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowStreamWriter.java @@ -26,7 +26,7 @@ import org.apache.arrow.vector.dictionary.DictionaryProvider; /** - * Writer for the Arrow stream format to send ArrowRecordBatches over a WriteChannel + * Writer for the Arrow stream format to send ArrowRecordBatches over a WriteChannel. */ public class ArrowStreamWriter extends ArrowWriter { @@ -58,7 +58,7 @@ public ArrowStreamWriter(VectorSchemaRoot root, DictionaryProvider provider, Wri * Write an EOS identifier to the WriteChannel. * * @param out Open WriteChannel with an active Arrow stream. - * @throws IOException + * @throws IOException on error */ public static void writeEndOfStream(WriteChannel out) throws IOException { out.writeIntLittleEndian(0); diff --git a/java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowWriter.java b/java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowWriter.java index 2998a51c10466..025122845923e 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowWriter.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowWriter.java @@ -41,7 +41,7 @@ import org.slf4j.LoggerFactory; /** - * Abstract base class for implementing Arrow writers for IPC over a WriteChannel + * Abstract base class for implementing Arrow writers for IPC over a WriteChannel. */ public abstract class ArrowWriter implements AutoCloseable { @@ -58,7 +58,7 @@ public abstract class ArrowWriter implements AutoCloseable { private boolean ended = false; /** - * Note: fields are not closed when the writer is closed + * Note: fields are not closed when the writer is closed. * * @param root the vectors to write to the output * @param provider where to find the dictionaries diff --git a/java/vector/src/main/java/org/apache/arrow/vector/ipc/WriteChannel.java b/java/vector/src/main/java/org/apache/arrow/vector/ipc/WriteChannel.java index 3afcd4356006b..674236683e9e9 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/ipc/WriteChannel.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/ipc/WriteChannel.java @@ -34,7 +34,7 @@ * Wrapper around a WritableByteChannel that maintains the position as well adding * some common serialization utilities. * - * All write methods in this class follow full write semantics, i.e., write calls + *

    All write methods in this class follow full write semantics, i.e., write calls * only return after requested data has been fully written. Note this is different * from java WritableByteChannel interface where partial write is allowed */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/ipc/message/ArrowRecordBatch.java b/java/vector/src/main/java/org/apache/arrow/vector/ipc/message/ArrowRecordBatch.java index 51ce6dfaf4c9a..26d39165f8063 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/ipc/message/ArrowRecordBatch.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/ipc/message/ArrowRecordBatch.java @@ -37,12 +37,12 @@ public class ArrowRecordBatch implements ArrowMessage { private static final Logger LOGGER = LoggerFactory.getLogger(ArrowRecordBatch.class); /** - * number of records + * Number of records. */ private final int length; /** - * Nodes correspond to the pre-ordered flattened logical schema + * Nodes correspond to the pre-ordered flattened logical schema. */ private final List nodes; @@ -57,6 +57,8 @@ public ArrowRecordBatch(int length, List nodes, List b } /** + * Construct a record batch from nodes. + * * @param length how many rows in this batch * @param nodes field level info * @param buffers will be retained until this recordBatch is closed @@ -102,6 +104,8 @@ public int getLength() { } /** + * Get the nodes in this record batch. + * * @return the FieldNodes corresponding to the schema */ public List getNodes() { @@ -109,6 +113,8 @@ public List getNodes() { } /** + * Get the record batch buffers. + * * @return the buffers containing the data */ public List getBuffers() { @@ -122,7 +128,7 @@ public List getBuffers() { * Create a new ArrowRecordBatch which has the same information as this batch but whose buffers * are owned by that Allocator. * - * This will also close this record batch and make it no longer useful. + *

    This will also close this record batch and make it no longer useful. * * @return A cloned ArrowRecordBatch */ @@ -135,6 +141,8 @@ public ArrowRecordBatch cloneWithTransfer(final BufferAllocator allocator) { } /** + * Get the serialized layout. + * * @return the serialized layout if we send the buffers on the wire */ public List getBuffersLayout() { @@ -160,7 +168,7 @@ public T accepts(ArrowMessageVisitor visitor) { } /** - * releases the buffers + * Releases the buffers. */ @Override public void close() { diff --git a/java/vector/src/main/java/org/apache/arrow/vector/ipc/message/MessageChannelReader.java b/java/vector/src/main/java/org/apache/arrow/vector/ipc/message/MessageChannelReader.java index 777286aa0b311..2135dec3485e1 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/ipc/message/MessageChannelReader.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/ipc/message/MessageChannelReader.java @@ -50,7 +50,7 @@ public MessageChannelReader(ReadChannel in, BufferAllocator allocator) { * returns null. * * @return MessageResult or null if reached end-of-stream - * @throws IOException + * @throws IOException on error */ public MessageResult readNext() throws IOException { @@ -83,7 +83,7 @@ public long bytesRead() { /** * Close the ReadChannel. * - * @throws IOException + * @throws IOException on error */ @Override public void close() throws IOException { diff --git a/java/vector/src/main/java/org/apache/arrow/vector/ipc/message/MessageSerializer.java b/java/vector/src/main/java/org/apache/arrow/vector/ipc/message/MessageSerializer.java index 896041ed38150..1449846eb6547 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/ipc/message/MessageSerializer.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/ipc/message/MessageSerializer.java @@ -45,9 +45,9 @@ * body and the type of the message. * 3. Serialized message. * - * For schema messages, the serialization is simply the FB serialized Schema. + *

    For schema messages, the serialization is simply the FB serialized Schema. * - * For RecordBatch messages the serialization is: + *

    For RecordBatch messages the serialization is: * 1. 4 byte little endian batch metadata header * 2. FB serialized RowBatch * 3. Padding to align to 8 byte boundary. @@ -91,7 +91,7 @@ public static void intToBytes(int value, byte[] bytes) { * @param messageBuffer Message metadata buffer to be written, this does not include any * message body data which should be subsequently written to the Channel * @return Number of bytes written - * @throws IOException + * @throws IOException on error */ public static int writeMessageBuffer(WriteChannel out, int messageLength, ByteBuffer messageBuffer) throws IOException { @@ -207,7 +207,7 @@ public static ArrowBlock serialize(WriteChannel out, ArrowRecordBatch batch) thr * @param out the output channel to write the buffers to * @param batch an ArrowRecordBatch containing buffers to be written * @return the number of bytes written - * @throws IOException + * @throws IOException on error */ public static long writeBatchBuffers(WriteChannel out, ArrowRecordBatch batch) throws IOException { long bufferStart = out.getCurrentPosition(); @@ -252,7 +252,7 @@ public static ArrowRecordBatch deserializeRecordBatch(Message recordBatchMessage * @param in Channel to read a RecordBatch message and data from * @param allocator BufferAllocator to allocate an Arrow buffer to read message body data * @return the deserialized ArrowRecordBatch - * @throws IOException + * @throws IOException on error */ public static ArrowRecordBatch deserializeRecordBatch(ReadChannel in, BufferAllocator allocator) throws IOException { MessageMetadataResult result = readMessage(in); @@ -310,7 +310,7 @@ public static ArrowRecordBatch deserializeRecordBatch(ReadChannel in, ArrowBlock * @param recordBatchFB Deserialized FlatBuffer record batch * @param body Read body of the record batch * @return ArrowRecordBatch from metadata and in-memory body - * @throws IOException + * @throws IOException on error */ public static ArrowRecordBatch deserializeRecordBatch(RecordBatch recordBatchFB, ArrowBuf body) throws IOException { // Now read the body @@ -403,7 +403,7 @@ public static ArrowDictionaryBatch deserializeDictionaryBatch(Message message, A * @param in Channel to read a DictionaryBatch message and data from * @param allocator BufferAllocator to allocate an Arrow buffer to read message body data * @return the deserialized ArrowDictionaryBatch - * @throws IOException + * @throws IOException on error */ public static ArrowDictionaryBatch deserializeDictionaryBatch(ReadChannel in, BufferAllocator allocator) throws IOException { @@ -530,8 +530,8 @@ public static ByteBuffer serializeMessage( * * @param in ReadChannel to read messages from * @return MessageMetadataResult with deserialized Message metadata and message information if - * a valid Message was read, or null if end-of-stream - * @throws IOException + * a valid Message was read, or null if end-of-stream + * @throws IOException on error */ public static MessageMetadataResult readMessage(ReadChannel in) throws IOException { @@ -567,7 +567,7 @@ public static MessageMetadataResult readMessage(ReadChannel in) throws IOExcepti * @param bodyLength Length in bytes of the message body to read * @param allocator Allocate the ArrowBuf to contain message body data * @return an ArrowBuf containing the message body data - * @throws IOException + * @throws IOException on error */ public static ArrowBuf readMessageBody(ReadChannel in, int bodyLength, BufferAllocator allocator) throws IOException { ArrowBuf bodyBuffer = allocator.buffer(bodyLength); diff --git a/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Field.java b/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Field.java index 92a63dc64b7a9..9c3289a990d9c 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Field.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Field.java @@ -131,9 +131,9 @@ public static Field convertField(org.apache.arrow.flatbuf.Field field) { } /** - * Helper method to ensure backward compatibility with schemas generated prior to ARROW-1347, ARROW-1663 + * Helper method to ensure backward compatibility with schemas generated prior to ARROW-1347, ARROW-1663. * - * @param field + * @param field the field to check * @param originalChildField original field which name might be mutated * @return original or mutated field */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Schema.java b/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Schema.java index 7f6c7f36f0242..b1b812d69177e 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Schema.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Schema.java @@ -46,11 +46,13 @@ import com.google.flatbuffers.FlatBufferBuilder; /** - * An Arrow Schema + * An Arrow Schema. */ public class Schema { /** + * Search for a field by name in given the list of fields. + * * @param fields the list of the fields * @param name the name of the field to return * @return the corresponding field @@ -120,8 +122,11 @@ public Map getCustomMetadata() { } /** + * Search for a field by name in this Schema. + * * @param name the name of the field to return * @return the corresponding field + * @throws IllegalArgumentException if the field was not found */ public Field findField(String name) { return findField(getFields(), name); diff --git a/java/vector/src/main/java/org/apache/arrow/vector/util/ByteFunctionHelpers.java b/java/vector/src/main/java/org/apache/arrow/vector/util/ByteFunctionHelpers.java index e72c2a8356549..bbe6d1c907b2e 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/util/ByteFunctionHelpers.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/util/ByteFunctionHelpers.java @@ -26,7 +26,7 @@ public class ByteFunctionHelpers { static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ByteFunctionHelpers.class); /** - * Helper function to check for equality of bytes in two ArrowBufs + * Helper function to check for equality of bytes in two ArrowBufs. * * @param left Left ArrowBuf for comparison * @param lStart start offset in the buffer @@ -80,7 +80,7 @@ private static final int memEqual(final long laddr, int lStart, int lEnd, final /** * Helper function to compare a set of bytes in two ArrowBufs. * - * Function will check data before completing in the case that + *

    Function will check data before completing in the case that * * @param left Left ArrowBuf to compare * @param lStart start offset in the buffer diff --git a/java/vector/src/main/java/org/apache/arrow/vector/util/DecimalUtility.java b/java/vector/src/main/java/org/apache/arrow/vector/util/DecimalUtility.java index e5c72ecefb289..da7ac70a11fd9 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/util/DecimalUtility.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/util/DecimalUtility.java @@ -66,7 +66,7 @@ public class DecimalUtility { /** * Simple function that returns the static precomputed - * power of ten, instead of using Math.pow + * power of ten, instead of using Math.pow. */ public static long getPowerOfTen(int power) { assert power >= 0 && power < scale_long_constants.length; @@ -99,7 +99,7 @@ public static long adjustScaleDivide(long input, int factor) { } /** - * Returns a string representation of the given integer + * Returns a string representation of the given integer. * If the length of the given integer is less than the * passed length, this function will prepend zeroes to the string */ diff --git a/java/vector/src/main/java/org/apache/arrow/vector/util/DictionaryUtility.java b/java/vector/src/main/java/org/apache/arrow/vector/util/DictionaryUtility.java index 6b5c2912c9a82..f2d1663ac0112 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/util/DictionaryUtility.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/util/DictionaryUtility.java @@ -36,9 +36,9 @@ public class DictionaryUtility { /** * Convert field and child fields that have a dictionary encoding to message format, so fields - * have the dictionary type + * have the dictionary type. * - * NOTE: in the message format, fields have the dictionary type + *

    NOTE: in the message format, fields have the dictionary type * in the memory format, they have the index type */ public static Field toMessageFormat(Field field, DictionaryProvider provider, Set dictionaryIdsUsed) { @@ -74,7 +74,7 @@ public static Field toMessageFormat(Field field, DictionaryProvider provider, Se /** * Convert field and child fields that have a dictionary encoding to memory format, so fields - * have the index type + * have the index type. */ public static Field toMemoryFormat(Field field, BufferAllocator allocator, Map dictionaries) { DictionaryEncoding encoding = field.getDictionary(); diff --git a/java/vector/src/main/java/org/apache/arrow/vector/util/MapWithOrdinal.java b/java/vector/src/main/java/org/apache/arrow/vector/util/MapWithOrdinal.java index d4fbc41d829a2..1a7bae3402b03 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/util/MapWithOrdinal.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/util/MapWithOrdinal.java @@ -37,12 +37,12 @@ /** * An implementation of map that supports constant time look-up by a generic key or an ordinal. * - * This class extends the functionality a regular {@link Map} with ordinal lookup support. + *

    This class extends the functionality a regular {@link Map} with ordinal lookup support. * Upon insertion an unused ordinal is assigned to the inserted (key, value) tuple. * Upon update the same ordinal id is re-used while value is replaced. * Upon deletion of an existing item, its corresponding ordinal is recycled and could be used by another item. * - * For any instance with N items, this implementation guarantees that ordinals are in the range of [0, N). However, + *

    For any instance with N items, this implementation guarantees that ordinals are in the range of [0, N). However, * the ordinal assignment is dynamic and may change after an insertion or deletion. Consumers of this class are * responsible for explicitly checking the ordinal corresponding to a key via * {@link org.apache.arrow.vector.util.MapWithOrdinal#getOrdinal(Object)} before attempting to execute a lookup @@ -144,7 +144,7 @@ public Set> entrySet() { }; /** - * Returns the value corresponding to the given ordinal + * Returns the value corresponding to the given ordinal. * * @param id ordinal value for lookup * @return an instance of V diff --git a/java/vector/src/main/java/org/apache/arrow/vector/util/Text.java b/java/vector/src/main/java/org/apache/arrow/vector/util/Text.java index 65c1ddf0cbed4..ef444fe40a3b6 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/util/Text.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/util/Text.java @@ -123,6 +123,8 @@ public byte[] getBytes() { } /** + * Get the number of bytes in the byte array. + * * @return the number of bytes in the byte array */ public int getLength() { @@ -132,11 +134,11 @@ public int getLength() { /** * Returns the Unicode Scalar Value (32-bit integer value) for the character at * position. Note that this method avoids using the converter or doing String - * instantiation + * instantiation. * * @param position the index of the char we want to retrieve * @return the Unicode scalar value at position or -1 if the position is invalid or points to a - * trailing byte + * trailing byte */ public int charAt(int position) { if (position > this.length) { @@ -163,7 +165,7 @@ public int find(String what) { * @param what the string to search for * @param start where to start from * @return byte position of the first occurrence of the search string in the UTF-8 buffer or -1 - * if not found + * if not found */ public int find(String what, int start) { try { @@ -221,7 +223,7 @@ public void set(String string) { } /** - * Set to a utf8 byte array + * Set to a utf8 byte array. * * @param utf8 the byte array to initialize from */ @@ -239,7 +241,7 @@ public void set(Text other) { } /** - * Set the Text to range of bytes + * Set the Text to range of bytes. * * @param utf8 the data to copy from * @param start the first position of the new string @@ -252,7 +254,7 @@ public void set(byte[] utf8, int start, int len) { } /** - * Append a range of bytes to the end of the given text + * Append a range of bytes to the end of the given text. * * @param utf8 the data to copy from * @param start the first position to append from utf8 @@ -344,7 +346,7 @@ public boolean equals(Object o) { } /** - * Copied from Arrays.hashCode so we don't have to copy the byte array + * Copied from Arrays.hashCode so we don't have to copy the byte array. * * @return hashCode */ @@ -465,7 +467,7 @@ public static ByteBuffer encode(String string, boolean replace) private static final int TRAIL_BYTE = 2; /** - * Check if a byte array contains valid utf-8 + * Check if a byte array contains valid utf-8. * * @param utf8 byte array * @throws MalformedInputException if the byte array contains invalid utf-8 @@ -475,7 +477,7 @@ public static void validateUTF8(byte[] utf8) throws MalformedInputException { } /** - * Check to see if a byte array is valid utf-8 + * Check to see if a byte array is valid utf-8. * * @param utf8 the array of bytes * @param start the offset of the first byte in the array diff --git a/java/vector/src/main/java/org/apache/arrow/vector/util/Validator.java b/java/vector/src/main/java/org/apache/arrow/vector/util/Validator.java index 6907094885da9..241f569c99035 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/util/Validator.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/util/Validator.java @@ -31,7 +31,7 @@ import org.apache.arrow.vector.types.pojo.Schema; /** - * Utility class for validating arrow data structures + * Utility class for validating arrow data structures. */ public class Validator { @@ -49,7 +49,7 @@ public static void compareSchemas(Schema schema1, Schema schema2) { } /** - * Validate two Dictionary encodings and dictionaries with id's from the encodings + * Validate two Dictionary encodings and dictionaries with id's from the encodings. */ public static void compareDictionaries( List encodings1, diff --git a/java/vector/src/main/java/org/joda/time/LocalDateTimes.java b/java/vector/src/main/java/org/joda/time/LocalDateTimes.java index 4b2d4df9aafef..a80cd1f1b272a 100644 --- a/java/vector/src/main/java/org/joda/time/LocalDateTimes.java +++ b/java/vector/src/main/java/org/joda/time/LocalDateTimes.java @@ -18,7 +18,7 @@ package org.joda.time; /** - * Workaround to access package protected fields in JODA + * Workaround to access package protected fields in JODA. */ public class LocalDateTimes { diff --git a/java/vector/src/test/java/org/apache/arrow/vector/TestCopyFrom.java b/java/vector/src/test/java/org/apache/arrow/vector/TestCopyFrom.java index 07d64b38414e6..f7d3ddb397315 100644 --- a/java/vector/src/test/java/org/apache/arrow/vector/TestCopyFrom.java +++ b/java/vector/src/test/java/org/apache/arrow/vector/TestCopyFrom.java @@ -32,7 +32,7 @@ import org.junit.Before; import org.junit.Test; -/** +/* * Tested field types: * * NullableInt diff --git a/java/vector/src/test/java/org/apache/arrow/vector/TestVectorUnloadLoad.java b/java/vector/src/test/java/org/apache/arrow/vector/TestVectorUnloadLoad.java index 075c2655a749b..cbba73441cba6 100644 --- a/java/vector/src/test/java/org/apache/arrow/vector/TestVectorUnloadLoad.java +++ b/java/vector/src/test/java/org/apache/arrow/vector/TestVectorUnloadLoad.java @@ -191,10 +191,10 @@ public void testUnloadLoadAddPadding() throws IOException { /** * The validity buffer can be empty if: - * - all values are defined - * - all values are null + * - all values are defined. + * - all values are null. * - * @throws IOException + * @throws IOException on error */ @Test public void testLoadValidityBuffer() throws IOException { diff --git a/java/vector/src/test/java/org/apache/arrow/vector/complex/writer/TestComplexWriter.java b/java/vector/src/test/java/org/apache/arrow/vector/complex/writer/TestComplexWriter.java index 52d3fae7c262b..b7215ce4e2e68 100644 --- a/java/vector/src/test/java/org/apache/arrow/vector/complex/writer/TestComplexWriter.java +++ b/java/vector/src/test/java/org/apache/arrow/vector/complex/writer/TestComplexWriter.java @@ -153,7 +153,7 @@ public void nullableStruct() { } /** - * This test is similar to {@link #nullableStruct()} ()} but we get the inner struct writer once at the beginning + * This test is similar to {@link #nullableStruct()} ()} but we get the inner struct writer once at the beginning. */ @Test public void nullableStruct2() { @@ -367,7 +367,7 @@ public void listListType() { } /** - * This test is similar to {@link #listListType()} but we get the inner list writer once at the beginning + * This test is similar to {@link #listListType()} but we get the inner list writer once at the beginning. */ @Test public void listListType2() { @@ -434,7 +434,7 @@ public void unionListListType() { } /** - * This test is similar to {@link #unionListListType()} but we get the inner list writer once at the beginning + * This test is similar to {@link #unionListListType()} but we get the inner list writer once at the beginning. */ @Test public void unionListListType2() { @@ -555,7 +555,7 @@ public void promotableWriter() { } /** - * Even without writing to the writer, the union schema is created correctly + * Even without writing to the writer, the union schema is created correctly. */ @Test public void promotableWriterSchema() { diff --git a/java/vector/src/test/java/org/apache/arrow/vector/ipc/BaseFileTest.java b/java/vector/src/test/java/org/apache/arrow/vector/ipc/BaseFileTest.java index 0576ef02dc0df..059dcb03dc9a3 100644 --- a/java/vector/src/test/java/org/apache/arrow/vector/ipc/BaseFileTest.java +++ b/java/vector/src/test/java/org/apache/arrow/vector/ipc/BaseFileTest.java @@ -75,7 +75,7 @@ import io.netty.buffer.ArrowBuf; /** - * Helps testing the file formats + * Helps testing the file formats. */ public class BaseFileTest { private static final Logger LOGGER = LoggerFactory.getLogger(BaseFileTest.class); diff --git a/java/vector/src/test/java/org/apache/arrow/vector/pojo/TestConvert.java b/java/vector/src/test/java/org/apache/arrow/vector/pojo/TestConvert.java index 700c7ef07e0ff..8c291e01a3643 100644 --- a/java/vector/src/test/java/org/apache/arrow/vector/pojo/TestConvert.java +++ b/java/vector/src/test/java/org/apache/arrow/vector/pojo/TestConvert.java @@ -51,7 +51,7 @@ import com.google.flatbuffers.FlatBufferBuilder; /** - * Test conversion between Flatbuf and Pojo field representations + * Test conversion between Flatbuf and Pojo field representations. */ public class TestConvert {