Thrift module: Blur
Enumerations
Enumeration: ErrorType
| The error type of a BlurException. |
| UNKNOWN | Unknown error. |
| QUERY_CANCEL | Query has been cancel. |
| QUERY_TIMEOUT | Query has timed out. |
| BACK_PRESSURE | Server has run out of memory and is trying to prevent a failure. |
| REQUEST_TIMEOUT | The TCP connection has timed out. |
UNKNOWN | 0 |
QUERY_CANCEL | 1 |
QUERY_TIMEOUT | 2 |
BACK_PRESSURE | 3 |
REQUEST_TIMEOUT | 4 |
Enumeration: ScoreType
| The scoring type used during a SuperQuery to score multi Record hits within a ColumnFamily. |
| SUPER | During a multi Record match, a calculation of the best match Record plus how often it occurs within the match Row produces the score that is used in the scoring of the SuperQuery. |
| AGGREGATE | During a multi Record match, the aggregate score of all the Records within a ColumnFamily is used in the scoring of the SuperQuery. |
| BEST | During a multi Record match, the best score of all the Records within a ColumnFamily is used in the scoring of the SuperQuery. |
| CONSTANT | A constant score of 1 is used in the scoring of the SuperQuery. |
SUPER | 0 |
AGGREGATE | 1 |
BEST | 2 |
CONSTANT | 3 |
Enumeration: QueryState
| The state of a query. |
| RUNNING | Query is running. |
| INTERRUPTED | Query has been interrupted. |
| COMPLETE | Query is complete. |
RUNNING | 0 |
INTERRUPTED | 1 |
COMPLETE | 2 |
BACK_PRESSURE_INTERRUPTED | 3 |
Enumeration: Status
| NOT_FOUND | Blur status UUID is not found. |
| FOUND | Blur status UUID is present. |
Enumeration: RowMutationType
| Specifies the type of Row mutation that should occur during a mutation of a given Row. |
| DELETE_ROW | Indicates that the entire Row is to be deleted. No changes are made if the specified row does not exist. |
| REPLACE_ROW | Indicates that the entire Row is to be deleted, and then a new Row with the same id is to be added. If the specified row does not exist, the new row will still be created. |
| UPDATE_ROW | Indicates that mutations of the underlying Records will be processed individually. Mutation will result in a BlurException if the specified row does not exist. |
DELETE_ROW | 0 |
REPLACE_ROW | 1 |
UPDATE_ROW | 2 |
Enumeration: RecordMutationType
| Specifies the type of Record mutation that should occur during a mutation of a given Record. |
| DELETE_ENTIRE_RECORD | Indicates the Record with the given recordId in the given Row is to be deleted. If the target record does not exist, then no changes are made. |
| REPLACE_ENTIRE_RECORD | Indicates the Record with the given recordId in the given Row is to be deleted, and a new Record with the same id is to be added. If the specified record does not exist the new record is still added. |
| REPLACE_COLUMNS | Replace the columns that are specified in the Record mutation. If the target record does not exist then this mutation will result in a BlurException. |
| APPEND_COLUMN_VALUES | Append the columns in the Record mutation to the Record that could already exist. If the target record does not exist then this mutation will result in a BlurException. |
DELETE_ENTIRE_RECORD | 0 |
REPLACE_ENTIRE_RECORD | 1 |
REPLACE_COLUMNS | 2 |
APPEND_COLUMN_VALUES | 3 |
Enumeration: ShardState
| The shard state, see shardServerLayoutOptions method in the Blur service for details. |
| OPENING | The shard is opening. |
| OPEN | The shard is open. |
| OPENING_ERROR | An error during the opening of the shard. |
| CLOSING | In the process of closing. |
| CLOSED | The shard is closed. |
| CLOSING_ERROR | An error during the closing of the shard. |
OPENING | 0 |
OPEN | 1 |
OPENING_ERROR | 2 |
CLOSING | 3 |
CLOSED | 4 |
CLOSING_ERROR | 5 |
Enumeration: Level
Logging level enum used to change the logging levels at runtime.
OFF | 0 |
FATAL | 1 |
ERROR | 2 |
WARN | 3 |
INFO | 4 |
DEBUG | 5 |
TRACE | 6 |
ALL | 7 |
Enumeration: BlurObjectType
Enumeration: CommandStatusState
RUNNING | 0 |
INTERRUPTED | 1 |
COMPLETE | 2 |
Data structures
Exception: BlurException
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | message | string | The message in the exception.
| default | |
| 2 | stackTraceStr | string | The original stack trace (if any).
| default | |
| 3 | errorType | ErrorType | | default | |
BlurException that carries a message plus the original stack
trace (if any).
Exception: TimeoutException
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | instanceExecutionId | i64 | | default | |
TimeoutException occurs before the network connection timeout
happens so that the client can reconnect.
Struct: User
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | username | string | username.
| default | |
| 2 | attributes | map<string, string> | map of user attributes.
| default | |
The user object is used to pass user context to server
side session.
Struct: Column
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | name | string | The name of the column.
| default | |
| 2 | value | string | The value to be indexed and stored.
| default | |
Column is the lowest storage element in Blur, it stores a single name and value pair.
Struct: Record
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | recordId | string | Record id uniquely identifies a record within a single row.
| default | |
| 2 | family | string | The family in which this record resides.
| default | |
| 3 | columns | list<Column> | A list of columns, multiple columns with the same name are allowed.
| default | |
Records contain a list of columns, multiple columns with the same name are allowed.
Struct: Row
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | id | string | The row id.
| default | |
| 2 | records | list<Record> | The list records within the row. If paging is used this list will only
reflect the paged records from the selector.
| default | |
Rows contain a list of records.
Struct: Query
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | query | string | A Lucene syntax based query.
| default | |
| 2 | rowQuery | bool | If the Row query is on, meaning the query will be perform against all the
Records (joining records in some cases) and the result will be Rows (groupings of Record).
| default | 1 |
| 3 | scoreType | ScoreType | The scoring type, see the document on ScoreType for explanation of each score type.
| default | UNKNOWN |
| 4 | rowFilter | string | The Row filter (normal Lucene syntax), is a filter performed
after the join to filter out entire Rows from the results. This
field is ignored when rowQuery is false.
| default | |
| 5 | recordFilter | string | The Record filter (normal Lucene syntax), is a filter performed
before the join to filter out Records from the results.
| default | |
The Query object holds the query string (normal Lucene syntax),
filters and type of scoring (used when super query is on).
Struct: HighlightOptions
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | query | Query | The original query is required if used in the Blur.fetchRow call. If
the highlightOptions is used in a call to Blur.query then the Query
passed into the call via the BlurQuery will be used if this query is
null. So that means if you use highlighting from the query call you can
leave this attribute null and it will default to the normal behavior.
| default | |
| 2 | preTag | string | The pre tag is the tag that marks the beginning of the highlighting.
| default | "<<<" |
| 3 | postTag | string | The post tag is the tag that marks the end of the highlighting.
| default | ">>>" |
The HighlightOptions controls how the data is fetched and returned.
Struct: Selector
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | recordOnly | bool | Fetch the Record only, not the entire Row.
| default | |
| 2 | locationId | string | WARNING: This is an internal only attribute and is not intended for use by clients.
The location id of the Record or Row to be fetched.
| default | |
| 3 | rowId | string | The row id of the Row to be fetched, not to be used with location id.
| default | |
| 4 | recordId | string | The record id of the Record to be fetched, not to be used with location id. However the row id needs to be provided to locate the correct Row with the requested Record.
| default | |
| 5 | columnFamiliesToFetch | set<string> | The column families to fetch. If null, fetch all. If empty, fetch none.
| default | |
| 6 | columnsToFetch | map<string, set<string>> | The columns in the families to fetch. If null, fetch all. If empty, fetch none.
| default | |
| 8 | startRecord | i32 | Only valid for Row fetches, the record in the row to start fetching. If the row contains 1000
records and you want the first 100, then this value is 0. If you want records 300-400 then this
value would be 300. If startRecord is beyond the end of the row, the row will be null in the
FetchResult. Used in conjunction with maxRecordsToFetch.
| default | 0 |
| 9 | maxRecordsToFetch | i32 | Only valid for Row fetches, the number of records to fetch. If the row contains 1000 records
and you want the first 100, then this value is 100. If you want records 300-400 then this value
would be 100. Used in conjunction with startRecord. By default this will fetch the first
1000 records of the row.
| default | 1000 |
| 10 | highlightOptions | HighlightOptions | The HighlightOptions object controls how the data is highlighted. If null no highlighting will occur.
| default | |
| 11 | orderOfFamiliesToFetch | list<string> | Can be null, if provided the provided family order will be the order in which the families are returned.
| default | |
Select carries the request for information to be retrieved from the stored columns.
Struct: FetchRowResult
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | row | Row | The row fetched.
| default | |
| 2 | startRecord | i32 | See Selector startRecord.
| default | -1 |
| 3 | maxRecordsToFetch | i32 | See Selector maxRecordsToFetch.
| default | -1 |
| 4 | moreRecordsToFetch | bool | Are there more Records to fetch based on the Selector provided.
| default | 0 |
| 5 | totalRecords | i32 | The total number of records the Selector found.
| default | |
FetchRowResult contains row result from a fetch.
Struct: FetchRecordResult
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | rowid | string | The row id of the record being fetched.
| default | |
| 2 | record | Record | The record fetched.
| default | |
FetchRecordResult contains rowid of the record and the record result from a fetch.
Struct: FetchResult
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | exists | bool | True if the result exists, false if it doesn't.
| default | |
| 2 | deleted | bool | If the row was marked as deleted.
| default | |
| 3 | table | string | The table the fetch result came from.
| default | |
| 4 | rowResult | FetchRowResult | The row result if a row was selected form the Selector.
| default | |
| 5 | recordResult | FetchRecordResult | The record result if a record was selected form the Selector.
| default | |
FetchResult contains the row or record fetch result based if the Selector
was going to fetch the entire row or a single record.
Struct: Facet
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | queryStr | string | The facet query.
| default | |
| 2 | minimumNumberOfBlurResults | i64 | The minimum number of results before no longer processing the facet. This
is a good way to decrease the strain on the system while using many facets. For
example if you set this attribute to 1000, then the shard server will stop
processing the facet at the 1000 mark. However because this is processed at
the shard server level the controller will likely return more than the minimum
because it sums the answers from the shard servers.
| default | 9223372036854775807 |
Blur facet.
Struct: SortField
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | family | string | | default | |
| 2 | column | string | | default | |
| 3 | reverse | bool | | default | |
Struct: BlurQuery
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | query | Query | The query information.
| default | |
| 3 | facets | list<Facet> | A list of Facets to execute with the given query.
| default | |
| 4 | selector | Selector | Selector is used to fetch data in the search results, if null only location ids will be fetched.
| default | |
| 6 | useCacheIfPresent | bool | Enabled by default to use a cached result if the query matches a previous run query with the
configured amount of time.
| default | 1 |
| 7 | start | i64 | The starting result position, 0 by default.
| default | 0 |
| 8 | fetch | i32 | The number of fetched results, 10 by default.
| default | 10 |
| 9 | minimumNumberOfResults | i64 | The minimum number of results to find before returning.
| default | 9223372036854775807 |
| 10 | maxQueryTime | i64 | The maximum amount of time the query should execute before timing out.
| default | 9223372036854775807 |
| 11 | uuid | string | Sets the uuid of this query, this is normal set by the client so that the status
of a running query can be found or the query can be canceled.
| default | |
| 12 | userContext | string | Sets a user context, only used for logging at this point.
@Deprecated use setUser method on Blur service.
| default | |
| 13 | cacheResult | bool | Enabled by default to cache this result. False would not cache the result.
| default | 1 |
| 14 | startTime | i64 | Sets the start time, if 0 the controller sets the time.
| default | 0 |
| 15 | sortFields | list<SortField> | The sortfields are applied in order to sort the results.
| default | |
| 16 | rowId | string | Optional optimization for record queries to run against a single row. This will allow the query to be executed on one and only one shard in the cluster.
| default | |
The Blur Query object that contains the query that needs to be executed along
with the query options.
Struct: SortFieldResult
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | nullValue | bool | Carries the null boolean incase the field is null.
| default | |
| 2 | stringValue | string | The string value.
| default | |
| 3 | intValue | i32 | The integer value.
| default | |
| 4 | longValue | i64 | The long value.
| default | |
| 5 | doubleValue | double | The double value.
| default | |
| 6 | binaryValue | binary | The binary value.
| default | |
Carries the one value from the sort that allows the merging of results.
Struct: BlurResult
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | locationId | string | WARNING: This is an internal only attribute and is not intended for use by clients.
| default | |
| 2 | score | double | The score for the hit in the query.
| default | |
| 3 | fetchResult | FetchResult | The fetched result if any.
| default | |
| 4 | sortFieldResults | list<SortFieldResult> | The fields used for sorting.
| default | |
The BlurResult carries the score, the location id and the fetched result (if any) form each query.
Struct: BlurResults
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | totalResults | i64 | The total number of hits in the query.
| default | 0 |
| 2 | shardInfo | map<string, i64> | Hit counts from each shard in the table.
| default | |
| 3 | results | list<BlurResult> | The query results.
| default | |
| 4 | facetCounts | list<i64> | The faceted count.
| default | |
| 5 | exceptions | list<BlurException> | Not currently used, a future feature could allow for partial results with errors.
| default | |
| 6 | query | BlurQuery | The original query.
| default | |
BlurResults holds all information resulting from a query.
Struct: RecordMutation
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | recordMutationType | RecordMutationType | Define how to mutate the given Record.
| default | UNKNOWN |
| 2 | record | Record | The Record to mutate.
| default | |
The RowMutation defines how the given Record is to be mutated.
Struct: RowMutation
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | table | string | The table that the row mutation is to act upon.
| default | |
| 2 | rowId | string | The row id that the row mutation is to act upon.
| default | |
| 4 | rowMutationType | RowMutationType | The RowMutationType to define how to mutate the given Row.
| default | UNKNOWN |
| 5 | recordMutations | list<RecordMutation> | The RecordMutations if any for this Row.
| default | |
The RowMutation defines how the given Row is to be mutated.
Struct: CpuTime
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | cpuTime | i64 | The total cpu time for the query on the given shard.
| default | |
| 2 | realTime | i64 | The real time of the query execution for a given shard.
| default | |
Holds the cpu time for a query executing on a single shard in a table.
Struct: BlurQueryStatus
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | query | BlurQuery | The original query.
| default | |
| 2 | cpuTimes | map<string, CpuTime> | A map of shard names to CpuTime, one for each shard in the table.
| default | |
| 3 | completeShards | i32 | The number of completed shards. The shard server will respond with
how many are complete on that server, while the controller will aggregate
all the shard server completed totals together.
| default | |
| 4 | totalShards | i32 | The total number of shards that the query is executing against. The shard
server will respond with how many shards are being queried on that server, while
the controller will aggregate all the shard server totals together.
| default | |
| 5 | state | QueryState | The state of the query. e.g. RUNNING, INTERRUPTED, COMPLETE
| default | |
| 6 | uuid | string | The uuid of the query.
| default | |
| 7 | status | Status | The status of the query NOT_FOUND if uuid is not found else FOUND
| default | |
| 8 | user | User | The user executing the given query.
| default | |
The BlurQueryStatus object hold the status of BlurQueries. The state of the query
(QueryState), the number of shards the query is executing against, the number of
shards that are complete, etc.
Struct: TableStats
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | tableName | string | The table name.
| default | |
| 2 | bytes | i64 | The size in bytes.
| default | |
| 3 | recordCount | i64 | The record count.
| default | |
| 4 | rowCount | i64 | The row count.
| default | |
| 5 | segmentImportPendingCount | i64 | The number of pending segment imports for this table.
| default | 0 |
| 6 | segmentImportInProgressCount | i64 | The number of segment imports in progress for this table.
| default | 0 |
TableStats holds the statistics for a given table.
Struct: ColumnDefinition
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | family | string | Required. The family that this column exists within.
| default | |
| 2 | columnName | string | Required. The column name.
| default | |
| 3 | subColumnName | string | If this column definition is for a sub column then provide the sub column name. Otherwise leave this field null.
| default | |
| 4 | fieldLessIndexed | bool | If this column should be searchable without having to specify the name of the column in the query.
NOTE: This will index the column as a full text field in a default field, so that means it's going to be indexed twice.
| default | |
| 5 | fieldType | string | The field type for the column. The built in types are:
- text - Full text indexing.
- string - Indexed string literal
- int - Converted to an integer and indexed numerically.
- long - Converted to an long and indexed numerically.
- float - Converted to an float and indexed numerically.
- double - Converted to an double and indexed numerically.
- stored - Not indexed, only stored.
| default | |
| 6 | properties | map<string, string> | For any custom field types, you can pass in configuration properties.
| default | |
| 7 | sortable | bool | This will attempt to enable sorting for this column, if the type does not support sorting then an exception will be thrown.
| default | |
| 8 | multiValueField | bool | This will attempt to enable the ability for multiple values per column name in a single Record.
| optional | 1 |
The ColumnDefinition defines how a given Column should be interpreted (indexed/stored)
Struct: Schema
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | table | string | The table name.
| default | |
| 2 | families | map<string, map<string, ColumnDefinition>> | Families and the column definitions within them.
| default | |
The current schema of the table.
Struct: TableDescriptor
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | enabled | bool | Is the table enabled or not, enabled by default.
| default | 1 |
| 3 | shardCount | i32 | The number of shards within the given table.
| default | 1 |
| 4 | tableUri | string | The location where the table should be stored this can be "file:///" for a local instance of Blur or "hdfs://" for a distributed installation of Blur.
| default | |
| 7 | cluster | string | The cluster where this table should be created.
| default | "default" |
| 8 | name | string | The table name.
| default | |
| 9 | similarityClass | string | Sets the similarity class in Lucene.
| default | |
| 10 | blockCaching | bool | Should block cache be enable or disabled for this table.
| default | 1 |
| 11 | blockCachingFileTypes | set<string> | The files extensions that you would like to allow block cache to cache. If null (default) everything is cached.
| default | |
| 12 | readOnly | bool | If a table is set to be readonly, that means that mutates through Thrift are NOT allowed. However
updates through MapReduce are allowed and in fact they are only allowed if the table is in readOnly mode.
| default | 0 |
| 13 | preCacheCols | list<string> | This is a list of fields to prefetch into the blockcache. The format of the entries should
be family dot column, "family.column".
| default | |
| 14 | tableProperties | map<string, string> | The table properties that can modify the default behavior of the table. TODO: Document all options.
| default | |
| 15 | strictTypes | bool | Whether strict types are enabled or not (default). If they are enabled no column can be added without first having it's type defined.
| default | 0 |
| 16 | defaultMissingFieldType | string | If strict is not enabled, the default field type.
| default | "text" |
| 17 | defaultMissingFieldLessIndexing | bool | If strict is not enabled, defines whether or not field less indexing is enabled on the newly created fields.
| default | 1 |
| 18 | defaultMissingFieldProps | map<string, string> | If strict is not enabled, defines the properties to be used in the new field creation.
| default | |
The table descriptor defines the base structure of the table as well as properties need for setup.
Struct: Metric
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | name | string | metric name.
| default | |
| 2 | strMap | map<string, string> | map of string values emitted by the Metric.
| default | |
| 3 | longMap | map<string, i64> | map of long values emitted by the Metric.
| default | |
| 4 | doubleMap | map<string, double> | map of double values emitted by the Metric.
| default | |
The Metric will hold all the information for a given Metric.
Struct: Value
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | stringValue | string | | default | |
| 2 | intValue | i32 | | default | |
| 3 | shortValue | i16 | | default | |
| 4 | longValue | i64 | | default | |
| 5 | doubleValue | double | | default | |
| 6 | floatValue | double | | default | |
| 7 | binaryValue | binary | | default | |
| 8 | booleanValue | bool | | default | |
| 9 | nullValue | bool | | default | |
Struct: Shard
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | table | string | | default | |
| 2 | shard | string | | default | |
Struct: Server
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | server | string | | default | |
Struct: BlurPackedObject
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | parentId | i32 | | default | |
| 2 | type | BlurObjectType | | default | |
| 3 | value | Value | | default | |
Struct: ValueObject
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | value | Value | | default | |
| 2 | blurObject | list<BlurPackedObject> | | default | |
Struct: Arguments
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | values | map<string, ValueObject> | | default | |
Struct: CommandStatus
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | executionId | string | | default | |
| 2 | commandName | string | | default | |
| 3 | arguments | Arguments | | default | |
| 4 | serverStateMap | map<string, map<CommandStatusState, i64>> | | default | |
| 5 | user | User | | default | |
Struct: ArgumentDescriptor
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | name | string | | default | |
| 2 | type | string | | default | |
| 3 | description | string | | default | |
Struct: CommandDescriptor
| Key | Field | Type | Description | Requiredness | Default value |
| 1 | commandName | string | | default | |
| 2 | description | string | | default | |
| 3 | requiredArguments | map<string, ArgumentDescriptor> | | default | |
| 4 | optionalArguments | map<string, ArgumentDescriptor> | | default | |
| 5 | returnType | string | | default | |
| 6 | version | string | | default | |
Services
Service: Blur
The Blur service API. This API is the same for both controller servers as well as
shards servers. Each of the methods are documented.
Function: Blur.listInstalledCommands
list<CommandDescriptor> listInstalledCommands()
throws BlurException
List the currently installed commands in the server process.
Function: Blur.reconnect
Response reconnect(i64 instanceExecutionId)
throws BlurException, TimeoutException
If the execute command times out due to command taking longer than the configured
network tcp timeout this method allows the client to reconnect to the already
executing command.
Function: Blur.commandStatusList
list<string> commandStatusList(i32 startingAt,
i16 fetch)
throws BlurException
Fetches the command status ids in the order they were submitted.
Function: Blur.commandStatus
CommandStatus commandStatus(string commandExecutionId)
throws BlurException
Retrieves the command status by the given command execution id.
Function: Blur.commandCancel
void commandCancel(string commandExecutionId)
throws BlurException
Cancels the command with the given command execution id.
Function: Blur.refresh
void refresh()
Releases and refreshes the read snapshots of the indexes in the session for the
current connection.
Function: Blur.createTable
void createTable(TableDescriptor tableDescriptor)
throws BlurException
Creates a table with the given TableDescriptor.
Parameters
| Name | Description | | tableDescriptor | the TableDescriptor.
|
Function: Blur.enableTable
void enableTable(string table)
throws BlurException
Enables the given table, blocking until all shards are online.
Parameters
| Name | Description | | table | the table name.
|
Function: Blur.disableTable
void disableTable(string table)
throws BlurException
Disables the given table, blocking until all shards are offline.
Parameters
| Name | Description | | table | the table name.
|
Function: Blur.removeTable
void removeTable(string table,
bool deleteIndexFiles)
throws BlurException
Removes the given table, with an optional to delete the underlying index storage as well.
Parameters
| Name | Description | | table | the table name.
|
| deleteIndexFiles | true to remove the index storage and false if to preserve.
|
Function: Blur.addColumnDefinition
bool addColumnDefinition(string table,
ColumnDefinition columnDefinition)
throws BlurException
Attempts to add a column definition to the given table.
@return true if successfully defined false if not.
Parameters
| Name | Description | | table | the name of the table.
|
| columnDefinition | the ColumnDefinition.
|
Function: Blur.tableList
list<string> tableList()
throws BlurException
Returns a list of the table names across all shard clusters.
@return list of all tables in all shard clusters.
Function: Blur.tableListByCluster
list<string> tableListByCluster(string cluster)
throws BlurException
Returns a list of the table names for the given cluster.
@return list of all the tables within the given shard cluster.
Parameters
| Name | Description | | cluster | the cluster name.
|
Function: Blur.describe
TableDescriptor describe(string table)
throws BlurException
Returns a table descriptor for the given table.
@return the TableDescriptor.
Parameters
| Name | Description | | table | the table name.
|
Function: Blur.schema
Schema schema(string table)
throws BlurException
Gets the schema for a given table.
@return Schema.
Parameters
| Name | Description | | table | the table name.
|
Function: Blur.parseQuery
string parseQuery(string table,
Query query)
throws BlurException
Parses the given query and returns the string that represents the query.
@return string representation of the parsed query.
Parameters
| Name | Description | | table | the table name.
|
| query | the query to parse.
|
Function: Blur.tableStats
TableStats tableStats(string table)
throws BlurException
Gets the table stats for the given table.
@return TableStats.
Parameters
| Name | Description | | table | the table name.
|
Function: Blur.optimize
void optimize(string table,
i32 numberOfSegmentsPerShard)
throws BlurException
Will perform a forced optimize on the index in the given table.
Parameters
| Name | Description | | table | table the name of the table.
|
| numberOfSegmentsPerShard | the maximum of segments per shard index after the operation is completed.
|
Function: Blur.createSnapshot
void createSnapshot(string table,
string name)
throws BlurException
Creates a snapshot for the table with the given name
Function: Blur.removeSnapshot
void removeSnapshot(string table,
string name)
throws BlurException
Removes a previous snapshot(identified by name) of the table
Function: Blur.listSnapshots
map<string, list<string>> listSnapshots(string table)
throws BlurException
Returns a map where the key is the shard, and the list is the snapshots within that shard
Function: Blur.setUser
void setUser(User user)
Sets the User for the current session.
Parameters
| Name | Description | | user | the User object.
|
Function: Blur.query
BlurResults query(string table,
BlurQuery blurQuery)
throws BlurException
Executes a query against a the given table and returns the results. If this method is
executed against a controller the results will contain the aggregated results from all
the shards. If this method is executed against a shard server the results will only
contain aggregated results from the shards of the given table that are being served on
the shard server, if any.
@return the BlurResults.
Parameters
| Name | Description | | table | the table name.
|
| blurQuery | the query to execute.
|
Function: Blur.fetchRow
FetchResult fetchRow(string table,
Selector selector)
throws BlurException
Fetches a Row or a Record in the given table with the given Selector.
@return the FetchResult.
Parameters
| Name | Description | | table | the table name.
|
| selector | the Selector to use to fetch the Row or Record.
|
Function: Blur.fetchRowBatch
list<FetchResult> fetchRowBatch(string table,
list<Selector> selectors)
throws BlurException
Fetches a batch of Rows or Records in the given table with the given Selector list.
@return the FetchResult.
Parameters
| Name | Description | | table | the table name.
|
| selectors | the Selector to use to fetch the Row or Record.
|
Function: Blur.loadData
void loadData(string table,
string location)
throws BlurException
Loads data from external location.
Parameters
| Name | Description | | table | The table name.
|
| location | Location of bulk data load.
|
Function: Blur.validateIndex
void validateIndex(string table,
list<string> externalIndexPaths)
throws BlurException
Function: Blur.loadIndex
void loadIndex(string table,
list<string> externalIndexPaths)
throws BlurException
Function: Blur.mutate
void mutate(RowMutation mutation)
throws BlurException
Mutates a Row given the RowMutation that is provided.
Parameters
| Name | Description | | mutation | the RowMutation.
|
Function: Blur.enqueueMutate
void enqueueMutate(RowMutation mutation)
throws BlurException
Enqueue a RowMutation. Note that the effect of the RowMutation will occur at some point in the future, volume and load will play a role in how much time will pass before the mutation goes into effect.
Parameters
| Name | Description | | mutation | the RowMutation.
|
Function: Blur.mutateBatch
void mutateBatch(list<RowMutation> mutations)
throws BlurException
Mutates a group of Rows given the list of RowMutations that are provided. Note: This is not an atomic operation.
Parameters
| Name | Description | | mutations | the batch of RowMutations.
|
Function: Blur.enqueueMutateBatch
void enqueueMutateBatch(list<RowMutation> mutations)
throws BlurException
Enqueue a batch of RowMutations. Note that the effect of the RowMutation will occur at some point in the future, volume and load will play a role in how much time will pass before the mutation goes into effect.
Parameters
| Name | Description | | mutations | the batch of RowMutations.
|
Function: Blur.bulkMutateStart
void bulkMutateStart(string bulkId)
throws BlurException
Starts a transaction for update (e.g. Mutate). Returns a transaction id.
Parameters
| Name | Description | | bulkId | The bulk id.
|
Function: Blur.bulkMutateAdd
void bulkMutateAdd(string bulkId,
RowMutation rowMutation)
throws BlurException
Adds to the specified transaction.
Parameters
| Name | Description | | bulkId | The bulk id.
|
| rowMutation | The row mutation.
|
Function: Blur.bulkMutateAddMultiple
void bulkMutateAddMultiple(string bulkId,
list<RowMutation> rowMutations)
throws BlurException
Adds to the specified transaction.
Parameters
| Name | Description | | bulkId | The bulk id.
|
| rowMutations | The row mutation.
|
Function: Blur.bulkMutateFinish
void bulkMutateFinish(string bulkId,
bool apply,
bool blockUntilComplete)
throws BlurException
Finishes the bulk mutate. If apply is true the mutations are applied and committed. If false the bulk mutate is deleted and not applied.
Parameters
| Name | Description | | bulkId | The bulk id.
|
| apply | Apply the bulk mutate flag.
|
| blockUntilComplete | If true this call will not block on bulk completion. This may be required for loader bulk loads.
|
Function: Blur.cancelQuery
void cancelQuery(string table,
string uuid)
throws BlurException
Cancels a query that is executing against the given table with the given uuid. Note, the
cancel call maybe take some time for the query actually stops executing.
Parameters
| Name | Description | | table | the table name.
|
| uuid | the uuid of the query.
|
Function: Blur.queryStatusIdList
list<string> queryStatusIdList(string table)
throws BlurException
Returns a list of the query ids of queries that have recently been executed for the given table.
@return list of all the uuids of the queries uuids.
Parameters
| Name | Description | | table | the table name.
|
Function: Blur.queryStatusById
BlurQueryStatus queryStatusById(string table,
string uuid)
throws BlurException
Returns the query status for the given table and query uuid.
@return fetches the BlurQueryStatus for the given table and uuid.
Parameters
| Name | Description | | table | the table name.
|
| uuid | the uuid of the query.
|
Function: Blur.terms
list<string> terms(string table,
string columnFamily,
string columnName,
string startWith,
i16 size)
throws BlurException
Gets the terms list from the index for the given table, family, column using the
startWith value to page through the results. This method only makes sense to use with
string and text field types.
@return the list of terms for the given column.
Parameters
| Name | Description | | table | the table name.
|
| columnFamily | the column family. If the frequency requested is a system field like "rowid", "recordid", "family", etc then columnFamily can be null.
|
| columnName | the column name.
|
| startWith | the term to start with assuming that you are paging through the term list.
|
| size | the number to fetch at once.
|
Function: Blur.recordFrequency
i64 recordFrequency(string table,
string columnFamily,
string columnName,
string value)
throws BlurException
Gets the record frequency for the provided table, family, column and value.
@return the count for the entire table.
Parameters
| Name | Description | | table | the table name.
|
| columnFamily | the column family. If the frequency requested is a system field like "rowid", "recordid", "family", etc then columnFamily can be null.
|
| columnName | the column name.
|
| value | the value.
|
Function: Blur.shardClusterList
list<string> shardClusterList()
throws BlurException
Returns a list of all the shard clusters.
@return list of all the shard clusters.
Function: Blur.shardServerList
list<string> shardServerList(string cluster)
throws BlurException
Returns a list of all the shard servers for the given cluster.
@return list of all the shard servers within the cluster.
Parameters
| Name | Description | | cluster | the cluster name.
|
Function: Blur.controllerServerList
list<string> controllerServerList()
throws BlurException
Returns a list of all the controller servers.
@return list of all the controllers.
Function: Blur.shardServerLayout
map<string, string> shardServerLayout(string table)
throws BlurException
Returns a map of the layout of the given table, where the key is the shard name
and the value is the shard server.
This method will return the "correct" layout for the given shard, or the
"correct" layout of cluster if called on a controller.
The meaning of correct:
Given the current state of the shard cluster with failures taken
into account, the correct layout is what the layout should be given the current state. In
other words, what the shard server should be serving. The act of calling the shard
server layout method with the NORMAL option will block until the layout shard server
matches the correct layout. Meaning it will block until indexes that should be open are
open and ready for queries. However indexes are lazily closed, so if a table is being
disabled then the call will return immediately with an empty map, but the indexes may
not be close yet.
@return map of shards in a table to the shard servers.
Parameters
| Name | Description | | table | the table name.
|
Function: Blur.shardServerLayoutState
map<string, map<string, ShardState>> shardServerLayoutState(string table)
throws BlurException
Returns a map of the layout of the given table, where the key is the shard name and the
value is the shard server.
This method will return immediately with what shards are currently
open in the shard server. So if a shard is being moved to another server and is being
closed by this server it WILL be returned in the map. The shardServerLayout method would not return
the shard given the same situation.
@return map of shards to a map of shard servers with the state of the shard.
Parameters
| Name | Description | | table | the table name.
|
Function: Blur.isInSafeMode
bool isInSafeMode(string cluster)
throws BlurException
Checks to see if the given cluster is in safemode.
@return boolean.
Parameters
| Name | Description | | cluster | the name of the cluster.
|
Function: Blur.configuration
map<string, string> configuration()
throws BlurException
Fetches the Blur configuration.
@return Map of property name to value.
Function: Blur.configurationPerServer
string configurationPerServer(string thriftServerPlusPort,
string configName)
throws BlurException
Fetches the Blur configuration.
@return Map of property name to value.
Function: Blur.metrics
map<string, Metric> metrics(set<string> metrics)
throws BlurException
Fetches the Blur metrics by name. If the metrics parameter is null all the Metrics are returned.
@return Map of metric name to Metric.
Parameters
| Name | Description | | metrics | the names of the metrics to return. If null all are returned.
|
Function: Blur.startTrace
void startTrace(string traceId,
string requestId)
Starts a trace with the given trace id.
Parameters
| Name | Description | | traceId | the trace id.
|
| requestId | the request id, used to connected remote calls together. Client can pass null.
|
Function: Blur.traceList
list<string> traceList()
throws BlurException
Get a list of all the traces.
@return the list of trace ids.
Function: Blur.traceRequestList
list<string> traceRequestList(string traceId)
throws BlurException
Gets a request list for the given trace.
@return the list of request ids for the given trace id.
Parameters
| Name | Description | | traceId | the trace id.
|
Function: Blur.traceRequestFetch
string traceRequestFetch(string traceId,
string requestId)
throws BlurException
Fetches the given trace.
@return the json for the given trace request.
Parameters
| Name | Description | | traceId | the trace id.
|
| requestId | the request id.
|
Function: Blur.traceRemove
void traceRemove(string traceId)
throws BlurException
Remove the trace for the given trace id.
Parameters
| Name | Description | | traceId | the trace id.
|
Function: Blur.ping
void ping()
A way to ping a server to make sure the connection is still valid.
Function: Blur.logging
void logging(string classNameOrLoggerName,
Level level)
throws BlurException
Changes the logging level for the given instance dynamically at runtime.
Parameters
| Name | Description | | classNameOrLoggerName | the className or Logger Name of the Logger to be changed.
|
| level | the logging level.
|
Function: Blur.resetLogging
void resetLogging()
throws BlurException
Resets the logging for this instance to match the log4j file. NOTE: This will allow for dynamically changing to logging file at runtime.