@VisibleForTesting
  int createTimelineSchema(String[] args, Configuration conf) throws Exception {
    String schemaCreatorClassName = conf.get(
        YarnConfiguration.TIMELINE_SERVICE_SCHEMA_CREATOR_CLASS,
        YarnConfiguration.DEFAULT_TIMELINE_SERVICE_SCHEMA_CREATOR_CLASS);
    LOG.info("Using {} for creating Timeline Service Schema ",
        schemaCreatorClassName);
    try {
      Class<?> schemaCreatorClass = Class.forName(schemaCreatorClassName);
      if (SchemaCreator.class.isAssignableFrom(schemaCreatorClass)) {
        SchemaCreator schemaCreator = (SchemaCreator) ReflectionUtils
            .newInstance(schemaCreatorClass, conf);
        schemaCreator.createTimelineSchema(args);
        return 0;
      } else {
        throw new YarnRuntimeException("Class: " + schemaCreatorClassName
            + " not instance of " + SchemaCreator.class.getCanonicalName());
      }
    } catch (ClassNotFoundException e) {
      throw new YarnRuntimeException("Could not instantiate TimelineReader: "
          + schemaCreatorClassName, e);
    }
  }
@Test
  void testTimelineSchemaCreation() throws Exception {
    Configuration conf = new Configuration();
    conf.set(YarnConfiguration.TIMELINE_SERVICE_SCHEMA_CREATOR_CLASS,
        "org.apache.hadoop.yarn.server.timelineservice.storage" +
            ".DummyTimelineSchemaCreator");
    TimelineSchemaCreator timelineSchemaCreator = new TimelineSchemaCreator();
    assertEquals(0, timelineSchemaCreator
        .createTimelineSchema(new String[]{}, conf));
  }