private void init(String SharedResourcesPath){
      FileInputStream inputStream = null;
      try {
        File f = new File(SharedResourcesPath, FILE_NAME);
        if (!f.exists()) {
          throw new Exception();
        }
        inputStream = new FileInputStream(f);

        Type type = new TypeToken<JsonOsFamilyRoot>() {}.getType();
        Gson gson = new Gson();
        jsonOsFamily = gson.fromJson(new InputStreamReader(inputStream), type);
        osMap = jsonOsFamily.getMapping();
      } catch (Exception e) {
        LOG.error(String.format(LOAD_CONFIG_MSG, new File(SharedResourcesPath, FILE_NAME).toString()));
        throw new RuntimeException(e);
      } finally {
        IOUtils.closeQuietly(inputStream);
      }
    }
Initialize object
@param properties list of properties
ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java