@Override
    public void run() {
        boolean flag = true;
        while (flag) {
            try {
                DownloadFile downloadFile = queue.poll(10, TimeUnit.SECONDS);
                if (downloadFile == null) {
                    LOG.debug("close download thread.....");
                    break;
                }
                if (LOG.isDebugEnabled()) {
                    LOG.debug("download file " + downloadFile);
                }
                try {
                    SpiderUtil.downloadFile(downloadFile.getSrcUrl(), downloadFile.getFileName());
                } catch (Exception e) {
                    LOG.warn("download error.", e);
                }
            } catch (InterruptedException e) {
                flag = false;
            }
        }
    }