This repository has been archived by the owner on Apr 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9440122
commit fc035c1
Showing
7 changed files
with
111 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
h1. Amanuensis: Clustered Infinispan Index Writer using JGroups | ||
|
||
|
||
h2. What is it ? | ||
|
||
Amanuensis attempts to implement a pseudo-distributed Lucene IndexWriter for use with Infinispan's Lucene Directory implementation. It is modelled around Hibernate Search's backend from which it borrows many ideas and bits of code. Index operations are dispatched from slaves to one master (colocated with Infinispan's coordinator) which applies them to the real IndexWriter. | ||
Amanuensis also implements methods for obtaining efficient IndexReader instances which handle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
h1. Things to do | ||
|
||
* Robustness (persistent queues) | ||
* Backup support (snapshot/restore indices) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/test/java/net/dataforte/infinispan/amanuensis/backend/jgroups/ExecutorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package net.dataforte.infinispan.amanuensis.backend.jgroups; | ||
|
||
import java.util.concurrent.Executors; | ||
import java.util.concurrent.ScheduledExecutorService; | ||
import java.util.concurrent.TimeUnit; | ||
|
||
import org.junit.Test; | ||
|
||
public class ExecutorTest { | ||
|
||
@Test | ||
public void testExecutor() throws Exception { | ||
final ScheduledExecutorService executor = Executors.newScheduledThreadPool(1); | ||
executor.scheduleWithFixedDelay(new Runnable() { | ||
int count = 0; | ||
|
||
@Override | ||
public void run() { | ||
// TODO Auto-generated method stub | ||
++count; | ||
System.out.printf("Execution count %d\n", count); | ||
if(count>2) { | ||
executor.shutdown(); | ||
} | ||
} | ||
|
||
}, 0, 1000, TimeUnit.MILLISECONDS); | ||
executor.awaitTermination(5000, TimeUnit.MILLISECONDS); | ||
System.out.println("Completed"); | ||
} | ||
|
||
} |