diff --git a/processing/src/main/java/org/apache/druid/frame/write/FrameRowTooLargeException.java b/processing/src/main/java/org/apache/druid/frame/write/FrameRowTooLargeException.java deleted file mode 100644 index e08c8ccc2ca..00000000000 --- a/processing/src/main/java/org/apache/druid/frame/write/FrameRowTooLargeException.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.druid.frame.write; - -import org.apache.druid.java.util.common.StringUtils; - -/** - * Exception that is conventionally thrown by workers when they call - * {@link FrameWriter#addSelection} and it returns false on an empty frame, or in - * a situation where allocating a new frame is impractical. - */ -public class FrameRowTooLargeException extends RuntimeException -{ - private final long maxFrameSize; - - public FrameRowTooLargeException(final long maxFrameSize) - { - super(StringUtils.format("Row too large to add to frame (max frame size = %,d)", maxFrameSize)); - this.maxFrameSize = maxFrameSize; - } - - public long getMaxFrameSize() - { - return maxFrameSize; - } -} diff --git a/processing/src/main/java/org/apache/druid/frame/write/FrameWriter.java b/processing/src/main/java/org/apache/druid/frame/write/FrameWriter.java index 5de131946d5..f37ed8571ac 100644 --- a/processing/src/main/java/org/apache/druid/frame/write/FrameWriter.java +++ b/processing/src/main/java/org/apache/druid/frame/write/FrameWriter.java @@ -34,9 +34,9 @@ public interface FrameWriter extends Closeable { /** * Write the current row to the frame that is under construction, if there is enough space to do so. - * + *

* If this method returns false on an empty frame, or in a situation where starting a new frame is impractical, - * it is conventional (although not required) for the caller to throw {@link FrameRowTooLargeException}. + * it is conventional (although not required) for the caller to throw {@link org.apache.druid.frame.processor.FrameRowTooLargeException}. * * @return true if the row was written, false if there was not enough space */ diff --git a/processing/src/test/java/org/apache/druid/frame/testutil/FrameSequenceBuilder.java b/processing/src/test/java/org/apache/druid/frame/testutil/FrameSequenceBuilder.java index 3fbd8ba3180..de7de8dd0da 100644 --- a/processing/src/test/java/org/apache/druid/frame/testutil/FrameSequenceBuilder.java +++ b/processing/src/test/java/org/apache/druid/frame/testutil/FrameSequenceBuilder.java @@ -24,7 +24,7 @@ import org.apache.druid.frame.FrameType; import org.apache.druid.frame.allocation.HeapMemoryAllocator; import org.apache.druid.frame.allocation.MemoryAllocator; import org.apache.druid.frame.key.SortColumn; -import org.apache.druid.frame.write.FrameRowTooLargeException; +import org.apache.druid.frame.processor.FrameRowTooLargeException; import org.apache.druid.frame.write.FrameWriter; import org.apache.druid.frame.write.FrameWriterFactory; import org.apache.druid.frame.write.FrameWriters; diff --git a/processing/src/test/java/org/apache/druid/frame/write/FrameRowTooLargeExceptionTest.java b/processing/src/test/java/org/apache/druid/frame/write/FrameRowTooLargeExceptionTest.java deleted file mode 100644 index 7c33ee09896..00000000000 --- a/processing/src/test/java/org/apache/druid/frame/write/FrameRowTooLargeExceptionTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.druid.frame.write; - -import org.junit.Assert; -import org.junit.Test; - -public class FrameRowTooLargeExceptionTest -{ - @Test - public void testBasic() - { - final int maxFrameSize = 1000; - final FrameRowTooLargeException e = new FrameRowTooLargeException(maxFrameSize); - Assert.assertEquals(maxFrameSize, e.getMaxFrameSize()); - } -}