Package org.apache.accumulo.server
Class ServerContext
java.lang.Object
org.apache.accumulo.core.clientImpl.ClientContext
org.apache.accumulo.server.ServerContext
- All Implemented Interfaces:
AutoCloseable
,AccumuloClient
Provides a server context for Accumulo server components that operate with the system credentials
and have access to the system files and configuration.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.accumulo.core.clientImpl.ClientContext
ClientContext.ClientBuilderImpl<T extends Object>
Nested classes/interfaces inherited from interface org.apache.accumulo.core.client.AccumuloClient
AccumuloClient.AuthenticationArgs<T extends Object>, AccumuloClient.ClientFactory<T extends Object>, AccumuloClient.ConnectionOptions<T extends Object>, AccumuloClient.FromOptions<T extends Object>, AccumuloClient.InstanceArgs<T extends Object>, AccumuloClient.PropertyOptions<T extends Object>, AccumuloClient.SaslOptions<T extends Object>, AccumuloClient.SslOptions<T extends Object>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static void
ensureDataVersionCompatible
(int dataVersion) Check to see if this version of Accumulo can run against or upgrade the passed in data version.getAmple()
getNamespaceConfiguration
(NamespaceId namespaceId) Retrieve the SSL/TLS configuration for starting up a listening serviceDetermine the type of Thrift server to instantiate given the server's configuration.protected long
void
Wait for ZK and hdfs, check data version and some properties, and start thread to monitor swappiness.static ServerContext
initialize
(SiteConfiguration siteConfig, String instanceName, InstanceId instanceID) Used during initialization to set the instance name and ID.static ServerContext
override
(SiteConfiguration siteConfig, String instanceName, String zooKeepers, int zkSessionTimeOut) Override properties for testingvoid
Methods inherited from class org.apache.accumulo.core.clientImpl.ClientContext
_getTableIdDetectNamespaceNotFound, clearTableListCache, createBatchDeleter, createBatchDeleter, createBatchScanner, createBatchScanner, createBatchScanner, createBatchWriter, createBatchWriter, createConditionalWriter, createConditionalWriter, createMultiTableBatchWriter, createMultiTableBatchWriter, createScanner, createScanner, executeCleanupTask, getAuthenticationToken, getBatchWriterConfig, getClientSslParams, getClientTimeoutInMillis, getConditionalWriterConfig, getCredentials, getHadoopConf, getInstanceID, getInstanceName, getManagerLocations, getManagerLocations, getNamespaceId, getPrincipal, getPrintableTableInfoFromId, getPrintableTableInfoFromName, getProperties, getRootTabletLocation, getScanServers, getScanServerSelector, getTableId, getTableIdToNameMap, getTableName, getTableNameToIdMap, getTableState, getTableState, getTransportPool, getZooCache, getZooKeeperRoot, getZooKeepers, getZooKeepersSessionTimeOut, instanceOperations, namespaceOperations, properties, replicationOperations, requireNotDeleted, requireNotOffline, requireTableExists, rpcCreds, securityOperations, setCredentials, submitScannerReadAheadTask, tableNodeExists, tableOperations, threadPools, token, verifyInstanceId, whoami
-
Constructor Details
-
ServerContext
-
-
Method Details
-
initialize
public static ServerContext initialize(SiteConfiguration siteConfig, String instanceName, InstanceId instanceID) Used during initialization to set the instance name and ID. -
override
public static ServerContext override(SiteConfiguration siteConfig, String instanceName, String zooKeepers, int zkSessionTimeOut) Override properties for testing -
getInstanceID
- Overrides:
getInstanceID
in classClientContext
-
getSiteConfiguration
-
getConfiguration
- Overrides:
getConfiguration
in classClientContext
-
getTableConfiguration
-
getNamespaceConfiguration
-
getDefaultConfiguration
-
getServerDirs
-
getVolumeManager
-
getZooReader
- Overrides:
getZooReader
in classClientContext
-
getZooReaderWriter
-
getServerSslParams
Retrieve the SSL/TLS configuration for starting up a listening service -
getSaslParams
- Overrides:
getSaslParams
in classClientContext
-
getThriftServerType
Determine the type of Thrift server to instantiate given the server's configuration.- Returns:
- A
ThriftServerType
value to denote the type of Thrift server to construct
-
getSecretManager
-
getTableManager
-
getUniqueNameAllocator
-
getCryptoFactory
-
getAmple
- Overrides:
getAmple
in classClientContext
-
getBaseUris
-
getVolumeReplacements
-
getTablesDirs
-
getRecoveryDirs
-
ensureDataVersionCompatible
public static void ensureDataVersionCompatible(int dataVersion) Check to see if this version of Accumulo can run against or upgrade the passed in data version. -
waitForZookeeperAndHdfs
public void waitForZookeeperAndHdfs() -
init
Wait for ZK and hdfs, check data version and some properties, and start thread to monitor swappiness. Should only be called once during server start up. -
getScheduledExecutor
-
getPropStore
-
getTransportPoolMaxAgeMillis
protected long getTransportPoolMaxAgeMillis()- Overrides:
getTransportPoolMaxAgeMillis
in classClientContext
-
getSecurityOperation
-
getMetricsInfo
-
close
public void close()- Specified by:
close
in interfaceAccumuloClient
- Specified by:
close
in interfaceAutoCloseable
- Overrides:
close
in classClientContext
-