@Override
    public void run() {
      String appType = _analyticJob.getAppType().getName();
      String analysisName = String.format("%s %s", appType, _analyticJob.getAppId());
      long analysisStartTimeMillis = System.currentTimeMillis();
      logger.info(String.format("Analyzing %s", analysisName));
      long applicableFinishTime = -1;
      long jobFinishTime = -1;
      FinishTimeInfo finishTimeInfo = null;
      try {
        final AppResult result = _analyticJob.getAnalysis();
        applicableFinishTime = getApplicableFinishTime(_analyticJob);
        synchronized (_appsLock) {
          finishTimeInfo = _appTypeToFinishTimeInfo.get(appType);
          final BackfillInfo backfillInfo = getBackfillInfoForSave(finishTimeInfo, appType, applicableFinishTime);
          jobFinishTime = result.finishTime;
          // Execute as a transaction.
          Ebean.execute(new TxRunnable() {
            public void run() {
              result.save();
              if (backfillInfo != null) {
                backfillInfo.save();
              }
            }
          });
          _appToAnalyticJobMap.remove(_analyticJob.getAppId());
          if (finishTimeInfo !=  null) {
            updateFinishTimeInfo(finishTimeInfo, backfillInfo, result.finishTime);
            removeFromFinishTimesMap(finishTimeInfo._appFinishTimesMap, applicableFinishTime);
          }
        }
        long processingTime = System.currentTimeMillis() - analysisStartTimeMillis;
        logger.info(String.format("Analysis of %s took %sms", analysisName, processingTime));
        MetricsController.setJobProcessingTime(processingTime);
        MetricsController.markProcessedJobs();

      } catch (InterruptedException e) {
        logger.info("Thread interrupted");
        logger.info(e.getMessage());
        logger.info(ExceptionUtils.getStackTrace(e));

        Thread.currentThread().interrupt();
      } catch (TimeoutException e){
        logger.warn("Timed out while fetching data. Exception message is: " + e.getMessage());
        jobFate(finishTimeInfo, appType, applicableFinishTime, jobFinishTime);
      } catch (Exception e) {
        logger.error(String.format("Failed to analyze %s", analysisName), e);
        jobFate(finishTimeInfo, appType, applicableFinishTime, jobFinishTime);
      }
    }
Job which is run for analysis.
app/com/linkedin/drelephant/ElephantRunner.java