diff --git a/java/algorithm/src/main/java/org/apache/arrow/algorithm/deduplicate/DeduplicationUtils.java b/java/algorithm/src/main/java/org/apache/arrow/algorithm/deduplicate/DeduplicationUtils.java index 01bbaeb0e7e59..8811e43d3d08d 100644 --- a/java/algorithm/src/main/java/org/apache/arrow/algorithm/deduplicate/DeduplicationUtils.java +++ b/java/algorithm/src/main/java/org/apache/arrow/algorithm/deduplicate/DeduplicationUtils.java @@ -18,13 +18,13 @@ package org.apache.arrow.algorithm.deduplicate; import org.apache.arrow.memory.ArrowBuf; -import org.apache.arrow.util.DataSizeRoundingUtil; import org.apache.arrow.util.Preconditions; import org.apache.arrow.vector.BitVectorHelper; import org.apache.arrow.vector.IntVector; import org.apache.arrow.vector.ValueVector; import org.apache.arrow.vector.compare.Range; import org.apache.arrow.vector.compare.RangeEqualsVisitor; +import org.apache.arrow.vector.util.DataSizeRoundingUtil; /** * Utilities for vector deduplication. diff --git a/java/algorithm/src/main/java/org/apache/arrow/algorithm/deduplicate/VectorRunDeduplicator.java b/java/algorithm/src/main/java/org/apache/arrow/algorithm/deduplicate/VectorRunDeduplicator.java index 8eb990b31bc8e..5ef03cbe4a734 100644 --- a/java/algorithm/src/main/java/org/apache/arrow/algorithm/deduplicate/VectorRunDeduplicator.java +++ b/java/algorithm/src/main/java/org/apache/arrow/algorithm/deduplicate/VectorRunDeduplicator.java @@ -19,11 +19,11 @@ import org.apache.arrow.memory.ArrowBuf; import org.apache.arrow.memory.BufferAllocator; -import org.apache.arrow.util.DataSizeRoundingUtil; import org.apache.arrow.util.Preconditions; import org.apache.arrow.vector.BitVectorHelper; import org.apache.arrow.vector.IntVector; import org.apache.arrow.vector.ValueVector; +import org.apache.arrow.vector.util.DataSizeRoundingUtil; /** * Remove adjacent equal elements from a vector. diff --git a/java/algorithm/src/test/java/org/apache/arrow/algorithm/deduplicate/TestDeduplicationUtils.java b/java/algorithm/src/test/java/org/apache/arrow/algorithm/deduplicate/TestDeduplicationUtils.java index 5068fb8271683..def83fba7b74a 100644 --- a/java/algorithm/src/test/java/org/apache/arrow/algorithm/deduplicate/TestDeduplicationUtils.java +++ b/java/algorithm/src/test/java/org/apache/arrow/algorithm/deduplicate/TestDeduplicationUtils.java @@ -23,10 +23,10 @@ import org.apache.arrow.memory.ArrowBuf; import org.apache.arrow.memory.BufferAllocator; import org.apache.arrow.memory.RootAllocator; -import org.apache.arrow.util.DataSizeRoundingUtil; import org.apache.arrow.vector.BitVectorHelper; import org.apache.arrow.vector.IntVector; import org.apache.arrow.vector.VarCharVector; +import org.apache.arrow.vector.util.DataSizeRoundingUtil; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/java/vector/src/main/java/org/apache/arrow/util/AutoCloseables.java b/java/memory/memory-core/src/main/java/org/apache/arrow/util/AutoCloseables.java similarity index 100% rename from java/vector/src/main/java/org/apache/arrow/util/AutoCloseables.java rename to java/memory/memory-core/src/main/java/org/apache/arrow/util/AutoCloseables.java diff --git a/java/vector/src/main/java/org/apache/arrow/util/Collections2.java b/java/memory/memory-core/src/main/java/org/apache/arrow/util/Collections2.java similarity index 100% rename from java/vector/src/main/java/org/apache/arrow/util/Collections2.java rename to java/memory/memory-core/src/main/java/org/apache/arrow/util/Collections2.java diff --git a/java/vector/src/main/codegen/templates/DenseUnionVector.java b/java/vector/src/main/codegen/templates/DenseUnionVector.java index 8902f2995a5b2..d2154a3bcd627 100644 --- a/java/vector/src/main/codegen/templates/DenseUnionVector.java +++ b/java/vector/src/main/codegen/templates/DenseUnionVector.java @@ -19,7 +19,6 @@ import org.apache.arrow.memory.BufferAllocator; import org.apache.arrow.memory.ReferenceManager; import org.apache.arrow.memory.util.CommonUtil; -import org.apache.arrow.util.DataSizeRoundingUtil; import org.apache.arrow.util.Preconditions; import org.apache.arrow.vector.BaseValueVector; import org.apache.arrow.vector.BitVectorHelper; @@ -37,6 +36,7 @@ import org.apache.arrow.vector.types.pojo.Field; import org.apache.arrow.vector.types.pojo.FieldType; import org.apache.arrow.vector.util.CallBack; +import org.apache.arrow.vector.util.DataSizeRoundingUtil; import org.apache.arrow.vector.util.TransferPair; import java.util.Arrays; @@ -63,7 +63,6 @@ import org.apache.arrow.vector.ipc.message.ArrowFieldNode; import org.apache.arrow.vector.BaseValueVector; import org.apache.arrow.vector.util.OversizedAllocationException; -import org.apache.arrow.util.DataSizeRoundingUtil; import org.apache.arrow.util.Preconditions; import static org.apache.arrow.vector.types.UnionMode.Dense; diff --git a/java/vector/src/main/codegen/templates/UnionVector.java b/java/vector/src/main/codegen/templates/UnionVector.java index b63aa873a9463..59a90cedee6f3 100644 --- a/java/vector/src/main/codegen/templates/UnionVector.java +++ b/java/vector/src/main/codegen/templates/UnionVector.java @@ -20,7 +20,6 @@ import org.apache.arrow.memory.ReferenceManager; import org.apache.arrow.memory.util.CommonUtil; import org.apache.arrow.memory.util.hash.ArrowBufHasher; -import org.apache.arrow.util.DataSizeRoundingUtil; import org.apache.arrow.util.Preconditions; import org.apache.arrow.vector.BaseValueVector; import org.apache.arrow.vector.BitVectorHelper; @@ -37,6 +36,7 @@ import org.apache.arrow.vector.types.pojo.Field; import org.apache.arrow.vector.types.pojo.FieldType; import org.apache.arrow.vector.util.CallBack; +import org.apache.arrow.vector.util.DataSizeRoundingUtil; <@pp.dropOutputFile /> <@pp.changeOutputFile name="/org/apache/arrow/vector/complex/UnionVector.java" /> @@ -55,7 +55,6 @@ import org.apache.arrow.vector.compare.VectorVisitor; import org.apache.arrow.vector.complex.impl.ComplexCopier; import org.apache.arrow.vector.util.CallBack; -import org.apache.arrow.util.DataSizeRoundingUtil; import org.apache.arrow.vector.util.ValueVectorUtility; import org.apache.arrow.vector.ipc.message.ArrowFieldNode; import org.apache.arrow.memory.util.ArrowBufPointer; diff --git a/java/vector/src/main/java/org/apache/arrow/vector/BaseValueVector.java b/java/vector/src/main/java/org/apache/arrow/vector/BaseValueVector.java index 516030a08b73d..0af9461c52562 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/BaseValueVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/BaseValueVector.java @@ -24,8 +24,8 @@ import org.apache.arrow.memory.BufferAllocator; import org.apache.arrow.memory.ReferenceManager; import org.apache.arrow.memory.util.CommonUtil; -import org.apache.arrow.util.DataSizeRoundingUtil; import org.apache.arrow.util.Preconditions; +import org.apache.arrow.vector.util.DataSizeRoundingUtil; import org.apache.arrow.vector.util.TransferPair; import org.apache.arrow.vector.util.ValueVectorUtility; import org.slf4j.Logger; 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 d731b02d36056..ec73382a0ef33 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 @@ -25,8 +25,8 @@ import org.apache.arrow.memory.ArrowBuf; import org.apache.arrow.memory.BoundsChecking; import org.apache.arrow.memory.BufferAllocator; -import org.apache.arrow.util.DataSizeRoundingUtil; import org.apache.arrow.vector.ipc.message.ArrowFieldNode; +import org.apache.arrow.vector.util.DataSizeRoundingUtil; import io.netty.util.internal.PlatformDependent; 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 085b49d17ed1b..6fa2fb1a72de9 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 @@ -25,9 +25,9 @@ import org.apache.arrow.flatbuf.RecordBatch; import org.apache.arrow.memory.ArrowBuf; import org.apache.arrow.memory.BufferAllocator; -import org.apache.arrow.util.DataSizeRoundingUtil; import org.apache.arrow.util.Preconditions; import org.apache.arrow.vector.compression.NoCompressionCodec; +import org.apache.arrow.vector.util.DataSizeRoundingUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/java/vector/src/main/java/org/apache/arrow/util/DataSizeRoundingUtil.java b/java/vector/src/main/java/org/apache/arrow/vector/util/DataSizeRoundingUtil.java similarity index 98% rename from java/vector/src/main/java/org/apache/arrow/util/DataSizeRoundingUtil.java rename to java/vector/src/main/java/org/apache/arrow/vector/util/DataSizeRoundingUtil.java index 2946503cb6439..3af2c98374070 100644 --- a/java/vector/src/main/java/org/apache/arrow/util/DataSizeRoundingUtil.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/util/DataSizeRoundingUtil.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.arrow.util; +package org.apache.arrow.vector.util; /** * Utilities for rounding data size. diff --git a/java/vector/src/test/java/org/apache/arrow/vector/TestVectorReAlloc.java b/java/vector/src/test/java/org/apache/arrow/vector/TestVectorReAlloc.java index e8a51f9d7f293..2d3f82d9956ab 100644 --- a/java/vector/src/test/java/org/apache/arrow/vector/TestVectorReAlloc.java +++ b/java/vector/src/test/java/org/apache/arrow/vector/TestVectorReAlloc.java @@ -23,7 +23,6 @@ import org.apache.arrow.memory.BufferAllocator; import org.apache.arrow.memory.RootAllocator; -import org.apache.arrow.util.DataSizeRoundingUtil; import org.apache.arrow.vector.complex.DenseUnionVector; import org.apache.arrow.vector.complex.FixedSizeListVector; import org.apache.arrow.vector.complex.ListVector; @@ -37,6 +36,7 @@ import org.apache.arrow.vector.types.pojo.ArrowType; import org.apache.arrow.vector.types.pojo.Field; import org.apache.arrow.vector.types.pojo.FieldType; +import org.apache.arrow.vector.util.DataSizeRoundingUtil; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/java/vector/src/test/java/org/apache/arrow/util/TestDataSizeRoundingUtil.java b/java/vector/src/test/java/org/apache/arrow/vector/util/TestDataSizeRoundingUtil.java similarity index 98% rename from java/vector/src/test/java/org/apache/arrow/util/TestDataSizeRoundingUtil.java rename to java/vector/src/test/java/org/apache/arrow/vector/util/TestDataSizeRoundingUtil.java index a04a957844097..4138ea9d7a181 100644 --- a/java/vector/src/test/java/org/apache/arrow/util/TestDataSizeRoundingUtil.java +++ b/java/vector/src/test/java/org/apache/arrow/vector/util/TestDataSizeRoundingUtil.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.arrow.util; +package org.apache.arrow.vector.util; import static org.junit.Assert.assertEquals;