Java Code Examples for org.apache.tez.dag.api.TezConfiguration#DAG_RECOVERY_RECOVER_FILE_SUFFIX

The following examples show how to use org.apache.tez.dag.api.TezConfiguration#DAG_RECOVERY_RECOVER_FILE_SUFFIX . 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: RecoveryParser.java    From incubator-tez with Apache License 2.0 5 votes vote down vote up
private FSDataOutputStream getDAGRecoveryOutputStream(Path recoveryDataDir,
    TezDAGID dagID)
    throws IOException {
  Path dagRecoveryPath = new Path(recoveryDataDir,
      dagID.toString() + TezConfiguration.DAG_RECOVERY_RECOVER_FILE_SUFFIX);
  return recoveryFS.create(dagRecoveryPath, true, recoveryBufferSize);
}
 
Example 2
Source File: TestTezCommonUtils.java    From incubator-tez with Apache License 2.0 5 votes vote down vote up
@Test
public void testTezDAGRecoveryStagingPath() throws Exception {
  String strAppId = "testAppId";
  Path stageDir = TezCommonUtils.getTezSystemStagingPath(conf, strAppId);
  Path recoveryPath = TezCommonUtils.getRecoveryPath(stageDir, conf);
  Path recoveryStageDir = TezCommonUtils.getAttemptRecoveryPath(recoveryPath, 2);

  Path dagRecoveryPathj = TezCommonUtils.getDAGRecoveryPath(recoveryStageDir, "dag_123");

  String expectedDir = RESOLVED_STAGE_DIR + File.separatorChar
      + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + File.separatorChar + strAppId + File.separator
      + TezConfiguration.DAG_RECOVERY_DATA_DIR_NAME + File.separator + "2" + File.separator
      + "dag_123" + TezConfiguration.DAG_RECOVERY_RECOVER_FILE_SUFFIX;
  Assert.assertEquals(dagRecoveryPathj.toString(), expectedDir);
}
 
Example 3
Source File: RecoveryParser.java    From incubator-tez with Apache License 2.0 4 votes vote down vote up
private Path getDAGRecoveryFilePath(Path recoveryDataDir,
    TezDAGID dagID) {
  return new Path(recoveryDataDir,
      dagID.toString() + TezConfiguration.DAG_RECOVERY_RECOVER_FILE_SUFFIX);
}
 
Example 4
Source File: TezCommonUtils.java    From incubator-tez with Apache License 2.0 2 votes vote down vote up
/**
 * <p>
 * Returns a path to store DAG specific recovery info
 * </p>
 * 
 * @param attemptRecoverPath
 *          :TEZ system level staging directory used for Tez internals
 * @param dagID
 *          DagID as string
 * @return DAG specific recovery path
 */
@Private
public static Path getDAGRecoveryPath(Path attemptRecoverPath, String dagID) {
  return new Path(attemptRecoverPath, dagID + TezConfiguration.DAG_RECOVERY_RECOVER_FILE_SUFFIX);
}