I believe that this database type is only ever used for unit tests.

> On May 18, 2017, at 1:57 PM, Anita Jebaraj <[email protected]> wrote:
> 
> Hello everyone,
> 
>             I came across the below piece of code in AmbariServer.java,
> Can someone point me to some documentation on In-memory Persistence type or
> on what context it would be used. Thanks in advance
> 
>  @Transactional
>  protected void initDB() throws AmbariException {
>    if (configs.getPersistenceType() == PersistenceType.IN_MEMORY ||
> dbInitNeeded) {
>      LOG.info("Database init needed - creating default data");
>      Users users = injector.getInstance(Users.class);
> 
>      users.createUser("admin", "admin");
>      users.createUser("user", "user");
> 
>      MetainfoEntity schemaVersion = new MetainfoEntity();
>      schemaVersion.setMetainfoName(Configuration.SERVER_VERSION_KEY);
> 
> schemaVersion.setMetainfoValue(VersionUtils.getVersionSubstring(ambariMetaInfo.getServerVersion()));
> 
>      metainfoDAO.create(schemaVersion);
>    }
>  }
> 
> 
> Thanks & Regards,
> Anita Jebaraj

Reply via email to