org.apache.hadoop.yarn.server.applicationhistoryservice.MemoryApplicationHistoryStore Java Examples

The following examples show how to use org.apache.hadoop.yarn.server.applicationhistoryservice.MemoryApplicationHistoryStore. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MiniYARNCluster.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
protected synchronized void serviceInit(Configuration conf)
    throws Exception {
  appHistoryServer = new ApplicationHistoryServer();
  conf.setClass(YarnConfiguration.APPLICATION_HISTORY_STORE,
      MemoryApplicationHistoryStore.class, ApplicationHistoryStore.class);
  conf.setClass(YarnConfiguration.TIMELINE_SERVICE_STORE,
      MemoryTimelineStore.class, TimelineStore.class);
  conf.setClass(YarnConfiguration.TIMELINE_SERVICE_STATE_STORE_CLASS,
      MemoryTimelineStateStore.class, TimelineStateStore.class);
  appHistoryServer.init(conf);
  super.serviceInit(conf);
}
 
Example #2
Source File: MiniYARNCluster.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
protected synchronized void serviceInit(Configuration conf)
    throws Exception {
  appHistoryServer = new ApplicationHistoryServer();
  conf.setClass(YarnConfiguration.APPLICATION_HISTORY_STORE,
      MemoryApplicationHistoryStore.class, ApplicationHistoryStore.class);
  conf.setClass(YarnConfiguration.TIMELINE_SERVICE_STORE,
      MemoryTimelineStore.class, TimelineStore.class);
  conf.setClass(YarnConfiguration.TIMELINE_SERVICE_STATE_STORE_CLASS,
      MemoryTimelineStateStore.class, TimelineStateStore.class);
  appHistoryServer.init(conf);
  super.serviceInit(conf);
}
 
Example #3
Source File: MiniYARNClusterSplice.java    From spliceengine with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
protected synchronized void serviceInit(Configuration conf)
    throws Exception {
    appHistoryServer = new ApplicationHistoryServer();
    conf.setClass(YarnConfiguration.APPLICATION_HISTORY_STORE,
                  MemoryApplicationHistoryStore.class, ApplicationHistoryStore.class);
    conf.setClass(YarnConfiguration.TIMELINE_SERVICE_STORE,
                  MemoryTimelineStore.class, TimelineStore.class);
    appHistoryServer.init(conf);
    super.serviceInit(conf);
}
 
Example #4
Source File: TestRMApplicationHistoryWriter.java    From hadoop with Apache License 2.0 4 votes vote down vote up
@Before
public void setup() {
  store = new MemoryApplicationHistoryStore();
  Configuration conf = new Configuration();
  conf.setBoolean(YarnConfiguration.APPLICATION_HISTORY_ENABLED, true);
  conf.setClass(YarnConfiguration.APPLICATION_HISTORY_STORE,
      MemoryApplicationHistoryStore.class, ApplicationHistoryStore.class);
  writer = new RMApplicationHistoryWriter() {

    @Override
    protected ApplicationHistoryStore createApplicationHistoryStore(
        Configuration conf) {
      return store;
    }

    @Override
    protected Dispatcher createDispatcher(Configuration conf) {
      MultiThreadedDispatcher dispatcher =
          new MultiThreadedDispatcher(
            conf
              .getInt(
                YarnConfiguration.RM_HISTORY_WRITER_MULTI_THREADED_DISPATCHER_POOL_SIZE,
                YarnConfiguration.DEFAULT_RM_HISTORY_WRITER_MULTI_THREADED_DISPATCHER_POOL_SIZE));
      dispatcher.setDrainEventsOnStop();
      return dispatcher;
    }

    class MultiThreadedDispatcher extends
        RMApplicationHistoryWriter.MultiThreadedDispatcher {

      public MultiThreadedDispatcher(int num) {
        super(num);
      }

      @Override
      protected AsyncDispatcher createDispatcher() {
        CounterDispatcher dispatcher = new CounterDispatcher();
        dispatchers.add(dispatcher);
        return dispatcher;
      }

    }
  };
  writer.init(conf);
  writer.start();
}
 
Example #5
Source File: TestAHSWebApp.java    From hadoop with Apache License 2.0 4 votes vote down vote up
@Before
public void setup() {
  store = new MemoryApplicationHistoryStore();
}
 
Example #6
Source File: TestRMApplicationHistoryWriter.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Before
public void setup() {
  store = new MemoryApplicationHistoryStore();
  Configuration conf = new Configuration();
  conf.setBoolean(YarnConfiguration.APPLICATION_HISTORY_ENABLED, true);
  conf.setClass(YarnConfiguration.APPLICATION_HISTORY_STORE,
      MemoryApplicationHistoryStore.class, ApplicationHistoryStore.class);
  writer = new RMApplicationHistoryWriter() {

    @Override
    protected ApplicationHistoryStore createApplicationHistoryStore(
        Configuration conf) {
      return store;
    }

    @Override
    protected Dispatcher createDispatcher(Configuration conf) {
      MultiThreadedDispatcher dispatcher =
          new MultiThreadedDispatcher(
            conf
              .getInt(
                YarnConfiguration.RM_HISTORY_WRITER_MULTI_THREADED_DISPATCHER_POOL_SIZE,
                YarnConfiguration.DEFAULT_RM_HISTORY_WRITER_MULTI_THREADED_DISPATCHER_POOL_SIZE));
      dispatcher.setDrainEventsOnStop();
      return dispatcher;
    }

    class MultiThreadedDispatcher extends
        RMApplicationHistoryWriter.MultiThreadedDispatcher {

      public MultiThreadedDispatcher(int num) {
        super(num);
      }

      @Override
      protected AsyncDispatcher createDispatcher() {
        CounterDispatcher dispatcher = new CounterDispatcher();
        dispatchers.add(dispatcher);
        return dispatcher;
      }

    }
  };
  writer.init(conf);
  writer.start();
}
 
Example #7
Source File: TestAHSWebApp.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Before
public void setup() {
  store = new MemoryApplicationHistoryStore();
}