terrymanu commented on code in PR #24536: URL: https://github.com/apache/shardingsphere/pull/24536#discussion_r1133084525
########## proxy/backend/type/hbase/src/main/java/org/apache/shardingsphere/proxy/backend/hbase/bean/HBaseOperation.java: ########## @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.shardingsphere.proxy.backend.hbase.bean; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import org.apache.hadoop.hbase.client.Operation; + +@AllArgsConstructor +@Getter +public class HBaseOperation { + + private final String tableName; + + private final Operation operation; + Review Comment: Please remove useless blank line ########## proxy/backend/type/hbase/src/main/java/org/apache/shardingsphere/proxy/backend/hbase/context/HBaseRegionWarmUpContext.java: ########## @@ -72,6 +74,24 @@ public void submitWarmUpTask(final String tableName, final HBaseCluster hbaseClu executorManager.submit(() -> loadRegionInfo(tableName, hbaseCluster)); } + /** + * load one table region info. Review Comment: 1. The first letter should be upper-case 2. Javadoc and @param should keep a blank line ########## proxy/backend/type/hbase/src/main/java/org/apache/shardingsphere/proxy/backend/hbase/context/HBaseRegionWarmUpContext.java: ########## @@ -72,6 +74,24 @@ public void submitWarmUpTask(final String tableName, final HBaseCluster hbaseClu executorManager.submit(() -> loadRegionInfo(tableName, hbaseCluster)); } + /** + * load one table region info. + * @param tableName tableName Review Comment: Please rewrite to `@param tableName table name` ########## proxy/backend/type/hbase/src/main/java/org/apache/shardingsphere/proxy/backend/hbase/converter/HBaseDatabaseDeleteConverter.java: ########## @@ -0,0 +1,71 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.shardingsphere.proxy.backend.hbase.converter; + +import com.google.common.base.Preconditions; +import lombok.AllArgsConstructor; +import org.apache.hadoop.hbase.client.Delete; +import org.apache.hadoop.hbase.util.Bytes; +import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext; +import org.apache.shardingsphere.infra.binder.statement.dml.DeleteStatementContext; +import org.apache.shardingsphere.proxy.backend.hbase.bean.HBaseOperation; +import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.BinaryOperationExpression; +import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.ExpressionSegment; +import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.InExpression; +import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.LiteralExpressionSegment; +import java.util.List; +import java.util.stream.Collectors; + +@AllArgsConstructor +public class HBaseDatabaseDeleteConverter extends HBaseDatabaseRowKeysConverterAdapter implements HBaseDatabaseConverter { Review Comment: 1. Please add final 2. Please add java doc ########## proxy/backend/type/hbase/src/main/java/org/apache/shardingsphere/proxy/backend/hbase/context/HBaseRegionWarmUpContext.java: ########## @@ -72,6 +74,24 @@ public void submitWarmUpTask(final String tableName, final HBaseCluster hbaseClu executorManager.submit(() -> loadRegionInfo(tableName, hbaseCluster)); } + /** + * load one table region info. + * @param tableName tableName + * @param connection hbase connection Review Comment: HBase is keyword, please rename all `hbase` to `HBase` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
