-
Notifications
You must be signed in to change notification settings - Fork 221
Open
Description
I create a bigqueue, and enqueue many items, then dequeue all.
But the size of bigqueue on disk will become bigger and bigger.
String queueDir = "/Users/ym/data/bigqueue";
String queueName = "demo";
IBigQueue bigQueue = null;
try {
bigQueue = new BigQueueImpl(queueDir, queueName);
for (int i = 0; i < 1000000; i++) {
String item = String.valueOf(i);
bigQueue.enqueue(item.getBytes());
}
// dequeue some items
for (int i = 0; i < 1000000; i++) {
String item = new String(bigQueue.dequeue());
System.out.println(item);
}
} finally {
bigQueue.close();
}
How to release space or reduce file ?
I have tried IBigQueue.gc() , but not working .
IBigQueue.removeAll() will reduce the file, but I only want to clear consumed items.
Metadata
Metadata
Assignees
Labels
No labels