@Override
        public void run() {
            FileSystem fs;
            Configuration conf = getConfig();
            Path historyLog = new Path(
                    conf.get("fs.defaultFS"),
                    conf.get(HboxConfiguration.HBOX_HISTORY_LOG_DIR, HboxConfiguration.DEFAULT_HBOX_HISTORY_LOG_DIR));
            Path eventLog = new Path(
                    conf.get("fs.defaultFS"),
                    conf.get(
                            HboxConfiguration.HBOX_TF_BOARD_HISTORY_DIR,
                            HboxConfiguration.DEFAULT_HBOX_TF_BOARD_HISTORY_DIR));
            int monitorInterval = conf.getInt(
                    HboxConfiguration.HBOX_HISTORY_LOG_DELETE_MONITOR_TIME_INTERVAL,
                    HboxConfiguration.DEFAULT_HBOX_HISTORY_LOG_DELETE_MONITOR_TIME_INTERVAL);
            int logMaxAge = conf.getInt(
                    HboxConfiguration.HBOX_HISTORY_LOG_MAX_AGE_MS,
                    HboxConfiguration.DEFAULT_HBOX_HISTORY_LOG_MAX_AGE_MS);
            final Clock clock = new SystemClock();
            while (!Thread.currentThread().isInterrupted()) {
                try {
                    LOG.info("Start delete log thread.");
                    Long currentClock = clock.getTime();
                    fs = FileSystem.get(conf);
                    FileStatus[] allHistoryLog = fs.listStatus(historyLog);
                    LOG.info("historyLog:" + historyLog);
                    for (FileStatus historyLogPer : allHistoryLog) {
                        LOG.info(historyLogPer.getPath() + ":"
                                + String.valueOf(currentClock - historyLogPer.getModificationTime()));
                        if ((currentClock - historyLogPer.getModificationTime()) > logMaxAge) {
                            fs.delete(historyLogPer.getPath());
                        }
                    }
                    FileStatus[] allEvetnLog = fs.listStatus(eventLog);
                    LOG.info("eventLog:" + eventLog);
                    for (FileStatus eventLogPer : allEvetnLog) {
                        LOG.info(eventLogPer.getPath() + ":"
                                + String.valueOf(currentClock - eventLogPer.getModificationTime()));
                        if ((currentClock - eventLogPer.getModificationTime()) > logMaxAge) {
                            fs.delete(eventLogPer.getPath());
                        }
                    }

                    Thread.sleep(monitorInterval);
                } catch (Exception e) {
                    LOG.info("HistoryLog delete thread interrupted.", e);
                    break;
                }
            }
        }
Retrieve JHS bind address from configuration

@param conf
@return InetSocketAddress
history-server/src/main/java/net/qihoo/hbox/jobhistory/JobHistoryServer.java