This commit is contained in:
parent
1120cc8485
commit
a73efb2d55
@ -25,20 +25,19 @@
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.servlet.ServletContext;
|
import javax.servlet.ServletContext;
|
||||||
import javax.servlet.http.HttpServlet;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.hadoop.classification.InterfaceAudience;
|
import org.apache.hadoop.classification.InterfaceAudience;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.hdfs.server.common.JspHelper;
|
import org.apache.hadoop.hdfs.server.namenode.DfsServlet;
|
||||||
import org.apache.hadoop.security.UserGroupInformation;
|
import org.apache.hadoop.security.UserGroupInformation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is used in Namesystem's web server to do fsck on namenode.
|
* This class is used in Namesystem's web server to do fsck on namenode.
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Private
|
@InterfaceAudience.Private
|
||||||
public class RouterFsckServlet extends HttpServlet {
|
public class RouterFsckServlet extends DfsServlet {
|
||||||
/** for java.io.Serializable. */
|
/** for java.io.Serializable. */
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ -67,15 +66,4 @@ public void doGet(HttpServletRequest request, HttpServletResponse response)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Copy from {@link org.apache.hadoop.hdfs.server.namenode.DfsServlet}.
|
|
||||||
* @param request Http request from the user
|
|
||||||
* @param conf configuration
|
|
||||||
* @return ugi of the requested user
|
|
||||||
* @throws IOException failed to get ugi
|
|
||||||
*/
|
|
||||||
protected UserGroupInformation getUGI(HttpServletRequest request,
|
|
||||||
Configuration conf) throws IOException {
|
|
||||||
return JspHelper.getUGI(getServletContext(), request, conf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user