Thrift module: Blur
Enumerations
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 |
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 |
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 | |
BlurException that carries a message plus the original stack
trace (if any).
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 | |
3 | recordCount | i32 | The total record count for the row. If paging is used in a selector to page
through records of a row, this count will reflect the entire row.
| default | |
Rows contain a list of records.
Struct: Selector
Key | Field | Type | Description | Requiredness | Default value |
1 | recordOnly | bool | Fetch the Record only, not the entire Row.
| default | |
2 | locationId | string | 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 | |
7 | allowStaleData | bool | @deprecated This value is no longer used. This allows the fetch to see the most current data that has been added to the table.
| 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 | |
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: SimpleQuery
Key | Field | Type | Description | Requiredness | Default value |
1 | queryStr | string | A Lucene syntax based query.
| default | |
2 | superQueryOn | bool | If the super 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 | type | ScoreType | The scoring type, see the document on ScoreType for explanation of each score type.
| default | UNKNOWN |
4 | postSuperFilter | string | The post super filter (normal Lucene syntax), is a filter performed after the join to filter out entire rows from the results.
| default | |
5 | preSuperFilter | string | The pre super filter (normal Lucene syntax), is a filter performed before the join to filter out records from the results.
| default | |
The SimpleQuery object holds the query string (normal Lucene syntax), filters and type of scoring (used when super query is on).
Struct: ExpertQuery
Key | Field | Type | Description | Requiredness | Default value |
1 | query | binary | The serialized query.
| default | |
2 | filter | binary | The serialized filter.
| default | |
The expert query allows for submission of a serialized query and filter object to be executed against all the queries.
Struct: Facet
Key | Field | Type | Description | Requiredness | Default value |
1 | queryStr | string | | default | |
2 | minimumNumberOfBlurResults | i64 | | default | 9223372036854775807 |
Blur facet.
Struct: BlurQuery
Key | Field | Type | Description | Requiredness | Default value |
1 | simpleQuery | SimpleQuery |
| default | |
2 | expertQuery | ExpertQuery |
| default | |
3 | facets | list<Facet > |
| default | |
4 | selector | Selector | Selector is used to fetch data in the search results, if null only location ids will be fetched.
| default | |
5 | allowStaleData | bool | @deprecated This value is no longer used. This allows the query to see the most current data that has been added to the table.
| default | 0 |
6 | useCacheIfPresent | bool |
| default | 1 |
7 | start | i64 |
| default | 0 |
8 | fetch | i32 |
| default | 10 |
9 | minimumNumberOfResults | i64 |
| default | 9223372036854775807 |
10 | maxQueryTime | i64 |
| default | 9223372036854775807 |
11 | uuid | i64 |
| default | |
12 | userContext | string |
| default | |
13 | cacheResult | bool |
| default | 1 |
14 | startTime | i64 |
| default | 0 |
15 | modifyFileCaches | bool |
| default | 1 |
Struct: BlurResult
Key | Field | Type | Description | Requiredness | Default value |
1 | locationId | string |
| default | |
2 | score | double |
| default | |
3 | fetchResult | FetchResult |
| default | |
Struct: BlurResults
Key | Field | Type | Description | Requiredness | Default value |
1 | totalResults | i64 |
| default | 0 |
2 | shardInfo | map<string , i64 > |
| default | |
3 | results | list<BlurResult > |
| default | |
4 | facetCounts | list<i64 > |
| default | |
5 | exceptions | list<BlurException > |
| default | |
6 | query | BlurQuery |
| default | |
Struct: RowMutation
Key | Field | Type | Description | Requiredness | Default value |
1 | table | string | The that that the row mutation is to act upon.
| default | |
2 | rowId | string | The row id that the row mutation is to act upon.
| default | |
3 | wal | bool | Write ahead log, by default all updates are written to a write ahead log before the update is applied. That way if a failure occurs before the index is committed the WAL can be replayed to recover any data that could have been lost.
| default | 1 |
4 | rowMutationType | RowMutationType | | default | |
5 | recordMutations | list<RecordMutation > | | default | |
6 | waitToBeVisible | bool | On mutate waits for the mutation to be visible to queries and fetch requests.
| default | 0 |
Struct: CpuTime
Key | Field | Type | Description | Requiredness | Default value |
1 | cpuTime | i64 |
| default | |
2 | realTime | i64 |
| default | |
Struct: BlurQueryStatus
Key | Field | Type | Description | Requiredness | Default value |
1 | query | BlurQuery |
| default | |
2 | cpuTimes | map<string , CpuTime > |
| default | |
3 | completeShards | i32 |
| default | |
4 | totalShards | i32 |
| default | |
5 | state | QueryState |
| default | |
6 | uuid | i64 |
| default | |
Struct: TableStats
Key | Field | Type | Description | Requiredness | Default value |
1 | tableName | string |
| default | |
2 | bytes | i64 |
| default | |
3 | recordCount | i64 |
| default | |
4 | rowCount | i64 |
| default | |
5 | queries | i64 |
| default | |
Struct: Schema
Key | Field | Type | Description | Requiredness | Default value |
1 | table | string |
| default | |
2 | columnFamilies | map<string , set<string > > |
| default | |
Struct: AlternateColumnDefinition
Key | Field | Type | Description | Requiredness | Default value |
1 | analyzerClassName | string |
| default | |
Struct: ColumnDefinition
Key | Field | Type | Description | Requiredness | Default value |
1 | analyzerClassName | string | | default | "org.apache.lucene.analysis.standard.StandardAnalyzer" |
2 | fullTextIndex | bool | | default | |
3 | alternateColumnDefinitions | map<string , AlternateColumnDefinition > | | default | |
Struct: ColumnFamilyDefinition
Struct: AnalyzerDefinition
Key | Field | Type | Description | Requiredness | Default value |
1 | defaultDefinition | ColumnDefinition |
| default | |
2 | fullTextAnalyzerClassName | string |
| default | "org.apache.lucene.analysis.standard.StandardAnalyzer" |
3 | columnFamilyDefinitions | map<string , ColumnFamilyDefinition > |
| default | |
Struct: ColumnPreCache
Key | Field | Type | Description | Requiredness | Default value |
1 | preCacheCols | list<string > | This map sets what column families and columns to prefetch into block cache on shard open.
| default | |
Struct: TableDescriptor
Key | Field | Type | Description | Requiredness | Default value |
1 | isEnabled | bool |
| default | 1 |
2 | analyzerDefinition | AnalyzerDefinition |
| default | |
3 | shardCount | i32 |
| default | 1 |
4 | tableUri | string |
| default | |
5 | compressionClass | string |
| default | "org.apache.hadoop.io.compress.DefaultCodec" |
6 | compressionBlockSize | i32 |
| default | 32768 |
7 | cluster | string |
| default | "default" |
8 | name | string |
| default | |
9 | similarityClass | string |
| default | |
10 | blockCaching | bool |
| default | 1 |
11 | blockCachingFileTypes | set<string > |
| default | |
12 | readOnly | bool |
| default | 0 |
13 | columnPreCache | ColumnPreCache | Sets what column families and columns to prefetch into block cache on shard open.
| default | |
Services
Service: Blur
Function: Blur.shardClusterList
list<string
>
shardClusterList()
throws BlurException
Returns a 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.
@param cluster the cluster name.
Function: Blur.controllerServerList
list<string
>
controllerServerList()
throws BlurException
Returns a list of all the controller servers.
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.
@param table the table name.
Function: Blur.tableList
list<string
>
tableList()
throws BlurException
Returns a list of the table names across all shard clusters.
Function: Blur.tableListByCluster
list<string
>
tableListByCluster(string
cluster)
throws BlurException
Returns a list of the table names for the given cluster.
@param cluster the cluster name.
Function: Blur.describe
TableDescriptor
describe(string
table)
throws BlurException
Returns a table descriptor for the given table.
@param table the table name.
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.
@param table the table name.
@param blurQuery the query to execute.
Function: Blur.cancelQuery
void
cancelQuery(string
table,
i64
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.
@param table the table name.
@param uuid the uuid of the query.
Function: Blur.currentQueries
list<BlurQueryStatus
>
currentQueries(string
table)
throws BlurException
@deprecated This method should avoided, @see #queryStatusIdList and #queryStatusById.
@param table the table name.
Function: Blur.queryStatusIdList
list<i64
>
queryStatusIdList(string
table)
throws BlurException
Returns a list of the query ids of queries that have recently been executed for the given table.
@param table the table name.
Function: Blur.queryStatusById
BlurQueryStatus
queryStatusById(string
table,
i64
uuid)
throws BlurException
Returns the query status for the given table and query uuid.
@param table the table name.
@param uuid the uuid of the query.
Function: Blur.terms
list<string
>
terms(string
table,
string
columnFamily,
string
columnName,
string
startWith,
i16
size)
throws BlurException
Function: Blur.recordFrequency
i64
recordFrequency(string
table,
string
columnFamily,
string
columnName,
string
value)
throws BlurException
Function: Blur.enableTable
void
enableTable(string
table)
throws BlurException
Function: Blur.disableTable
void
disableTable(string
table)
throws BlurException
Function: Blur.removeTable
void
removeTable(string
table,
bool
deleteIndexFiles)
throws BlurException
Function: Blur.optimize
void
optimize(string
table,
i32
numberOfSegmentsPerShard)
throws BlurException
Function: Blur.isInSafeMode
bool
isInSafeMode(string
cluster)
throws BlurException
Function: Blur.configuration
map<string
, string
>
configuration()
throws BlurException