@Override
  public void run(HookContext hookContext) throws Exception {
    SessionState ss = SessionState.get();
    if (ss != null && ss.getConf().get(HiveConf.ConfVars.HIVE_SERVER2_MATERIALIZED_VIEWS_REGISTRY_IMPL.varname)
            .equals("DUMMY")) {
      HiveMaterializedViewsRegistry.get().init(Hive.get(ss.getConf()));
    }
  }
Implementation of a pre execute hook that reloads the materialized view registry
if needed by the test framework
ql/src/java/org/apache/hadoop/hive/ql/hooks/MaterializedViewRegistryPropertiesHook.java