|
| 1 | +/* |
| 2 | + * Licensed to the Apache Software Foundation (ASF) under one |
| 3 | + * or more contributor license agreements. See the NOTICE file |
| 4 | + * distributed with this work for additional information |
| 5 | + * regarding copyright ownership. The ASF licenses this file |
| 6 | + * to you under the Apache License, Version 2.0 (the |
| 7 | + * "License"); you may not use this file except in compliance |
| 8 | + * with the License. You may obtain a copy of the License at |
| 9 | + * |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, software |
| 13 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | + * See the License for the specific language governing permissions and |
| 16 | + * limitations under the License. |
| 17 | + */ |
| 18 | + |
| 19 | +package org.apache.fluss.lake.iceberg.maintenance; |
| 20 | + |
| 21 | +import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; |
| 22 | +import org.apache.fluss.config.Configuration; |
| 23 | +import org.apache.fluss.lake.iceberg.testutils.FlinkIcebergTieringTestBase; |
| 24 | +import org.apache.fluss.lake.iceberg.tiering.IcebergCatalogProvider; |
| 25 | +import org.apache.fluss.lake.iceberg.tiering.writer.TaskWriterFactory; |
| 26 | +import org.apache.fluss.metadata.TableBucket; |
| 27 | +import org.apache.fluss.metadata.TablePath; |
| 28 | + |
| 29 | +import org.apache.iceberg.AppendFiles; |
| 30 | +import org.apache.iceberg.DataFile; |
| 31 | +import org.apache.iceberg.FileScanTask; |
| 32 | +import org.apache.iceberg.PartitionSpec; |
| 33 | +import org.apache.iceberg.RewriteFiles; |
| 34 | +import org.apache.iceberg.Schema; |
| 35 | +import org.apache.iceberg.Table; |
| 36 | +import org.apache.iceberg.catalog.Catalog; |
| 37 | +import org.apache.iceberg.catalog.Namespace; |
| 38 | +import org.apache.iceberg.catalog.SupportsNamespaces; |
| 39 | +import org.apache.iceberg.catalog.TableIdentifier; |
| 40 | +import org.apache.iceberg.data.IcebergGenerics; |
| 41 | +import org.apache.iceberg.data.Record; |
| 42 | +import org.apache.iceberg.expressions.Expressions; |
| 43 | +import org.apache.iceberg.io.CloseableIterable; |
| 44 | +import org.apache.iceberg.io.TaskWriter; |
| 45 | +import org.apache.iceberg.types.Types; |
| 46 | +import org.junit.jupiter.api.BeforeAll; |
| 47 | +import org.junit.jupiter.api.BeforeEach; |
| 48 | +import org.junit.jupiter.api.Test; |
| 49 | +import org.junit.jupiter.api.io.TempDir; |
| 50 | + |
| 51 | +import java.io.File; |
| 52 | +import java.io.IOException; |
| 53 | +import java.util.ArrayList; |
| 54 | +import java.util.List; |
| 55 | + |
| 56 | +import static org.apache.fluss.lake.iceberg.utils.IcebergConversions.toIceberg; |
| 57 | +import static org.apache.fluss.metadata.TableDescriptor.BUCKET_COLUMN_NAME; |
| 58 | +import static org.apache.fluss.metadata.TableDescriptor.OFFSET_COLUMN_NAME; |
| 59 | +import static org.apache.fluss.metadata.TableDescriptor.TIMESTAMP_COLUMN_NAME; |
| 60 | +import static org.apache.fluss.utils.Preconditions.checkState; |
| 61 | +import static org.assertj.core.api.Assertions.assertThat; |
| 62 | + |
| 63 | +/** Integration test to for Iceberg compaction. */ |
| 64 | +class IcebergRewriteITCase extends FlinkIcebergTieringTestBase { |
| 65 | + protected static final String DEFAULT_DB = "fluss"; |
| 66 | + |
| 67 | + private static StreamExecutionEnvironment execEnv; |
| 68 | + |
| 69 | + @BeforeAll |
| 70 | + protected static void beforeAll() { |
| 71 | + FlinkIcebergTieringTestBase.beforeAll(); |
| 72 | + execEnv = StreamExecutionEnvironment.getExecutionEnvironment(); |
| 73 | + execEnv.setParallelism(2); |
| 74 | + execEnv.enableCheckpointing(1000); |
| 75 | + } |
| 76 | + |
| 77 | + @Test |
| 78 | + void testCompaction() throws Exception { |
| 79 | + |
| 80 | + } |
| 81 | +} |
0 commit comments