private QueryHistoryRepository createRepository(HiveConf conf) {
    try {
      return (QueryHistoryRepository) ReflectionUtil.newInstance(
          conf.getClassByName(conf.get(HiveConf.ConfVars.HIVE_QUERY_HISTORY_REPOSITORY_CLASS.varname)), conf);
    } catch (ClassNotFoundException e) {
      throw new RuntimeException(e);
    }
  }
Start method actually starts the service in a sense that it initializes the repository (which might involve
database operations) and starts the executor that's responsible for flushing records.
ql/src/java/org/apache/hadoop/hive/ql/queryhistory/QueryHistoryService.java