(hbase) branch HBASE-28463 updated: HBASE-28467: Add time-based priority caching checks for cacheOnRead code paths. (#5905)
This is an automated email from the ASF dual-hosted git repository. wchevreuil pushed a commit to branch HBASE-28463 in repository https://gitbox.apache.org/repos/asf/hbase.git The following commit(s) were added to refs/heads/HBASE-28463 by this push: new 3a701b933ed HBASE-28467: Add time-based priority caching checks for cacheOnRead code paths. (#5905) 3a701b933ed is described below commit 3a701b933ed6e90fac934331684a26bad568dff9 Author: jhungund <106576553+jhung...@users.noreply.github.com> AuthorDate: Thu May 23 00:16:49 2024 +0530 HBASE-28467: Add time-based priority caching checks for cacheOnRead code paths. (#5905) Signed-off-by: Wellington Chevreuil --- .../apache/hadoop/hbase/io/hfile/CacheConfig.java | 12 .../hadoop/hbase/io/hfile/HFileReaderImpl.java | 10 ++-- .../hbase/regionserver/TestDataTieringManager.java | 64 ++ 3 files changed, 82 insertions(+), 4 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java index 7fb1f1ec85b..40dc0aed494 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java @@ -275,6 +275,18 @@ public class CacheConfig implements ConfigurationObserver { || (prefetchOnOpen && (category != BlockCategory.META && category != BlockCategory.UNKNOWN)); } + public boolean shouldCacheBlockOnRead(BlockCategory category, HFileInfo hFileInfo, +Configuration conf) { +Optional cacheFileBlock = Optional.of(true); +if (getBlockCache().isPresent()) { + Optional result = getBlockCache().get().shouldCacheFile(hFileInfo, conf); + if (result.isPresent()) { +cacheFileBlock = result; + } +} +return shouldCacheBlockOnRead(category) && cacheFileBlock.get(); + } + /** Returns true if blocks in this file should be flagged as in-memory */ public boolean isInMemory() { return this.inMemory; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java index e0585c6edaa..989af7eab88 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java @@ -1193,7 +1193,8 @@ public abstract class HFileReaderImpl implements HFile.Reader, Configurable { BlockCacheKey cacheKey = new BlockCacheKey(name, metaBlockOffset, this.isPrimaryReplicaReader(), BlockType.META); - cacheBlock &= cacheConf.shouldCacheBlockOnRead(BlockType.META.getCategory()); + cacheBlock &= +cacheConf.shouldCacheBlockOnRead(BlockType.META.getCategory(), getHFileInfo(), conf); HFileBlock cachedBlock = getCachedBlock(cacheKey, cacheBlock, false, true, BlockType.META, null); if (cachedBlock != null) { @@ -1346,14 +1347,15 @@ public abstract class HFileReaderImpl implements HFile.Reader, Configurable { } BlockType.BlockCategory category = hfileBlock.getBlockType().getCategory(); final boolean cacheCompressed = cacheConf.shouldCacheCompressed(category); -final boolean cacheOnRead = cacheConf.shouldCacheBlockOnRead(category); +final boolean cacheOnRead = + cacheConf.shouldCacheBlockOnRead(category, getHFileInfo(), conf); // Don't need the unpacked block back and we're storing the block in the cache compressed if (cacheOnly && cacheCompressed && cacheOnRead) { cacheConf.getBlockCache().ifPresent(cache -> { LOG.debug("Skipping decompression of block {} in prefetch", cacheKey); // Cache the block if necessary -if (cacheable && cacheConf.shouldCacheBlockOnRead(category)) { +if (cacheable && cacheOnRead) { cache.cacheBlock(cacheKey, hfileBlock, cacheConf.isInMemory(), cacheOnly); } }); @@ -1366,7 +1368,7 @@ public abstract class HFileReaderImpl implements HFile.Reader, Configurable { HFileBlock unpacked = hfileBlock.unpack(hfileContext, fsBlockReader); // Cache the block if necessary cacheConf.getBlockCache().ifPresent(cache -> { - if (cacheable && cacheConf.shouldCacheBlockOnRead(category)) { + if (cacheable && cacheOnRead) { // Using the wait on cache during compaction and prefetching. cache.cacheBlock(cacheKey, cacheCompressed ? hfileBlock : unpacked, cacheConf.isInMemory(), cacheOnly); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDataTieringManager.java index fbd88a6f58b..78e03cce683 100644 ---
(hbase) branch branch-2.4 updated: HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286)
This is an automated email from the ASF dual-hosted git repository. wchevreuil pushed a commit to branch branch-2.4 in repository https://gitbox.apache.org/repos/asf/hbase.git The following commit(s) were added to refs/heads/branch-2.4 by this push: new 6cfb809f60f HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286) 6cfb809f60f is described below commit 6cfb809f60fcc28ee39eee55930703cecc8d2568 Author: Wellington Ramos Chevreuil AuthorDate: Wed May 22 16:28:33 2024 +0100 HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286) Signed-off-by: Tak Lon (Stephen) Wu (cherry picked from commit e5b581686dd772a45885f34aaa90d7c4ce3474af) --- dev-support/hbase_docker/README.md | 3 ++ dev-support/hbase_docker/m1/Dockerfile | 92 ++ 2 files changed, 95 insertions(+) diff --git a/dev-support/hbase_docker/README.md b/dev-support/hbase_docker/README.md index d98f7ada98b..3d0641afaee 100644 --- a/dev-support/hbase_docker/README.md +++ b/dev-support/hbase_docker/README.md @@ -41,3 +41,6 @@ this image will start the HMaster and launch the HBase shell when run. **hbase_docker** image. Alternatively, you can type `docker run -it hbase_docker bash` to start a container without a running HMaster. Within this environment, HBase is built in `/root/hbase-bin`. + +> NOTE: When running on mac m1 platforms, the docker file requires setting platfrom flag explicitly. +> You may use same instructions above running from to the "./m1" sub-dir. diff --git a/dev-support/hbase_docker/m1/Dockerfile b/dev-support/hbase_docker/m1/Dockerfile new file mode 100644 index 000..5399fa0e5af --- /dev/null +++ b/dev-support/hbase_docker/m1/Dockerfile @@ -0,0 +1,92 @@ +# 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. + +FROM --platform=linux/amd64 ubuntu:22.04 AS base_image +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN DEBIAN_FRONTEND=noninteractive apt-get -qq update && \ + DEBIAN_FRONTEND=noninteractive apt-get -qq install --no-install-recommends -y \ +ca-certificates=20211016 \ +curl='7.81.0-*' \ +git='1:2.34.1-*' \ +locales='2.35-*' \ +&& \ +apt-get clean && \ +rm -rf /var/lib/apt/lists/* \ +&& \ +locale-gen en_US.UTF-8 +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 + +FROM base_image AS maven_download_image +ENV MAVEN_VERSION='3.8.6' +ENV MAVEN_URL "https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz; +ENV MAVEN_SHA512 'f790857f3b1f90ae8d16281f902c689e4f136ebe584aba45e4b1fa66c80cba826d3e0e52fdd04ed44b4c66f6d3fe3584a057c26dfcac544a60b301e6d0f91c26' +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN curl --location --fail --silent --show-error --output /tmp/maven.tar.gz "${MAVEN_URL}" && \ + echo "${MAVEN_SHA512} */tmp/maven.tar.gz" | sha512sum -c - + +FROM base_image AS openjdk8_download_image +ENV OPENJDK8_URL 'https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u352-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u352b08.tar.gz' +ENV OPENJDK8_SHA256 '1633bd7590cb1cd72f5a1378ae8294451028b274d798e2a4ac672059a2f00fee' +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN curl --location --fail --silent --show-error --output /tmp/adoptopenjdk8.tar.gz "${OPENJDK8_URL}" && \ + echo "${OPENJDK8_SHA256} */tmp/adoptopenjdk8.tar.gz" | sha256sum -c - + +FROM base_image +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +# +# when updating java or maven versions here, consider also updating +# `dev-support/docker/Dockerfile` as well. +# + +# hadolint ignore=DL3010 +COPY --from=maven_download_image /tmp/maven.tar.gz /tmp/maven.tar.gz +RUN tar xzf /tmp/maven.tar.gz -C /opt && \ + ln -s "/opt/$(dirname "$(tar -tf /tmp/maven.tar.gz | head -n1)")" /opt/maven && \ + rm /tmp/maven.tar.gz + +# hadolint ignore=DL3010 +COPY --from=openjdk8_download_image /tmp/adoptopenjdk8.tar.gz /tmp/adoptopenjdk8.tar.gz +RUN mkdir -p /usr/lib/jvm && \ + tar xzf /tmp/adoptopenjdk8.tar.gz -C /usr/lib/jvm && \ + ln -s "/usr/lib/jvm/$(basename "$(tar -tf /tmp/adoptopenjdk8.tar.gz | head -n1)")" /usr/lib/jvm/java-8-adoptopenjdk && \ + ln -s
(hbase) branch branch-2.5 updated: HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286)
This is an automated email from the ASF dual-hosted git repository. wchevreuil pushed a commit to branch branch-2.5 in repository https://gitbox.apache.org/repos/asf/hbase.git The following commit(s) were added to refs/heads/branch-2.5 by this push: new b61a73a9524 HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286) b61a73a9524 is described below commit b61a73a9524a02b3c411713ccb3b2cd69757509e Author: Wellington Ramos Chevreuil AuthorDate: Wed May 22 16:28:33 2024 +0100 HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286) Signed-off-by: Tak Lon (Stephen) Wu (cherry picked from commit e5b581686dd772a45885f34aaa90d7c4ce3474af) --- dev-support/hbase_docker/README.md | 3 ++ dev-support/hbase_docker/m1/Dockerfile | 92 ++ 2 files changed, 95 insertions(+) diff --git a/dev-support/hbase_docker/README.md b/dev-support/hbase_docker/README.md index d98f7ada98b..3d0641afaee 100644 --- a/dev-support/hbase_docker/README.md +++ b/dev-support/hbase_docker/README.md @@ -41,3 +41,6 @@ this image will start the HMaster and launch the HBase shell when run. **hbase_docker** image. Alternatively, you can type `docker run -it hbase_docker bash` to start a container without a running HMaster. Within this environment, HBase is built in `/root/hbase-bin`. + +> NOTE: When running on mac m1 platforms, the docker file requires setting platfrom flag explicitly. +> You may use same instructions above running from to the "./m1" sub-dir. diff --git a/dev-support/hbase_docker/m1/Dockerfile b/dev-support/hbase_docker/m1/Dockerfile new file mode 100644 index 000..5399fa0e5af --- /dev/null +++ b/dev-support/hbase_docker/m1/Dockerfile @@ -0,0 +1,92 @@ +# 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. + +FROM --platform=linux/amd64 ubuntu:22.04 AS base_image +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN DEBIAN_FRONTEND=noninteractive apt-get -qq update && \ + DEBIAN_FRONTEND=noninteractive apt-get -qq install --no-install-recommends -y \ +ca-certificates=20211016 \ +curl='7.81.0-*' \ +git='1:2.34.1-*' \ +locales='2.35-*' \ +&& \ +apt-get clean && \ +rm -rf /var/lib/apt/lists/* \ +&& \ +locale-gen en_US.UTF-8 +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 + +FROM base_image AS maven_download_image +ENV MAVEN_VERSION='3.8.6' +ENV MAVEN_URL "https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz; +ENV MAVEN_SHA512 'f790857f3b1f90ae8d16281f902c689e4f136ebe584aba45e4b1fa66c80cba826d3e0e52fdd04ed44b4c66f6d3fe3584a057c26dfcac544a60b301e6d0f91c26' +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN curl --location --fail --silent --show-error --output /tmp/maven.tar.gz "${MAVEN_URL}" && \ + echo "${MAVEN_SHA512} */tmp/maven.tar.gz" | sha512sum -c - + +FROM base_image AS openjdk8_download_image +ENV OPENJDK8_URL 'https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u352-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u352b08.tar.gz' +ENV OPENJDK8_SHA256 '1633bd7590cb1cd72f5a1378ae8294451028b274d798e2a4ac672059a2f00fee' +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN curl --location --fail --silent --show-error --output /tmp/adoptopenjdk8.tar.gz "${OPENJDK8_URL}" && \ + echo "${OPENJDK8_SHA256} */tmp/adoptopenjdk8.tar.gz" | sha256sum -c - + +FROM base_image +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +# +# when updating java or maven versions here, consider also updating +# `dev-support/docker/Dockerfile` as well. +# + +# hadolint ignore=DL3010 +COPY --from=maven_download_image /tmp/maven.tar.gz /tmp/maven.tar.gz +RUN tar xzf /tmp/maven.tar.gz -C /opt && \ + ln -s "/opt/$(dirname "$(tar -tf /tmp/maven.tar.gz | head -n1)")" /opt/maven && \ + rm /tmp/maven.tar.gz + +# hadolint ignore=DL3010 +COPY --from=openjdk8_download_image /tmp/adoptopenjdk8.tar.gz /tmp/adoptopenjdk8.tar.gz +RUN mkdir -p /usr/lib/jvm && \ + tar xzf /tmp/adoptopenjdk8.tar.gz -C /usr/lib/jvm && \ + ln -s "/usr/lib/jvm/$(basename "$(tar -tf /tmp/adoptopenjdk8.tar.gz | head -n1)")" /usr/lib/jvm/java-8-adoptopenjdk && \ + ln -s
(hbase) branch branch-2.6 updated: HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286)
This is an automated email from the ASF dual-hosted git repository. wchevreuil pushed a commit to branch branch-2.6 in repository https://gitbox.apache.org/repos/asf/hbase.git The following commit(s) were added to refs/heads/branch-2.6 by this push: new f8f8555ec4d HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286) f8f8555ec4d is described below commit f8f8555ec4dc8454d53f5623e9f28d16dabe5cd6 Author: Wellington Ramos Chevreuil AuthorDate: Wed May 22 16:28:33 2024 +0100 HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286) Signed-off-by: Tak Lon (Stephen) Wu (cherry picked from commit e5b581686dd772a45885f34aaa90d7c4ce3474af) --- dev-support/hbase_docker/README.md | 3 ++ dev-support/hbase_docker/m1/Dockerfile | 92 ++ 2 files changed, 95 insertions(+) diff --git a/dev-support/hbase_docker/README.md b/dev-support/hbase_docker/README.md index d98f7ada98b..3d0641afaee 100644 --- a/dev-support/hbase_docker/README.md +++ b/dev-support/hbase_docker/README.md @@ -41,3 +41,6 @@ this image will start the HMaster and launch the HBase shell when run. **hbase_docker** image. Alternatively, you can type `docker run -it hbase_docker bash` to start a container without a running HMaster. Within this environment, HBase is built in `/root/hbase-bin`. + +> NOTE: When running on mac m1 platforms, the docker file requires setting platfrom flag explicitly. +> You may use same instructions above running from to the "./m1" sub-dir. diff --git a/dev-support/hbase_docker/m1/Dockerfile b/dev-support/hbase_docker/m1/Dockerfile new file mode 100644 index 000..5399fa0e5af --- /dev/null +++ b/dev-support/hbase_docker/m1/Dockerfile @@ -0,0 +1,92 @@ +# 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. + +FROM --platform=linux/amd64 ubuntu:22.04 AS base_image +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN DEBIAN_FRONTEND=noninteractive apt-get -qq update && \ + DEBIAN_FRONTEND=noninteractive apt-get -qq install --no-install-recommends -y \ +ca-certificates=20211016 \ +curl='7.81.0-*' \ +git='1:2.34.1-*' \ +locales='2.35-*' \ +&& \ +apt-get clean && \ +rm -rf /var/lib/apt/lists/* \ +&& \ +locale-gen en_US.UTF-8 +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 + +FROM base_image AS maven_download_image +ENV MAVEN_VERSION='3.8.6' +ENV MAVEN_URL "https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz; +ENV MAVEN_SHA512 'f790857f3b1f90ae8d16281f902c689e4f136ebe584aba45e4b1fa66c80cba826d3e0e52fdd04ed44b4c66f6d3fe3584a057c26dfcac544a60b301e6d0f91c26' +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN curl --location --fail --silent --show-error --output /tmp/maven.tar.gz "${MAVEN_URL}" && \ + echo "${MAVEN_SHA512} */tmp/maven.tar.gz" | sha512sum -c - + +FROM base_image AS openjdk8_download_image +ENV OPENJDK8_URL 'https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u352-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u352b08.tar.gz' +ENV OPENJDK8_SHA256 '1633bd7590cb1cd72f5a1378ae8294451028b274d798e2a4ac672059a2f00fee' +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN curl --location --fail --silent --show-error --output /tmp/adoptopenjdk8.tar.gz "${OPENJDK8_URL}" && \ + echo "${OPENJDK8_SHA256} */tmp/adoptopenjdk8.tar.gz" | sha256sum -c - + +FROM base_image +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +# +# when updating java or maven versions here, consider also updating +# `dev-support/docker/Dockerfile` as well. +# + +# hadolint ignore=DL3010 +COPY --from=maven_download_image /tmp/maven.tar.gz /tmp/maven.tar.gz +RUN tar xzf /tmp/maven.tar.gz -C /opt && \ + ln -s "/opt/$(dirname "$(tar -tf /tmp/maven.tar.gz | head -n1)")" /opt/maven && \ + rm /tmp/maven.tar.gz + +# hadolint ignore=DL3010 +COPY --from=openjdk8_download_image /tmp/adoptopenjdk8.tar.gz /tmp/adoptopenjdk8.tar.gz +RUN mkdir -p /usr/lib/jvm && \ + tar xzf /tmp/adoptopenjdk8.tar.gz -C /usr/lib/jvm && \ + ln -s "/usr/lib/jvm/$(basename "$(tar -tf /tmp/adoptopenjdk8.tar.gz | head -n1)")" /usr/lib/jvm/java-8-adoptopenjdk && \ + ln -s
(hbase) branch branch-2 updated: HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286)
This is an automated email from the ASF dual-hosted git repository. wchevreuil pushed a commit to branch branch-2 in repository https://gitbox.apache.org/repos/asf/hbase.git The following commit(s) were added to refs/heads/branch-2 by this push: new 1705d7be692 HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286) 1705d7be692 is described below commit 1705d7be692e644af0dbfcf0421d22eb3a678e2b Author: Wellington Ramos Chevreuil AuthorDate: Wed May 22 16:28:33 2024 +0100 HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286) Signed-off-by: Tak Lon (Stephen) Wu (cherry picked from commit e5b581686dd772a45885f34aaa90d7c4ce3474af) --- dev-support/hbase_docker/README.md | 3 ++ dev-support/hbase_docker/m1/Dockerfile | 92 ++ 2 files changed, 95 insertions(+) diff --git a/dev-support/hbase_docker/README.md b/dev-support/hbase_docker/README.md index d98f7ada98b..3d0641afaee 100644 --- a/dev-support/hbase_docker/README.md +++ b/dev-support/hbase_docker/README.md @@ -41,3 +41,6 @@ this image will start the HMaster and launch the HBase shell when run. **hbase_docker** image. Alternatively, you can type `docker run -it hbase_docker bash` to start a container without a running HMaster. Within this environment, HBase is built in `/root/hbase-bin`. + +> NOTE: When running on mac m1 platforms, the docker file requires setting platfrom flag explicitly. +> You may use same instructions above running from to the "./m1" sub-dir. diff --git a/dev-support/hbase_docker/m1/Dockerfile b/dev-support/hbase_docker/m1/Dockerfile new file mode 100644 index 000..5399fa0e5af --- /dev/null +++ b/dev-support/hbase_docker/m1/Dockerfile @@ -0,0 +1,92 @@ +# 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. + +FROM --platform=linux/amd64 ubuntu:22.04 AS base_image +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN DEBIAN_FRONTEND=noninteractive apt-get -qq update && \ + DEBIAN_FRONTEND=noninteractive apt-get -qq install --no-install-recommends -y \ +ca-certificates=20211016 \ +curl='7.81.0-*' \ +git='1:2.34.1-*' \ +locales='2.35-*' \ +&& \ +apt-get clean && \ +rm -rf /var/lib/apt/lists/* \ +&& \ +locale-gen en_US.UTF-8 +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 + +FROM base_image AS maven_download_image +ENV MAVEN_VERSION='3.8.6' +ENV MAVEN_URL "https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz; +ENV MAVEN_SHA512 'f790857f3b1f90ae8d16281f902c689e4f136ebe584aba45e4b1fa66c80cba826d3e0e52fdd04ed44b4c66f6d3fe3584a057c26dfcac544a60b301e6d0f91c26' +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN curl --location --fail --silent --show-error --output /tmp/maven.tar.gz "${MAVEN_URL}" && \ + echo "${MAVEN_SHA512} */tmp/maven.tar.gz" | sha512sum -c - + +FROM base_image AS openjdk8_download_image +ENV OPENJDK8_URL 'https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u352-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u352b08.tar.gz' +ENV OPENJDK8_SHA256 '1633bd7590cb1cd72f5a1378ae8294451028b274d798e2a4ac672059a2f00fee' +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN curl --location --fail --silent --show-error --output /tmp/adoptopenjdk8.tar.gz "${OPENJDK8_URL}" && \ + echo "${OPENJDK8_SHA256} */tmp/adoptopenjdk8.tar.gz" | sha256sum -c - + +FROM base_image +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +# +# when updating java or maven versions here, consider also updating +# `dev-support/docker/Dockerfile` as well. +# + +# hadolint ignore=DL3010 +COPY --from=maven_download_image /tmp/maven.tar.gz /tmp/maven.tar.gz +RUN tar xzf /tmp/maven.tar.gz -C /opt && \ + ln -s "/opt/$(dirname "$(tar -tf /tmp/maven.tar.gz | head -n1)")" /opt/maven && \ + rm /tmp/maven.tar.gz + +# hadolint ignore=DL3010 +COPY --from=openjdk8_download_image /tmp/adoptopenjdk8.tar.gz /tmp/adoptopenjdk8.tar.gz +RUN mkdir -p /usr/lib/jvm && \ + tar xzf /tmp/adoptopenjdk8.tar.gz -C /usr/lib/jvm && \ + ln -s "/usr/lib/jvm/$(basename "$(tar -tf /tmp/adoptopenjdk8.tar.gz | head -n1)")" /usr/lib/jvm/java-8-adoptopenjdk && \ + ln -s
(hbase) branch branch-3 updated: HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286)
This is an automated email from the ASF dual-hosted git repository. wchevreuil pushed a commit to branch branch-3 in repository https://gitbox.apache.org/repos/asf/hbase.git The following commit(s) were added to refs/heads/branch-3 by this push: new 8fe72377650 HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286) 8fe72377650 is described below commit 8fe723776501ac1b2fa728e710ce55863941eee1 Author: Wellington Ramos Chevreuil AuthorDate: Wed May 22 16:28:33 2024 +0100 HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286) Signed-off-by: Tak Lon (Stephen) Wu (cherry picked from commit e5b581686dd772a45885f34aaa90d7c4ce3474af) --- dev-support/hbase_docker/README.md | 3 ++ dev-support/hbase_docker/m1/Dockerfile | 92 ++ 2 files changed, 95 insertions(+) diff --git a/dev-support/hbase_docker/README.md b/dev-support/hbase_docker/README.md index d98f7ada98b..3d0641afaee 100644 --- a/dev-support/hbase_docker/README.md +++ b/dev-support/hbase_docker/README.md @@ -41,3 +41,6 @@ this image will start the HMaster and launch the HBase shell when run. **hbase_docker** image. Alternatively, you can type `docker run -it hbase_docker bash` to start a container without a running HMaster. Within this environment, HBase is built in `/root/hbase-bin`. + +> NOTE: When running on mac m1 platforms, the docker file requires setting platfrom flag explicitly. +> You may use same instructions above running from to the "./m1" sub-dir. diff --git a/dev-support/hbase_docker/m1/Dockerfile b/dev-support/hbase_docker/m1/Dockerfile new file mode 100644 index 000..5399fa0e5af --- /dev/null +++ b/dev-support/hbase_docker/m1/Dockerfile @@ -0,0 +1,92 @@ +# 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. + +FROM --platform=linux/amd64 ubuntu:22.04 AS base_image +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN DEBIAN_FRONTEND=noninteractive apt-get -qq update && \ + DEBIAN_FRONTEND=noninteractive apt-get -qq install --no-install-recommends -y \ +ca-certificates=20211016 \ +curl='7.81.0-*' \ +git='1:2.34.1-*' \ +locales='2.35-*' \ +&& \ +apt-get clean && \ +rm -rf /var/lib/apt/lists/* \ +&& \ +locale-gen en_US.UTF-8 +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 + +FROM base_image AS maven_download_image +ENV MAVEN_VERSION='3.8.6' +ENV MAVEN_URL "https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz; +ENV MAVEN_SHA512 'f790857f3b1f90ae8d16281f902c689e4f136ebe584aba45e4b1fa66c80cba826d3e0e52fdd04ed44b4c66f6d3fe3584a057c26dfcac544a60b301e6d0f91c26' +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN curl --location --fail --silent --show-error --output /tmp/maven.tar.gz "${MAVEN_URL}" && \ + echo "${MAVEN_SHA512} */tmp/maven.tar.gz" | sha512sum -c - + +FROM base_image AS openjdk8_download_image +ENV OPENJDK8_URL 'https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u352-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u352b08.tar.gz' +ENV OPENJDK8_SHA256 '1633bd7590cb1cd72f5a1378ae8294451028b274d798e2a4ac672059a2f00fee' +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN curl --location --fail --silent --show-error --output /tmp/adoptopenjdk8.tar.gz "${OPENJDK8_URL}" && \ + echo "${OPENJDK8_SHA256} */tmp/adoptopenjdk8.tar.gz" | sha256sum -c - + +FROM base_image +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +# +# when updating java or maven versions here, consider also updating +# `dev-support/docker/Dockerfile` as well. +# + +# hadolint ignore=DL3010 +COPY --from=maven_download_image /tmp/maven.tar.gz /tmp/maven.tar.gz +RUN tar xzf /tmp/maven.tar.gz -C /opt && \ + ln -s "/opt/$(dirname "$(tar -tf /tmp/maven.tar.gz | head -n1)")" /opt/maven && \ + rm /tmp/maven.tar.gz + +# hadolint ignore=DL3010 +COPY --from=openjdk8_download_image /tmp/adoptopenjdk8.tar.gz /tmp/adoptopenjdk8.tar.gz +RUN mkdir -p /usr/lib/jvm && \ + tar xzf /tmp/adoptopenjdk8.tar.gz -C /usr/lib/jvm && \ + ln -s "/usr/lib/jvm/$(basename "$(tar -tf /tmp/adoptopenjdk8.tar.gz | head -n1)")" /usr/lib/jvm/java-8-adoptopenjdk && \ + ln -s
(hbase) branch master updated: HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286)
This is an automated email from the ASF dual-hosted git repository. wchevreuil pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/hbase.git The following commit(s) were added to refs/heads/master by this push: new e5b581686dd HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286) e5b581686dd is described below commit e5b581686dd772a45885f34aaa90d7c4ce3474af Author: Wellington Ramos Chevreuil AuthorDate: Wed May 22 16:28:33 2024 +0100 HBASE-27915 Update hbase_docker with an extra Dockerfile compatible with mac m1 platform (#5286) Signed-off-by: Tak Lon (Stephen) Wu --- dev-support/hbase_docker/README.md | 3 ++ dev-support/hbase_docker/m1/Dockerfile | 92 ++ 2 files changed, 95 insertions(+) diff --git a/dev-support/hbase_docker/README.md b/dev-support/hbase_docker/README.md index d98f7ada98b..3d0641afaee 100644 --- a/dev-support/hbase_docker/README.md +++ b/dev-support/hbase_docker/README.md @@ -41,3 +41,6 @@ this image will start the HMaster and launch the HBase shell when run. **hbase_docker** image. Alternatively, you can type `docker run -it hbase_docker bash` to start a container without a running HMaster. Within this environment, HBase is built in `/root/hbase-bin`. + +> NOTE: When running on mac m1 platforms, the docker file requires setting platfrom flag explicitly. +> You may use same instructions above running from to the "./m1" sub-dir. diff --git a/dev-support/hbase_docker/m1/Dockerfile b/dev-support/hbase_docker/m1/Dockerfile new file mode 100644 index 000..5399fa0e5af --- /dev/null +++ b/dev-support/hbase_docker/m1/Dockerfile @@ -0,0 +1,92 @@ +# 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. + +FROM --platform=linux/amd64 ubuntu:22.04 AS base_image +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN DEBIAN_FRONTEND=noninteractive apt-get -qq update && \ + DEBIAN_FRONTEND=noninteractive apt-get -qq install --no-install-recommends -y \ +ca-certificates=20211016 \ +curl='7.81.0-*' \ +git='1:2.34.1-*' \ +locales='2.35-*' \ +&& \ +apt-get clean && \ +rm -rf /var/lib/apt/lists/* \ +&& \ +locale-gen en_US.UTF-8 +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 + +FROM base_image AS maven_download_image +ENV MAVEN_VERSION='3.8.6' +ENV MAVEN_URL "https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz; +ENV MAVEN_SHA512 'f790857f3b1f90ae8d16281f902c689e4f136ebe584aba45e4b1fa66c80cba826d3e0e52fdd04ed44b4c66f6d3fe3584a057c26dfcac544a60b301e6d0f91c26' +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN curl --location --fail --silent --show-error --output /tmp/maven.tar.gz "${MAVEN_URL}" && \ + echo "${MAVEN_SHA512} */tmp/maven.tar.gz" | sha512sum -c - + +FROM base_image AS openjdk8_download_image +ENV OPENJDK8_URL 'https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u352-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u352b08.tar.gz' +ENV OPENJDK8_SHA256 '1633bd7590cb1cd72f5a1378ae8294451028b274d798e2a4ac672059a2f00fee' +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN curl --location --fail --silent --show-error --output /tmp/adoptopenjdk8.tar.gz "${OPENJDK8_URL}" && \ + echo "${OPENJDK8_SHA256} */tmp/adoptopenjdk8.tar.gz" | sha256sum -c - + +FROM base_image +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +# +# when updating java or maven versions here, consider also updating +# `dev-support/docker/Dockerfile` as well. +# + +# hadolint ignore=DL3010 +COPY --from=maven_download_image /tmp/maven.tar.gz /tmp/maven.tar.gz +RUN tar xzf /tmp/maven.tar.gz -C /opt && \ + ln -s "/opt/$(dirname "$(tar -tf /tmp/maven.tar.gz | head -n1)")" /opt/maven && \ + rm /tmp/maven.tar.gz + +# hadolint ignore=DL3010 +COPY --from=openjdk8_download_image /tmp/adoptopenjdk8.tar.gz /tmp/adoptopenjdk8.tar.gz +RUN mkdir -p /usr/lib/jvm && \ + tar xzf /tmp/adoptopenjdk8.tar.gz -C /usr/lib/jvm && \ + ln -s "/usr/lib/jvm/$(basename "$(tar -tf /tmp/adoptopenjdk8.tar.gz | head -n1)")" /usr/lib/jvm/java-8-adoptopenjdk && \ + ln -s /usr/lib/jvm/java-8-adoptopenjdk /usr/lib/jvm/java-8 && \ + rm /tmp/adoptopenjdk8.tar.gz
(hbase-site) branch asf-site updated: INFRA-10751 Empty commit
This is an automated email from the ASF dual-hosted git repository. git-site-role pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/hbase-site.git The following commit(s) were added to refs/heads/asf-site by this push: new c631c6ca961 INFRA-10751 Empty commit c631c6ca961 is described below commit c631c6ca9612ae184a42bdb2dd7d332daaac5c0f Author: jenkins AuthorDate: Wed May 22 14:43:38 2024 + INFRA-10751 Empty commit
(hbase) branch HBASE-28463 updated: HBASE-28469: Integration of time-based priority caching into compaction paths (#5866)
This is an automated email from the ASF dual-hosted git repository. wchevreuil pushed a commit to branch HBASE-28463 in repository https://gitbox.apache.org/repos/asf/hbase.git The following commit(s) were added to refs/heads/HBASE-28463 by this push: new d3317caa5ff HBASE-28469: Integration of time-based priority caching into compaction paths (#5866) d3317caa5ff is described below commit d3317caa5ffe28324840a79661b23dd130d4daf9 Author: vinayak hegde AuthorDate: Wed May 22 18:59:49 2024 +0530 HBASE-28469: Integration of time-based priority caching into compaction paths (#5866) Signed-off-by: Wellington Chevreuil Reviewed-by: Janardhan Hugund --- .../apache/hadoop/hbase/io/hfile/BlockCache.java | 17 ++ .../hadoop/hbase/io/hfile/BlockCacheKey.java | 1 - .../hadoop/hbase/io/hfile/CombinedBlockCache.java | 20 ++- .../org/apache/hadoop/hbase/io/hfile/HFile.java| 5 + .../hadoop/hbase/io/hfile/HFileWriterImpl.java | 53 +- .../hadoop/hbase/io/hfile/bucket/BucketCache.java | 13 ++ .../hbase/regionserver/DataTieringManager.java | 50 +- .../hbase/regionserver/HRegionFileSystem.java | 25 +++ .../hadoop/hbase/regionserver/StoreFileWriter.java | 23 +-- .../hbase/regionserver/TimeRangeTracker.java | 4 +- .../hbase/regionserver/TestDataTieringManager.java | 183 ++--- 11 files changed, 336 insertions(+), 58 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java index ac83af1053a..922ac5dd144 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java @@ -22,6 +22,7 @@ import java.util.Map; import java.util.Optional; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; +import org.apache.hadoop.hbase.regionserver.TimeRangeTracker; import org.apache.hadoop.hbase.util.Pair; import org.apache.yetus.audience.InterfaceAudience; @@ -207,6 +208,22 @@ public interface BlockCache extends Iterable { return Optional.empty(); } + /** + * Checks whether the block represented by the given key should be cached or not. This method may + * not be overridden by all implementing classes. In such cases, the returned Optional will be + * empty. For subclasses implementing this logic, the returned Optional would contain the boolean + * value reflecting if the passed block should indeed be cached. + * @param key The key representing the block to check if it should be cached. + * @param timeRangeTracker the time range tracker containing the timestamps + * @param conf The configuration object to use for determining caching behavior. + * @return An empty Optional if this method is not supported; otherwise, the returned Optional + * contains the boolean value indicating if the block should be cached. + */ + default Optional shouldCacheBlock(BlockCacheKey key, TimeRangeTracker timeRangeTracker, +Configuration conf) { +return Optional.empty(); + } + /** * Checks whether the block for the passed key is already cached. This method may not be * overridden by all implementing classes. In such cases, the returned Optional will be empty. For diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheKey.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheKey.java index bf22d38e373..bcc1f58ba5e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheKey.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheKey.java @@ -116,5 +116,4 @@ public class BlockCacheKey implements HeapSize, java.io.Serializable { public Path getFilePath() { return filePath; } - } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java index b12510cdccd..c29ed1ecf31 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java @@ -26,6 +26,7 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.io.HeapSize; import org.apache.hadoop.hbase.io.hfile.bucket.BucketCache; +import org.apache.hadoop.hbase.regionserver.TimeRangeTracker; import org.apache.hadoop.hbase.util.Pair; import org.apache.yetus.audience.InterfaceAudience; import org.slf4j.Logger; @@ -484,11 +485,22 @@ public class CombinedBlockCache implements ResizableBlockCache, HeapSize { @Override public Optional shouldCacheFile(HFileInfo hFileInfo, Configuration conf) { -Optional l1Result =
(hbase) branch branch-3 updated: HBASE-28577 Remove deprecated methods in KeyValue (#5883)
This is an automated email from the ASF dual-hosted git repository. zhangduo pushed a commit to branch branch-3 in repository https://gitbox.apache.org/repos/asf/hbase.git The following commit(s) were added to refs/heads/branch-3 by this push: new 8089de0cff8 HBASE-28577 Remove deprecated methods in KeyValue (#5883) 8089de0cff8 is described below commit 8089de0cff868d0f55c280a9571505ada64d54cf Author: lixiaobao <977734...@qq.com> AuthorDate: Wed May 22 18:34:42 2024 +0800 HBASE-28577 Remove deprecated methods in KeyValue (#5883) Co-authored-by: lixiaobao Co-authored-by: 李小保 Signed-off-by: Duo Zhang (cherry picked from commit 419666b8eb8a881724fe6f65e8235a4220824e51) --- .../java/org/apache/hadoop/hbase/KeyValue.java | 656 - .../hadoop/hbase/io/hfile/FixedFileTrailer.java| 11 +- .../org/apache/hadoop/hbase/TestSerialization.java | 7 +- .../hbase/io/hfile/TestFixedFileTrailer.java | 9 - 4 files changed, 7 insertions(+), 676 deletions(-) diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java index 3661c063e88..89e91ca8036 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java @@ -33,7 +33,6 @@ import java.util.Map; import org.apache.hadoop.hbase.util.ByteBufferUtils; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.ClassSize; -import org.apache.hadoop.io.RawComparator; import org.apache.yetus.audience.InterfaceAudience; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -87,22 +86,6 @@ public class KeyValue implements ExtendedCell, Cloneable { public static final byte[] COLUMN_FAMILY_DELIM_ARRAY = new byte[] { COLUMN_FAMILY_DELIMITER }; - /** - * Comparator for plain key/values; i.e. non-catalog table key/values. Works on Key portion of - * KeyValue only. - * @deprecated Use {@link CellComparator#getInstance()} instead. Deprecated for hbase 2.0, remove - * for hbase 3.0. - */ - @Deprecated - public static final KVComparator COMPARATOR = new KVComparator(); - /** - * A {@link KVComparator} for hbase:meta catalog table {@link KeyValue}s. - * @deprecated Use {@link MetaCellComparator#META_COMPARATOR} instead. Deprecated for hbase 2.0, - * remove for hbase 3.0. - */ - @Deprecated - public static final KVComparator META_COMPARATOR = new MetaComparator(); - /** Size of the key length field in bytes */ public static final int KEY_LENGTH_SIZE = Bytes.SIZEOF_INT; @@ -1497,623 +1480,6 @@ public class KeyValue implements ExtendedCell, Cloneable { return result; } - /** - * A {@link KVComparator} for hbase:meta catalog table {@link KeyValue}s. - * @deprecated : {@link MetaCellComparator#META_COMPARATOR} to be used. Deprecated for hbase 2.0, - * remove for hbase 3.0. - */ - @Deprecated - public static class MetaComparator extends KVComparator { -/** - * Compare key portion of a {@link KeyValue} for keys in hbase:meta table. - */ -@Override -public int compare(final Cell left, final Cell right) { - return PrivateCellUtil.compareKeyIgnoresMvcc(MetaCellComparator.META_COMPARATOR, left, right); -} - -@Override -public int compareOnlyKeyPortion(Cell left, Cell right) { - return compare(left, right); -} - -@Override -public int compareRows(byte[] left, int loffset, int llength, byte[] right, int roffset, - int rlength) { - int leftDelimiter = getDelimiter(left, loffset, llength, HConstants.DELIMITER); - int rightDelimiter = getDelimiter(right, roffset, rlength, HConstants.DELIMITER); - // Compare up to the delimiter - int lpart = (leftDelimiter < 0 ? llength : leftDelimiter - loffset); - int rpart = (rightDelimiter < 0 ? rlength : rightDelimiter - roffset); - int result = Bytes.compareTo(left, loffset, lpart, right, roffset, rpart); - if (result != 0) { -return result; - } else { -if (leftDelimiter < 0 && rightDelimiter >= 0) { - return -1; -} else if (rightDelimiter < 0 && leftDelimiter >= 0) { - return 1; -} else if (leftDelimiter < 0 && rightDelimiter < 0) { - return 0; -} - } - // Compare middle bit of the row. - // Move past delimiter - leftDelimiter++; - rightDelimiter++; - int leftFarDelimiter = getDelimiterInReverse(left, leftDelimiter, -llength - (leftDelimiter - loffset), HConstants.DELIMITER); - int rightFarDelimiter = getDelimiterInReverse(right, rightDelimiter, -rlength - (rightDelimiter - roffset), HConstants.DELIMITER); - // Now compare middlesection of row. - lpart = (leftFarDelimiter < 0 ? llength + loffset : leftFarDelimiter) - leftDelimiter; - rpart =
(hbase) branch master updated: HBASE-28577 Remove deprecated methods in KeyValue (#5883)
This is an automated email from the ASF dual-hosted git repository. zhangduo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/hbase.git The following commit(s) were added to refs/heads/master by this push: new 419666b8eb8 HBASE-28577 Remove deprecated methods in KeyValue (#5883) 419666b8eb8 is described below commit 419666b8eb8a881724fe6f65e8235a4220824e51 Author: lixiaobao <977734...@qq.com> AuthorDate: Wed May 22 18:34:42 2024 +0800 HBASE-28577 Remove deprecated methods in KeyValue (#5883) Co-authored-by: lixiaobao Co-authored-by: 李小保 Signed-off-by: Duo Zhang --- .../java/org/apache/hadoop/hbase/KeyValue.java | 656 - .../hadoop/hbase/io/hfile/FixedFileTrailer.java| 11 +- .../org/apache/hadoop/hbase/TestSerialization.java | 7 +- .../hbase/io/hfile/TestFixedFileTrailer.java | 9 - 4 files changed, 7 insertions(+), 676 deletions(-) diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java index 3661c063e88..89e91ca8036 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java @@ -33,7 +33,6 @@ import java.util.Map; import org.apache.hadoop.hbase.util.ByteBufferUtils; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.ClassSize; -import org.apache.hadoop.io.RawComparator; import org.apache.yetus.audience.InterfaceAudience; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -87,22 +86,6 @@ public class KeyValue implements ExtendedCell, Cloneable { public static final byte[] COLUMN_FAMILY_DELIM_ARRAY = new byte[] { COLUMN_FAMILY_DELIMITER }; - /** - * Comparator for plain key/values; i.e. non-catalog table key/values. Works on Key portion of - * KeyValue only. - * @deprecated Use {@link CellComparator#getInstance()} instead. Deprecated for hbase 2.0, remove - * for hbase 3.0. - */ - @Deprecated - public static final KVComparator COMPARATOR = new KVComparator(); - /** - * A {@link KVComparator} for hbase:meta catalog table {@link KeyValue}s. - * @deprecated Use {@link MetaCellComparator#META_COMPARATOR} instead. Deprecated for hbase 2.0, - * remove for hbase 3.0. - */ - @Deprecated - public static final KVComparator META_COMPARATOR = new MetaComparator(); - /** Size of the key length field in bytes */ public static final int KEY_LENGTH_SIZE = Bytes.SIZEOF_INT; @@ -1497,623 +1480,6 @@ public class KeyValue implements ExtendedCell, Cloneable { return result; } - /** - * A {@link KVComparator} for hbase:meta catalog table {@link KeyValue}s. - * @deprecated : {@link MetaCellComparator#META_COMPARATOR} to be used. Deprecated for hbase 2.0, - * remove for hbase 3.0. - */ - @Deprecated - public static class MetaComparator extends KVComparator { -/** - * Compare key portion of a {@link KeyValue} for keys in hbase:meta table. - */ -@Override -public int compare(final Cell left, final Cell right) { - return PrivateCellUtil.compareKeyIgnoresMvcc(MetaCellComparator.META_COMPARATOR, left, right); -} - -@Override -public int compareOnlyKeyPortion(Cell left, Cell right) { - return compare(left, right); -} - -@Override -public int compareRows(byte[] left, int loffset, int llength, byte[] right, int roffset, - int rlength) { - int leftDelimiter = getDelimiter(left, loffset, llength, HConstants.DELIMITER); - int rightDelimiter = getDelimiter(right, roffset, rlength, HConstants.DELIMITER); - // Compare up to the delimiter - int lpart = (leftDelimiter < 0 ? llength : leftDelimiter - loffset); - int rpart = (rightDelimiter < 0 ? rlength : rightDelimiter - roffset); - int result = Bytes.compareTo(left, loffset, lpart, right, roffset, rpart); - if (result != 0) { -return result; - } else { -if (leftDelimiter < 0 && rightDelimiter >= 0) { - return -1; -} else if (rightDelimiter < 0 && leftDelimiter >= 0) { - return 1; -} else if (leftDelimiter < 0 && rightDelimiter < 0) { - return 0; -} - } - // Compare middle bit of the row. - // Move past delimiter - leftDelimiter++; - rightDelimiter++; - int leftFarDelimiter = getDelimiterInReverse(left, leftDelimiter, -llength - (leftDelimiter - loffset), HConstants.DELIMITER); - int rightFarDelimiter = getDelimiterInReverse(right, rightDelimiter, -rlength - (rightDelimiter - roffset), HConstants.DELIMITER); - // Now compare middlesection of row. - lpart = (leftFarDelimiter < 0 ? llength + loffset : leftFarDelimiter) - leftDelimiter; - rpart = (rightFarDelimiter < 0 ? rlength + roffset : rightFarDelimiter) - rightDelimiter; -
(hbase) branch dependabot/pip/dev-support/git-jira-release-audit/requests-2.32.2 created (now c7e365315b8)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/pip/dev-support/git-jira-release-audit/requests-2.32.2 in repository https://gitbox.apache.org/repos/asf/hbase.git at c7e365315b8 --- updated-dependencies: - dependency-name: requests dependency-type: direct:production ... No new revisions were added by this update.
(hbase) branch master updated (d85574aa1f4 -> 3b18ba664a6)
This is an automated email from the ASF dual-hosted git repository. ndimiduk pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/hbase.git from d85574aa1f4 HBASE-28607 Bump requests from 2.31.0 to 2.32.0 in /dev-support/flaky-tests (#5929) add 3b18ba664a6 HBASE-28605 Add ErrorProne ban on Hadoop shaded thirdparty jars (#5918) No new revisions were added by this update. Summary of changes: pom.xml | 1 + 1 file changed, 1 insertion(+)