keith-turner commented on code in PR #3645: URL: https://github.com/apache/accumulo/pull/3645#discussion_r1272484527
########## core/src/main/java/org/apache/accumulo/core/client/admin/TabletInformation.java: ########## @@ -0,0 +1,159 @@ +/* + * 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 + * + * https://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.accumulo.core.client.admin; + +import java.util.Objects; + +import org.apache.accumulo.core.data.TableId; +import org.apache.accumulo.core.util.NumUtil; + +public class TabletInformation { + + private final String tableName; + private final String endRow; + private final String prevEndRow; + private final int numFiles; + private final int numWalLogs; + private final long numEntries; + private final long size; + private final String status; + private final String location; + private final String dir; + private final TableId tableId; + private final TabletHostingGoal goal; + + public TabletInformation(String tableName, TableId tableId, String endRow, String prevEndRow, + int numFiles, int numWalLogs, long numEntries, long size, String status, String location, + String dir, TabletHostingGoal goal) { + this.tableName = tableName; + this.tableId = tableId; + this.endRow = endRow; + this.prevEndRow = prevEndRow; + this.numFiles = numFiles; + this.numWalLogs = numWalLogs; + this.numEntries = numEntries; + this.size = size; + this.status = status; + this.location = location; + this.dir = dir; + this.goal = goal; + } Review Comment: Oh interesting. One way around this is the following : - Create a TabletInformation interface w/ all the getter methods in this class. - Create a non public API class called TabletInformationImpl that wraps TabletMetadata. Internal code creates TabletInformationImpl and returns them when TabletInformation type is needed. This is a similar strategy to TabletId and TabletIdImpl which wraps KeyExtent. -- 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]
