diff --git a/.palantir/revapi.yml b/.palantir/revapi.yml index 9fc79c53cc43..c10575a81090 100644 --- a/.palantir/revapi.yml +++ b/.palantir/revapi.yml @@ -1172,6 +1172,11 @@ acceptedBreaks: \ java.util.function.Consumer)" justification: "Removing deprecated code" "1.8.0": + org.apache.iceberg:iceberg-core: + - code: "java.method.removed" + old: "method java.lang.String[] org.apache.iceberg.hadoop.Util::blockLocations(org.apache.iceberg.CombinedScanTask,\ + \ org.apache.hadoop.conf.Configuration)" + justification: "Removing deprecated code" org.apache.iceberg:iceberg-parquet: - code: "java.class.visibilityReduced" old: "class org.apache.iceberg.data.parquet.BaseParquetReaders" diff --git a/core/src/main/java/org/apache/iceberg/hadoop/Util.java b/core/src/main/java/org/apache/iceberg/hadoop/Util.java index 806d3c91f408..cbf7e7aaecf0 100644 --- a/core/src/main/java/org/apache/iceberg/hadoop/Util.java +++ b/core/src/main/java/org/apache/iceberg/hadoop/Util.java @@ -27,7 +27,6 @@ import org.apache.hadoop.fs.BlockLocation; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; -import org.apache.iceberg.CombinedScanTask; import org.apache.iceberg.ContentScanTask; import org.apache.iceberg.FileScanTask; import org.apache.iceberg.ScanTask; @@ -59,15 +58,6 @@ public static FileSystem getFs(Path path, Configuration conf) { } } - /** - * @deprecated since 1.8.0, will be removed in 1.9.0; use {@link - * Util#blockLocations(ScanTaskGroup, Configuration)} instead. - */ - @Deprecated - public static String[] blockLocations(CombinedScanTask task, Configuration conf) { - return blockLocations((ScanTaskGroup) task, conf); - } - public static String[] blockLocations(ScanTaskGroup taskGroup, Configuration conf) { Set locationSets = Sets.newHashSet(); for (FileScanTask f : taskGroup.tasks()) { diff --git a/core/src/main/java/org/apache/iceberg/io/StructCopy.java b/core/src/main/java/org/apache/iceberg/io/StructCopy.java deleted file mode 100644 index f8adbf62a1d6..000000000000 --- a/core/src/main/java/org/apache/iceberg/io/StructCopy.java +++ /dev/null @@ -1,65 +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.iceberg.io; - -import org.apache.iceberg.StructLike; - -/** - * Copy the StructLike's values into a new one. It does not handle list or map values now. - * - * @deprecated since 1.8.0, will be removed in 1.9.0; use {@link - * org.apache.iceberg.util.StructLikeUtil#copy(StructLike)} instead. - */ -@Deprecated -class StructCopy implements StructLike { - static StructLike copy(StructLike struct) { - return struct != null ? new StructCopy(struct) : null; - } - - private final Object[] values; - - private StructCopy(StructLike toCopy) { - this.values = new Object[toCopy.size()]; - - for (int i = 0; i < values.length; i += 1) { - Object value = toCopy.get(i, Object.class); - - if (value instanceof StructLike) { - values[i] = copy((StructLike) value); - } else { - values[i] = value; - } - } - } - - @Override - public int size() { - return values.length; - } - - @Override - public T get(int pos, Class javaClass) { - return javaClass.cast(values[pos]); - } - - @Override - public void set(int pos, T value) { - throw new UnsupportedOperationException("Struct copy cannot be modified"); - } -}