dlmarion commented on code in PR #2680: URL: https://github.com/apache/accumulo/pull/2680#discussion_r931331628
########## server/base/src/test/java/org/apache/accumulo/server/util/PrintMetadataTest.java: ########## @@ -0,0 +1,33 @@ +/* + * 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.accumulo.server.util; + +import org.apache.accumulo.server.MockServerContext; +import org.apache.accumulo.server.ServerContext; +import org.junit.jupiter.api.Test; + +public class PrintMetadataTest { + @Test + public void test() throws Exception { + ServerContext serverContext = new MockServerContext().withTables("table1").withAmple().done(); + + PrintMetadata printMetadata = new PrintMetadata(serverContext); + printMetadata.execute(new String[] {}); Review Comment: Should this check the output? ########## core/src/main/java/org/apache/accumulo/core/metadata/schema/TabletMetadata.java: ########## @@ -471,4 +471,9 @@ private static Optional<TServerInstance> checkServer(ClientContext context, Stri } return server; } + + @Override + public String toString() { + return getExtent() + " " + getDirName() + " " + getLocation(); Review Comment: I would remove this, or move this if it's being used in the new code. TabletMetadata has so many fields and this is just printing a few. If someone modifies this method later, and it exposes data that we don't want exposed in the PrintMetadata utility, then that could be bad. -- 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]
