ndimiduk commented on code in PR #6134: URL: https://github.com/apache/hbase/pull/6134#discussion_r1752094904
########## hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BulkLoad.java: ########## @@ -0,0 +1,39 @@ +/* + * 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.hadoop.hbase.backup.impl; + +import org.apache.hadoop.hbase.TableName; +import org.apache.yetus.audience.InterfaceAudience; + [email protected] +public class BulkLoad { + public final TableName tableName; + public final String region; + public final String family; + public final String hfilePath; + public final byte[] rowKey; + + public BulkLoad(TableName tableName, String region, String family, String hfilePath, Review Comment: Yeah, nice! Please take this new POJO all the way home: - make the fields private - add public getters - implement toString using the apache commons ToStringBuilder NO_CLASS_NAME_STYLE - implement equals and hashcode using apache commons EqualsBuilder and HashCodeBuilder ########## hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupManager.java: ########## @@ -356,8 +355,7 @@ public HashMap<String, Long> readRegionServerLastLogRollResult() throws IOExcept return systemTable.readRegionServerLastLogRollResult(backupInfo.getBackupRootDir()); } - public Pair<Map<TableName, Map<String, Map<String, List<Pair<String, Boolean>>>>>, List<byte[]>> - readBulkloadRows(List<TableName> tableList) throws IOException { + public List<BulkLoad> readBulkloadRows(List<TableName> tableList) throws IOException { Review Comment: a type!! so much better. ########## hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java: ########## @@ -175,24 +159,20 @@ protected Map<byte[], List<Path>>[] handleBulkLoad(List<TableName> sTableList) if (fs.exists(p)) { if (LOG.isTraceEnabled()) { LOG.trace("found bulk hfile " + file + " in " + famDir + " for " + tblName); Review Comment: nit: clean up these log lines with `{}` as well. -- 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]
