@Override public void init(Configuration conf, NodeAttributesManager mgr) throws Exception { StoreSchema schema = new StoreSchema(EDITLOG_FILENAME, MIRROR_FILENAME); initStore(conf, new Path( conf.get(YarnConfiguration.FS_NODE_ATTRIBUTE_STORE_ROOT_DIR, getDefaultFSNodeAttributeRootDir())), schema, mgr); }
@After public void after() throws IOException { FileSystemNodeAttributeStore fsStore = ((FileSystemNodeAttributeStore) mgr.store); fsStore.getFs().delete(fsStore.getFsWorkingPath(), true); mgr.stop(); }
@Override public void removeNodeAttributes(List<NodeToAttributes> nodeAttributeMapping) throws IOException { RemoveNodeToAttributeLogOp op = new RemoveNodeToAttributeLogOp(); writeToLog(op.setAttributes(nodeAttributeMapping)); }
@Override public void replaceNodeAttributes(List<NodeToAttributes> nodeToAttribute) throws IOException { ReplaceNodeToAttributeLogOp op = new ReplaceNodeToAttributeLogOp(); writeToLog(op.setAttributes(nodeToAttribute)); }
@Override public void addNodeAttributes(List<NodeToAttributes> nodeAttributeMapping) throws IOException { AddNodeToAttributeLogOp op = new AddNodeToAttributeLogOp(); writeToLog(op.setAttributes(nodeAttributeMapping)); }