@Before public void setup() throws Exception { fsContext = FileContext.getLocalFSFileContext(); fsPath = new File("target", this.getClass().getSimpleName() + "-tmpDir").getAbsoluteFile(); fsContext.delete(new Path(fsPath.getAbsolutePath()), true); config.set(YarnConfiguration.TIMELINE_SERVICE_LEVELDB_PATH, fsPath.getAbsolutePath()); config.setBoolean(YarnConfiguration.TIMELINE_SERVICE_TTL_ENABLE, false); store = new LeveldbTimelineStore(); store.init(config); store.start(); loadTestEntityData(); loadVerificationEntityData(); loadTestDomainData(); }
private void restartTimelineStore() throws IOException { // need to close so leveldb releases database lock if (store != null) { store.close(); } store = new LeveldbTimelineStore(); store.init(config); store.start(); }
LeveldbTimelineStore store = new LeveldbTimelineStore();
@Before public void setup() throws Exception { fsPath = new File("target", this.getClass().getSimpleName() + "-tmpDir").getAbsoluteFile(); fsContext = FileContext.getLocalFSFileContext(); fsContext.delete(new Path(fsPath.getAbsolutePath()), true); Configuration conf = new YarnConfiguration(); conf.set(YarnConfiguration.TIMELINE_SERVICE_LEVELDB_PATH, fsPath.getAbsolutePath()); conf.setBoolean(YarnConfiguration.TIMELINE_SERVICE_TTL_ENABLE, false); store = new LeveldbTimelineStore(); store.init(conf); store.start(); loadTestEntityData(); loadVerificationEntityData(); loadTestDomainData(); conf.setBoolean(YarnConfiguration.YARN_ACL_ENABLE, false); aclsManager = new TimelineACLsManager(conf); aclsManager.setTimelineStore(store); dataManaer = new TimelineDataManager(store, aclsManager); conf.setBoolean(YarnConfiguration.YARN_ACL_ENABLE, true); conf.set(YarnConfiguration.YARN_ADMIN_ACL, "admin"); dataManaer.init(conf); adminACLsManager = new AdminACLsManager(conf); }