joshelser commented on a change in pull request #3667: URL: https://github.com/apache/hbase/pull/3667#discussion_r706287598
########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/startupprogress/MasterStartupProgress.java ########## @@ -0,0 +1,83 @@ +/** + * + * 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.master.startupprogress; + +import static org.apache.hadoop.hbase.util.EnvironmentEdgeManager.currentTime; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import org.apache.hadoop.hbase.master.HMaster; +import org.apache.yetus.audience.InterfaceAudience; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * MasterStartupProgress tracks all the different phases in HMaster startup process. + * Once the master startup is complete, you can't begin or end phase. + * For read access, call {@link #createView()} to create a consistent view with + * a clone of the data. + */ [email protected] +public class MasterStartupProgress { Review comment: We have MonitoredTask and MonitoredTaskImpl which appear to do very similar things to what you're doing here. Did you look at MonitoredTask and is there a reason we cannot use/extend it instead of writing net-new code? ########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/startupprogress/PhaseStatus.java ########## @@ -0,0 +1,73 @@ +/** + * + * 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.master.startupprogress; + +import org.apache.yetus.audience.InterfaceAudience; + +/** + * This stores all the details that are required on the UI page. + */ [email protected] +public class PhaseStatus { + private String phaseName; Review comment: Make this a `Phase`? -- 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]
