org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryStore Java Examples
The following examples show how to use
org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryStore.
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: RMApplicationHistoryWriter.java From hadoop with Apache License 2.0 | 6 votes |
protected ApplicationHistoryStore createApplicationHistoryStore( Configuration conf) { try { Class<? extends ApplicationHistoryStore> storeClass = conf.getClass(YarnConfiguration.APPLICATION_HISTORY_STORE, NullApplicationHistoryStore.class, ApplicationHistoryStore.class); return storeClass.newInstance(); } catch (Exception e) { String msg = "Could not instantiate ApplicationHistoryWriter: " + conf.get(YarnConfiguration.APPLICATION_HISTORY_STORE, NullApplicationHistoryStore.class.getName()); LOG.error(msg, e); throw new YarnRuntimeException(msg, e); } }
Example #2
Source File: RMApplicationHistoryWriter.java From big-c with Apache License 2.0 | 6 votes |
protected ApplicationHistoryStore createApplicationHistoryStore( Configuration conf) { try { Class<? extends ApplicationHistoryStore> storeClass = conf.getClass(YarnConfiguration.APPLICATION_HISTORY_STORE, NullApplicationHistoryStore.class, ApplicationHistoryStore.class); return storeClass.newInstance(); } catch (Exception e) { String msg = "Could not instantiate ApplicationHistoryWriter: " + conf.get(YarnConfiguration.APPLICATION_HISTORY_STORE, NullApplicationHistoryStore.class.getName()); LOG.error(msg, e); throw new YarnRuntimeException(msg, e); } }
Example #3
Source File: MiniYARNCluster.java From hadoop with Apache License 2.0 | 5 votes |
@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 #4
Source File: MiniYARNCluster.java From big-c with Apache License 2.0 | 5 votes |
@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 #5
Source File: MiniYARNClusterSplice.java From spliceengine with GNU Affero General Public License v3.0 | 5 votes |
@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 #6
Source File: TestRMApplicationHistoryWriter.java From hadoop with Apache License 2.0 | 4 votes |
@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 hadoop with Apache License 2.0 | 4 votes |
public void setApplicationHistoryStore(ApplicationHistoryStore store) { this.store = store; }
Example #8
Source File: TestAHSWebApp.java From hadoop with Apache License 2.0 | 4 votes |
public MockApplicationHistoryManagerImpl(ApplicationHistoryStore store) { super(); init(new YarnConfiguration()); start(); }
Example #9
Source File: TestAHSWebApp.java From hadoop with Apache License 2.0 | 4 votes |
@Override protected ApplicationHistoryStore createApplicationHistoryStore( Configuration conf) { return store; }
Example #10
Source File: TestRMApplicationHistoryWriter.java From big-c with Apache License 2.0 | 4 votes |
@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 #11
Source File: TestAHSWebApp.java From big-c with Apache License 2.0 | 4 votes |
public void setApplicationHistoryStore(ApplicationHistoryStore store) { this.store = store; }
Example #12
Source File: TestAHSWebApp.java From big-c with Apache License 2.0 | 4 votes |
public MockApplicationHistoryManagerImpl(ApplicationHistoryStore store) { super(); init(new YarnConfiguration()); start(); }
Example #13
Source File: TestAHSWebApp.java From big-c with Apache License 2.0 | 4 votes |
@Override protected ApplicationHistoryStore createApplicationHistoryStore( Configuration conf) { return store; }