aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Juul <arnej@yahooinc.com>2023-01-05 08:46:19 +0000
committerArne Juul <arnej@yahooinc.com>2023-01-05 08:46:39 +0000
commitb572c5aa6bd7283d7da0e3c3ee88881fa054ec5d (patch)
treec1acd87c5b70fd8fed4a7875e6ebbbe7d738fdb2
parenta67b9dee3bb362c36d1e3902510355b1563cff86 (diff)
remove unused code / dep
-rw-r--r--airlift-zstd/pom.xml7
-rw-r--r--airlift-zstd/src/test/java/ai/vespa/airlift/compress/HadoopCodecCompressor.java65
-rw-r--r--airlift-zstd/src/test/java/ai/vespa/airlift/compress/HadoopCodecDecompressor.java65
-rw-r--r--vespa-dependencies-enforcer/allowed-maven-dependencies.txt1
4 files changed, 0 insertions, 138 deletions
diff --git a/airlift-zstd/pom.xml b/airlift-zstd/pom.xml
index ded66d0fc6d..2162d69d722 100644
--- a/airlift-zstd/pom.xml
+++ b/airlift-zstd/pom.xml
@@ -52,13 +52,6 @@
</dependency>
<dependency>
- <groupId>io.trino.hadoop</groupId>
- <artifactId>hadoop-apache</artifactId>
- <version>3.2.0-17</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
<groupId>org.lz4</groupId>
<artifactId>lz4-java</artifactId>
<version>1.8.0</version>
diff --git a/airlift-zstd/src/test/java/ai/vespa/airlift/compress/HadoopCodecCompressor.java b/airlift-zstd/src/test/java/ai/vespa/airlift/compress/HadoopCodecCompressor.java
deleted file mode 100644
index 3511c9972d8..00000000000
--- a/airlift-zstd/src/test/java/ai/vespa/airlift/compress/HadoopCodecCompressor.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed 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 ai.vespa.airlift.compress;
-
-import org.apache.hadoop.io.compress.CompressionCodec;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.UncheckedIOException;
-import java.nio.ByteBuffer;
-
-public class HadoopCodecCompressor
- implements Compressor
-{
- private final CompressionCodec codec;
- private final Compressor blockCompressorForSizeCalculation;
-
- public HadoopCodecCompressor(CompressionCodec codec, Compressor blockCompressorForSizeCalculation)
- {
- this.codec = codec;
- this.blockCompressorForSizeCalculation = blockCompressorForSizeCalculation;
- }
-
- @Override
- public int maxCompressedLength(int uncompressedSize)
- {
- // assume hadoop stream encoder won't increase size by more than 10% over the block encoder
- return (int) ((blockCompressorForSizeCalculation.maxCompressedLength(uncompressedSize) * 1.1) + 8);
- }
-
- @Override
- public int compress(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset, int maxOutputLength)
- {
- ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(output, outputOffset, maxOutputLength);
-
- try {
- OutputStream out = codec.createOutputStream(byteArrayOutputStream);
- // write in a single shot to cause multiple chunks per block
- out.write(input, inputOffset, inputLength);
- out.close();
- }
- catch (IOException e) {
- throw new UncheckedIOException(e);
- }
-
- return byteArrayOutputStream.size();
- }
-
- @Override
- public void compress(ByteBuffer input, ByteBuffer output)
- {
- throw new UnsupportedOperationException("not yet implemented");
- }
-}
diff --git a/airlift-zstd/src/test/java/ai/vespa/airlift/compress/HadoopCodecDecompressor.java b/airlift-zstd/src/test/java/ai/vespa/airlift/compress/HadoopCodecDecompressor.java
deleted file mode 100644
index 5425fd8d4ff..00000000000
--- a/airlift-zstd/src/test/java/ai/vespa/airlift/compress/HadoopCodecDecompressor.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed 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 ai.vespa.airlift.compress;
-
-import org.apache.hadoop.io.compress.CompressionCodec;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UncheckedIOException;
-import java.nio.ByteBuffer;
-
-public class HadoopCodecDecompressor
- implements Decompressor
-{
- private final CompressionCodec codec;
-
- public HadoopCodecDecompressor(CompressionCodec codec)
- {
- this.codec = codec;
- }
-
- @Override
- public int decompress(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset, int maxOutputLength)
- throws MalformedInputException
- {
- try (InputStream in = codec.createInputStream(new ByteArrayInputStream(input, inputOffset, inputLength))) {
- int bytesRead = 0;
- while (bytesRead < maxOutputLength) {
- int size = in.read(output, outputOffset + bytesRead, maxOutputLength - bytesRead);
- if (size < 0) {
- break;
- }
- bytesRead += size;
- }
-
- if (in.read() >= 0) {
- throw new RuntimeException("All input was not consumed");
- }
-
- return bytesRead;
- }
- catch (IOException e) {
- throw new UncheckedIOException(e);
- }
- }
-
- @Override
- public void decompress(ByteBuffer input, ByteBuffer output)
- throws MalformedInputException
- {
- throw new UnsupportedOperationException("not yet implemented");
- }
-}
diff --git a/vespa-dependencies-enforcer/allowed-maven-dependencies.txt b/vespa-dependencies-enforcer/allowed-maven-dependencies.txt
index f0c5e7f530b..c39514bc513 100644
--- a/vespa-dependencies-enforcer/allowed-maven-dependencies.txt
+++ b/vespa-dependencies-enforcer/allowed-maven-dependencies.txt
@@ -222,7 +222,6 @@ com.github.luben:zstd-jni:1.5.2-1
com.github.tomakehurst:wiremock-jre8-standalone:2.35.0
com.google.guava:guava-testlib:27.1-jre
com.google.jimfs:jimfs:1.2
-io.trino.hadoop:hadoop-apache:3.2.0-17
junit:junit:4.13.2
net.bytebuddy:byte-buddy:1.11.19
net.bytebuddy:byte-buddy-agent:1.11.19