You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "vaijosh (via GitHub)" <gi...@apache.org> on 2026/05/11 08:43:33 UTC

[PR] [Improve] Upgrade HBase version and replace custom hbase-shaded-endpint with official artifacts #3016 [hugegraph]

vaijosh opened a new pull request, #3021:
URL: https://github.com/apache/hugegraph/pull/3021

   ## Title
   feat(hbase): upgrade to HBase 2.6.5 and replace custom shaded endpoint with official Apache artifacts
   
   ## Background
   This PR modernizes HugeGraph’s HBase integration by replacing the custom `hbase-shaded-endpoint` dependency with official Apache HBase 2.6.5 artifacts, and adds a reproducible Docker-based local test environment for HBase backend development/verification.
   
   ## What changed
   
   ### 1) HBase dependency upgrade (`hugegraph-server/hugegraph-hbase/pom.xml`)
   - Added `hbase.version` property: `2.6.5`
   - Replaced:
     - `com.baidu.hugegraph:hbase-shaded-endpoint:2.0.6`
   - With:
     - `org.apache.hbase:hbase-endpoint:${hbase.version}`
     - `org.apache.hbase:hbase-shaded-client:${hbase.version}`
   - Added exclusions on `hbase-endpoint` to avoid pulling heavyweight server/hadoop transitive components not needed by HugeGraph runtime.
   - Kept dependency order (`hbase-endpoint` before `hbase-shaded-client`) to preserve `AggregationClient`/`LongColumnInterpreter` compatibility.
   
   ### 2) Dockerized HBase standalone environment (new files under `docker/hbase/`)
   - Added `Dockerfile` to build HBase `2.6.5` image from official Apache tarballs.
   - Added SHA512 verification with strict default behavior and mirror fallback:
     - primary: `downloads.apache.org`
     - fallback: `archive.apache.org`
   - Added robust checksum parsing to support Apache `.sha512` formats.
   - Added `entrypoint.sh` that starts ZooKeeper + Master + RegionServer and blocks until service readiness.
   - Added `hbase-site.xml` tuned for local standalone/pseudo-distributed usage and HugeGraph defaults.
   - Added `docker-compose.hbase.yml` with ports, healthcheck, persistent volumes, and overridable download URLs.
   
   ### 3) End-to-end usage and troubleshooting docs (`docker/HBASE.md`)
   - Added full guide for:
     - starting/stopping HBase in Docker
     - HugeGraph server config/init for HBase backend
     - API sanity checks (schema + vertex + gremlin)
     - troubleshooting common issues and cleanup
   
   ### 4) Dependency allowlist update (`install-dist/scripts/dependency/known-dependencies.txt`)
   - Removed: `hbase-shaded-endpoint-2.0.6.jar`
   - Added:
     - `hbase-endpoint-2.6.5.jar`
     - `hbase-shaded-client-2.6.5.jar`
   
   ## Why
   - Align HugeGraph HBase integration with official Apache HBase artifacts.
   - Remove reliance on custom shaded endpoint packaging.
   - Provide a consistent and secure local HBase test setup for contributors and CI-like reproduction.
   - Reduce build/setup friction with documented and reproducible steps.
   
   ## Impact
   - Scope is limited to HBase module dependencies, Docker test tooling, and dependency metadata/docs.
   - Existing non-HBase backends are not directly affected.
   
   ## How to verify
   ```bash
   docker compose -f docker/hbase/docker-compose.hbase.yml build --no-cache hbase
   docker compose -f docker/hbase/docker-compose.hbase.yml up -d
   docker compose -f docker/hbase/docker-compose.hbase.yml ps
   
   mvn clean install -pl hugegraph-server/hugegraph-hbase -am -DskipTests
   
   bash install-dist/scripts/dependency/check_dependencies.sh
   ```
   
   ## Notes
   SHA512 verification remains enforced by default during Docker image build.
   ALLOW_UNVERIFIED_DOWNLOAD=true is intended only for trusted/restricted test environments.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: upgrade HBase and replace custom hbase-shaded-endpint [hugegraph]

Posted by "vaijosh (via GitHub)" <gi...@apache.org>.
vaijosh commented on PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#issuecomment-4508644382

   > Thanks for addressing the license/notice side of the HBase upgrade. I think we should still try to minimize the new release metadata while staying ASF-compliant.
   > 
   > The new HBase runtime jars are indeed bundled, so they should be reflected in the distribution metadata. However, the newly added `LICENSE-hbase-*.txt` files appear to be identical copies of the Apache License 2.0 text. Since the top-level `LICENSE` already includes the full Apache License 2.0 text, I don't think we need to duplicate the same license text once per HBase jar.
   > 
   > Could we please narrow this down before merging?
   > 
   > TODO:
   > 
   > * Keep the new HBase/HBase-thirdparty bundled components listed in `install-dist/release-docs/LICENSE`, including their versions.
   > * Remove the duplicate per-HBase Apache-2.0 license files under `install-dist/release-docs/licenses/`.
   > * Adjust the `LICENSE` wording that currently says each license text is included in `licenses/LICENSE-[project].txt`, since that would no longer be true for these Apache-2.0 entries.
   > * Re-check the added HBase section in `NOTICE` and keep only the upstream notice content that is legally relevant to the bits actually bundled in the HugeGraph distribution.
   > 
   > This should satisfy the compliance requirement while avoiding unnecessary license/notice bloat in the release docs.
   
   Thanks @imbajin for these valuable suggestions.
   I have addressed them in the recent commit. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] feat(server): use HBase 2.6 to replace hbase-shaded & support docker-compose way [hugegraph]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin merged PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: upgrade HBase and replace custom hbase-shaded-endpint [hugegraph]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#discussion_r3281724127


##########
docker/HBASE.md:
##########


Review Comment:
   shall we move this file to `hbase/README.md`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: upgrade HBase and replace custom hbase-shaded-endpint [hugegraph]

Posted by "vaijosh (via GitHub)" <gi...@apache.org>.
vaijosh commented on code in PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#discussion_r3249182114


##########
hugegraph-server/hugegraph-hbase/pom.xml:
##########
@@ -27,24 +27,49 @@
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>hugegraph-hbase</artifactId>
-
+    <properties>
+        <hbase.version>2.6.5</hbase.version>
+    </properties>
     <dependencies>
         <dependency>
             <groupId>org.apache.hugegraph</groupId>
             <artifactId>hugegraph-core</artifactId>
             <version>${revision}</version>
         </dependency>
+        <!--
+            hbase-endpoint must come before hbase-shaded-client so that the
+            unshaded LongColumnInterpreter (using com.google.protobuf) is on
+            the classpath ahead of the shaded variant, allowing AggregationClient
+            rowCount() generic bounds to resolve correctly.
+        -->
         <dependency>
-            <groupId>com.baidu.hugegraph</groupId>
-            <artifactId>hbase-shaded-endpoint</artifactId>
-            <version>2.0.6</version>
+            <groupId>org.apache.hbase</groupId>
+            <artifactId>hbase-endpoint</artifactId>
+            <version>${hbase.version}</version>
             <exclusions>
                 <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
+                    <groupId>org.apache.hbase</groupId>
+                    <artifactId>hbase-server</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-common</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-hdfs</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-mapreduce-client-core</artifactId>
                 </exclusion>
             </exclusions>

Review Comment:
   Confirmed aggregation paths (count, max) work on a live HBase cluster without hbase-server. Arthas traces verify that the hbase-endpoint coprocessors are being called correctly and performance remains optimized.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: upgrade HBase and replace custom hbase-shaded-endpint [hugegraph]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#issuecomment-4505890087

   Thanks for addressing the license/notice side of the HBase upgrade. I think we should still try to minimize the new release metadata while staying ASF-compliant.
   
   The new HBase runtime jars are indeed bundled, so they should be reflected in the distribution metadata. However, the newly added `LICENSE-hbase-*.txt` files appear to be identical copies of the Apache License 2.0 text. Since the top-level `LICENSE` already includes the full Apache License 2.0 text, I don't think we need to duplicate the same license text once per HBase jar.
   
   Could we please narrow this down before merging?
   
   TODO:
   - Keep the new HBase/HBase-thirdparty bundled components listed in `install-dist/release-docs/LICENSE`, including their versions.
   - Remove the duplicate per-HBase Apache-2.0 license files under `install-dist/release-docs/licenses/`.
   - Adjust the `LICENSE` wording that currently says each license text is included in `licenses/LICENSE-[project].txt`, since that would no longer be true for these Apache-2.0 entries.
   - Re-check the added HBase section in `NOTICE` and keep only the upstream notice content that is legally relevant to the bits actually bundled in the HugeGraph distribution.
   
   This should satisfy the compliance requirement while avoiding unnecessary license/notice bloat in the release docs.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: upgrade HBase and replace custom hbase-shaded-endpint [hugegraph]

Posted by "vaijosh (via GitHub)" <gi...@apache.org>.
vaijosh commented on PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#issuecomment-4484826440

   @imbajin,
   I observed comment ` hbase)
           # TODO: replace it with hbase2.3+ to avoid java8 env
           "$TRAVIS_DIR"/install-hbase.sh`
   in `[hugegraph-server/hugegraph-dist/src/assembly/travis/install-backend.sh](https://github.com/apache/hugegraph/blob/f69ca66c::master/hugegraph-server/hugegraph-dist/src/assembly/travis/install-backend.sh#L42-L44)`.
   Does it mean we can get rid of java 8 after this PR ( hbase update to 2.6.5 )?  I tested that Hbase 2.6.5 backed works fine with java 8 and even java 11, so I don't think java 8 is required anymore.
   
   If there are no other dependencies on java 8, can we remove it immediately after merging this PR?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: upgrade HBase and replace custom hbase-shaded-endpint [hugegraph]

Posted by "vaijosh (via GitHub)" <gi...@apache.org>.
vaijosh commented on code in PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#discussion_r3247892077


##########
docker/hbase/entrypoint.sh:
##########
@@ -0,0 +1,57 @@
+#!/bin/bash
+#
+# 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.
+#
+set -e
+
+echo "Starting HBase ${HBASE_VERSION} standalone..."
+
+# Start services explicitly to avoid SSH-based helper assumptions in containers
+${HBASE_HOME}/bin/hbase-daemon.sh start zookeeper
+${HBASE_HOME}/bin/hbase-daemon.sh start master
+${HBASE_HOME}/bin/hbase-daemon.sh start regionserver
+
+echo "HBase started. Waiting for ZooKeeper on port 2181..."
+zk_attempts=0
+until nc -z localhost 2181; do
+    zk_attempts=$((zk_attempts + 1))
+    if [ "$zk_attempts" -ge 120 ]; then
+        echo "Timed out waiting for ZooKeeper on 2181"
+        ${HBASE_HOME}/bin/hbase-daemon.sh status || true
+        exit 1
+    fi
+    sleep 1
+done
+echo "ZooKeeper is ready."
+
+echo "Waiting for HBase Master..."
+master_attempts=0
+until echo "status 'simple'" | ${HBASE_HOME}/bin/hbase shell -n 2>/dev/null | grep -E -q "([1-9][0-9]*[[:space:]]+live[[:space:]]+servers|[1-9][0-9]*[[:space:]]+servers|servers:[[:space:]]*[1-9])"; do
+    master_attempts=$((master_attempts + 1))
+    if [ "$master_attempts" -ge 180 ]; then
+        echo "Timed out waiting for HBase master/regionserver readiness"
+        ${HBASE_HOME}/bin/hbase-daemon.sh status || true
+        tail -n 80 ${HBASE_HOME}/logs/hbase--*.out 2>/dev/null || true
+        exit 1
+    fi
+    sleep 3
+done
+echo "HBase is ready. Master + RegionServer online."
+
+# Tail all daemon logs so `docker logs` includes startup/runtime issues
+exec tail -F ${HBASE_HOME}/logs/hbase--*.out ${HBASE_HOME}/logs/hbase--*.log 2>/dev/null || \
+     tail -f /dev/null

Review Comment:
   Fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: upgrade HBase and replace custom hbase-shaded-endpint [hugegraph]

Posted by "vaijosh (via GitHub)" <gi...@apache.org>.
vaijosh commented on code in PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#discussion_r3249187940


##########
hugegraph-server/hugegraph-hbase/pom.xml:
##########
@@ -27,24 +27,49 @@
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>hugegraph-hbase</artifactId>
-
+    <properties>
+        <hbase.version>2.6.5</hbase.version>
+    </properties>
     <dependencies>
         <dependency>
             <groupId>org.apache.hugegraph</groupId>
             <artifactId>hugegraph-core</artifactId>
             <version>${revision}</version>
         </dependency>
+        <!--
+            hbase-endpoint must come before hbase-shaded-client so that the
+            unshaded LongColumnInterpreter (using com.google.protobuf) is on
+            the classpath ahead of the shaded variant, allowing AggregationClient
+            rowCount() generic bounds to resolve correctly.
+        -->
         <dependency>
-            <groupId>com.baidu.hugegraph</groupId>
-            <artifactId>hbase-shaded-endpoint</artifactId>
-            <version>2.0.6</version>
+            <groupId>org.apache.hbase</groupId>
+            <artifactId>hbase-endpoint</artifactId>
+            <version>${hbase.version}</version>
             <exclusions>
                 <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
+                    <groupId>org.apache.hbase</groupId>
+                    <artifactId>hbase-server</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-common</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-hdfs</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-mapreduce-client-core</artifactId>
                 </exclusion>
             </exclusions>

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: upgrade HBase and replace custom hbase-shaded-endpint [hugegraph]

Posted by "vaijosh (via GitHub)" <gi...@apache.org>.
vaijosh commented on code in PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#discussion_r3247890001


##########
docker/hbase/Dockerfile:
##########
@@ -0,0 +1,101 @@
+# 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.
+#
+# Standalone HBase 2.6.5 image for HugeGraph HBase backend testing.
+# Exposes ZooKeeper on 2181 with znode /hbase (matching hugegraph.properties defaults).
+
+FROM eclipse-temurin:11-jre-jammy
+
+ARG HBASE_VERSION=2.6.5
+ARG HBASE_PRIMARY_URL=https://downloads.apache.org/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz
+ARG HBASE_FALLBACK_URL=https://archive.apache.org/dist/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz
+ARG ALLOW_UNVERIFIED_DOWNLOAD=false
+
+ENV HBASE_VERSION=${HBASE_VERSION}
+ENV HBASE_HOME=/opt/hbase
+ENV PATH=${HBASE_HOME}/bin:${PATH}
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+        curl \
+        netcat-openbsd \
+    && rm -rf /var/lib/apt/lists/*
+
+RUN set -eux; \
+    download_ok=0; \
+    for url in "${HBASE_PRIMARY_URL}" "${HBASE_FALLBACK_URL}"; do \
+        [ -n "${url}" ] || continue; \
+        echo "Downloading HBase from ${url}"; \
+        if curl -fL --retry 8 --retry-delay 5 --retry-all-errors \
+                --connect-timeout 30 --max-time 1800 "${url}" -o /tmp/hbase.tar.gz; then \
+            download_ok=1; \
+            break; \
+        fi; \
+        echo "Download failed for ${url}, trying next source..."; \
+        rm -f /tmp/hbase.tar.gz; \
+    done; \
+    if [ "${download_ok}" -ne 1 ]; then \
+        echo "Unable to download HBase ${HBASE_VERSION} tarball from configured sources"; \
+        exit 1; \
+    fi; \
+    if curl -fL --retry 5 --retry-delay 3 --retry-all-errors \
+            --connect-timeout 30 "${HBASE_PRIMARY_URL}.sha512" -o /tmp/hbase.tar.gz.sha512 2>/dev/null || \
+       curl -fL --retry 5 --retry-delay 3 --retry-all-errors \
+            --connect-timeout 30 "${HBASE_FALLBACK_URL}.sha512" -o /tmp/hbase.tar.gz.sha512 2>/dev/null; then \
+        echo "Verifying SHA512 checksum..."; \

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: upgrade HBase and replace custom hbase-shaded-endpint [hugegraph]

Posted by "vaijosh (via GitHub)" <gi...@apache.org>.
vaijosh commented on code in PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#discussion_r3249195405


##########
docker/hbase/Dockerfile:
##########
@@ -0,0 +1,101 @@
+# 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.
+#
+# Standalone HBase 2.6.5 image for HugeGraph HBase backend testing.
+# Exposes ZooKeeper on 2181 with znode /hbase (matching hugegraph.properties defaults).
+
+FROM eclipse-temurin:11-jre-jammy
+
+ARG HBASE_VERSION=2.6.5
+ARG HBASE_PRIMARY_URL=https://downloads.apache.org/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz

Review Comment:
   fixed



##########
docker/hbase/Dockerfile:
##########
@@ -0,0 +1,101 @@
+# 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.
+#
+# Standalone HBase 2.6.5 image for HugeGraph HBase backend testing.
+# Exposes ZooKeeper on 2181 with znode /hbase (matching hugegraph.properties defaults).
+
+FROM eclipse-temurin:11-jre-jammy
+
+ARG HBASE_VERSION=2.6.5
+ARG HBASE_PRIMARY_URL=https://downloads.apache.org/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz
+ARG HBASE_FALLBACK_URL=https://archive.apache.org/dist/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz
+ARG ALLOW_UNVERIFIED_DOWNLOAD=false
+
+ENV HBASE_VERSION=${HBASE_VERSION}
+ENV HBASE_HOME=/opt/hbase
+ENV PATH=${HBASE_HOME}/bin:${PATH}
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+        curl \
+        netcat-openbsd \
+    && rm -rf /var/lib/apt/lists/*
+
+RUN set -eux; \
+    download_ok=0; \
+    for url in "${HBASE_PRIMARY_URL}" "${HBASE_FALLBACK_URL}"; do \
+        [ -n "${url}" ] || continue; \
+        echo "Downloading HBase from ${url}"; \
+        if curl -fL --retry 8 --retry-delay 5 --retry-all-errors \
+                --connect-timeout 30 --max-time 1800 "${url}" -o /tmp/hbase.tar.gz; then \
+            download_ok=1; \
+            break; \
+        fi; \
+        echo "Download failed for ${url}, trying next source..."; \
+        rm -f /tmp/hbase.tar.gz; \
+    done; \
+    if [ "${download_ok}" -ne 1 ]; then \
+        echo "Unable to download HBase ${HBASE_VERSION} tarball from configured sources"; \
+        exit 1; \
+    fi; \
+    if curl -fL --retry 5 --retry-delay 3 --retry-all-errors \
+            --connect-timeout 30 "${HBASE_PRIMARY_URL}.sha512" -o /tmp/hbase.tar.gz.sha512 2>/dev/null || \
+       curl -fL --retry 5 --retry-delay 3 --retry-all-errors \
+            --connect-timeout 30 "${HBASE_FALLBACK_URL}.sha512" -o /tmp/hbase.tar.gz.sha512 2>/dev/null; then \
+        echo "Verifying SHA512 checksum..."; \
+        expected_hash=$(grep -Eio '[a-f0-9]{128}' /tmp/hbase.tar.gz.sha512 | head -n 1 | tr 'A-F' 'a-f' || true); \
+        if [ -z "$expected_hash" ]; then \
+            expected_hash=$(awk '{for (i = 1; i <= NF; i++) if ($i ~ /^[0-9A-Fa-f]+$/) hash = hash $i} END {if (length(hash) >= 128) print tolower(substr(hash, 1, 128))}' /tmp/hbase.tar.gz.sha512 || true); \

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: upgrade HBase and replace custom hbase-shaded-endpint [hugegraph]

Posted by "vaijosh (via GitHub)" <gi...@apache.org>.
vaijosh commented on code in PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#discussion_r3249192803


##########
docker/hbase/entrypoint.sh:
##########
@@ -0,0 +1,57 @@
+#!/bin/bash
+#
+# 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.
+#
+set -e
+
+echo "Starting HBase ${HBASE_VERSION} standalone..."
+
+# Start services explicitly to avoid SSH-based helper assumptions in containers
+${HBASE_HOME}/bin/hbase-daemon.sh start zookeeper
+${HBASE_HOME}/bin/hbase-daemon.sh start master
+${HBASE_HOME}/bin/hbase-daemon.sh start regionserver
+
+echo "HBase started. Waiting for ZooKeeper on port 2181..."
+zk_attempts=0
+until nc -z localhost 2181; do
+    zk_attempts=$((zk_attempts + 1))
+    if [ "$zk_attempts" -ge 120 ]; then
+        echo "Timed out waiting for ZooKeeper on 2181"
+        ${HBASE_HOME}/bin/hbase-daemon.sh status || true
+        exit 1
+    fi
+    sleep 1
+done
+echo "ZooKeeper is ready."
+
+echo "Waiting for HBase Master..."
+master_attempts=0
+until echo "status 'simple'" | ${HBASE_HOME}/bin/hbase shell -n 2>/dev/null | grep -E -q "([1-9][0-9]*[[:space:]]+live[[:space:]]+servers|[1-9][0-9]*[[:space:]]+servers|servers:[[:space:]]*[1-9])"; do
+    master_attempts=$((master_attempts + 1))
+    if [ "$master_attempts" -ge 180 ]; then
+        echo "Timed out waiting for HBase master/regionserver readiness"
+        ${HBASE_HOME}/bin/hbase-daemon.sh status || true
+        tail -n 80 ${HBASE_HOME}/logs/hbase--*.out 2>/dev/null || true
+        exit 1
+    fi
+    sleep 3
+done
+echo "HBase is ready. Master + RegionServer online."
+
+# Tail all daemon logs so `docker logs` includes startup/runtime issues
+exec tail -F ${HBASE_HOME}/logs/hbase--*.out ${HBASE_HOME}/logs/hbase--*.log 2>/dev/null || \
+     tail -f /dev/null

Review Comment:
   fixed



##########
docker/hbase/hbase-site.xml:
##########
@@ -0,0 +1,89 @@
+<?xml version="1.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.
+  -->
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<configuration>
+    <!-- Standalone mode: use local filesystem -->
+    <property>
+        <name>hbase.rootdir</name>
+        <value>/tmp/hbase</value>
+    </property>
+    <!-- Embedded ZooKeeper data directory -->
+    <property>
+        <name>hbase.zookeeper.property.dataDir</name>
+        <value>/tmp/zookeeper</value>
+    </property>

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: upgrade HBase and replace custom hbase-shaded-endpint [hugegraph]

Posted by "vaijosh (via GitHub)" <gi...@apache.org>.
vaijosh commented on code in PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#discussion_r3249190673


##########
install-dist/scripts/dependency/known-dependencies.txt:
##########
@@ -164,7 +164,8 @@ hamcrest-2.2.jar
 hamcrest-core-1.3.jar
 hanlp-portable-1.5.0.jar
 hanlp-portable-1.8.3.jar
-hbase-shaded-endpoint-2.0.6.jar
+hbase-endpoint-2.6.5.jar
+hbase-shaded-client-2.6.5.jar

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: upgrade HBase and replace custom hbase-shaded-endpint [hugegraph]

Posted by "vaijosh (via GitHub)" <gi...@apache.org>.
vaijosh commented on code in PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#discussion_r3282078142


##########
docker/hbase/README.md:
##########


Review Comment:
   Done. Thanks @imbajin for the suggestion.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: upgrade HBase and replace custom hbase-shaded-endpint [hugegraph]

Posted by "vaijosh (via GitHub)" <gi...@apache.org>.
vaijosh commented on code in PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#discussion_r3247888685


##########
docker/hbase/Dockerfile:
##########
@@ -0,0 +1,101 @@
+# 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.
+#
+# Standalone HBase 2.6.5 image for HugeGraph HBase backend testing.
+# Exposes ZooKeeper on 2181 with znode /hbase (matching hugegraph.properties defaults).
+
+FROM eclipse-temurin:11-jre-jammy
+
+ARG HBASE_VERSION=2.6.5
+ARG HBASE_PRIMARY_URL=https://downloads.apache.org/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz
+ARG HBASE_FALLBACK_URL=https://archive.apache.org/dist/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz
+ARG ALLOW_UNVERIFIED_DOWNLOAD=false
+
+ENV HBASE_VERSION=${HBASE_VERSION}
+ENV HBASE_HOME=/opt/hbase
+ENV PATH=${HBASE_HOME}/bin:${PATH}
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+        curl \
+        netcat-openbsd \
+    && rm -rf /var/lib/apt/lists/*
+
+RUN set -eux; \
+    download_ok=0; \
+    for url in "${HBASE_PRIMARY_URL}" "${HBASE_FALLBACK_URL}"; do \
+        [ -n "${url}" ] || continue; \
+        echo "Downloading HBase from ${url}"; \
+        if curl -fL --retry 8 --retry-delay 5 --retry-all-errors \
+                --connect-timeout 30 --max-time 1800 "${url}" -o /tmp/hbase.tar.gz; then \
+            download_ok=1; \
+            break; \
+        fi; \
+        echo "Download failed for ${url}, trying next source..."; \
+        rm -f /tmp/hbase.tar.gz; \
+    done; \
+    if [ "${download_ok}" -ne 1 ]; then \
+        echo "Unable to download HBase ${HBASE_VERSION} tarball from configured sources"; \
+        exit 1; \
+    fi; \
+    if curl -fL --retry 5 --retry-delay 3 --retry-all-errors \
+            --connect-timeout 30 "${HBASE_PRIMARY_URL}.sha512" -o /tmp/hbase.tar.gz.sha512 2>/dev/null || \
+       curl -fL --retry 5 --retry-delay 3 --retry-all-errors \
+            --connect-timeout 30 "${HBASE_FALLBACK_URL}.sha512" -o /tmp/hbase.tar.gz.sha512 2>/dev/null; then \
+        echo "Verifying SHA512 checksum..."; \
+        expected_hash=$(grep -Eio '[a-f0-9]{128}' /tmp/hbase.tar.gz.sha512 | head -n 1 | tr 'A-F' 'a-f' || true); \
+        if [ -z "$expected_hash" ]; then \
+            expected_hash=$(awk '{for (i = 1; i <= NF; i++) if ($i ~ /^[0-9A-Fa-f]+$/) hash = hash $i} END {if (length(hash) >= 128) print tolower(substr(hash, 1, 128))}' /tmp/hbase.tar.gz.sha512 || true); \
+        fi; \
+        if [ -n "$expected_hash" ]; then \
+            actual_hash=$(sha512sum /tmp/hbase.tar.gz | awk '{print $1}'); \
+            if [ "$expected_hash" = "$actual_hash" ]; then \
+                echo "SHA512 verified OK"; \
+            else \
+                echo "ERROR: SHA512 mismatch"; \
+                echo "  Expected: $expected_hash"; \
+                echo "  Actual:   $actual_hash"; \
+                exit 1; \
+            fi; \
+        else \
+            if [ "${ALLOW_UNVERIFIED_DOWNLOAD}" = "true" ]; then \
+                echo "WARNING: Could not parse SHA512 file (ALLOW_UNVERIFIED_DOWNLOAD=true)"; \
+            else \
+                echo "ERROR: Could not parse SHA512 file"; \
+                exit 1; \
+            fi; \
+        fi; \
+    else \
+        if [ "${ALLOW_UNVERIFIED_DOWNLOAD}" = "true" ]; then \
+            echo "WARNING: Could not download SHA512 file (ALLOW_UNVERIFIED_DOWNLOAD=true)"; \
+        else \
+            echo "ERROR: Could not download SHA512 file"; \
+            exit 1; \
+        fi; \
+    fi; \
+    tar -xzf /tmp/hbase.tar.gz -C /opt; \
+    mv /opt/hbase-${HBASE_VERSION} ${HBASE_HOME}; \
+    rm -f /tmp/hbase.tar.gz /tmp/hbase.tar.gz.sha512 /tmp/hbase.sha512

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: upgrade HBase and replace custom hbase-shaded-endpint [hugegraph]

Posted by "vaijosh (via GitHub)" <gi...@apache.org>.
vaijosh commented on code in PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#discussion_r3249184227


##########
hugegraph-server/hugegraph-hbase/pom.xml:
##########
@@ -27,24 +27,49 @@
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>hugegraph-hbase</artifactId>
-
+    <properties>
+        <hbase.version>2.6.5</hbase.version>
+    </properties>
     <dependencies>
         <dependency>
             <groupId>org.apache.hugegraph</groupId>
             <artifactId>hugegraph-core</artifactId>
             <version>${revision}</version>
         </dependency>
+        <!--
+            hbase-endpoint must come before hbase-shaded-client so that the
+            unshaded LongColumnInterpreter (using com.google.protobuf) is on
+            the classpath ahead of the shaded variant, allowing AggregationClient
+            rowCount() generic bounds to resolve correctly.
+        -->
         <dependency>
-            <groupId>com.baidu.hugegraph</groupId>
-            <artifactId>hbase-shaded-endpoint</artifactId>
-            <version>2.0.6</version>
+            <groupId>org.apache.hbase</groupId>
+            <artifactId>hbase-endpoint</artifactId>
+            <version>${hbase.version}</version>
             <exclusions>
                 <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
+                    <groupId>org.apache.hbase</groupId>
+                    <artifactId>hbase-server</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-common</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-hdfs</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-mapreduce-client-core</artifactId>
                 </exclusion>

Review Comment:
   Done



##########
docker/HBASE.md:
##########
@@ -0,0 +1,425 @@
+# HBase Backend Testing with Docker
+
+This guide explains how to start HBase locally with Docker, verify it is working, and validate HugeGraph API operations.
+
+> **All commands in this guide should be run from the repository root** unless otherwise noted.
+
+> **Recent path change**: The HBase compose file moved from `docker/docker-compose.hbase.yml` to `docker/hbase/docker-compose.hbase.yml`. If you have older shell history/scripts, update `-f` accordingly.
+
+> **Security note**: The HBase Docker build enforces SHA512 verification by default and fails when checksum download/parsing/validation fails. Only use `--build-arg ALLOW_UNVERIFIED_DOWNLOAD=true` for trusted test environments with restricted networks.
+
+---
+
+## Quick Start
+
+### 0. (Optional) Clean Up Leftover HBase Tables
+```bash
+docker compose -f docker/hbase/docker-compose.hbase.yml build --no-cache hbase
+```
+
+### 1. Start HBase with Docker
+
+```bash
+docker compose -f docker/hbase/docker-compose.hbase.yml up -d
+```
+
+### 2. Wait for HBase to be Ready (~2 minutes)
+
+```bash
+# Check ZooKeeper connectivity
+nc -z localhost 2181 && echo "Ready" || echo "Not ready"
+
+# Or watch the logs
+docker compose -f docker/hbase/docker-compose.hbase.yml logs
+```
+
+### 3. (Optional) Clean Up Leftover HBase Tables
+
+For reruns, drop any leftover HugeGraph tables after the container is up:
+
+```bash
+docker exec hg-hbase-test bash -c '
+  for t in $(echo "list" | hbase shell -n 2>/dev/null | grep "^default_hugegraph"); do
+    echo "disable '"'"'$t'"'"'; drop '"'"'$t'"'"'"
+  done | hbase shell
+'
+```
+
+Verify tables are gone before proceeding:
+
+```bash
+docker exec hg-hbase-test bash -lc "echo 'list' | hbase shell -n"
+# Expected: TABLE (empty), 0 row(s)
+```
+
+
+### 4. Configure and Init the HugeGraph Server (required for API tests)
+
+> This step is only needed for HugeGraph API sanity checks.
+
+> **Prerequisite**: Run `mvn clean package -DskipTests` from the repository root to generate the distribution. This creates an `apache-hugegraph-<version>/` directory with all necessary binaries and configs.
+
+Set backend to HBase in the server config:
+
+```bash
+SERVER_DIR="$(find . -maxdepth 3 -type d -path './apache-hugegraph-*/apache-hugegraph-server-*' | head -n 1)"
+SERVER_DIR="${SERVER_DIR#./}"
+[ -n "$SERVER_DIR" ] || { echo "HugeGraph server runtime not found. Run mvn clean package -DskipTests first."; exit 1; }
+CONF="$SERVER_DIR/conf/graphs/hugegraph.properties"
+
+# Switch backend to hbase
+perl -pi -e 's/^backend=.*/backend=hbase/'     "$CONF"
+perl -pi -e 's/^serializer=.*/serializer=hbase/' "$CONF"
+
+# Uncomment HBase connection settings
+perl -pi -e 's/^#(hbase\.hosts=.*)/$1/'        "$CONF"
+perl -pi -e 's/^#(hbase\.port=.*)/$1/'         "$CONF"
+perl -pi -e 's/^#(hbase\.znode_parent=.*)/$1/' "$CONF"
+```
+
+Initialize HBase tables and start the server:
+
+```bash
+printf 'pa\npa\n' | "$SERVER_DIR/bin/init-store.sh"
+"$SERVER_DIR/bin/start-hugegraph.sh" -t 60
+```
+
+After `init-store.sh`, you can verify the tables were created:
+
+```bash
+docker exec hg-hbase-test bash -lc "echo 'list' | hbase shell -n"
+```
+
+---
+
+## Docker Compose Services
+
+### HBase Container
+
+- **Image**: `hugegraph/hbase:2.6.5`
+- **Container Name**: `hg-hbase-test`
+- **Hostname**: `hbase`
+- **Ports**:
+  - `2181` - ZooKeeper (embedded)
+  - `16000` - HBase Master RPC
+  - `16010` - HBase Master Web UI (http://localhost:16010)
+  - `16020` - HBase RegionServer RPC
+  - `16030` - HBase RegionServer Web UI (http://localhost:16030)
+- **Health Check**: ZooKeeper connectivity on port 2181
+- **Startup Time**: ~90-120 seconds
+
+---
+
+## Manual Verification
+
+### 1. Check Container is Healthy
+
+```bash
+docker compose -f docker/hbase/docker-compose.hbase.yml ps
+docker logs hg-hbase-test | tail -50
+```
+
+### 2. Check ZooKeeper Connectivity
+
+```bash
+# From host machine
+nc -z localhost 2181 && echo "ZooKeeper OK" || echo "ZooKeeper not ready"
+
+# From inside the container
+docker exec hg-hbase-test nc -z localhost 2181 && echo "Ready" || echo "Not ready"
+```
+
+### 3. Check HBase Master and RegionServer Web UIs
+
+```bash
+# HBase Master Web UI (should return HTML)
+curl -s http://localhost:16010 | head -20
+
+# RegionServer Web UI
+curl -s http://localhost:16030 | head -20
+
+# Or open in browser
+open http://localhost:16010
+```
+
+### 4. Verify HBase Tables via Shell
+
+```bash
+# List all tables (should show HugeGraph tables after init-store)
+docker exec hg-hbase-test bash -lc "echo 'list' | hbase shell -n"
+
+# Check a specific table exists (example: after backend init)
+docker exec hg-hbase-test bash -lc 'echo "describe '"'"'default_hugegraph:g_v'"'"'" | hbase shell -n'
+```
+
+### 5. Verify HBase Logs for Errors
+
+```bash
+# Check for any ERROR lines in HBase logs
+docker exec hg-hbase-test bash -lc "grep -i error /opt/hbase/logs/*.log | tail -20"
+
+# Tail live logs (run from repo root)
+docker compose -f docker/hbase/docker-compose.hbase.yml logs
+```
+
+> **Known benign messages** — these are safe to ignore in standalone mode:
+> - `SASL config status: Will not attempt to authenticate using SASL (unknown error)` — ZooKeeper SASL is not configured; standalone HBase does not need it.
+> - `Invalid configuration, only one server specified (ignoring)` — expected when running a single-node ZooKeeper.
+> - `NoClassDefFoundError: org/eclipse/jetty/...` — Jetty UI dependency missing in the container; does not affect HBase or ZooKeeper functionality.
+
+---
+
+## Manual API Sanity (curl)
+
+These steps assume the HugeGraph server is running at `http://localhost:8080` with auth enabled (`admin/pa`).
+
+> **Note on Idempotency**: Schema creation calls below use `"check_exist": false`. Re-running is safe only when the submitted schema definition matches the existing one. If definitions conflict, HugeGraph returns `ExistedException`.
+>
+> **Prerequisite**: The HBase backend tables must be initialized before any API calls will work. If you see `TableNotFoundException` errors, re-run `init-store.sh` (see Step 0 below or the Quick Start section).
+
+### 0. Initialize Backend and Start Server
+
+> **Skip this if the server is already running.** This step is required the first time or after a full cleanup.
+>
+> **Prerequisite**: Run `mvn clean package -DskipTests` from the repository root first to generate the distribution.
+
+```bash
+SERVER_DIR="$(find . -maxdepth 3 -type d -path './apache-hugegraph-*/apache-hugegraph-server-*' | head -n 1)"
+SERVER_DIR="${SERVER_DIR#./}"
+[ -n "$SERVER_DIR" ] || { echo "HugeGraph server runtime not found. Run mvn clean package -DskipTests first."; exit 1; }
+
+# Initialize HBase tables (enter password 'pa' when prompted)
+printf 'pa\npa\n' | "$SERVER_DIR/bin/init-store.sh"
+
+# Start the server (wait up to 60s for startup)
+"$SERVER_DIR/bin/start-hugegraph.sh" -t 60
+```
+
+Verify the server is up before continuing:
+
+### 1. Check Server is Up
+
+```bash
+curl -s http://localhost:8080/versions | python3 -m json.tool
+```
+
+### 2. List Graphs
+
+```bash
+curl -s -u admin:pa http://localhost:8080/graphspaces/DEFAULT/graphs | python3 -m json.tool
+```
+
+### 3. Create Property Keys
+
+Create multiple property keys for testing. Re-running with the same schema returns the existing definition.
+
+```bash
+# Text property
+curl -s -u admin:pa -X POST \
+  http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/schema/propertykeys \
+  -H 'Content-Type: application/json' \
+  -d '{
+    "name": "email",
+    "data_type": "TEXT",
+    "cardinality": "SINGLE",
+    "check_exist": false
+  }' | python3 -m json.tool
+
+# Numeric property
+curl -s -u admin:pa -X POST \
+  http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/schema/propertykeys \
+  -H 'Content-Type: application/json' \
+  -d '{
+    "name": "age",
+    "data_type": "INT",
+    "cardinality": "SINGLE",
+    "check_exist": false
+  }' | python3 -m json.tool
+```
+
+### 4. Create a Vertex Label
+
+```bash
+curl -s -u admin:pa -X POST \
+  http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/schema/vertexlabels \
+  -H 'Content-Type: application/json' \
+  -d '{
+    "name": "user",
+    "id_strategy": "PRIMARY_KEY",
+    "primary_keys": ["email"],
+    "properties": ["email", "age"],
+    "check_exist": false
+  }' | python3 -m json.tool
+```

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: upgrade HBase and replace custom hbase-shaded-endpint [hugegraph]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#issuecomment-4469382271

   The HBase upgrade direction looks reasonable, but I don't think this is ready to merge until the dependency/release-materials check and HBase runtime verification are completed.
   
   This PR replaces the old custom `hbase-shaded-endpoint:2.0.6` dependency with official Apache HBase 2.6.5 artifacts and adds several new/changed transitive jars in `known-dependencies.txt`:
   
   ```text
   hugegraph-hbase
           -> hbase-endpoint:2.6.5
           -> hbase-shaded-client:2.6.5
           -> hbase-client/common/zookeeper/protocol/... 2.6.5
           -> zookeeper 3.8.6
           -> other transitive jars
   ```
   
   For dependency changes, please also check the release-compliance materials and update them as needed, following the existing HugeGraph release-docs style:
   
   ```text
   install-dist/scripts/dependency/known-dependencies.txt
   install-dist/release-docs/LICENSE
   install-dist/release-docs/NOTICE
   install-dist/release-docs/licenses/*
   ```
   
   This does not necessarily mean adding large new LICENSE / NOTICE sections. The exact update should be based on the actual newly added or changed jars and their license/notice requirements, consistent with how this repo already records third-party dependencies. But we should not merge with only the dependency allowlist updated if the corresponding release materials still describe the old HBase 2.0.6 dependency set.
   
   Please also confirm the new HBase 2.6.5 runtime path with enough verification before merge. Since this PR adds a Dockerized HBase 2.6.5 environment, it would be helpful to include the exact commands/results used to verify that the new version works end to end, for example:
   
   ```text
   docker compose -f docker/hbase/docker-compose.hbase.yml build --no-cache hbase
   docker compose -f docker/hbase/docker-compose.hbase.yml up -d
   mvn clean install -pl hugegraph-server/hugegraph-hbase -am -DskipTests
   init HugeGraph with backend=hbase
   start HugeGraph server
   run schema + vertex + Gremlin sanity checks
   run count/aggregation path that depends on AggregationClient / LongColumnInterpreter
   ```
   
   In short:
   
   ```text
   Before merge:
     1. audit the new/changed HBase dependency set
     2. update release docs/licenses only where needed
     3. confirm the HBase 2.6.5 Docker/runtime verification is actually green
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: upgrade HBase and replace custom hbase-shaded-endpint [hugegraph]

Posted by "vaijosh (via GitHub)" <gi...@apache.org>.
vaijosh commented on PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#issuecomment-4479682220

   > confirm the HBase 2.6.5 Docker/runtime verification is actually green
   Many thanks @imbajin for the review and valuable suggestions! 
   
   I have updated the PR based on your feedback:
   
   1. **License & Notice Updates:** Updated the files under `release-docs/` (specifically `licenses/`, `NOTICE`, and `LICENSE`).
   2. **HBase 2.6.5 Verification:** Confirmed that the Docker/runtime verification is green and fully functional. I verified this via two methods:
      * **Manual Check:** Followed the steps outlined in `HBASE.md`.
      * **CI Pipeline Check:** Verified locally using the exact steps executed by the CI pipeline.
   
   I have attached the successful local API test execution logs for the reference.
   [api-test-execution.log](https://github.com/user-attachments/files/27967755/api-test-execution.log)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] 3016: [Improve] Upgrade HBase version and replace custom hbase-shaded-endpint with official artifacts #3016 [hugegraph]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#discussion_r3246647311


##########
install-dist/scripts/dependency/known-dependencies.txt:
##########
@@ -164,7 +164,8 @@ hamcrest-2.2.jar
 hamcrest-core-1.3.jar
 hanlp-portable-1.5.0.jar
 hanlp-portable-1.8.3.jar
-hbase-shaded-endpoint-2.0.6.jar
+hbase-endpoint-2.6.5.jar
+hbase-shaded-client-2.6.5.jar

Review Comment:
   The known-dependencies allowlist only adds `hbase-endpoint-2.6.5.jar` and `hbase-shaded-client-2.6.5.jar`, but moving from the single self-contained `hbase-shaded-endpoint-2.0.6.jar` to the official HBase 2.6.5 `hbase-endpoint` artifact pulls in a substantial set of transitive jars that were previously bundled (e.g. hbase-common, hbase-protocol, hbase-protocol-shaded, hbase-server, hbase-mapreduce, hbase-metrics, hbase-metrics-api, hbase-hadoop-compat, hbase-hadoop2-compat, hbase-zookeeper, hbase-shaded-miscellaneous, hbase-shaded-netty, hbase-shaded-protobuf, possibly hadoop-* even after exclusions). `check_dependencies.sh` will fail the build whenever an unlisted jar is produced. Please run the dependency check after a full build and add every newly introduced jar (and remove any 2.0.6-era entries that are no longer pulled in) to keep the allowlist consistent.



##########
docker/HBASE.md:
##########
@@ -0,0 +1,425 @@
+# HBase Backend Testing with Docker
+
+This guide explains how to start HBase locally with Docker, verify it is working, and validate HugeGraph API operations.
+
+> **All commands in this guide should be run from the repository root** unless otherwise noted.
+
+> **Recent path change**: The HBase compose file moved from `docker/docker-compose.hbase.yml` to `docker/hbase/docker-compose.hbase.yml`. If you have older shell history/scripts, update `-f` accordingly.
+
+> **Security note**: The HBase Docker build enforces SHA512 verification by default and fails when checksum download/parsing/validation fails. Only use `--build-arg ALLOW_UNVERIFIED_DOWNLOAD=true` for trusted test environments with restricted networks.
+
+---
+
+## Quick Start
+
+### 0. (Optional) Clean Up Leftover HBase Tables

Review Comment:
   Step 0 is titled "(Optional) Clean Up Leftover HBase Tables" but the command underneath is `docker compose ... build --no-cache hbase`, which actually builds the image — it does nothing related to cleaning up tables. The same "Clean Up Leftover HBase Tables" title is reused (correctly this time) for Step 3 at line 36. Step 0's title should be changed (e.g. "Build the HBase Image") to match what its command actually does; otherwise readers will be misled.
   



##########
hugegraph-server/hugegraph-hbase/pom.xml:
##########
@@ -27,24 +27,49 @@
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>hugegraph-hbase</artifactId>
-
+    <properties>
+        <hbase.version>2.6.5</hbase.version>
+    </properties>
     <dependencies>
         <dependency>
             <groupId>org.apache.hugegraph</groupId>
             <artifactId>hugegraph-core</artifactId>
             <version>${revision}</version>
         </dependency>
+        <!--
+            hbase-endpoint must come before hbase-shaded-client so that the
+            unshaded LongColumnInterpreter (using com.google.protobuf) is on
+            the classpath ahead of the shaded variant, allowing AggregationClient
+            rowCount() generic bounds to resolve correctly.
+        -->
         <dependency>
-            <groupId>com.baidu.hugegraph</groupId>
-            <artifactId>hbase-shaded-endpoint</artifactId>
-            <version>2.0.6</version>
+            <groupId>org.apache.hbase</groupId>
+            <artifactId>hbase-endpoint</artifactId>
+            <version>${hbase.version}</version>
             <exclusions>
                 <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
+                    <groupId>org.apache.hbase</groupId>
+                    <artifactId>hbase-server</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-common</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-hdfs</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-mapreduce-client-core</artifactId>
                 </exclusion>
             </exclusions>

Review Comment:
   `hbase-endpoint` at 2.6.5 transitively depends on `hbase-server` (it contains coprocessor implementations such as `AggregateImplementation` which the HugeGraph CountSession registers via `COPROCESSOR_AGGR`). Excluding `hbase-server` here may remove the very classes the endpoint relies on at runtime, and will also strip dependent classes used by `AggregationClient`. Please verify that the count/aggregation code path still works against a live HBase cluster after this exclusion (the current PR description only mentions schema/vertex/gremlin sanity checks, not aggregation/count operations). If `hbase-server` is required, remove the exclusion and instead exclude only the specific heavyweight transitives you want to drop.



##########
docker/hbase/entrypoint.sh:
##########
@@ -0,0 +1,57 @@
+#!/bin/bash
+#
+# 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.
+#
+set -e
+
+echo "Starting HBase ${HBASE_VERSION} standalone..."
+
+# Start services explicitly to avoid SSH-based helper assumptions in containers
+${HBASE_HOME}/bin/hbase-daemon.sh start zookeeper
+${HBASE_HOME}/bin/hbase-daemon.sh start master
+${HBASE_HOME}/bin/hbase-daemon.sh start regionserver
+
+echo "HBase started. Waiting for ZooKeeper on port 2181..."
+zk_attempts=0
+until nc -z localhost 2181; do
+    zk_attempts=$((zk_attempts + 1))
+    if [ "$zk_attempts" -ge 120 ]; then
+        echo "Timed out waiting for ZooKeeper on 2181"
+        ${HBASE_HOME}/bin/hbase-daemon.sh status || true
+        exit 1
+    fi
+    sleep 1
+done
+echo "ZooKeeper is ready."
+
+echo "Waiting for HBase Master..."
+master_attempts=0
+until echo "status 'simple'" | ${HBASE_HOME}/bin/hbase shell -n 2>/dev/null | grep -E -q "([1-9][0-9]*[[:space:]]+live[[:space:]]+servers|[1-9][0-9]*[[:space:]]+servers|servers:[[:space:]]*[1-9])"; do
+    master_attempts=$((master_attempts + 1))
+    if [ "$master_attempts" -ge 180 ]; then
+        echo "Timed out waiting for HBase master/regionserver readiness"
+        ${HBASE_HOME}/bin/hbase-daemon.sh status || true
+        tail -n 80 ${HBASE_HOME}/logs/hbase--*.out 2>/dev/null || true
+        exit 1
+    fi
+    sleep 3
+done
+echo "HBase is ready. Master + RegionServer online."
+
+# Tail all daemon logs so `docker logs` includes startup/runtime issues
+exec tail -F ${HBASE_HOME}/logs/hbase--*.out ${HBASE_HOME}/logs/hbase--*.log 2>/dev/null || \
+     tail -f /dev/null

Review Comment:
   `exec tail -F ... 2>/dev/null || tail -f /dev/null` doesn't actually provide the intended fallback: once `exec` replaces the shell with `tail`, the `||` branch can never run (the shell is gone). If the primary `tail` exits non-zero (e.g. because the glob expands to no files and tail treats the literal name as missing), the container will exit instead of falling back to `tail -f /dev/null`. Either drop the `exec` so the `||` works, or explicitly check that files exist first.
   



##########
docker/hbase/Dockerfile:
##########
@@ -0,0 +1,101 @@
+# 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.
+#
+# Standalone HBase 2.6.5 image for HugeGraph HBase backend testing.
+# Exposes ZooKeeper on 2181 with znode /hbase (matching hugegraph.properties defaults).
+
+FROM eclipse-temurin:11-jre-jammy
+
+ARG HBASE_VERSION=2.6.5
+ARG HBASE_PRIMARY_URL=https://downloads.apache.org/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz

Review Comment:
   `downloads.apache.org` only hosts the *currently active* releases. As soon as HBase 2.6.5 is superseded by a newer patch release, the primary URL will return 404 and every Docker build will incur the fallback to `archive.apache.org`. This is functional but slow and noisy. Consider either using `archive.apache.org` as the primary (it's stable for all historical versions) or documenting that the primary URL is expected to break over time.
   



##########
docker/hbase/Dockerfile:
##########
@@ -0,0 +1,101 @@
+# 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.
+#
+# Standalone HBase 2.6.5 image for HugeGraph HBase backend testing.
+# Exposes ZooKeeper on 2181 with znode /hbase (matching hugegraph.properties defaults).
+
+FROM eclipse-temurin:11-jre-jammy
+
+ARG HBASE_VERSION=2.6.5
+ARG HBASE_PRIMARY_URL=https://downloads.apache.org/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz
+ARG HBASE_FALLBACK_URL=https://archive.apache.org/dist/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz
+ARG ALLOW_UNVERIFIED_DOWNLOAD=false
+
+ENV HBASE_VERSION=${HBASE_VERSION}
+ENV HBASE_HOME=/opt/hbase
+ENV PATH=${HBASE_HOME}/bin:${PATH}
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+        curl \
+        netcat-openbsd \
+    && rm -rf /var/lib/apt/lists/*
+
+RUN set -eux; \
+    download_ok=0; \
+    for url in "${HBASE_PRIMARY_URL}" "${HBASE_FALLBACK_URL}"; do \
+        [ -n "${url}" ] || continue; \
+        echo "Downloading HBase from ${url}"; \
+        if curl -fL --retry 8 --retry-delay 5 --retry-all-errors \
+                --connect-timeout 30 --max-time 1800 "${url}" -o /tmp/hbase.tar.gz; then \
+            download_ok=1; \
+            break; \
+        fi; \
+        echo "Download failed for ${url}, trying next source..."; \
+        rm -f /tmp/hbase.tar.gz; \
+    done; \
+    if [ "${download_ok}" -ne 1 ]; then \
+        echo "Unable to download HBase ${HBASE_VERSION} tarball from configured sources"; \
+        exit 1; \
+    fi; \
+    if curl -fL --retry 5 --retry-delay 3 --retry-all-errors \
+            --connect-timeout 30 "${HBASE_PRIMARY_URL}.sha512" -o /tmp/hbase.tar.gz.sha512 2>/dev/null || \
+       curl -fL --retry 5 --retry-delay 3 --retry-all-errors \
+            --connect-timeout 30 "${HBASE_FALLBACK_URL}.sha512" -o /tmp/hbase.tar.gz.sha512 2>/dev/null; then \
+        echo "Verifying SHA512 checksum..."; \
+        expected_hash=$(grep -Eio '[a-f0-9]{128}' /tmp/hbase.tar.gz.sha512 | head -n 1 | tr 'A-F' 'a-f' || true); \
+        if [ -z "$expected_hash" ]; then \
+            expected_hash=$(awk '{for (i = 1; i <= NF; i++) if ($i ~ /^[0-9A-Fa-f]+$/) hash = hash $i} END {if (length(hash) >= 128) print tolower(substr(hash, 1, 128))}' /tmp/hbase.tar.gz.sha512 || true); \

Review Comment:
   The awk fallback that builds `hash` by concatenating every hex-looking token in the file can produce an incorrect 128-char string when the `.sha512` is in Apache's grouped format (e.g. `hbase-2.6.5-bin.tar.gz: 6F09 1234 ABCD ... 5678`). The filename token `hbase-2.6.5-bin.tar.gz:` contains substrings that match `[0-9A-Fa-f]+` (e.g. `2`, `6`, `5`, `bin`), and `awk` will concatenate those onto the hash, shifting all subsequent bytes and producing a hash that is wrong (or rejected by the `length >= 128` check by coincidence). Restrict the regex to hex-only tokens of a minimum length (e.g. `length($i) >= 8 && $i ~ /^[0-9A-Fa-f]+$/`) and/or skip the first token (the filename).
   



##########
docker/hbase/Dockerfile:
##########
@@ -0,0 +1,101 @@
+# 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.
+#
+# Standalone HBase 2.6.5 image for HugeGraph HBase backend testing.
+# Exposes ZooKeeper on 2181 with znode /hbase (matching hugegraph.properties defaults).
+
+FROM eclipse-temurin:11-jre-jammy
+
+ARG HBASE_VERSION=2.6.5
+ARG HBASE_PRIMARY_URL=https://downloads.apache.org/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz
+ARG HBASE_FALLBACK_URL=https://archive.apache.org/dist/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz
+ARG ALLOW_UNVERIFIED_DOWNLOAD=false
+
+ENV HBASE_VERSION=${HBASE_VERSION}
+ENV HBASE_HOME=/opt/hbase
+ENV PATH=${HBASE_HOME}/bin:${PATH}
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+        curl \
+        netcat-openbsd \
+    && rm -rf /var/lib/apt/lists/*
+
+RUN set -eux; \
+    download_ok=0; \
+    for url in "${HBASE_PRIMARY_URL}" "${HBASE_FALLBACK_URL}"; do \
+        [ -n "${url}" ] || continue; \
+        echo "Downloading HBase from ${url}"; \
+        if curl -fL --retry 8 --retry-delay 5 --retry-all-errors \
+                --connect-timeout 30 --max-time 1800 "${url}" -o /tmp/hbase.tar.gz; then \
+            download_ok=1; \
+            break; \
+        fi; \
+        echo "Download failed for ${url}, trying next source..."; \
+        rm -f /tmp/hbase.tar.gz; \
+    done; \
+    if [ "${download_ok}" -ne 1 ]; then \
+        echo "Unable to download HBase ${HBASE_VERSION} tarball from configured sources"; \
+        exit 1; \
+    fi; \
+    if curl -fL --retry 5 --retry-delay 3 --retry-all-errors \
+            --connect-timeout 30 "${HBASE_PRIMARY_URL}.sha512" -o /tmp/hbase.tar.gz.sha512 2>/dev/null || \
+       curl -fL --retry 5 --retry-delay 3 --retry-all-errors \
+            --connect-timeout 30 "${HBASE_FALLBACK_URL}.sha512" -o /tmp/hbase.tar.gz.sha512 2>/dev/null; then \
+        echo "Verifying SHA512 checksum..."; \

Review Comment:
   The checksum download only attempts `${HBASE_PRIMARY_URL}.sha512` and `${HBASE_FALLBACK_URL}.sha512`, but the tarball download loop iterates over both URLs. If the primary tarball download succeeds and the primary `.sha512` 404s (e.g. when the user supplied a corporate-mirror `HBASE_PRIMARY_URL` that doesn't host `.sha512`), the fallback `.sha512` from `archive.apache.org` may correspond to the same artifact and verify OK — but if a user overrides `HBASE_PRIMARY_URL` to a non-Apache mirror, both `.sha512` requests can succeed for the wrong checksum or both fail and the build aborts (default). Consider downloading the checksum from the same URL the tarball actually came from, and document that custom mirrors must host the matching `.sha512`.



##########
hugegraph-server/hugegraph-hbase/pom.xml:
##########
@@ -27,24 +27,49 @@
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>hugegraph-hbase</artifactId>
-
+    <properties>
+        <hbase.version>2.6.5</hbase.version>
+    </properties>
     <dependencies>
         <dependency>
             <groupId>org.apache.hugegraph</groupId>
             <artifactId>hugegraph-core</artifactId>
             <version>${revision}</version>
         </dependency>
+        <!--
+            hbase-endpoint must come before hbase-shaded-client so that the
+            unshaded LongColumnInterpreter (using com.google.protobuf) is on
+            the classpath ahead of the shaded variant, allowing AggregationClient
+            rowCount() generic bounds to resolve correctly.
+        -->
         <dependency>
-            <groupId>com.baidu.hugegraph</groupId>
-            <artifactId>hbase-shaded-endpoint</artifactId>
-            <version>2.0.6</version>
+            <groupId>org.apache.hbase</groupId>
+            <artifactId>hbase-endpoint</artifactId>
+            <version>${hbase.version}</version>
             <exclusions>
                 <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
+                    <groupId>org.apache.hbase</groupId>
+                    <artifactId>hbase-server</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-common</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-hdfs</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-mapreduce-client-core</artifactId>
                 </exclusion>
             </exclusions>

Review Comment:
   The PR title and description state that the dependency exclusions on `hbase-endpoint` are designed to "avoid pulling heavyweight server/hadoop transitive components not needed by HugeGraph runtime", but the comment on lines 39-44 explains a completely different rationale (ordering relative to `hbase-shaded-client` so the unshaded `LongColumnInterpreter` resolves). These two motivations are independent and only the latter is captured in code comments. Please also document why `hbase-server` is being excluded despite `hbase-endpoint` typically depending on it, so future maintainers don't accidentally re-add it and break the runtime classpath assumptions.



##########
hugegraph-server/hugegraph-hbase/pom.xml:
##########
@@ -27,24 +27,49 @@
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>hugegraph-hbase</artifactId>
-
+    <properties>
+        <hbase.version>2.6.5</hbase.version>
+    </properties>
     <dependencies>
         <dependency>
             <groupId>org.apache.hugegraph</groupId>
             <artifactId>hugegraph-core</artifactId>
             <version>${revision}</version>
         </dependency>
+        <!--
+            hbase-endpoint must come before hbase-shaded-client so that the
+            unshaded LongColumnInterpreter (using com.google.protobuf) is on
+            the classpath ahead of the shaded variant, allowing AggregationClient
+            rowCount() generic bounds to resolve correctly.
+        -->
         <dependency>
-            <groupId>com.baidu.hugegraph</groupId>
-            <artifactId>hbase-shaded-endpoint</artifactId>
-            <version>2.0.6</version>
+            <groupId>org.apache.hbase</groupId>
+            <artifactId>hbase-endpoint</artifactId>
+            <version>${hbase.version}</version>
             <exclusions>
                 <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
+                    <groupId>org.apache.hbase</groupId>
+                    <artifactId>hbase-server</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-common</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-hdfs</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.hadoop</groupId>
+                    <artifactId>hadoop-mapreduce-client-core</artifactId>
                 </exclusion>

Review Comment:
   The previous dependency excluded `log4j:log4j` to avoid pulling the vulnerable Log4j 1.x into the runtime classpath. The new `hbase-endpoint`/`hbase-server` chain still transitively brings in log4j (HBase 2.6.x bundles log4j 1.2.x via slf4j-log4j12 / log4j-over-slf4j shims depending on profile). Please re-add the `log4j:log4j` (and consider `log4j:apache-log4j-extras`, `org.slf4j:slf4j-log4j12`) exclusions on the new `hbase-endpoint` dependency, or confirm via `mvn dependency:tree` that no log4j 1.x artifact is reintroduced.
   



##########
docker/hbase/entrypoint.sh:
##########
@@ -0,0 +1,57 @@
+#!/bin/bash
+#
+# 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.
+#
+set -e
+
+echo "Starting HBase ${HBASE_VERSION} standalone..."
+
+# Start services explicitly to avoid SSH-based helper assumptions in containers
+${HBASE_HOME}/bin/hbase-daemon.sh start zookeeper
+${HBASE_HOME}/bin/hbase-daemon.sh start master
+${HBASE_HOME}/bin/hbase-daemon.sh start regionserver
+
+echo "HBase started. Waiting for ZooKeeper on port 2181..."
+zk_attempts=0
+until nc -z localhost 2181; do
+    zk_attempts=$((zk_attempts + 1))
+    if [ "$zk_attempts" -ge 120 ]; then
+        echo "Timed out waiting for ZooKeeper on 2181"
+        ${HBASE_HOME}/bin/hbase-daemon.sh status || true
+        exit 1
+    fi
+    sleep 1
+done
+echo "ZooKeeper is ready."
+
+echo "Waiting for HBase Master..."
+master_attempts=0
+until echo "status 'simple'" | ${HBASE_HOME}/bin/hbase shell -n 2>/dev/null | grep -E -q "([1-9][0-9]*[[:space:]]+live[[:space:]]+servers|[1-9][0-9]*[[:space:]]+servers|servers:[[:space:]]*[1-9])"; do
+    master_attempts=$((master_attempts + 1))
+    if [ "$master_attempts" -ge 180 ]; then
+        echo "Timed out waiting for HBase master/regionserver readiness"
+        ${HBASE_HOME}/bin/hbase-daemon.sh status || true
+        tail -n 80 ${HBASE_HOME}/logs/hbase--*.out 2>/dev/null || true
+        exit 1
+    fi
+    sleep 3
+done
+echo "HBase is ready. Master + RegionServer online."
+
+# Tail all daemon logs so `docker logs` includes startup/runtime issues
+exec tail -F ${HBASE_HOME}/logs/hbase--*.out ${HBASE_HOME}/logs/hbase--*.log 2>/dev/null || \
+     tail -f /dev/null

Review Comment:
   The tail glob `${HBASE_HOME}/logs/hbase--*.out` (and similarly `hbase--*.log`) contains a double dash, which only matches log files where `HBASE_IDENT_STRING` is empty. HBase's daemon scripts default `HBASE_IDENT_STRING` to `$USER`, so when the container runs as root the actual log filenames are `hbase-root-master-*.log` / `hbase-root-regionserver-*.log` and the glob will not match. The command then silently falls back to `tail -f /dev/null`, meaning `docker logs` will not include any HBase runtime output — defeating the purpose of this step. Use a glob like `${HBASE_HOME}/logs/hbase-*.log` (single dash) or explicitly set `HBASE_IDENT_STRING=""` before starting the daemons.



##########
docker/hbase/hbase-site.xml:
##########
@@ -0,0 +1,89 @@
+<?xml version="1.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.
+  -->
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<configuration>
+    <!-- Standalone mode: use local filesystem -->
+    <property>
+        <name>hbase.rootdir</name>
+        <value>/tmp/hbase</value>
+    </property>
+    <!-- Embedded ZooKeeper data directory -->
+    <property>
+        <name>hbase.zookeeper.property.dataDir</name>
+        <value>/tmp/zookeeper</value>
+    </property>

Review Comment:
   `hbase.rootdir` is set to `/tmp/hbase` (and ZooKeeper data to `/tmp/zookeeper`). In standalone/pseudo-distributed HBase, `hbase.rootdir` is interpreted with the default filesystem scheme — for a path without a scheme this typically resolves to HDFS in a Hadoop install, and to `file:///tmp/hbase` in a no-Hadoop install. Relying on this implicit scheme is fragile. Please use an explicit `file:///tmp/hbase` value (and `file:///tmp/zookeeper` is unnecessary because that path is ZooKeeper-local) to ensure HBase boots in local-FS mode regardless of the environment. Also, `/tmp` is regularly cleaned by some distros/CI; the compose volume mount mitigates that on the host, but documenting the choice (or using `/var/lib/hbase`) would be safer.



##########
docker/hbase/Dockerfile:
##########
@@ -0,0 +1,101 @@
+# 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.
+#
+# Standalone HBase 2.6.5 image for HugeGraph HBase backend testing.
+# Exposes ZooKeeper on 2181 with znode /hbase (matching hugegraph.properties defaults).
+
+FROM eclipse-temurin:11-jre-jammy
+
+ARG HBASE_VERSION=2.6.5
+ARG HBASE_PRIMARY_URL=https://downloads.apache.org/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz
+ARG HBASE_FALLBACK_URL=https://archive.apache.org/dist/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz
+ARG ALLOW_UNVERIFIED_DOWNLOAD=false
+
+ENV HBASE_VERSION=${HBASE_VERSION}
+ENV HBASE_HOME=/opt/hbase
+ENV PATH=${HBASE_HOME}/bin:${PATH}
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+        curl \
+        netcat-openbsd \
+    && rm -rf /var/lib/apt/lists/*
+
+RUN set -eux; \
+    download_ok=0; \
+    for url in "${HBASE_PRIMARY_URL}" "${HBASE_FALLBACK_URL}"; do \
+        [ -n "${url}" ] || continue; \
+        echo "Downloading HBase from ${url}"; \
+        if curl -fL --retry 8 --retry-delay 5 --retry-all-errors \
+                --connect-timeout 30 --max-time 1800 "${url}" -o /tmp/hbase.tar.gz; then \
+            download_ok=1; \
+            break; \
+        fi; \
+        echo "Download failed for ${url}, trying next source..."; \
+        rm -f /tmp/hbase.tar.gz; \
+    done; \
+    if [ "${download_ok}" -ne 1 ]; then \
+        echo "Unable to download HBase ${HBASE_VERSION} tarball from configured sources"; \
+        exit 1; \
+    fi; \
+    if curl -fL --retry 5 --retry-delay 3 --retry-all-errors \
+            --connect-timeout 30 "${HBASE_PRIMARY_URL}.sha512" -o /tmp/hbase.tar.gz.sha512 2>/dev/null || \
+       curl -fL --retry 5 --retry-delay 3 --retry-all-errors \
+            --connect-timeout 30 "${HBASE_FALLBACK_URL}.sha512" -o /tmp/hbase.tar.gz.sha512 2>/dev/null; then \
+        echo "Verifying SHA512 checksum..."; \
+        expected_hash=$(grep -Eio '[a-f0-9]{128}' /tmp/hbase.tar.gz.sha512 | head -n 1 | tr 'A-F' 'a-f' || true); \
+        if [ -z "$expected_hash" ]; then \
+            expected_hash=$(awk '{for (i = 1; i <= NF; i++) if ($i ~ /^[0-9A-Fa-f]+$/) hash = hash $i} END {if (length(hash) >= 128) print tolower(substr(hash, 1, 128))}' /tmp/hbase.tar.gz.sha512 || true); \
+        fi; \
+        if [ -n "$expected_hash" ]; then \
+            actual_hash=$(sha512sum /tmp/hbase.tar.gz | awk '{print $1}'); \
+            if [ "$expected_hash" = "$actual_hash" ]; then \
+                echo "SHA512 verified OK"; \
+            else \
+                echo "ERROR: SHA512 mismatch"; \
+                echo "  Expected: $expected_hash"; \
+                echo "  Actual:   $actual_hash"; \
+                exit 1; \
+            fi; \
+        else \
+            if [ "${ALLOW_UNVERIFIED_DOWNLOAD}" = "true" ]; then \
+                echo "WARNING: Could not parse SHA512 file (ALLOW_UNVERIFIED_DOWNLOAD=true)"; \
+            else \
+                echo "ERROR: Could not parse SHA512 file"; \
+                exit 1; \
+            fi; \
+        fi; \
+    else \
+        if [ "${ALLOW_UNVERIFIED_DOWNLOAD}" = "true" ]; then \
+            echo "WARNING: Could not download SHA512 file (ALLOW_UNVERIFIED_DOWNLOAD=true)"; \
+        else \
+            echo "ERROR: Could not download SHA512 file"; \
+            exit 1; \
+        fi; \
+    fi; \
+    tar -xzf /tmp/hbase.tar.gz -C /opt; \
+    mv /opt/hbase-${HBASE_VERSION} ${HBASE_HOME}; \
+    rm -f /tmp/hbase.tar.gz /tmp/hbase.tar.gz.sha512 /tmp/hbase.sha512

Review Comment:
   `rm -f /tmp/hbase.sha512` at the end of the RUN references a path that is never created — the file is downloaded to `/tmp/hbase.tar.gz.sha512`. Harmless, but should be removed to avoid confusion.



##########
docker/HBASE.md:
##########
@@ -0,0 +1,425 @@
+# HBase Backend Testing with Docker
+
+This guide explains how to start HBase locally with Docker, verify it is working, and validate HugeGraph API operations.
+
+> **All commands in this guide should be run from the repository root** unless otherwise noted.
+
+> **Recent path change**: The HBase compose file moved from `docker/docker-compose.hbase.yml` to `docker/hbase/docker-compose.hbase.yml`. If you have older shell history/scripts, update `-f` accordingly.
+
+> **Security note**: The HBase Docker build enforces SHA512 verification by default and fails when checksum download/parsing/validation fails. Only use `--build-arg ALLOW_UNVERIFIED_DOWNLOAD=true` for trusted test environments with restricted networks.
+
+---
+
+## Quick Start
+
+### 0. (Optional) Clean Up Leftover HBase Tables
+```bash
+docker compose -f docker/hbase/docker-compose.hbase.yml build --no-cache hbase
+```
+
+### 1. Start HBase with Docker
+
+```bash
+docker compose -f docker/hbase/docker-compose.hbase.yml up -d
+```
+
+### 2. Wait for HBase to be Ready (~2 minutes)
+
+```bash
+# Check ZooKeeper connectivity
+nc -z localhost 2181 && echo "Ready" || echo "Not ready"
+
+# Or watch the logs
+docker compose -f docker/hbase/docker-compose.hbase.yml logs
+```
+
+### 3. (Optional) Clean Up Leftover HBase Tables
+
+For reruns, drop any leftover HugeGraph tables after the container is up:
+
+```bash
+docker exec hg-hbase-test bash -c '
+  for t in $(echo "list" | hbase shell -n 2>/dev/null | grep "^default_hugegraph"); do
+    echo "disable '"'"'$t'"'"'; drop '"'"'$t'"'"'"
+  done | hbase shell
+'
+```
+
+Verify tables are gone before proceeding:
+
+```bash
+docker exec hg-hbase-test bash -lc "echo 'list' | hbase shell -n"
+# Expected: TABLE (empty), 0 row(s)
+```
+
+
+### 4. Configure and Init the HugeGraph Server (required for API tests)
+
+> This step is only needed for HugeGraph API sanity checks.
+
+> **Prerequisite**: Run `mvn clean package -DskipTests` from the repository root to generate the distribution. This creates an `apache-hugegraph-<version>/` directory with all necessary binaries and configs.
+
+Set backend to HBase in the server config:
+
+```bash
+SERVER_DIR="$(find . -maxdepth 3 -type d -path './apache-hugegraph-*/apache-hugegraph-server-*' | head -n 1)"
+SERVER_DIR="${SERVER_DIR#./}"
+[ -n "$SERVER_DIR" ] || { echo "HugeGraph server runtime not found. Run mvn clean package -DskipTests first."; exit 1; }
+CONF="$SERVER_DIR/conf/graphs/hugegraph.properties"
+
+# Switch backend to hbase
+perl -pi -e 's/^backend=.*/backend=hbase/'     "$CONF"
+perl -pi -e 's/^serializer=.*/serializer=hbase/' "$CONF"
+
+# Uncomment HBase connection settings
+perl -pi -e 's/^#(hbase\.hosts=.*)/$1/'        "$CONF"
+perl -pi -e 's/^#(hbase\.port=.*)/$1/'         "$CONF"
+perl -pi -e 's/^#(hbase\.znode_parent=.*)/$1/' "$CONF"
+```
+
+Initialize HBase tables and start the server:
+
+```bash
+printf 'pa\npa\n' | "$SERVER_DIR/bin/init-store.sh"
+"$SERVER_DIR/bin/start-hugegraph.sh" -t 60
+```
+
+After `init-store.sh`, you can verify the tables were created:
+
+```bash
+docker exec hg-hbase-test bash -lc "echo 'list' | hbase shell -n"
+```
+
+---
+
+## Docker Compose Services
+
+### HBase Container
+
+- **Image**: `hugegraph/hbase:2.6.5`
+- **Container Name**: `hg-hbase-test`
+- **Hostname**: `hbase`
+- **Ports**:
+  - `2181` - ZooKeeper (embedded)
+  - `16000` - HBase Master RPC
+  - `16010` - HBase Master Web UI (http://localhost:16010)
+  - `16020` - HBase RegionServer RPC
+  - `16030` - HBase RegionServer Web UI (http://localhost:16030)
+- **Health Check**: ZooKeeper connectivity on port 2181
+- **Startup Time**: ~90-120 seconds
+
+---
+
+## Manual Verification
+
+### 1. Check Container is Healthy
+
+```bash
+docker compose -f docker/hbase/docker-compose.hbase.yml ps
+docker logs hg-hbase-test | tail -50
+```
+
+### 2. Check ZooKeeper Connectivity
+
+```bash
+# From host machine
+nc -z localhost 2181 && echo "ZooKeeper OK" || echo "ZooKeeper not ready"
+
+# From inside the container
+docker exec hg-hbase-test nc -z localhost 2181 && echo "Ready" || echo "Not ready"
+```
+
+### 3. Check HBase Master and RegionServer Web UIs
+
+```bash
+# HBase Master Web UI (should return HTML)
+curl -s http://localhost:16010 | head -20
+
+# RegionServer Web UI
+curl -s http://localhost:16030 | head -20
+
+# Or open in browser
+open http://localhost:16010
+```
+
+### 4. Verify HBase Tables via Shell
+
+```bash
+# List all tables (should show HugeGraph tables after init-store)
+docker exec hg-hbase-test bash -lc "echo 'list' | hbase shell -n"
+
+# Check a specific table exists (example: after backend init)
+docker exec hg-hbase-test bash -lc 'echo "describe '"'"'default_hugegraph:g_v'"'"'" | hbase shell -n'
+```
+
+### 5. Verify HBase Logs for Errors
+
+```bash
+# Check for any ERROR lines in HBase logs
+docker exec hg-hbase-test bash -lc "grep -i error /opt/hbase/logs/*.log | tail -20"
+
+# Tail live logs (run from repo root)
+docker compose -f docker/hbase/docker-compose.hbase.yml logs
+```
+
+> **Known benign messages** — these are safe to ignore in standalone mode:
+> - `SASL config status: Will not attempt to authenticate using SASL (unknown error)` — ZooKeeper SASL is not configured; standalone HBase does not need it.
+> - `Invalid configuration, only one server specified (ignoring)` — expected when running a single-node ZooKeeper.
+> - `NoClassDefFoundError: org/eclipse/jetty/...` — Jetty UI dependency missing in the container; does not affect HBase or ZooKeeper functionality.
+
+---
+
+## Manual API Sanity (curl)
+
+These steps assume the HugeGraph server is running at `http://localhost:8080` with auth enabled (`admin/pa`).
+
+> **Note on Idempotency**: Schema creation calls below use `"check_exist": false`. Re-running is safe only when the submitted schema definition matches the existing one. If definitions conflict, HugeGraph returns `ExistedException`.

Review Comment:
   The "Note on Idempotency" claims schema creation calls below use `"check_exist": false`, and describes the resulting behavior as: "Re-running is safe only when the submitted schema definition matches the existing one. If definitions conflict, HugeGraph returns `ExistedException`." That is the opposite of what `check_exist=false` does in HugeGraph: it asks the server to *skip the existence check* (and thus tolerate re-submission silently / let it overwrite or throw on collision differently). The wording should be reviewed against actual server behavior — as written, the doc gives the false impression that `check_exist:false` is what triggers `ExistedException` on mismatch, which can confuse first-time users.
   



##########
docker/HBASE.md:
##########
@@ -0,0 +1,425 @@
+# HBase Backend Testing with Docker
+
+This guide explains how to start HBase locally with Docker, verify it is working, and validate HugeGraph API operations.
+
+> **All commands in this guide should be run from the repository root** unless otherwise noted.
+
+> **Recent path change**: The HBase compose file moved from `docker/docker-compose.hbase.yml` to `docker/hbase/docker-compose.hbase.yml`. If you have older shell history/scripts, update `-f` accordingly.
+
+> **Security note**: The HBase Docker build enforces SHA512 verification by default and fails when checksum download/parsing/validation fails. Only use `--build-arg ALLOW_UNVERIFIED_DOWNLOAD=true` for trusted test environments with restricted networks.
+
+---
+
+## Quick Start
+
+### 0. (Optional) Clean Up Leftover HBase Tables
+```bash
+docker compose -f docker/hbase/docker-compose.hbase.yml build --no-cache hbase
+```
+
+### 1. Start HBase with Docker
+
+```bash
+docker compose -f docker/hbase/docker-compose.hbase.yml up -d
+```
+
+### 2. Wait for HBase to be Ready (~2 minutes)
+
+```bash
+# Check ZooKeeper connectivity
+nc -z localhost 2181 && echo "Ready" || echo "Not ready"
+
+# Or watch the logs
+docker compose -f docker/hbase/docker-compose.hbase.yml logs
+```
+
+### 3. (Optional) Clean Up Leftover HBase Tables
+
+For reruns, drop any leftover HugeGraph tables after the container is up:
+
+```bash
+docker exec hg-hbase-test bash -c '
+  for t in $(echo "list" | hbase shell -n 2>/dev/null | grep "^default_hugegraph"); do
+    echo "disable '"'"'$t'"'"'; drop '"'"'$t'"'"'"
+  done | hbase shell
+'
+```
+
+Verify tables are gone before proceeding:
+
+```bash
+docker exec hg-hbase-test bash -lc "echo 'list' | hbase shell -n"
+# Expected: TABLE (empty), 0 row(s)
+```
+
+
+### 4. Configure and Init the HugeGraph Server (required for API tests)
+
+> This step is only needed for HugeGraph API sanity checks.
+
+> **Prerequisite**: Run `mvn clean package -DskipTests` from the repository root to generate the distribution. This creates an `apache-hugegraph-<version>/` directory with all necessary binaries and configs.
+
+Set backend to HBase in the server config:
+
+```bash
+SERVER_DIR="$(find . -maxdepth 3 -type d -path './apache-hugegraph-*/apache-hugegraph-server-*' | head -n 1)"
+SERVER_DIR="${SERVER_DIR#./}"
+[ -n "$SERVER_DIR" ] || { echo "HugeGraph server runtime not found. Run mvn clean package -DskipTests first."; exit 1; }
+CONF="$SERVER_DIR/conf/graphs/hugegraph.properties"
+
+# Switch backend to hbase
+perl -pi -e 's/^backend=.*/backend=hbase/'     "$CONF"
+perl -pi -e 's/^serializer=.*/serializer=hbase/' "$CONF"
+
+# Uncomment HBase connection settings
+perl -pi -e 's/^#(hbase\.hosts=.*)/$1/'        "$CONF"
+perl -pi -e 's/^#(hbase\.port=.*)/$1/'         "$CONF"
+perl -pi -e 's/^#(hbase\.znode_parent=.*)/$1/' "$CONF"
+```
+
+Initialize HBase tables and start the server:
+
+```bash
+printf 'pa\npa\n' | "$SERVER_DIR/bin/init-store.sh"
+"$SERVER_DIR/bin/start-hugegraph.sh" -t 60
+```
+
+After `init-store.sh`, you can verify the tables were created:
+
+```bash
+docker exec hg-hbase-test bash -lc "echo 'list' | hbase shell -n"
+```
+
+---
+
+## Docker Compose Services
+
+### HBase Container
+
+- **Image**: `hugegraph/hbase:2.6.5`
+- **Container Name**: `hg-hbase-test`
+- **Hostname**: `hbase`
+- **Ports**:
+  - `2181` - ZooKeeper (embedded)
+  - `16000` - HBase Master RPC
+  - `16010` - HBase Master Web UI (http://localhost:16010)
+  - `16020` - HBase RegionServer RPC
+  - `16030` - HBase RegionServer Web UI (http://localhost:16030)
+- **Health Check**: ZooKeeper connectivity on port 2181
+- **Startup Time**: ~90-120 seconds
+
+---
+
+## Manual Verification
+
+### 1. Check Container is Healthy
+
+```bash
+docker compose -f docker/hbase/docker-compose.hbase.yml ps
+docker logs hg-hbase-test | tail -50
+```
+
+### 2. Check ZooKeeper Connectivity
+
+```bash
+# From host machine
+nc -z localhost 2181 && echo "ZooKeeper OK" || echo "ZooKeeper not ready"
+
+# From inside the container
+docker exec hg-hbase-test nc -z localhost 2181 && echo "Ready" || echo "Not ready"
+```
+
+### 3. Check HBase Master and RegionServer Web UIs
+
+```bash
+# HBase Master Web UI (should return HTML)
+curl -s http://localhost:16010 | head -20
+
+# RegionServer Web UI
+curl -s http://localhost:16030 | head -20
+
+# Or open in browser
+open http://localhost:16010
+```
+
+### 4. Verify HBase Tables via Shell
+
+```bash
+# List all tables (should show HugeGraph tables after init-store)
+docker exec hg-hbase-test bash -lc "echo 'list' | hbase shell -n"
+
+# Check a specific table exists (example: after backend init)
+docker exec hg-hbase-test bash -lc 'echo "describe '"'"'default_hugegraph:g_v'"'"'" | hbase shell -n'
+```
+
+### 5. Verify HBase Logs for Errors
+
+```bash
+# Check for any ERROR lines in HBase logs
+docker exec hg-hbase-test bash -lc "grep -i error /opt/hbase/logs/*.log | tail -20"
+
+# Tail live logs (run from repo root)
+docker compose -f docker/hbase/docker-compose.hbase.yml logs
+```
+
+> **Known benign messages** — these are safe to ignore in standalone mode:
+> - `SASL config status: Will not attempt to authenticate using SASL (unknown error)` — ZooKeeper SASL is not configured; standalone HBase does not need it.
+> - `Invalid configuration, only one server specified (ignoring)` — expected when running a single-node ZooKeeper.
+> - `NoClassDefFoundError: org/eclipse/jetty/...` — Jetty UI dependency missing in the container; does not affect HBase or ZooKeeper functionality.
+
+---
+
+## Manual API Sanity (curl)
+
+These steps assume the HugeGraph server is running at `http://localhost:8080` with auth enabled (`admin/pa`).
+
+> **Note on Idempotency**: Schema creation calls below use `"check_exist": false`. Re-running is safe only when the submitted schema definition matches the existing one. If definitions conflict, HugeGraph returns `ExistedException`.
+>
+> **Prerequisite**: The HBase backend tables must be initialized before any API calls will work. If you see `TableNotFoundException` errors, re-run `init-store.sh` (see Step 0 below or the Quick Start section).
+
+### 0. Initialize Backend and Start Server
+
+> **Skip this if the server is already running.** This step is required the first time or after a full cleanup.
+>
+> **Prerequisite**: Run `mvn clean package -DskipTests` from the repository root first to generate the distribution.
+
+```bash
+SERVER_DIR="$(find . -maxdepth 3 -type d -path './apache-hugegraph-*/apache-hugegraph-server-*' | head -n 1)"
+SERVER_DIR="${SERVER_DIR#./}"
+[ -n "$SERVER_DIR" ] || { echo "HugeGraph server runtime not found. Run mvn clean package -DskipTests first."; exit 1; }
+
+# Initialize HBase tables (enter password 'pa' when prompted)
+printf 'pa\npa\n' | "$SERVER_DIR/bin/init-store.sh"
+
+# Start the server (wait up to 60s for startup)
+"$SERVER_DIR/bin/start-hugegraph.sh" -t 60
+```
+
+Verify the server is up before continuing:
+
+### 1. Check Server is Up
+
+```bash
+curl -s http://localhost:8080/versions | python3 -m json.tool
+```
+
+### 2. List Graphs
+
+```bash
+curl -s -u admin:pa http://localhost:8080/graphspaces/DEFAULT/graphs | python3 -m json.tool
+```
+
+### 3. Create Property Keys
+
+Create multiple property keys for testing. Re-running with the same schema returns the existing definition.
+
+```bash
+# Text property
+curl -s -u admin:pa -X POST \
+  http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/schema/propertykeys \
+  -H 'Content-Type: application/json' \
+  -d '{
+    "name": "email",
+    "data_type": "TEXT",
+    "cardinality": "SINGLE",
+    "check_exist": false
+  }' | python3 -m json.tool
+
+# Numeric property
+curl -s -u admin:pa -X POST \
+  http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/schema/propertykeys \
+  -H 'Content-Type: application/json' \
+  -d '{
+    "name": "age",
+    "data_type": "INT",
+    "cardinality": "SINGLE",
+    "check_exist": false
+  }' | python3 -m json.tool
+```
+
+### 4. Create a Vertex Label
+
+```bash
+curl -s -u admin:pa -X POST \
+  http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/schema/vertexlabels \
+  -H 'Content-Type: application/json' \
+  -d '{
+    "name": "user",
+    "id_strategy": "PRIMARY_KEY",
+    "primary_keys": ["email"],
+    "properties": ["email", "age"],
+    "check_exist": false
+  }' | python3 -m json.tool
+```

Review Comment:
   In step 2 "List Graphs" and elsewhere the doc uses the URL `http://localhost:8080/graphspaces/DEFAULT/graphs`, which is the HugeGraph multi-graphspace API. The default HugeGraph server in this repository (the one produced by `mvn clean package -DskipTests` referenced earlier in this guide) exposes the legacy single-graphspace API at `http://localhost:8080/apis/graphs/hugegraph/...` unless graphspace support is explicitly enabled. Following these curl commands verbatim against a default-built server will return 404. Please verify which API surface the documented server build actually exposes and update the URLs (or document the required configuration to enable the `/graphspaces` endpoints).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: upgrade HBase and replace custom hbase-shaded-endpint [hugegraph]

Posted by "vaijosh (via GitHub)" <gi...@apache.org>.
vaijosh commented on code in PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#discussion_r3247904052


##########
docker/HBASE.md:
##########
@@ -0,0 +1,425 @@
+# HBase Backend Testing with Docker
+
+This guide explains how to start HBase locally with Docker, verify it is working, and validate HugeGraph API operations.
+
+> **All commands in this guide should be run from the repository root** unless otherwise noted.
+
+> **Recent path change**: The HBase compose file moved from `docker/docker-compose.hbase.yml` to `docker/hbase/docker-compose.hbase.yml`. If you have older shell history/scripts, update `-f` accordingly.
+
+> **Security note**: The HBase Docker build enforces SHA512 verification by default and fails when checksum download/parsing/validation fails. Only use `--build-arg ALLOW_UNVERIFIED_DOWNLOAD=true` for trusted test environments with restricted networks.
+
+---
+
+## Quick Start
+
+### 0. (Optional) Clean Up Leftover HBase Tables
+```bash
+docker compose -f docker/hbase/docker-compose.hbase.yml build --no-cache hbase
+```
+
+### 1. Start HBase with Docker
+
+```bash
+docker compose -f docker/hbase/docker-compose.hbase.yml up -d
+```
+
+### 2. Wait for HBase to be Ready (~2 minutes)
+
+```bash
+# Check ZooKeeper connectivity
+nc -z localhost 2181 && echo "Ready" || echo "Not ready"
+
+# Or watch the logs
+docker compose -f docker/hbase/docker-compose.hbase.yml logs
+```
+
+### 3. (Optional) Clean Up Leftover HBase Tables
+
+For reruns, drop any leftover HugeGraph tables after the container is up:
+
+```bash
+docker exec hg-hbase-test bash -c '
+  for t in $(echo "list" | hbase shell -n 2>/dev/null | grep "^default_hugegraph"); do
+    echo "disable '"'"'$t'"'"'; drop '"'"'$t'"'"'"
+  done | hbase shell
+'
+```
+
+Verify tables are gone before proceeding:
+
+```bash
+docker exec hg-hbase-test bash -lc "echo 'list' | hbase shell -n"
+# Expected: TABLE (empty), 0 row(s)
+```
+
+
+### 4. Configure and Init the HugeGraph Server (required for API tests)
+
+> This step is only needed for HugeGraph API sanity checks.
+
+> **Prerequisite**: Run `mvn clean package -DskipTests` from the repository root to generate the distribution. This creates an `apache-hugegraph-<version>/` directory with all necessary binaries and configs.
+
+Set backend to HBase in the server config:
+
+```bash
+SERVER_DIR="$(find . -maxdepth 3 -type d -path './apache-hugegraph-*/apache-hugegraph-server-*' | head -n 1)"
+SERVER_DIR="${SERVER_DIR#./}"
+[ -n "$SERVER_DIR" ] || { echo "HugeGraph server runtime not found. Run mvn clean package -DskipTests first."; exit 1; }
+CONF="$SERVER_DIR/conf/graphs/hugegraph.properties"
+
+# Switch backend to hbase
+perl -pi -e 's/^backend=.*/backend=hbase/'     "$CONF"
+perl -pi -e 's/^serializer=.*/serializer=hbase/' "$CONF"
+
+# Uncomment HBase connection settings
+perl -pi -e 's/^#(hbase\.hosts=.*)/$1/'        "$CONF"
+perl -pi -e 's/^#(hbase\.port=.*)/$1/'         "$CONF"
+perl -pi -e 's/^#(hbase\.znode_parent=.*)/$1/' "$CONF"
+```
+
+Initialize HBase tables and start the server:
+
+```bash
+printf 'pa\npa\n' | "$SERVER_DIR/bin/init-store.sh"
+"$SERVER_DIR/bin/start-hugegraph.sh" -t 60
+```
+
+After `init-store.sh`, you can verify the tables were created:
+
+```bash
+docker exec hg-hbase-test bash -lc "echo 'list' | hbase shell -n"
+```
+
+---
+
+## Docker Compose Services
+
+### HBase Container
+
+- **Image**: `hugegraph/hbase:2.6.5`
+- **Container Name**: `hg-hbase-test`
+- **Hostname**: `hbase`
+- **Ports**:
+  - `2181` - ZooKeeper (embedded)
+  - `16000` - HBase Master RPC
+  - `16010` - HBase Master Web UI (http://localhost:16010)
+  - `16020` - HBase RegionServer RPC
+  - `16030` - HBase RegionServer Web UI (http://localhost:16030)
+- **Health Check**: ZooKeeper connectivity on port 2181
+- **Startup Time**: ~90-120 seconds
+
+---
+
+## Manual Verification
+
+### 1. Check Container is Healthy
+
+```bash
+docker compose -f docker/hbase/docker-compose.hbase.yml ps
+docker logs hg-hbase-test | tail -50
+```
+
+### 2. Check ZooKeeper Connectivity
+
+```bash
+# From host machine
+nc -z localhost 2181 && echo "ZooKeeper OK" || echo "ZooKeeper not ready"
+
+# From inside the container
+docker exec hg-hbase-test nc -z localhost 2181 && echo "Ready" || echo "Not ready"
+```
+
+### 3. Check HBase Master and RegionServer Web UIs
+
+```bash
+# HBase Master Web UI (should return HTML)
+curl -s http://localhost:16010 | head -20
+
+# RegionServer Web UI
+curl -s http://localhost:16030 | head -20
+
+# Or open in browser
+open http://localhost:16010
+```
+
+### 4. Verify HBase Tables via Shell
+
+```bash
+# List all tables (should show HugeGraph tables after init-store)
+docker exec hg-hbase-test bash -lc "echo 'list' | hbase shell -n"
+
+# Check a specific table exists (example: after backend init)
+docker exec hg-hbase-test bash -lc 'echo "describe '"'"'default_hugegraph:g_v'"'"'" | hbase shell -n'
+```
+
+### 5. Verify HBase Logs for Errors
+
+```bash
+# Check for any ERROR lines in HBase logs
+docker exec hg-hbase-test bash -lc "grep -i error /opt/hbase/logs/*.log | tail -20"
+
+# Tail live logs (run from repo root)
+docker compose -f docker/hbase/docker-compose.hbase.yml logs
+```
+
+> **Known benign messages** — these are safe to ignore in standalone mode:
+> - `SASL config status: Will not attempt to authenticate using SASL (unknown error)` — ZooKeeper SASL is not configured; standalone HBase does not need it.
+> - `Invalid configuration, only one server specified (ignoring)` — expected when running a single-node ZooKeeper.
+> - `NoClassDefFoundError: org/eclipse/jetty/...` — Jetty UI dependency missing in the container; does not affect HBase or ZooKeeper functionality.
+
+---
+
+## Manual API Sanity (curl)
+
+These steps assume the HugeGraph server is running at `http://localhost:8080` with auth enabled (`admin/pa`).
+
+> **Note on Idempotency**: Schema creation calls below use `"check_exist": false`. Re-running is safe only when the submitted schema definition matches the existing one. If definitions conflict, HugeGraph returns `ExistedException`.

Review Comment:
   Fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: upgrade HBase and replace custom hbase-shaded-endpint [hugegraph]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #3021:
URL: https://github.com/apache/hugegraph/pull/3021#issuecomment-4468985791

   ## [Codecov](https://app.codecov.io/gh/apache/hugegraph/pull/3021?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 93.25%. Comparing base ([`e108076`](https://app.codecov.io/gh/apache/hugegraph/commit/e108076aca60c06735fc1b315a4dd6c15f7562c1?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`21f9774`](https://app.codecov.io/gh/apache/hugegraph/commit/21f97744e2eb5649d39ac3d94f9dbd42441669f5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 1 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##             master    #3021       +/-   ##
   =============================================
   + Coverage     35.85%   93.25%   +57.40%     
   + Complexity      338       65      -273     
   =============================================
     Files           802        9      -793     
     Lines         67995      267    -67728     
     Branches       8902       22     -8880     
   =============================================
   - Hits          24381      249    -24132     
   + Misses        41008        8    -41000     
   + Partials       2606       10     -2596     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/hugegraph/pull/3021?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org