From 73e77d281824ec3b5a4655b58bbb04f4555f0266 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Thu, 19 Dec 2024 21:49:28 +0000 Subject: [PATCH] Add license header --- .../predownload/PredownloadException.java | 18 +++++++++++++++++ .../tools/predownload/PredownloadMetrics.java | 18 +++++++++++++++++ .../predownload/PredownloadScheduler.java | 20 +++++++++++++++++-- .../pinot/tools/predownload/SegmentInfo.java | 18 +++++++++++++++++ .../tools/predownload/StatusRecorder.java | 18 +++++++++++++++++ .../pinot/tools/predownload/TableInfo.java | 18 +++++++++++++++++ .../pinot/tools/predownload/ZKClient.java | 18 +++++++++++++++++ .../predownload/PredownloadSchedulerTest.java | 18 +++++++++++++++++ .../tools/predownload/SegmentInfoTest.java | 18 +++++++++++++++++ .../tools/predownload/StatusRecorderTest.java | 18 +++++++++++++++++ .../tools/predownload/TableInfoTest.java | 18 +++++++++++++++++ .../pinot/tools/predownload/TestUtil.java | 18 +++++++++++++++++ .../pinot/tools/predownload/ZKClientTest.java | 18 +++++++++++++++++ .../test_data/sample_pinot_server.properties | 19 ++++++++++++++++++ 14 files changed, 253 insertions(+), 2 deletions(-) diff --git a/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/PredownloadException.java b/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/PredownloadException.java index f00e17114c47..1ee743fb8f1b 100644 --- a/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/PredownloadException.java +++ b/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/PredownloadException.java @@ -1,3 +1,21 @@ +/** + * 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.pinot.tools.predownload; public class PredownloadException extends RuntimeException { diff --git a/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/PredownloadMetrics.java b/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/PredownloadMetrics.java index d410991c36cc..24d1ec31d64c 100644 --- a/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/PredownloadMetrics.java +++ b/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/PredownloadMetrics.java @@ -1,3 +1,21 @@ +/** + * 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.pinot.tools.predownload; import java.util.concurrent.TimeUnit; diff --git a/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/PredownloadScheduler.java b/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/PredownloadScheduler.java index a7f59ec717ae..1251862289c3 100644 --- a/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/PredownloadScheduler.java +++ b/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/PredownloadScheduler.java @@ -1,3 +1,21 @@ +/** + * 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.pinot.tools.predownload; import com.google.common.annotations.VisibleForTesting; @@ -244,7 +262,6 @@ public PredownloadCompleteReason downloadSegments() { }, _executor); // TODO: add future.orTimeout() to handle per segment downloading timeout - // Right now not able to use due to monorepo incapability with JAVA9+ syntax futures.add(future); } @@ -311,7 +328,6 @@ private File getTmpSegmentDataDir(SegmentInfo segmentInfo) if (tableInfo == null) { throw new PredownloadException("Table info not found for segment: " + segmentInfo.getSegmentName()); } - // TableDataManagerConfig is removed in 1.1: https://github.com/apache/pinot/pull/12189 String tableDataDir = tableInfo.getInstanceDataManagerConfig().getInstanceDataDir() + File.separator + tableInfo.getTableConfig() .getTableName(); diff --git a/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/SegmentInfo.java b/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/SegmentInfo.java index 90b34c6491a4..b9266fba4924 100644 --- a/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/SegmentInfo.java +++ b/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/SegmentInfo.java @@ -1,3 +1,21 @@ +/** + * 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.pinot.tools.predownload; import io.netty.util.internal.StringUtil; diff --git a/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/StatusRecorder.java b/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/StatusRecorder.java index 7e1667ea12f8..9edca9faf605 100644 --- a/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/StatusRecorder.java +++ b/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/StatusRecorder.java @@ -1,3 +1,21 @@ +/** + * 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.pinot.tools.predownload; import com.google.common.annotations.VisibleForTesting; diff --git a/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/TableInfo.java b/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/TableInfo.java index b7fa2083886d..709d97c7f7fd 100644 --- a/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/TableInfo.java +++ b/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/TableInfo.java @@ -1,3 +1,21 @@ +/** + * 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.pinot.tools.predownload; import java.io.File; diff --git a/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/ZKClient.java b/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/ZKClient.java index 566b70ef4481..9ab6534e1763 100644 --- a/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/ZKClient.java +++ b/pinot-tools/src/main/java/org/apache/pinot/tools/predownload/ZKClient.java @@ -1,3 +1,21 @@ +/** + * 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.pinot.tools.predownload; import java.util.ArrayList; diff --git a/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/PredownloadSchedulerTest.java b/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/PredownloadSchedulerTest.java index 2b6086c18239..3dac17e73fde 100644 --- a/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/PredownloadSchedulerTest.java +++ b/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/PredownloadSchedulerTest.java @@ -1,3 +1,21 @@ +/** + * 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.pinot.tools.predownload; import java.io.File; diff --git a/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/SegmentInfoTest.java b/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/SegmentInfoTest.java index cb42714f7ca1..d211442fb518 100644 --- a/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/SegmentInfoTest.java +++ b/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/SegmentInfoTest.java @@ -1,3 +1,21 @@ +/** + * 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.pinot.tools.predownload; import org.apache.pinot.common.metadata.segment.SegmentZKMetadata; diff --git a/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/StatusRecorderTest.java b/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/StatusRecorderTest.java index 67bfb1e52b75..461ac276dbe5 100644 --- a/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/StatusRecorderTest.java +++ b/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/StatusRecorderTest.java @@ -1,3 +1,21 @@ +/** + * 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.pinot.tools.predownload; import java.io.File; diff --git a/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/TableInfoTest.java b/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/TableInfoTest.java index 6e5c8bdf92c6..9058b2e81e0e 100644 --- a/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/TableInfoTest.java +++ b/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/TableInfoTest.java @@ -1,3 +1,21 @@ +/** + * 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.pinot.tools.predownload; import java.io.IOException; diff --git a/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/TestUtil.java b/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/TestUtil.java index 8b0a6a5c0f99..0fde65641e99 100644 --- a/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/TestUtil.java +++ b/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/TestUtil.java @@ -1,3 +1,21 @@ +/** + * 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.pinot.tools.predownload; import org.apache.pinot.common.metadata.segment.SegmentZKMetadata; diff --git a/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/ZKClientTest.java b/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/ZKClientTest.java index 9faa6a39f85f..cdd6b8409a95 100644 --- a/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/ZKClientTest.java +++ b/pinot-tools/src/test/java/org/apache/pinot/tools/predownload/ZKClientTest.java @@ -1,3 +1,21 @@ +/** + * 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.pinot.tools.predownload; import java.util.Arrays; diff --git a/pinot-tools/src/test/resources/test_data/sample_pinot_server.properties b/pinot-tools/src/test/resources/test_data/sample_pinot_server.properties index 3f02aa700600..16820e57ac05 100644 --- a/pinot-tools/src/test/resources/test_data/sample_pinot_server.properties +++ b/pinot-tools/src/test/resources/test_data/sample_pinot_server.properties @@ -1,3 +1,22 @@ +# +# 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. +# + cluster_name=production-dca-cluster-dca zookeeper_path=pinotzk.dca.uber.internal/pinot-odin/pinot-prod