Rewrite metadata service.