private static ViewDataMigrator getDataMigrator(Class<? extends ViewDataMigrator> clazz,
                                                  final ViewContext viewContext,
                                                  final ViewDataMigrationContext dataMigrationContext) {
    Injector viewInstanceInjector = Guice.createInjector(new AbstractModule() {
      @Override
      protected void configure() {
        bind(ViewContext.class)
                .toInstance(viewContext);
        bind(ViewDataMigrationContext.class)
            .toInstance(dataMigrationContext);
      }
    });
    return viewInstanceInjector.getInstance(clazz);
  }
Get the data migrator instance for view instance.

@param dataMigrationContext  the data migration context to inject into migrator instance.
@return  the data migrator.
@throws ClassNotFoundException  if class defined in the archive could not be loaded
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java