|
|
@ -124,14 +124,14 @@ public class IODispatcher extends Thread {
|
|
|
|
final MergeJob job = new MergeJob(f1, f2, factory, array, newFile);
|
|
|
|
final MergeJob job = new MergeJob(f1, f2, factory, array, newFile);
|
|
|
|
if (isAlive()) {
|
|
|
|
if (isAlive()) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
this.mergeQueue.put(job);
|
|
|
|
this.mergeQueue.add(job);
|
|
|
|
if (f2 == null) {
|
|
|
|
if (f2 == null) {
|
|
|
|
log.info("appended rewrite job of file " + f1.getName() + " to " + newFile.getName());
|
|
|
|
log.info("appended rewrite job of file " + f1.getName() + " to " + newFile.getName());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
log.info("appended merge job of files " + f1.getName() + ", " + f2.getName() + " to " + newFile.getName());
|
|
|
|
log.info("appended merge job of files " + f1.getName() + ", " + f2.getName() + " to " + newFile.getName());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (final InterruptedException e) {
|
|
|
|
} catch (final Exception e) {
|
|
|
|
log.warn("interrupted: " + e.getMessage(), e);
|
|
|
|
log.warn("Could not add merge job to queue: " + e.getMessage(), e);
|
|
|
|
array.mergeMount(f1, f2, factory, newFile, (int) Math.min(MemoryControl.available() / 3, this.writeBufferSize));
|
|
|
|
array.mergeMount(f1, f2, factory, newFile, (int) Math.min(MemoryControl.available() / 3, this.writeBufferSize));
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
this.controlQueue.release();
|
|
|
|
this.controlQueue.release();
|
|
|
|