hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Lucene-hadoop Wiki] Update of "DistributedLucene" by MarkButler
Date Mon, 14 Jan 2008 10:51:15 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lucene-hadoop Wiki" for change notification.

The following page has been changed by MarkButler:
http://wiki.apache.org/lucene-hadoop/DistributedLucene

The comment on the change is:
 

------------------------------------------------------------------------------
  public class IndexVersion implements Comparable<IndexVersion>, Writable, Constants
{
    private String id;
    private int version;
+   public IndexVersion(String id);
+   public IndexVersion nextVersion();
+   public String getId();
+   public int getVersion();
  }
  }}}
  
@@ -18, +22 @@

    private IndexVersion indexVersion;
    private InetSocketAddress location;
    private IndexState state;
+   public IndexLocation(InetSocketAddress location, IndexVersion indexVersion, IndexState
state);
+   public IndexLocation(DataNodeStatusInformation dnsi, IndexVersion indexVersion, IndexState
state);
+   public IndexVersion getIndexVersion();
+   public InetSocketAddress getAddress();
+   public IndexState getState();
+   public void setState(IndexState state);
+   public IndexLocation newUncommittedVersion();
  }
+ }}}
+ 
+ {{{
+ public class DataNodeStatusInformation implements Writable {
+   private long capacity;
+   private long capacityUsed;
+   private long capacityRemaining;
+   private DataNodeConfiguration dataconf;
+   public DataNodeStatusInformation() throws IOException;
+   public InetSocketAddress getAddress();
+   public String getRack() ;
+   public long getCapacity();
+   public long getCapacityUsed();
+   public long getCapacityRemaining();
+ }
+ }}}
+ 
+ {{{
+ public class DataNodeConfiguration implements Writable, Constants {
+   private File rootDir;
+   private InetSocketAddress addr;
+   private String rack;
+   public DataNodeConfiguration(Configuration conf, String machineName, int port, String
rack) throws IOException;
+   public DataNodeConfiguration() throws IOException;
+   public File getRootDir();
+   public InetSocketAddress getAddress();
+   public String getRack();
+ } 
  }}}
  
  {{{
@@ -37, +76 @@

    void addDocument(String index, Document doc) throws IOException;
    int removeDocuments(String index, Term term) throws IOException; // Change here, Doug
suggested int[] but that is different to current Lucene API
    IndexVersion commitVersion(String index) throws IOException;
-   void addIndex(String index) throws IOException; // Shouldn't this be called createIndex
?
+   void createIndex(String index) throws IOException; 
    void addIndex(String index, IndexLocation indexToAdd) throws IOException;
    SearchResults search(IndexVersion i, Query query, Sort sort, int n) throws IOException;
  }
@@ -49, +88 @@

  public interface ClientToNameNodeProtocol extends VersionedProtocol {
    IndexLocation[] getSearchableIndexes();
    IndexLocation getUpdateableIndex(String id);
+   public String getDataNode() ; // get a random data node
  }
  }}}
  
@@ -67, +107 @@

  public interface DataNodeToNameNodeProtocol extends VersionedProtocol {
    public IndexLocation[] heartbeat(DataNodeStatusInformation datanode,
        IndexLocation[] searchableIndexes) throws RemoteException;
+ }
+ }}}
+ 
+ === Client API ===
+ 
+ {{{
+ public interface ClientAPI {
+   void createIndex(String index, boolean sharded) throws IOException;
+   String[] getIndexes();
+   void addDocument(String index, Document doc) throws IOException;
+   int removeDocuments(String index, Term term) throws IOException;
+   void commit(String index) throws IOException;
+   SearchResults search(String index, Query query, Sort sort, int n) throws IOException;
  }
  }}}
  
@@ -181, +234 @@

  
  Then provide a query operation which calls all the shards.
  
- Here is a proposal for the client API:
- 
- {{{
- public interface ClientAPI {
-   void createIndex(String index, boolean sharded) throws IOException;
-   String[] getIndexes();
-   void addDocument(String index, Document doc) throws IOException;
-   int removeDocuments(String index, Term term) throws IOException; // Change here, Doug
suggested int[] but that is different to current Lucene API
-   void commit(String index) throws IOException;
-   SearchResults search(String index, Query query, Sort sort, int n) throws IOException;
- }
- }}}
- 
  == Related Pages ==
  
  http://wiki.apache.org/solr/DistributedSearch - Distributed search in SOLR

Mime
View raw message