|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.blur.thrift.TableAdmin
org.apache.blur.thrift.BlurShardServer
public class BlurShardServer
Constructor Summary | |
---|---|
BlurShardServer()
|
Method Summary | |
---|---|
void |
cancelQuery(String table,
String uuid)
Cancels a query that is executing against the given table with the given uuid. |
void |
close()
|
void |
createSnapshot(String table,
String name)
Creates a snapshot for the table with the given name |
void |
enqueueMutate(RowMutation mutation)
Enqueue a RowMutation. |
void |
enqueueMutateBatch(List<RowMutation> mutations)
Enqueue a batch of RowMutations. |
FetchResult |
fetchRow(String table,
Selector selector)
Fetches a Row or a Record in the given table with the given Selector. |
List<FetchResult> |
fetchRowBatch(String table,
List<Selector> selectors)
Fetches a batch of Rows or Records in the given table with the given Selector list. |
int |
getDataFetchThreadCount()
|
int |
getMaxQueryCacheElements()
|
long |
getMaxTimeToLive()
|
void |
init()
|
Map<String,List<String>> |
listSnapshots(String table)
Returns a map where the key is the shard, and the list is the snapshots within that shard |
void |
mutate(RowMutation mutation)
Mutates a Row given the RowMutation that is provided. |
void |
mutateBatch(List<RowMutation> mutations)
Mutates a group of Rows given the list of RowMutations that are provided. |
void |
optimize(String table,
int numberOfSegmentsPerShard)
Will perform a forced optimize on the index in the given table. |
String |
parseQuery(String table,
Query simpleQuery)
Parses the given query and returns the string that represents the query. |
BlurResults |
query(String table,
BlurQuery blurQuery)
Executes a query against a the given table and returns the results. |
BlurQueryStatus |
queryStatusById(String table,
String uuid)
Returns the query status for the given table and query uuid. |
List<String> |
queryStatusIdList(String table)
Returns a list of the query ids of queries that have recently been executed for the given table. |
long |
recordFrequency(String table,
String columnFamily,
String columnName,
String value)
Gets the record frequency for the provided table, family, column and value. |
void |
removeSnapshot(String table,
String name)
Removes a previous snapshot(identified by name) of the table |
Schema |
schema(String table)
Gets the schema for a given table. |
void |
setDataFetchThreadCount(int dataFetchThreadCount)
|
void |
setIndexManager(IndexManager indexManager)
|
void |
setIndexServer(IndexServer indexServer)
|
void |
setMaxQueryCacheElements(int maxQueryCacheElements)
|
void |
setMaxTimeToLive(long maxTimeToLive)
|
void |
setQueryChecker(BlurQueryChecker queryChecker)
|
void |
setUser(User user)
Sets the User for the current session. |
Map<String,String> |
shardServerLayout(String table)
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. |
Map<String,Map<String,ShardState>> |
shardServerLayoutState(String table)
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. |
void |
startTrace(String rootId,
String requestId)
Starts a trace with the given trace id. |
TableStats |
tableStats(String table)
Gets the table stats for the given table. |
List<String> |
terms(String table,
String columnFamily,
String columnName,
String startWith,
short size)
Gets the terms list from the index for the given table, family, column using the startWith value to page through the results. |
Methods inherited from class org.apache.blur.thrift.TableAdmin |
---|
addColumnDefinition, checkForUpdates, checkForUpdates, checkTable, checkTable, configuration, controllerServerList, createTable, describe, disableTable, enableTable, getClusterStatus, getMaxRecordsPerRowFetchRequest, isInSafeMode, isTableEnabled, logging, metrics, ping, removeTable, resetLogging, setClusterStatus, setConfiguration, setMaxRecordsPerRowFetchRequest, setZookeeper, shardClusterList, shardServerList, tableExists, tableList, tableListByCluster, traceList, traceRemove, traceRequestFetch, traceRequestList |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.blur.thrift.generated.Blur.Iface |
---|
addColumnDefinition, configuration, controllerServerList, createTable, describe, disableTable, enableTable, isInSafeMode, logging, metrics, ping, removeTable, resetLogging, shardClusterList, shardServerList, tableList, tableListByCluster, traceList, traceRemove, traceRequestFetch, traceRequestList |
Constructor Detail |
---|
public BlurShardServer()
Method Detail |
---|
public void init() throws BlurException
BlurException
public BlurResults query(String table, BlurQuery blurQuery) throws BlurException, TException
Blur.Iface
query
in interface Blur.Iface
table
- the table name.blurQuery
- the query to execute.
BlurException
TException
public String parseQuery(String table, Query simpleQuery) throws BlurException, TException
Blur.Iface
parseQuery
in interface Blur.Iface
table
- the table name.simpleQuery
- the query to parse.
BlurException
TException
public FetchResult fetchRow(String table, Selector selector) throws BlurException, TException
Blur.Iface
fetchRow
in interface Blur.Iface
table
- the table name.selector
- the Selector to use to fetch the Row or Record.
BlurException
TException
public List<FetchResult> fetchRowBatch(String table, List<Selector> selectors) throws BlurException, TException
Blur.Iface
fetchRowBatch
in interface Blur.Iface
table
- the table name.selectors
- the Selector to use to fetch the Row or Record.
BlurException
TException
public void cancelQuery(String table, String uuid) throws BlurException, TException
Blur.Iface
cancelQuery
in interface Blur.Iface
table
- the table name.uuid
- the uuid of the query.
BlurException
TException
public TableStats tableStats(String table) throws BlurException, TException
Blur.Iface
tableStats
in interface Blur.Iface
table
- the table name.
BlurException
TException
public void close()
public Map<String,String> shardServerLayout(String table) throws BlurException, TException
Blur.Iface
shardServerLayout
in interface Blur.Iface
table
- the table name.
BlurException
TException
public Map<String,Map<String,ShardState>> shardServerLayoutState(String table) throws BlurException, TException
Blur.Iface
shardServerLayoutState
in interface Blur.Iface
table
- the table name.
BlurException
TException
public long recordFrequency(String table, String columnFamily, String columnName, String value) throws BlurException, TException
Blur.Iface
recordFrequency
in interface Blur.Iface
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.
BlurException
TException
public Schema schema(String table) throws BlurException, TException
Blur.Iface
schema
in interface Blur.Iface
schema
in class TableAdmin
table
- the table name.
BlurException
TException
public List<String> terms(String table, String columnFamily, String columnName, String startWith, short size) throws BlurException, TException
Blur.Iface
terms
in interface Blur.Iface
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.
BlurException
TException
public void mutate(RowMutation mutation) throws BlurException, TException
Blur.Iface
mutate
in interface Blur.Iface
mutation
- the RowMutation.
BlurException
TException
public void enqueueMutate(RowMutation mutation) throws BlurException, TException
Blur.Iface
enqueueMutate
in interface Blur.Iface
mutation
- the RowMutation.
BlurException
TException
public void mutateBatch(List<RowMutation> mutations) throws BlurException, TException
Blur.Iface
mutateBatch
in interface Blur.Iface
mutations
- the batch of RowMutations.
BlurException
TException
public void enqueueMutateBatch(List<RowMutation> mutations) throws BlurException, TException
Blur.Iface
enqueueMutateBatch
in interface Blur.Iface
mutations
- the batch of RowMutations.
BlurException
TException
public long getMaxTimeToLive()
public void setMaxTimeToLive(long maxTimeToLive)
public int getMaxQueryCacheElements()
public void setMaxQueryCacheElements(int maxQueryCacheElements)
public void setQueryChecker(BlurQueryChecker queryChecker)
public void setIndexManager(IndexManager indexManager)
public void setIndexServer(IndexServer indexServer)
public BlurQueryStatus queryStatusById(String table, String uuid) throws BlurException, TException
Blur.Iface
queryStatusById
in interface Blur.Iface
table
- the table name.uuid
- the uuid of the query.
BlurException
TException
public List<String> queryStatusIdList(String table) throws BlurException, TException
Blur.Iface
queryStatusIdList
in interface Blur.Iface
table
- the table name.
BlurException
TException
public void optimize(String table, int numberOfSegmentsPerShard) throws BlurException, TException
Blur.Iface
optimize
in interface Blur.Iface
table
- table the name of the table.numberOfSegmentsPerShard
- the maximum of segments per shard index after the operation is completed.
BlurException
TException
public void createSnapshot(String table, String name) throws BlurException, TException
Blur.Iface
createSnapshot
in interface Blur.Iface
BlurException
TException
public void removeSnapshot(String table, String name) throws BlurException, TException
Blur.Iface
removeSnapshot
in interface Blur.Iface
BlurException
TException
public Map<String,List<String>> listSnapshots(String table) throws BlurException, TException
Blur.Iface
listSnapshots
in interface Blur.Iface
BlurException
TException
public int getDataFetchThreadCount()
public void setDataFetchThreadCount(int dataFetchThreadCount)
public void setUser(User user) throws TException
Blur.Iface
setUser
in interface Blur.Iface
user
- the User object.
TException
public void startTrace(String rootId, String requestId) throws TException
Blur.Iface
startTrace
in interface Blur.Iface
rootId
- the trace id.requestId
- the request id, used to connected remote calls together. Client can pass null.
TException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |