public void init() {
    try {
      // Create a new conf object to bypass metastore authorization, as we need to
      // retrieve all materialized views from all databases
      HiveConf conf = new HiveConf();
      conf.set(MetastoreConf.ConfVars.FILTER_HOOK.getVarname(),
          DefaultMetaStoreFilterHookImpl.class.getName());
      init(Hive.get(conf));
    } catch (HiveException e) {
      LOG.error("Problem connecting to the metastore when initializing the view registry", e);
    }
  }
Initialize the registry for the given database. It will extract the materialized views
that are enabled for rewriting from the metastore for the current user, parse them,
and register them in this cache.

The loading process runs on the background; the method returns in the moment that the
runnable task is created, thus the views will still not be loaded in the cache when
it returns.
ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveMaterializedViewsRegistry.java