|
||||||||||
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.BlurControllerServer
public class BlurControllerServer
Nested Class Summary | |
---|---|
static class |
BlurControllerServer.BlurClient
|
static class |
BlurControllerServer.BlurClientRemote
|
Constructor Summary | |
---|---|
BlurControllerServer()
|
Method Summary | |
---|---|
void |
cancelQuery(String table,
String uuid)
Cancels a query that is executing against the given table with the given uuid. |
void |
close()
|
BlurResults |
convertToBlurResults(BlurResultIterable hitsIterable,
BlurQuery query,
java.util.concurrent.atomic.AtomicLongArray facetCounts,
java.util.concurrent.ExecutorService executor,
Selector selector,
String table)
|
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. |
BlurControllerServer.BlurClient |
getClient()
|
int |
getRemoteFetchCount()
|
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 |
static Schema |
merge(Schema result,
Schema schema)
|
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 |
void |
setClient(BlurControllerServer.BlurClient client)
|
void |
setDefaultDelay(long defaultDelay)
|
void |
setFetchDelay(long fetchDelay)
|
void |
setMaxDefaultDelay(long maxDefaultDelay)
|
void |
setMaxDefaultRetries(int maxDefaultRetries)
|
void |
setMaxFetchDelay(long maxFetchDelay)
|
void |
setMaxFetchRetries(int maxFetchRetries)
|
void |
setMaxMutateDelay(long maxMutateDelay)
|
void |
setMaxMutateRetries(int maxMutateRetries)
|
void |
setMutateDelay(long mutateDelay)
|
void |
setNodeName(String nodeName)
|
void |
setQueryChecker(BlurQueryChecker queryChecker)
|
void |
setRemoteFetchCount(int remoteFetchCount)
|
void |
setThreadCount(int threadCount)
|
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, schema, 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, schema, shardClusterList, shardServerList, tableList, tableListByCluster, traceList, traceRemove, traceRequestFetch, traceRequestList |
Constructor Detail |
---|
public BlurControllerServer()
Method Detail |
---|
public void init() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public void close()
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 BlurResults convertToBlurResults(BlurResultIterable hitsIterable, BlurQuery query, java.util.concurrent.atomic.AtomicLongArray facetCounts, java.util.concurrent.ExecutorService executor, Selector selector, String table) throws InterruptedException, java.util.concurrent.ExecutionException, BlurException
InterruptedException
java.util.concurrent.ExecutionException
BlurException
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 List<String> queryStatusIdList(String table) throws BlurException, TException
Blur.Iface
queryStatusIdList
in interface Blur.Iface
table
- the table name.
BlurException
TException
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 TableStats tableStats(String table) throws BlurException, TException
Blur.Iface
tableStats
in interface Blur.Iface
table
- the table name.
BlurException
TException
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 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 static Schema merge(Schema result, Schema schema)
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 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 void setNodeName(String nodeName)
public int getRemoteFetchCount()
public void setRemoteFetchCount(int remoteFetchCount)
public void setQueryChecker(BlurQueryChecker queryChecker)
public void setThreadCount(int threadCount)
public void setMaxFetchRetries(int maxFetchRetries)
public void setMaxMutateRetries(int maxMutateRetries)
public void setMaxDefaultRetries(int maxDefaultRetries)
public void setFetchDelay(long fetchDelay)
public void setMutateDelay(long mutateDelay)
public void setDefaultDelay(long defaultDelay)
public void setMaxFetchDelay(long maxFetchDelay)
public void setMaxMutateDelay(long maxMutateDelay)
public void setMaxDefaultDelay(long maxDefaultDelay)
public BlurControllerServer.BlurClient getClient()
public void setClient(BlurControllerServer.BlurClient client)
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 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 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 |