Initial logic of Metastore.