ranganathg commented on code in PR #4470:
URL: https://github.com/apache/hbase/pull/4470#discussion_r1430902296


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/http/MasterHbckServlet.java:
##########
@@ -0,0 +1,144 @@
+/*
+ * 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.http;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.ServerName;
+import org.apache.hadoop.hbase.client.RegionInfo;
+import org.apache.hadoop.hbase.master.HMaster;
+import org.apache.hadoop.hbase.master.HbckChore;
+import org.apache.hadoop.hbase.master.http.gson.GsonFactory;
+import org.apache.hadoop.hbase.master.janitor.CatalogJanitor;
+import org.apache.hadoop.hbase.master.janitor.Report;
+import org.apache.hadoop.hbase.util.Pair;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.hbase.thirdparty.com.google.gson.Gson;
+
+@InterfaceAudience.Private
+public class MasterHbckServlet extends HttpServlet {
+
+  public static final String START_TIMESTAMP = "start_timestamp";
+  public static final String END_TIMESTAMP = "end_timestamp";
+  public static final String INCONSISTENT_REGIONS = "inconsistent_regions";
+  public static final String ORPHAN_REGIONS_ON_RS = "orphan_regions_on_rs";
+  public static final String ORPHAN_REGIONS_ON_FS = "orphan_regions_on_fs";
+  public static final String HOLES = "holes";
+  public static final String OVERLAPS = "overlaps";
+  public static final String UNKNOWN_SERVERS = "unknown_servers";
+  public static final String EMPTY_REGIONINFO = "empty_regioninfo";
+
+  private static final long serialVersionUID = 1L;
+  private static final Logger LOG = 
LoggerFactory.getLogger(MasterHbckServlet.class);
+  private static final Gson GSON = GsonFactory.buildGson();
+
+  @Override
+  public void doGet(HttpServletRequest request, HttpServletResponse response)

Review Comment:
   I agree to Nick’s comment on the REST Endpoint returning JSON backed my 
Model which is a standard way of implementing REST APIs.



-- 
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: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to