Interface WorkerServer

All Superinterfaces:
org.gwtproject.rpc.api.Server<WorkerServer,WorkerClient>

public interface WorkerServer extends org.gwtproject.rpc.api.Server<WorkerServer,WorkerClient>
  • Method Details

    • register

      void register(int clientId, String service, ConnectToken authToken, org.gwtproject.rpc.api.Callback<ConnectionSuccess,String> callback)
      com.illumon.iris.db.tables.remotequery.RemoteQueryProcessor.ClientConnectionHandler#handleConnectionRegistration(com.illumon.iris.db.tables.remotequery.RemoteQueryProcessor.ClientState, com.fishlib.base.Command, java.lang.Object[]) com.illumon.iris.db.RemoteQueryCommandConstants#REGISTER
    • getCatalog

      void getCatalog(boolean systemNamespaces, boolean userNamespaces, String namespaceRegex, String tableRegex, org.gwtproject.rpc.api.Callback<Catalog,String> callback)
      Get a catalog of available tables.
    • getCatalogTable

      void getCatalogTable(TableHandle handle, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Get a catalog of available tables as a table (includes all system and user tables).
    • fetchTable

      void fetchTable(TableHandle handle, String tableName, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      No command for this one, just rewrap in com.illumon.iris.db.tables.remote.RemoteDatabase.FetchQuery
    • fetchPandasTable

      void fetchPandasTable(TableHandle handle, String name, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Fetches the Table for a Pandas Data Frame.
    • intradayTable

      void intradayTable(TableHandle handle, String namespace, String tableName, String internalPartitionValue, boolean live, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Get an intraday disk table by namespace and table name.
    • getIntradayPartitionsAsTable

      void getIntradayPartitionsAsTable(TableHandle handle, String namespace, String name, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
    • historicalTable

      void historicalTable(TableHandle handle, String namespace, String tableName, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Get a historical disk table by namespace and table name.
    • timeTable

      void timeTable(TableHandle handle, long startTimeNanos, long periodNanos, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Create a time table with the given start time and period.
    • emptyTable

      void emptyTable(TableHandle handle, long size, String[] columnNames, String[] columnTypes, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Create an empty table with the given column names and types.
    • newTable

      void newTable(TableHandle handle, ColumnHolder[] columnHolders, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Create an in-memory table with the given columns and data.
    • mergeTables

      void mergeTables(TableHandle[] inputTableHandles, TableHandle resultHandle, String keyColumn, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Create a merged table from the given input tables. If a key column is provided (not null), a sorted merged will be performed using that column.
    • newInputTable

      void newInputTable(TableHandle inputHandle, TableHandle resultHandle, String[] keyColumns, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Create an in-memory input table with key columns and data from the supplied table.
    • bindTableToVariable

      void bindTableToVariable(TableHandle handle, String name, ScriptHandle scriptHandle, org.gwtproject.rpc.api.Callback<Void,String> callback)
      Binds a table to a variable name in the session scope.
    • fetchScriptTable

      void fetchScriptTable(TableHandle handle, ScriptHandle script, String tableName, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
    • fetchPandasScriptTable

      void fetchPandasScriptTable(TableHandle handle, ScriptHandle script, String name, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Fetches the Table for a Pandas Data Frame.
    • fetchInputTable

      void fetchInputTable(TableHandle handle, org.gwtproject.rpc.api.Callback<InputTableDefinition,String> callback)
      Uses TableApplyQuery to get access to the database so we can call methods on InputTable class. This method only works if the table in question is the return value of InputTable.getTable(), which is a table that has the "InputTable" correctly set (so we can access it based on table handle instead of namespace + name tuple).
    • addRowsToInputTable

      void addRowsToInputTable(TableHandle tableHandle, RowValues[] rows, boolean allowEdits, org.gwtproject.rpc.api.Callback<Void,String> callback)
      Adds rows of data to an input table; values are serialized as arrays of arrays of columnId + stringValue tuples. The return type of the callback is Void because we don't expect anything new / useful from the server (changes to the table will be piped into viewport if you are subscribed). Callback is here so we can wire up any failures to the promise we gave to client.
    • addTablesToInputTable

      void addTablesToInputTable(TableHandle tableHandle, TableHandle[] tablesToAdd, org.gwtproject.rpc.api.Callback<Void,String> callback)
      Add or delete tables from an input table. Tables should contain the key columns from the input table.
    • deleteTablesFromInputTable

      void deleteTablesFromInputTable(TableHandle tableHandle, TableHandle[] tablesToDelete, org.gwtproject.rpc.api.Callback<Void,String> callback)
    • release

      void release(TableHandle handle)
      RemoteQueryCommandConstants.REMOTE_QUERY_RELEASE_REFERENCE
    • subscribe

      void subscribe(TableHandle handle, BitSet columns, boolean isViewport, org.gwtproject.rpc.api.Callback<Void,String> callback)
      Creates a subscription on a table, so that snapshots and viewports will be sent to the client as appropriate. After calling this with isViewport=true, rows should be specified using updateSubscription(TableHandle, TableSubscriptionRequest[], Callback), or for either type of subscription, updateSubscription can be used to change the columnns. The table handle must be marked as receiving preemptive updates, and if isViewport is true, must be flat. Only one subscription can be created on a single table handle at a time. com.illumon.iris.db.RemoteQueryCommandConstants#REMOTE_QUERY_PREEMPTIVE_TABLE_SUBSCRIPTION, RemoteQueryProcessor.PREEMPTIVE_SUBSCRIBE and PREEMPTIVE_VIEWPORT_SUBSCRIBE
    • updateSubscription

      void updateSubscription(TableHandle table, TableSubscriptionRequest[] viewports, org.gwtproject.rpc.api.Callback<Void,String> callback)
      Alters the subscription to the given table to be the union of the given viewports, resulting in a snapshot containing the new rows and subsequent deltas as necessary. The subscribe(TableHandle, BitSet, boolean, Callback) method must be called first. This can be used to update columns on a non-viewport subscription, but all row ranges must be empty. com.illumon.iris.db.RemoteQueryCommandConstants#REMOTE_QUERY_PREEMPTIVE_TABLE_SUBSCRIPTION, RemoteQueryProcessor.PREEMPTIVE_VIEWPORT_SUBSCRIBE
    • unsubscribe

      void unsubscribe(TableHandle table, org.gwtproject.rpc.api.Callback<Void,String> callback)
      Removes the subscription on this table handle. com.illumon.iris.db.RemoteQueryCommandConstants#REMOTE_QUERY_PREEMPTIVE_TABLE_SUBSCRIPTION, RemoteQueryProcessor.PREEMPTIVE_UNSUBSCRIBE, PREEMPTIVE_VIEWPORT_UNSUBSCRIBE
    • constructSnapshotQuery

      void constructSnapshotQuery(TableHandle table, RangeSet rows, BitSet columns, org.gwtproject.rpc.api.Callback<TableSnapshot,String> callback)
      No command for this one, just rewrap in com.illumon.iris.db.tables.remote.ConstructSnapshotQuery
    • fetchTableMap

      void fetchTableMap(String tableMapName, org.gwtproject.rpc.api.Callback<TableMapDeclaration,String> callback)
      Exports a handle for a TableMap, allowing more calls to be made to it. Additionally, this subscribes to updates from the server on added keys
    • getTableMapKeys

      void getTableMapKeys(TableMapHandle handle, org.gwtproject.rpc.api.Callback<ColumnData,String> callback)
      Returns all keys currently in a TableMap
    • getTableMapStringEntry

      void getTableMapStringEntry(TableMapHandle tableMapHandle, TableHandle tableHandle, String key, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
    • getTableMapStringArrayEntry

      void getTableMapStringArrayEntry(TableMapHandle tableMapHandle, TableHandle tableHandle, String[] key, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
    • getMergedTableMap

      void getMergedTableMap(TableMapHandle tableMapHandle, TableHandle tableHandle, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
    • releaseTableMap

      void releaseTableMap(TableMapHandle tableMapHandle)
    • byExternal

      void byExternal(TableHandle tableHandle, boolean dropKeys, String[] keys, org.gwtproject.rpc.api.Callback<TableMapDeclaration,String> callback)
    • requestMetrics

      void requestMetrics(int clientId, boolean enable, org.gwtproject.rpc.api.Callback<Void,String> callback)
      Enable or disable metrics for a given worker.
    • join

      void join(JoinDescriptor joinDescriptor, TableHandle resultHandle, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Returns the result of a table join operation.
    • batch

      void batch(BatchTableRequest request, org.gwtproject.rpc.api.Callback<BatchTableResponse,String> callback)
      Takes up to many operations on many tables, or even sequential operations on a single table and performs the given table mutations in the most optimal sequence we can hack together. Resolution of clientId handles will be pushed to the client as they come in, so client callbacks for individual operations within the batch can be executed as they are finished (by receiving an event when the handle in question is resolved to a new exported table). The callback here will be the last to fire, and may even be removed / reduced to save bytes across the wire.
    • selectDistinct

      void selectDistinct(TableHandle handle, TableHandle resultHandle, String[] columnNames, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> c)
      Returns a new table definition with the unique tuples of the specified columns
    • comboAggregate

      void comboAggregate(TableHandle inputTableHandle, TableHandle resultHandle, ComboAggregateDescriptor comboAggregateDescriptor, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Run a aggregate operation on the given table.
    • update

      void update(TableHandle inputTableHandle, TableHandle resultHandle, String[] columnSpecs, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Add columns to the given table using the given column specifications and the update table operation.
    • lazyUpdate

      void lazyUpdate(TableHandle inputTableHandle, TableHandle resultHandle, String[] columnSpecs, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Add columns to the given table using the given column specifications and the lazyUpdate table operation.
    • select

      void select(TableHandle inputTableHandle, TableHandle resultHandle, String[] columnSpecs, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Select the given columns from the given table, bring the data fully into memory.
    • ungroup

      void ungroup(TableHandle inputTableHandle, TableHandle resultHandle, boolean nullFill, String[] columnsToUngroup, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Ungroup the given columns (all columns will be ungrouped if null is specified).
    • headBy

      void headBy(TableHandle inputTableHandle, TableHandle resultHandle, long nRows, String[] groupByColumnSpecs, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Run the headBy table operation for the given group by columns on the given table.
    • tailBy

      void tailBy(TableHandle inputTableHandle, TableHandle resultHandle, long nRows, String[] groupByColumnSpecs, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Run the tailBy operation for the given group by columns on the given table.
    • pong

      void pong()
      Initiates a call to WorkerClient.ping(), allows the server to know that the client is still there.
    • fetchTotalsTable

      void fetchTotalsTable(TableHandle handle, TableHandle resultHandle, String directive, String[] columns, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      If it exists, fetches the Totals Table associated with the given handle. If not, results in an error.
    • fetchTableAttributeAsTable

      void fetchTableAttributeAsTable(TableHandle handle, TableHandle resultHandle, String attributeName, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Examines the given table to see if it has another table as one of its attributes, and if so, exports it.
    • rollup

      void rollup(RollupTableRequest request, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Invokes Table.rollup with the given configuration, allowing the client to make treetable queries on the resulting handle.
    • treeTable

      void treeTable(TableHandle handle, TableHandle resultHandle, String idColumn, String parentColumn, boolean promoteOrphansToRoot, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> c)
      Invokes Table.treeTable with the given columns allowing the client to make treetable queries on the resulting handle.
    • reexport

      void reexport(TableHandle source, TableHandle target, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Force the server to re-export a given table. This can be helpful to produce a second "copy" of a table for things like creating a second tree instance, with its own separate set of expanded rows, etc.
    • snapshot

      void snapshot(TableHandle leftTableHandle, TableHandle rightTableHandle, TableHandle resultHandle, boolean doInitialSnapshot, String[] stampColumns, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Invokes Table.snapshot with the given parameters.
      Parameters:
      leftTableHandle - The table on which to invoke the snapshot function. If null, empty(1) table will be used.
      rightTableHandle - The table to pass into the snapshot function.
      resultHandle - Handle for the snapshot table.
      doInitialSnapshot - Whether to take an initial snapshot (passed to table.snapshot function).
      stampColumns - Which columns to take from the left table (can be renamed if desired).
      callback - Return snapshot table definition.
    • treeSnapshotQuery

      void treeSnapshotQuery(TableHandle handle, TreeTableRequest request, org.gwtproject.rpc.api.Callback<TreeTableResult,String> callback)
      Requests a snapshot of a treetable's data and state, based on the given configuration.
    • seekRow

      void seekRow(TableHandle handle, long startingRow, String columnName, String valueType, String seekValue, boolean insensitive, boolean contains, boolean isBackward, org.gwtproject.rpc.api.Callback<Long,String> callback)
      Searches for a row, based on the given parameters.
      Parameters:
      handle - the table handle to operate on
      startingRow - the row that we should start searching from (i.e. the row position that is currently selected)
      columnName - the column we are searching
      seekValue - the value we are searching for
      insensitive - case insensitive search
      contains - should we look for strings containing this value
      isBackward - are we seeking backwards
      callback - , with a row position on success or a string error message
    • fetchFigure

      void fetchFigure(String figureName, org.gwtproject.rpc.api.Callback<FigureDescriptor,String> callback)
    • fetchScriptFigure

      void fetchScriptFigure(ScriptHandle script, String figureName, org.gwtproject.rpc.api.Callback<FigureDescriptor,String> callback)
    • finishFigureFetch

      void finishFigureFetch(TableHandle[] handles, int[] serverIds, org.gwtproject.rpc.api.Callback<InitialTableDefinition[],String> callback)
    • fetchParameterizedQuery

      void fetchParameterizedQuery(String name, org.gwtproject.rpc.api.Callback<ParameterizedQueryDescriptor,String> callback)
    • fetchScriptParameterizedQuery

      void fetchScriptParameterizedQuery(ScriptHandle script, String name, org.gwtproject.rpc.api.Callback<ParameterizedQueryDescriptor,String> callback)
    • applyParametersQuery

      void applyParametersQuery(ScriptHandle script, int universeId, String widgetName, ParameterValue[] parameters, org.gwtproject.rpc.api.Callback<ApplyParametersResult,String> callback)
      Apply parameters to a parameterized query
      Parameters:
      script - Parent session of the parameterized query, or null if using the default scope
      universeId - Universe ID for the invocation
      widgetName - Name of the ParameterizedQueryServerImpl widget
      parameters - Parameter values to apply
      callback - Callback completes when successful with the resulting tables/widgets, or fails with an error string
    • downsampleTable

      void downsampleTable(TableHandle handle, TableHandle result, String dateCol, String[] valueCols, int pxCount, long[] zoomRange, org.gwtproject.rpc.api.Callback<InitialTableDefinition,String> callback)
      Reduces the given table to the minimum rows required to losslessly display its contents over the given number of pixels, columns, and specified range. Assumes that
    • getColumnStatisticsForTable

      void getColumnStatisticsForTable(TableHandle handle, String columnName, org.gwtproject.rpc.api.Callback<ColumnStatistics,String> callback)
      Gets statistics about a column from a table.
      Parameters:
      handle - a handle to the table
      columnName - the column
      callback - the callback for the result
    • getWorkerHeapInfo

      void getWorkerHeapInfo(org.gwtproject.rpc.api.Callback<WorkerHeapInfo,String> callback)
      Get the heap information from a worker (used memory, total memory, maximum memory).
      Parameters:
      callback - the callback for the result
    • executeCommand

      void executeCommand(ExecutionHandle handle, String code, org.gwtproject.rpc.api.Callback<CommandResult,String> callback)
    • cancelCommand

      void cancelCommand(ExecutionHandle handle)
    • startConsole

      void startConsole(ScriptHandle handle, ConsoleSessionType config, org.gwtproject.rpc.api.Callback<ConsoleConnectionResult,String> callback)
    • stopConsole

      void stopConsole(ScriptHandle handle)
    • openDocument

      void openDocument(ScriptHandle handle, DidOpenTextDocumentParams params)
    • changeDocument

      void changeDocument(ScriptHandle handle, DidChangeTextDocumentParams params)
    • getCompletionItems

      void getCompletionItems(ScriptHandle handle, CompletionParams params, org.gwtproject.rpc.api.Callback<CompletionItem[],String> callback)
    • closeDocument

      void closeDocument(ScriptHandle handle, DidCloseTextDocumentParams params)
    • subscribeToLogs

      void subscribeToLogs()
    • unsubscribeToLogs

      void unsubscribeToLogs()
    • legacyConsoleSessionHeartbeat

      void legacyConsoleSessionHeartbeat(int sessionId, org.gwtproject.rpc.api.Callback<Void,String> callback)