Thrift module: Blur

ModuleServicesData typesConstants
BlurBlur
AlternateColumnDefinition
AnalyzerDefinition
BlurException
BlurQuery
BlurQueryStatus
BlurResult
BlurResults
Column
ColumnDefinition
ColumnFamilyDefinition
ColumnPreCache
CpuTime
ExpertQuery
Facet
FetchRecordResult
FetchResult
FetchRowResult
QueryState
Record
RecordMutation
RecordMutationType
Row
RowMutation
RowMutationType
Schema
ScoreType
Selector
SimpleQuery
TableDescriptor
TableStats

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.


SUPER0
AGGREGATE1
BEST2
CONSTANT3

Enumeration: QueryState

The state of a query.

RUNNING - Query is running.

INTERRUPTED - Query has been interrupted.

COMPLETE - Query is complete.


RUNNING0
INTERRUPTED1
COMPLETE2

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_ROW0
REPLACE_ROW1
UPDATE_ROW2

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_RECORD0
REPLACE_ENTIRE_RECORD1
REPLACE_COLUMNS2
APPEND_COLUMN_VALUES3

Data structures

Exception: BlurException

KeyFieldTypeDescriptionRequirednessDefault value
1messagestringThe message in the exception. default
2stackTraceStrstringThe original stack trace (if any). default

BlurException that carries a message plus the original stack trace (if any).

Struct: Column

KeyFieldTypeDescriptionRequirednessDefault value
1namestringThe name of the column. default
2valuestringThe 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

KeyFieldTypeDescriptionRequirednessDefault value
1recordIdstringRecord id uniquely identifies a record within a single row. default
2familystringThe family in which this record resides. default
3columnslist<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

KeyFieldTypeDescriptionRequirednessDefault value
1idstringThe row id. default
2recordslist<Record>The list records within the row. If paging is used this list will only reflect the paged records from the selector. default
3recordCounti32The 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

KeyFieldTypeDescriptionRequirednessDefault value
1recordOnlyboolFetch the Record only, not the entire Row. default
2locationIdstringThe location id of the Record or Row to be fetched. default
3rowIdstringThe row id of the Row to be fetched, not to be used with location id. default
4recordIdstringThe 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
5columnFamiliesToFetchset<string>The column families to fetch. If null, fetch all. If empty, fetch none. default
6columnsToFetchmap<string, set<string>>The columns in the families to fetch. If null, fetch all. If empty, fetch none. default
7allowStaleDatabool@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

KeyFieldTypeDescriptionRequirednessDefault value
1rowRowThe row fetched. default

FetchRowResult contains row result from a fetch.

Struct: FetchRecordResult

KeyFieldTypeDescriptionRequirednessDefault value
1rowidstringThe row id of the record being fetched. default
2recordRecordThe record fetched. default

FetchRecordResult contains rowid of the record and the record result from a fetch.

Struct: FetchResult

KeyFieldTypeDescriptionRequirednessDefault value
1existsboolTrue if the result exists, false if it doesn't. default
2deletedboolIf the row was marked as deleted. default
3tablestringThe table the fetch result came from. default
4rowResultFetchRowResultThe row result if a row was selected form the Selector. default
5recordResultFetchRecordResultThe 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

KeyFieldTypeDescriptionRequirednessDefault value
1queryStrstringA Lucene syntax based query. default
2superQueryOnboolIf 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). default1
3typeScoreTypeThe scoring type, see the document on ScoreType for explanation of each score type. defaultUNKNOWN
4postSuperFilterstringThe post super filter (normal Lucene syntax), is a filter performed after the join to filter out entire rows from the results. default
5preSuperFilterstringThe 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

KeyFieldTypeDescriptionRequirednessDefault value
1querybinaryThe serialized query. default
2filterbinaryThe 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

KeyFieldTypeDescriptionRequirednessDefault value
1queryStrstringdefault
2minimumNumberOfBlurResultsi64default9223372036854775807

Blur facet.

Struct: BlurQuery

KeyFieldTypeDescriptionRequirednessDefault value
1simpleQuerySimpleQuery default
2expertQueryExpertQuery default
3facetslist<Facet> default
4selectorSelectorSelector is used to fetch data in the search results, if null only location ids will be fetched. default
5allowStaleDatabool@deprecated This value is no longer used. This allows the query to see the most current data that has been added to the table. default0
6useCacheIfPresentbool default1
7starti64 default0
8fetchi32 default10
9minimumNumberOfResultsi64 default9223372036854775807
10maxQueryTimei64 default9223372036854775807
11uuidi64 default
12userContextstring default
13cacheResultbool default1
14startTimei64 default0
15modifyFileCachesbool default1


Struct: BlurResult

KeyFieldTypeDescriptionRequirednessDefault value
1locationIdstring default
2scoredouble default
3fetchResultFetchResult default


Struct: BlurResults

KeyFieldTypeDescriptionRequirednessDefault value
1totalResultsi64 default0
2shardInfomap<string, i64> default
3resultslist<BlurResult> default
4facetCountslist<i64> default
5exceptionslist<BlurException> default
6queryBlurQuery default


Struct: RecordMutation

KeyFieldTypeDescriptionRequirednessDefault value
1recordMutationTypeRecordMutationType default
2recordRecord default


Struct: RowMutation

KeyFieldTypeDescriptionRequirednessDefault value
1tablestringThe that that the row mutation is to act upon. default
2rowIdstringThe row id that the row mutation is to act upon. default
3walboolWrite 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. default1
4rowMutationTypeRowMutationTypedefault
5recordMutationslist<RecordMutation>default
6waitToBeVisibleboolOn mutate waits for the mutation to be visible to queries and fetch requests. default0


Struct: CpuTime

KeyFieldTypeDescriptionRequirednessDefault value
1cpuTimei64 default
2realTimei64 default


Struct: BlurQueryStatus

KeyFieldTypeDescriptionRequirednessDefault value
1queryBlurQuery default
2cpuTimesmap<string, CpuTime> default
3completeShardsi32 default
4totalShardsi32 default
5stateQueryState default
6uuidi64 default


Struct: TableStats

KeyFieldTypeDescriptionRequirednessDefault value
1tableNamestring default
2bytesi64 default
3recordCounti64 default
4rowCounti64 default
5queriesi64 default


Struct: Schema

KeyFieldTypeDescriptionRequirednessDefault value
1tablestring default
2columnFamiliesmap<string, set<string>> default


Struct: AlternateColumnDefinition

KeyFieldTypeDescriptionRequirednessDefault value
1analyzerClassNamestring default


Struct: ColumnDefinition

KeyFieldTypeDescriptionRequirednessDefault value
1analyzerClassNamestringdefault"org.apache.lucene.analysis.standard.StandardAnalyzer"
2fullTextIndexbooldefault
3alternateColumnDefinitionsmap<string, AlternateColumnDefinition>default


Struct: ColumnFamilyDefinition

KeyFieldTypeDescriptionRequirednessDefault value
1defaultDefinitionColumnDefinition default
2columnDefinitionsmap<string, ColumnDefinition> default


Struct: AnalyzerDefinition

KeyFieldTypeDescriptionRequirednessDefault value
1defaultDefinitionColumnDefinition default
2fullTextAnalyzerClassNamestring default"org.apache.lucene.analysis.standard.StandardAnalyzer"
3columnFamilyDefinitionsmap<string, ColumnFamilyDefinition> default


Struct: ColumnPreCache

KeyFieldTypeDescriptionRequirednessDefault value
1preCacheColslist<string>This map sets what column families and columns to prefetch into block cache on shard open. default


Struct: TableDescriptor

KeyFieldTypeDescriptionRequirednessDefault value
1isEnabledbool default1
2analyzerDefinitionAnalyzerDefinition default
3shardCounti32 default1
4tableUristring default
5compressionClassstring default"org.apache.hadoop.io.compress.DefaultCodec"
6compressionBlockSizei32 default32768
7clusterstring default"default"
8namestring default
9similarityClassstring default
10blockCachingbool default1
11blockCachingFileTypesset<string> default
12readOnlybool default0
13columnPreCacheColumnPreCacheSets 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.schema

Schema schema(string table)
    throws BlurException

Function: Blur.getTableStats

TableStats getTableStats(string table)
    throws BlurException

Function: Blur.tableStats

TableStats tableStats(string table)
    throws BlurException

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.fetchRow

FetchResult fetchRow(string table,
                     Selector selector)
    throws BlurException

Function: Blur.mutate

void mutate(RowMutation mutation)
    throws BlurException

Function: Blur.mutateBatch

void mutateBatch(list<RowMutation> mutations)
    throws BlurException

Function: Blur.createTable

void createTable(TableDescriptor tableDescriptor)
    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