blob: bf4ac850c6d3d3108af830094d075ba64f445d90 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_292) on Tue Jun 15 06:08:24 GMT 2021 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Server (Apache Hadoop HttpFS 3.3.1 API)</title>
<meta name="date" content="2021-06-15">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Server (Apache Hadoop HttpFS 3.3.1 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Server.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/hadoop/lib/server/BaseService.html" title="class in org.apache.hadoop.lib.server"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/hadoop/lib/server/Server.Status.html" title="enum in org.apache.hadoop.lib.server"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/hadoop/lib/server/Server.html" target="_top">Frames</a></li>
<li><a href="Server.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.hadoop.lib.server</div>
<h2 title="Class Server" class="title">Class Server</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.hadoop.lib.server.Server</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../../org/apache/hadoop/lib/servlet/ServerWebApp.html" title="class in org.apache.hadoop.lib.servlet">ServerWebApp</a></dd>
</dl>
<hr>
<br>
<pre>@InterfaceAudience.Private
public class <span class="typeNameLabel">Server</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">A Server class provides standard configuration, logging and <a href="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server"><code>Service</code></a>
lifecyle management.
<p>
A Server normally has a home directory, a configuration directory, a temp
directory and logs directory.
<p>
The Server configuration is loaded from 2 overlapped files,
<code>#SERVER#-default.xml</code> and <code>#SERVER#-site.xml</code>. The
default file is loaded from the classpath, the site file is laoded from the
configuration directory.
<p>
The Server collects all configuration properties prefixed with
<code>#SERVER#</code>. The property names are then trimmed from the
<code>#SERVER#</code> prefix.
<p>
The Server log configuration is loaded from the
<code>#SERVICE#-log4j.properties</code> file in the configuration directory.
<p>
The lifecycle of server is defined in by <a href="../../../../../org/apache/hadoop/lib/server/Server.Status.html" title="enum in org.apache.hadoop.lib.server"><code>Server.Status</code></a> enum.
When a server is create, its status is UNDEF, when being initialized it is
BOOTING, once initialization is complete by default transitions to NORMAL.
The <code>#SERVER#.startup.status</code> configuration property can be used
to specify a different startup status (NORMAL, ADMIN or HALTED).
<p>
Services classes are defined in the <code>#SERVER#.services</code> and
<code>#SERVER#.services.ext</code> properties. They are loaded in order
(services first, then services.ext).
<p>
Before initializing the services, they are traversed and duplicate service
interface are removed from the service list. The last service using a given
interface wins (this enables a simple override mechanism).
<p>
After the services have been resoloved by interface de-duplication they are
initialized in order. Once all services are initialized they are
post-initialized (this enables late/conditional service bindings).</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.Status.html" title="enum in org.apache.hadoop.lib.server">Server.Status</a></span></code>
<div class="block">Enumeration that defines the server status.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#CONF_SERVICES">CONF_SERVICES</a></span></code>
<div class="block">Server property name that defines the service classes.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#CONF_SERVICES_EXT">CONF_SERVICES_EXT</a></span></code>
<div class="block">Server property name that defines the service extension classes.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#CONF_STARTUP_STATUS">CONF_STARTUP_STATUS</a></span></code>
<div class="block">Server property name that defines server startup status.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#DEFAULT_LOG4J_PROPERTIES">DEFAULT_LOG4J_PROPERTIES</a></span></code>
<div class="block">Name of the log4j configuration file the Server will load from the
classpath if the <code>#SERVER#-log4j.properties</code> is not defined
in the server configuration directory.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#Server-java.lang.String-java.lang.String-">Server</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;homeDir)</code>
<div class="block">Creates a server instance.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#Server-java.lang.String-java.lang.String-org.apache.hadoop.conf.Configuration-">Server</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;homeDir,
org.apache.hadoop.conf.Configuration&nbsp;config)</code>
<div class="block">Creates a server instance.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#Server-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-">Server</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;homeDir,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;configDir,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;logDir,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;tempDir)</code>
<div class="block">Creates a server instance.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#Server-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-org.apache.hadoop.conf.Configuration-">Server</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;homeDir,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;configDir,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;logDir,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;tempDir,
org.apache.hadoop.conf.Configuration&nbsp;config)</code>
<div class="block">Creates a server instance.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#checkServiceDependencies-org.apache.hadoop.lib.server.Service-">checkServiceDependencies</a></span>(<a href="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server">Service</a>&nbsp;service)</code>
<div class="block">Checks if all service dependencies of a service are available.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#destroy--">destroy</a></span>()</code>
<div class="block">Destroys the server.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#destroyServices--">destroyServices</a></span>()</code>
<div class="block">Destroys the server services.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#ensureOperational--">ensureOperational</a></span>()</code>
<div class="block">Verifies the server is operational.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;T</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#get-java.lang.Class-">get</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;serviceKlass)</code>
<div class="block">Returns the <a href="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server"><code>Service</code></a> associated to the specified interface.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>org.apache.hadoop.conf.Configuration</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#getConfig--">getConfig</a></span>()</code>
<div class="block">Returns the server configuration.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#getConfigDir--">getConfigDir</a></span>()</code>
<div class="block">Returns the server config dir.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#getHomeDir--">getHomeDir</a></span>()</code>
<div class="block">Returns the server home dir.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#getLogDir--">getLogDir</a></span>()</code>
<div class="block">Returns the server log dir.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#getName--">getName</a></span>()</code>
<div class="block">Returns the name of the server.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#getPrefix--">getPrefix</a></span>()</code>
<div class="block">Returns the server prefix for server configuration properties.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#getPrefixedName-java.lang.String-">getPrefixedName</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</code>
<div class="block">Returns the prefixed name of a server property.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/hadoop/lib/server/Server.Status.html" title="enum in org.apache.hadoop.lib.server">Server.Status</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#getStatus--">getStatus</a></span>()</code>
<div class="block">Returns the current server status.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#getTempDir--">getTempDir</a></span>()</code>
<div class="block">Returns the server temp dir.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#init--">init</a></span>()</code>
<div class="block">Initializes the Server.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#initConfig--">initConfig</a></span>()</code>
<div class="block">Loads and inializes the server configuration.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#initLog--">initLog</a></span>()</code>
<div class="block">Initializes Log4j logging.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#initServices-java.util.List-">initServices</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server">Service</a>&gt;&nbsp;services)</code>
<div class="block">Initializes the list of services.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server">Service</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#loadServices--">loadServices</a></span>()</code>
<div class="block">Loads services defined in <code>services</code> and
<code>services.ext</code> and de-dups them.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#setService-java.lang.Class-">setService</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server">Service</a>&gt;&nbsp;klass)</code>
<div class="block">Adds a service programmatically.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/lib/server/Server.html#setStatus-org.apache.hadoop.lib.server.Server.Status-">setStatus</a></span>(<a href="../../../../../org/apache/hadoop/lib/server/Server.Status.html" title="enum in org.apache.hadoop.lib.server">Server.Status</a>&nbsp;status)</code>
<div class="block">Sets a new server status.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="CONF_SERVICES">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CONF_SERVICES</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> CONF_SERVICES</pre>
<div class="block">Server property name that defines the service classes.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.lib.server.Server.CONF_SERVICES">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="CONF_SERVICES_EXT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CONF_SERVICES_EXT</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> CONF_SERVICES_EXT</pre>
<div class="block">Server property name that defines the service extension classes.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.lib.server.Server.CONF_SERVICES_EXT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="CONF_STARTUP_STATUS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CONF_STARTUP_STATUS</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> CONF_STARTUP_STATUS</pre>
<div class="block">Server property name that defines server startup status.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.lib.server.Server.CONF_STARTUP_STATUS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_LOG4J_PROPERTIES">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_LOG4J_PROPERTIES</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> DEFAULT_LOG4J_PROPERTIES</pre>
<div class="block">Name of the log4j configuration file the Server will load from the
classpath if the <code>#SERVER#-log4j.properties</code> is not defined
in the server configuration directory.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.lib.server.Server.DEFAULT_LOG4J_PROPERTIES">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Server-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Server</h4>
<pre>public&nbsp;Server(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;homeDir)</pre>
<div class="block">Creates a server instance.
<p>
The config, log and temp directories are all under the specified home directory.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - server name.</dd>
<dd><code>homeDir</code> - server home directory.</dd>
</dl>
</li>
</ul>
<a name="Server-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Server</h4>
<pre>public&nbsp;Server(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;homeDir,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;configDir,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;logDir,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;tempDir)</pre>
<div class="block">Creates a server instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - server name.</dd>
<dd><code>homeDir</code> - server home directory.</dd>
<dd><code>configDir</code> - config directory.</dd>
<dd><code>logDir</code> - log directory.</dd>
<dd><code>tempDir</code> - temp directory.</dd>
</dl>
</li>
</ul>
<a name="Server-java.lang.String-java.lang.String-org.apache.hadoop.conf.Configuration-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Server</h4>
<pre>public&nbsp;Server(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;homeDir,
org.apache.hadoop.conf.Configuration&nbsp;config)</pre>
<div class="block">Creates a server instance.
<p>
The config, log and temp directories are all under the specified home directory.
<p>
It uses the provided configuration instead loading it from the config dir.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - server name.</dd>
<dd><code>homeDir</code> - server home directory.</dd>
<dd><code>config</code> - server configuration.</dd>
</dl>
</li>
</ul>
<a name="Server-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-org.apache.hadoop.conf.Configuration-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Server</h4>
<pre>public&nbsp;Server(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;homeDir,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;configDir,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;logDir,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;tempDir,
org.apache.hadoop.conf.Configuration&nbsp;config)</pre>
<div class="block">Creates a server instance.
<p>
It uses the provided configuration instead loading it from the config dir.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - server name.</dd>
<dd><code>homeDir</code> - server home directory.</dd>
<dd><code>configDir</code> - config directory.</dd>
<dd><code>logDir</code> - log directory.</dd>
<dd><code>tempDir</code> - temp directory.</dd>
<dd><code>config</code> - server configuration.</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getStatus--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStatus</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/lib/server/Server.Status.html" title="enum in org.apache.hadoop.lib.server">Server.Status</a>&nbsp;getStatus()</pre>
<div class="block">Returns the current server status.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current server status.</dd>
</dl>
</li>
</ul>
<a name="setStatus-org.apache.hadoop.lib.server.Server.Status-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setStatus</h4>
<pre>public&nbsp;void&nbsp;setStatus(<a href="../../../../../org/apache/hadoop/lib/server/Server.Status.html" title="enum in org.apache.hadoop.lib.server">Server.Status</a>&nbsp;status)
throws <a href="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</a></pre>
<div class="block">Sets a new server status.
<p>
The status must be settable.
<p>
All services will be notified o the status change via the
<a href="../../../../../org/apache/hadoop/lib/server/Service.html#serverStatusChange-org.apache.hadoop.lib.server.Server.Status-org.apache.hadoop.lib.server.Server.Status-"><code>Service.serverStatusChange(Server.Status, Server.Status)</code></a> method. If a service
throws an exception during the notification, the server will be destroyed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>status</code> - status to set.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</a></code> - thrown if the service has been destroy because of
a failed notification to a service.</dd>
</dl>
</li>
</ul>
<a name="ensureOperational--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureOperational</h4>
<pre>protected&nbsp;void&nbsp;ensureOperational()</pre>
<div class="block">Verifies the server is operational.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - thrown if the server is not operational.</dd>
</dl>
</li>
</ul>
<a name="init--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>init</h4>
<pre>public&nbsp;void&nbsp;init()
throws <a href="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</a></pre>
<div class="block">Initializes the Server.
<p>
The initialization steps are:
<ul>
<li>It verifies the service home and temp directories exist</li>
<li>Loads the Server <code>#SERVER#-default.xml</code>
configuration file from the classpath</li>
<li>Initializes log4j logging. If the
<code>#SERVER#-log4j.properties</code> file does not exist in the config
directory it load <code>default-log4j.properties</code> from the classpath
</li>
<li>Loads the <code>#SERVER#-site.xml</code> file from the server config
directory and merges it with the default configuration.</li>
<li>Loads the services</li>
<li>Initializes the services</li>
<li>Post-initializes the services</li>
<li>Sets the server startup status</li>
</ul></div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</a></code> - thrown if the server could not be initialized.</dd>
</dl>
</li>
</ul>
<a name="initLog--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>initLog</h4>
<pre>protected&nbsp;void&nbsp;initLog()
throws <a href="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</a></pre>
<div class="block">Initializes Log4j logging.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</a></code> - thrown if Log4j could not be initialized.</dd>
</dl>
</li>
</ul>
<a name="initConfig--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>initConfig</h4>
<pre>protected&nbsp;void&nbsp;initConfig()
throws <a href="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</a></pre>
<div class="block">Loads and inializes the server configuration.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</a></code> - thrown if the configuration could not be loaded/initialized.</dd>
</dl>
</li>
</ul>
<a name="loadServices--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>loadServices</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server">Service</a>&gt;&nbsp;loadServices()
throws <a href="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</a></pre>
<div class="block">Loads services defined in <code>services</code> and
<code>services.ext</code> and de-dups them.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>List of final services to initialize.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</a></code> - throw if the services could not be loaded.</dd>
</dl>
</li>
</ul>
<a name="initServices-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>initServices</h4>
<pre>protected&nbsp;void&nbsp;initServices(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server">Service</a>&gt;&nbsp;services)
throws <a href="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</a></pre>
<div class="block">Initializes the list of services.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>services</code> - services to initialized, it must be a de-dupped list of
services.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</a></code> - thrown if the services could not be initialized.</dd>
</dl>
</li>
</ul>
<a name="checkServiceDependencies-org.apache.hadoop.lib.server.Service-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkServiceDependencies</h4>
<pre>protected&nbsp;void&nbsp;checkServiceDependencies(<a href="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server">Service</a>&nbsp;service)
throws <a href="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</a></pre>
<div class="block">Checks if all service dependencies of a service are available.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>service</code> - service to check if all its dependencies are available.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</a></code> - thrown if a service dependency is missing.</dd>
</dl>
</li>
</ul>
<a name="destroyServices--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>destroyServices</h4>
<pre>protected&nbsp;void&nbsp;destroyServices()</pre>
<div class="block">Destroys the server services.</div>
</li>
</ul>
<a name="destroy--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>destroy</h4>
<pre>public&nbsp;void&nbsp;destroy()</pre>
<div class="block">Destroys the server.
<p>
All services are destroyed in reverse order of initialization, then the
Log4j framework is shutdown.</div>
</li>
</ul>
<a name="getName--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getName</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getName()</pre>
<div class="block">Returns the name of the server.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the server name.</dd>
</dl>
</li>
</ul>
<a name="getPrefix--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPrefix</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getPrefix()</pre>
<div class="block">Returns the server prefix for server configuration properties.
<p>
By default it is the server name.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the prefix for server configuration properties.</dd>
</dl>
</li>
</ul>
<a name="getPrefixedName-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPrefixedName</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getPrefixedName(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</pre>
<div class="block">Returns the prefixed name of a server property.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - of the property.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>prefixed name of the property.</dd>
</dl>
</li>
</ul>
<a name="getHomeDir--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHomeDir</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getHomeDir()</pre>
<div class="block">Returns the server home dir.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the server home dir.</dd>
</dl>
</li>
</ul>
<a name="getConfigDir--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConfigDir</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getConfigDir()</pre>
<div class="block">Returns the server config dir.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the server config dir.</dd>
</dl>
</li>
</ul>
<a name="getLogDir--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLogDir</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getLogDir()</pre>
<div class="block">Returns the server log dir.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the server log dir.</dd>
</dl>
</li>
</ul>
<a name="getTempDir--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTempDir</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getTempDir()</pre>
<div class="block">Returns the server temp dir.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the server temp dir.</dd>
</dl>
</li>
</ul>
<a name="getConfig--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConfig</h4>
<pre>public&nbsp;org.apache.hadoop.conf.Configuration&nbsp;getConfig()</pre>
<div class="block">Returns the server configuration.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the server configuration.</dd>
</dl>
</li>
</ul>
<a name="get-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>get</h4>
<pre>public&nbsp;&lt;T&gt;&nbsp;T&nbsp;get(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;serviceKlass)</pre>
<div class="block">Returns the <a href="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server"><code>Service</code></a> associated to the specified interface.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>serviceKlass</code> - service interface.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the service implementation.</dd>
</dl>
</li>
</ul>
<a name="setService-java.lang.Class-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setService</h4>
<pre>public&nbsp;void&nbsp;setService(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server">Service</a>&gt;&nbsp;klass)
throws <a href="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</a></pre>
<div class="block">Adds a service programmatically.
<p>
If a service with the same interface exists, it will be destroyed and
removed before the given one is initialized and added.
<p>
If an exception is thrown the server is destroyed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>klass</code> - service class to add.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</a></code> - throw if the service could not initialized/added
to the server.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Server.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/hadoop/lib/server/BaseService.html" title="class in org.apache.hadoop.lib.server"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/hadoop/lib/server/Server.Status.html" title="enum in org.apache.hadoop.lib.server"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/hadoop/lib/server/Server.html" target="_top">Frames</a></li>
<li><a href="Server.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2008&#x2013;2021 <a href="https://www.apache.org">Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>