ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anita Jebaraj <anita....@gmail.com>
Subject In-memory Persistence Type
Date Thu, 18 May 2017 17:57:33 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message