aryangupta1998 commented on code in PR #8254: URL: https://github.com/apache/ozone/pull/8254#discussion_r2040340441
########## hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/container/ContainerLogParser.java: ########## @@ -0,0 +1,77 @@ +/* + * 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.ozone.debug.container; + +import java.sql.SQLException; +import java.util.concurrent.Callable; +import org.apache.hadoop.ozone.containerlog.parser.ContainerDatanodeDatabase; +import org.apache.hadoop.ozone.containerlog.parser.ContainerLogFileParser; +import picocli.CommandLine; + +/** + * Parses container logs, processes them, and updates the database accordingly. + */ + [email protected]( + name = "container_log_parse", + description = "parse the container logs" +) +public class ContainerLogParser implements Callable<Void> { + @CommandLine.Option(names = {"--parse"}, + description = "path to the dir which contains log files") + private String path; + + @CommandLine.Option(names = {"--thread-count"}, + description = "Thread count for concurrent processing.", + defaultValue = "10") + private int threadCount; Review Comment: Let's check for threadCount as well in the call(). If threadCount is 0 or negative, inform the client that threadCount is invalid, set the threadCount to the default value, 10, and continue the tool operation. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
