本文整理了Java中org.apache.hadoop.yarn.util.YarnVersionInfo.getRevision()
方法的一些代码示例,展示了YarnVersionInfo.getRevision()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YarnVersionInfo.getRevision()
方法的具体详情如下:
包路径:org.apache.hadoop.yarn.util.YarnVersionInfo
类名称:YarnVersionInfo
方法名:getRevision
[英]Get the subversion revision number for the root directory
[中]获取根目录的subversion版本号
代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-common
public static void main(String[] args) {
LOG.debug("version: "+ getVersion());
System.out.println("Yarn " + getVersion());
System.out.println("Subversion " + getUrl() + " -r " + getRevision());
System.out.println("Compiled by " + getUser() + " on " + getDate());
System.out.println("From source with checksum " + getSrcChecksum());
}
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common
public static void main(String[] args) {
LOG.debug("version: "+ getVersion());
System.out.println("Yarn " + getVersion());
System.out.println("Subversion " + getUrl() + " -r " + getRevision());
System.out.println("Compiled by " + getUser() + " on " + getDate());
System.out.println("From source with checksum " + getSrcChecksum());
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common
public static void main(String[] args) {
LOG.debug("version: "+ getVersion());
System.out.println("YARN " + getVersion());
System.out.println("Subversion " + getUrl() + " -r " + getRevision());
System.out.println("Compiled by " + getUser() + " on " + getDate());
System.out.println("From source with checksum " + getSrcChecksum());
}
}
代码示例来源:origin: io.hops/hadoop-yarn-common
/**
* Test the yarn version info routines.
* @throws IOException
*/
@Test
public void versionInfoGenerated() throws IOException {
// can't easily know what the correct values are going to be so just
// make sure they aren't Unknown
assertTrue("getVersion returned Unknown", !YarnVersionInfo.getVersion().equals("Unknown"));
assertTrue("getUser returned Unknown", !YarnVersionInfo.getUser().equals("Unknown"));
assertTrue("getUrl returned Unknown", !YarnVersionInfo.getUrl().equals("Unknown"));
assertTrue("getSrcChecksum returned Unknown", !YarnVersionInfo.getSrcChecksum().equals("Unknown"));
// these could be Unknown if the VersionInfo generated from code not in svn or git
// so just check that they return something
assertNotNull("getRevision returned null", YarnVersionInfo.getRevision());
assertNotNull("getBranch returned null", YarnVersionInfo.getBranch());
assertTrue("getBuildVersion check doesn't contain: source checksum",
YarnVersionInfo.getBuildVersion().contains("source checksum"));
}
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common
/**
* Test the yarn version info routines.
* @throws IOException
*/
@Test
public void versionInfoGenerated() throws IOException {
// can't easily know what the correct values are going to be so just
// make sure they aren't Unknown
assertTrue("getVersion returned Unknown", !YarnVersionInfo.getVersion().equals("Unknown"));
assertTrue("getUser returned Unknown", !YarnVersionInfo.getUser().equals("Unknown"));
assertTrue("getUrl returned Unknown", !YarnVersionInfo.getUrl().equals("Unknown"));
assertTrue("getSrcChecksum returned Unknown", !YarnVersionInfo.getSrcChecksum().equals("Unknown"));
// these could be Unknown if the VersionInfo generated from code not in svn or git
// so just check that they return something
assertNotNull("getRevision returned null", YarnVersionInfo.getRevision());
assertNotNull("getBranch returned null", YarnVersionInfo.getBranch());
assertTrue("getBuildVersion check doesn't contain: source checksum",
YarnVersionInfo.getBuildVersion().contains("source checksum"));
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common
/**
* Test the yarn version info routines.
* @throws IOException
*/
@Test
public void versionInfoGenerated() throws IOException {
// can't easily know what the correct values are going to be so just
// make sure they aren't Unknown
assertNotEquals("getVersion returned Unknown",
"Unknown", YarnVersionInfo.getVersion());
assertNotEquals("getUser returned Unknown",
"Unknown", YarnVersionInfo.getUser());
assertNotEquals("getSrcChecksum returned Unknown",
"Unknown", YarnVersionInfo.getSrcChecksum());
// these could be Unknown if the VersionInfo generated from code not in svn or git
// so just check that they return something
assertNotNull("getUrl returned null", YarnVersionInfo.getUrl());
assertNotNull("getRevision returned null", YarnVersionInfo.getRevision());
assertNotNull("getBranch returned null", YarnVersionInfo.getBranch());
assertTrue("getBuildVersion check doesn't contain: source checksum",
YarnVersionInfo.getBuildVersion().contains("source checksum"));
}
}
内容来源于网络,如有侵权,请联系作者删除!