protected void logEdit(short op, Writable writable) {
        JournalTask task = submitLog(op, writable, -1);
        waitInfinity(task);
    }
@Test
    public void testInterrupt() throws Exception {
        // block if more than one task is put
        BlockingQueue<JournalTask> journalQueue = new ArrayBlockingQueue<>(1);
        Thread t1 = new Thread(new Runnable() {
            @Override
            public void run() {
                EditLog editLog = new EditLog(journalQueue);
                editLog.logEdit((short) 1, new Text("111"));
            }
        });

        t1.start();
        while (journalQueue.isEmpty()) {
            Thread.sleep(50);
        }
        // t1 is blocked in task.get() now
        Assert.assertEquals(1, journalQueue.size());

        // t2 will be blocked in queue.put() because queue is full
        Thread t2 = new Thread(new Runnable() {
            @Override
            public void run() {
                EditLog editLog = new EditLog(journalQueue);
                editLog.logEdit((short) 2, new Text("222"));
            }
        });
        t2.start();

        // t1 got interrupt exception while blocking in task.get()
        for (int i = 0; i != 3; i++) {
            t1.interrupt();
            Thread.sleep(100);
        }

        // t2 got interrupt exception while blocking in queue.put()
        for (int i = 0; i != 3; i++) {
            t2.interrupt();
            Thread.sleep(100);
        }

        Assert.assertEquals(1, journalQueue.size());
        JournalTask task = journalQueue.take();

        task.markSucceed();
        task = journalQueue.take();
        task.markSucceed();

        t1.join();
        t2.join();
    }