org.apache.blur.manager
Interface IndexServer

All Superinterfaces:
Closeable
All Known Implementing Classes:
AbstractDistributedIndexServer, AbstractIndexServer, DistributedIndexServer, LocalIndexServer

public interface IndexServer
extends Closeable

The IndexServer interface provides the internal API to interact with the indexes being served in the shard server instance.


Method Summary
 void close()
          Closes the index server.
 Map<String,BlurIndex> getIndexes(String table)
          Gets a map of the index readers for current running node.
 String getNodeName()
          Gets the current nodes name.
 long getRecordCount(String table)
          Gets the record count of the table.
 long getRowCount(String table)
          Gets the row count of the table.
 List<String> getShardList(String table)
          The shard list for a given table.
 SortedSet<String> getShardListCurrentServerOnly(String table)
          Gets a sorted list of shards being served by this server.
 Map<String,ShardState> getShardState(String table)
          Get the shard state.
 long getTableSize(String table)
          Gets the current on disk table size.
 

Method Detail

getShardListCurrentServerOnly

SortedSet<String> getShardListCurrentServerOnly(String table)
                                                throws IOException
Gets a sorted list of shards being served by this server.

Parameters:
table - the table name
Returns:
the sorted list of shards.
Throws:
IOException

getIndexes

Map<String,BlurIndex> getIndexes(String table)
                                 throws IOException
Gets a map of the index readers for current running node.

Keys are shard names, values are the associated indexes.

Parameters:
table - the table name.
Returns:
the map of readers.
Throws:
IOException

getShardList

List<String> getShardList(String table)
The shard list for a given table.

Parameters:
table - the table name.
Returns:
the list of shards.

getNodeName

String getNodeName()
Gets the current nodes name.

Returns:

getRecordCount

long getRecordCount(String table)
                    throws IOException
Gets the record count of the table.

Parameters:
table - the name of the table.
Returns:
the record count.
Throws:
IOException

getRowCount

long getRowCount(String table)
                 throws IOException
Gets the row count of the table.

Parameters:
table - the name of the table.
Returns:
Throws:
IOException

getTableSize

long getTableSize(String table)
                  throws IOException
Gets the current on disk table size.

Parameters:
table - the name of the table.
Returns:
the number of bytes on disk.
Throws:
IOException

close

void close()
           throws IOException
Closes the index server.

Specified by:
close in interface Closeable
Throws:
IOException

getShardState

Map<String,ShardState> getShardState(String table)
Get the shard state. Provides access to the as is state of the shards in this instance.

Parameters:
table - the table name.
Returns:
the map of shard name to state.


Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.