Class RemoteQueryProcessor
java.lang.Object
com.illumon.iris.db.tables.remotequery.RemoteQueryProcessor
- All Implemented Interfaces:
UpdateErrorReporter
public class RemoteQueryProcessor extends Object implements UpdateErrorReporter
RemoteQueryProcessor is the class that runs workers.
Note: RemoteQueryProcessor acts as a client (ConnectionStatusHandler interface) to RemoteQueryDispatcher,
and as a server (CommandHandler interface) to RemoteQueryClient.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRemoteQueryProcessor.Envelopestatic classRemoteQueryProcessor.Invokerstatic interfaceRemoteQueryProcessor.QueryClassNameProviderstatic classRemoteQueryProcessor.RedirectableIDispatcherStatusListener -
Field Summary
Fields Modifier and Type Field Description static ThreadLocal<String>clientHoststatic StringENVIRONMENT_KEY_ARTIFACT_USEREnvironment Variable Names - these are used externallystatic StringENVIRONMENT_KEY_AUTHENTICATED_USERstatic StringENVIRONMENT_KEY_DISPATCHER_NAMEstatic StringENVIRONMENT_KEY_PROCESS_INFO_IDstatic StringENVIRONMENT_KEY_WORKER_NONCEstatic StringLOG_PERFORMANCE_DATA_PROPstatic intPREEMPTIVE_SUBSCRIBEstatic intPREEMPTIVE_UNSUBSCRIBEstatic intPREEMPTIVE_UPDATE_COLUMNSstatic intPREEMPTIVE_UPDATE_VIEWPORTstatic intPREEMPTIVE_UPDATE_VIEWPORT_AND_COLUMNSstatic intPREEMPTIVE_VIEWPORT_SUBSCRIBEstatic intPREEMPTIVE_VIEWPORT_UNSUBSCRIBEstatic StringPROP_INVOKERstatic StringPROP_PROCESS_INFO_IDstatic StringPROP_USER_NAMEstatic StringPROP_WORKER_IDstatic StringREMOTE_QUERY_PROCESSOR_PROPERTY_PREFIXstatic StringWORKER_NAMEstatic StringWORKER_PROCESS_INFO_IDstatic longWORKER_START_TIME -
Method Summary
Modifier and Type Method Description static voidaddAtExit(Runnable r)voidaddTerminationHandler(Runnable terminationHandler)booleanauditTableAccess()static voidexit(int status)Set<String>getAdminGroups()Set<String>getAllowedViewers()IrisGroupProvidergetIrisGroupProvider()StringgetQueryDescription()StringgetWeepsOwner()booleanhasTableAcls()static io.deephaven.enterprise.dispatcher.client.DispatcherClientinitializeDispatcherClient(io.deephaven.enterprise.dispatcher.client.IDispatcherStatusListener listener, com.fishlib.io.logger.Logger log)static io.deephaven.enterprise.dispatcher.client.WorkerDetailsinitializeWorkerDetails(io.deephaven.enterprise.dispatcher.client.DispatcherClient dispatcherClientV2, com.fishlib.io.logger.Logger log)booleanisDone()voidlogTableAccessAuditEvent(io.deephaven.enterprise.auth.UserContext userContext, String remoteHost, int remotePort, String namespace, String table, String details)voidlogWidgetAccessAuditEvent(io.deephaven.enterprise.auth.UserContext userContext, String remoteHost, int remotePort, String namespace, String table, String details)static voidmain(String... args)voidpossiblyLogWorkerAuditRecord(String clientHost, int clientPort, io.deephaven.enterprise.auth.UserContext userContext, int id, String status, String details)voidremoveTerminationHandler(Runnable terminationHandler)voidreportUpdateError(Throwable t)static booleanserializingClientResult()voidsetHasTableAcls()static voidsetSerializeClientResult(boolean flag)This shouldn't be used by external clients, but for unit testing purposes, we want to cause our serialization to behave as if we were operating across the remote query processor connection.voidsetVisibility(String owner, Set<String> allowedViewers, Set<String> adminGroups)voidstart(CompletableFuture<io.deephaven.enterprise.auth.UserContext> userContextCompletableFuture, FutureTask<PermissionFilterProvider> permissionFilterProviderFutureTask)voidstop()
-
Field Details
-
ENVIRONMENT_KEY_ARTIFACT_USER
Environment Variable Names - these are used externally- See Also:
- Constant Field Values
-
ENVIRONMENT_KEY_AUTHENTICATED_USER
- See Also:
- Constant Field Values
-
ENVIRONMENT_KEY_WORKER_NONCE
- See Also:
- Constant Field Values
-
ENVIRONMENT_KEY_PROCESS_INFO_ID
- See Also:
- Constant Field Values
-
ENVIRONMENT_KEY_DISPATCHER_NAME
- See Also:
- Constant Field Values
-
PROP_WORKER_ID
- See Also:
- Constant Field Values
-
PROP_PROCESS_INFO_ID
- See Also:
- Constant Field Values
-
PROP_INVOKER
- See Also:
- Constant Field Values
-
PROP_USER_NAME
- See Also:
- Constant Field Values
-
WORKER_NAME
-
WORKER_PROCESS_INFO_ID
-
WORKER_START_TIME
public static final long WORKER_START_TIME -
LOG_PERFORMANCE_DATA_PROP
- See Also:
- Constant Field Values
-
REMOTE_QUERY_PROCESSOR_PROPERTY_PREFIX
- See Also:
- Constant Field Values
-
clientHost
-
PREEMPTIVE_SUBSCRIBE
public static final int PREEMPTIVE_SUBSCRIBE- See Also:
- Constant Field Values
-
PREEMPTIVE_UNSUBSCRIBE
public static final int PREEMPTIVE_UNSUBSCRIBE- See Also:
- Constant Field Values
-
PREEMPTIVE_UPDATE_COLUMNS
public static final int PREEMPTIVE_UPDATE_COLUMNS- See Also:
- Constant Field Values
-
PREEMPTIVE_VIEWPORT_SUBSCRIBE
public static final int PREEMPTIVE_VIEWPORT_SUBSCRIBE- See Also:
- Constant Field Values
-
PREEMPTIVE_VIEWPORT_UNSUBSCRIBE
public static final int PREEMPTIVE_VIEWPORT_UNSUBSCRIBE- See Also:
- Constant Field Values
-
PREEMPTIVE_UPDATE_VIEWPORT
public static final int PREEMPTIVE_UPDATE_VIEWPORT- See Also:
- Constant Field Values
-
PREEMPTIVE_UPDATE_VIEWPORT_AND_COLUMNS
public static final int PREEMPTIVE_UPDATE_VIEWPORT_AND_COLUMNS- See Also:
- Constant Field Values
-
-
Method Details
-
auditTableAccess
public boolean auditTableAccess() -
getQueryDescription
-
initializeDispatcherClient
public static io.deephaven.enterprise.dispatcher.client.DispatcherClient initializeDispatcherClient(io.deephaven.enterprise.dispatcher.client.IDispatcherStatusListener listener, com.fishlib.io.logger.Logger log) -
initializeWorkerDetails
public static io.deephaven.enterprise.dispatcher.client.WorkerDetails initializeWorkerDetails(io.deephaven.enterprise.dispatcher.client.DispatcherClient dispatcherClientV2, com.fishlib.io.logger.Logger log) throws IOException- Throws:
IOException
-
start
public void start(CompletableFuture<io.deephaven.enterprise.auth.UserContext> userContextCompletableFuture, FutureTask<PermissionFilterProvider> permissionFilterProviderFutureTask) -
addTerminationHandler
-
removeTerminationHandler
-
stop
public void stop() -
isDone
public boolean isDone() -
hasTableAcls
public boolean hasTableAcls() -
getAllowedViewers
-
setHasTableAcls
public void setHasTableAcls() -
setVisibility
-
getWeepsOwner
-
getAdminGroups
-
getIrisGroupProvider
-
setSerializeClientResult
public static void setSerializeClientResult(boolean flag)This shouldn't be used by external clients, but for unit testing purposes, we want to cause our serialization to behave as if we were operating across the remote query processor connection. -
serializingClientResult
public static boolean serializingClientResult() -
reportUpdateError
- Specified by:
reportUpdateErrorin interfaceUpdateErrorReporter
-
possiblyLogWorkerAuditRecord
-
logTableAccessAuditEvent
-
logWidgetAccessAuditEvent
-
main
-
addAtExit
-
exit
public static void exit(int status)
-