List of usage examples for org.apache.hadoop.yarn.conf YarnConfiguration TIMELINE_SERVICE_ENTITYGROUP_FS_STORE_ACTIVE_DIR
String TIMELINE_SERVICE_ENTITYGROUP_FS_STORE_ACTIVE_DIR
To view the source code for org.apache.hadoop.yarn.conf YarnConfiguration TIMELINE_SERVICE_ENTITYGROUP_FS_STORE_ACTIVE_DIR.
Click Source Link
From source file:org.apache.tez.dag.history.ats.acls.TestATSHistoryV15.java
License:Apache License
@BeforeClass public static void setup() throws IOException { try {//from ww w . j a va 2 s . c o m conf.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR, TEST_ROOT_DIR); dfsCluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).format(true).racks(null).build(); remoteFs = dfsCluster.getFileSystem(); } catch (IOException io) { throw new RuntimeException("problem starting mini dfs cluster", io); } if (mrrTezCluster == null) { try { mrrTezCluster = new MiniTezClusterWithTimeline(TestATSHistoryV15.class.getName(), 1, 1, 1, true); Configuration conf = new Configuration(); conf.setBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, true); conf.set("fs.defaultFS", remoteFs.getUri().toString()); // use HDFS conf.setInt("yarn.nodemanager.delete.debug-delay-sec", 20000); atsActivePath = new Path("/tmp/ats/active/" + random.nextInt(100000)); Path atsDonePath = new Path("/tmp/ats/done/" + random.nextInt(100000)); conf.setDouble(YarnConfiguration.TIMELINE_SERVICE_VERSION, 1.5); remoteFs.mkdirs(atsActivePath); remoteFs.mkdirs(atsDonePath); conf.setInt(DFSConfigKeys.DFS_REPLICATION_KEY, 1); conf.set(YarnConfiguration.TIMELINE_SERVICE_ENTITYGROUP_FS_STORE_ACTIVE_DIR, remoteFs.resolvePath(atsActivePath).toString()); conf.set(YarnConfiguration.TIMELINE_SERVICE_ENTITYGROUP_FS_STORE_DONE_DIR, remoteFs.resolvePath(atsDonePath).toString()); mrrTezCluster.init(conf); mrrTezCluster.start(); } catch (Throwable e) { LOG.info("Failed to start Mini Tez Cluster", e); } } user = UserGroupInformation.getCurrentUser().getShortUserName(); timelineAddress = mrrTezCluster.getConfig().get(YarnConfiguration.TIMELINE_SERVICE_WEBAPP_ADDRESS); if (timelineAddress != null) { // Hack to handle bug in MiniYARNCluster handling of webapp address timelineAddress = timelineAddress.replace("0.0.0.0", "localhost"); } }