org.apache.blur.manager.indexserver
Class LocalIndexServer

java.lang.Object
  extended by org.apache.blur.manager.indexserver.AbstractIndexServer
      extended by org.apache.blur.manager.indexserver.LocalIndexServer
All Implemented Interfaces:
Closeable, IndexServer

public class LocalIndexServer
extends AbstractIndexServer


Constructor Summary
LocalIndexServer(TableDescriptor tableDescriptor)
           
LocalIndexServer(TableDescriptor tableDescriptor, boolean ramDir)
           
 
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.
 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.
 
Methods inherited from class org.apache.blur.manager.indexserver.AbstractIndexServer
getRecordCount, getRowCount
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalIndexServer

public LocalIndexServer(TableDescriptor tableDescriptor)
                 throws IOException
Throws:
IOException

LocalIndexServer

public LocalIndexServer(TableDescriptor tableDescriptor,
                        boolean ramDir)
                 throws IOException
Throws:
IOException
Method Detail

close

public void close()
Description copied from interface: IndexServer
Closes the index server.


getShardListCurrentServerOnly

public SortedSet<String> getShardListCurrentServerOnly(String table)
                                                throws IOException
Description copied from interface: IndexServer
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

public Map<String,BlurIndex> getIndexes(String table)
                                 throws IOException
Description copied from interface: IndexServer
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

public List<String> getShardList(String table)
Description copied from interface: IndexServer
The shard list for a given table.

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

getNodeName

public String getNodeName()
Description copied from interface: IndexServer
Gets the current nodes name.

Returns:

getTableSize

public long getTableSize(String table)
                  throws IOException
Description copied from interface: IndexServer
Gets the current on disk table size.

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

getShardState

public Map<String,ShardState> getShardState(String table)
Description copied from interface: IndexServer
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.