本文整理了Java中org.apache.hadoop.yarn.util.YarnVersionInfo.getBranch()
方法的一些代码示例,展示了YarnVersionInfo.getBranch()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YarnVersionInfo.getBranch()
方法的具体详情如下:
包路径:org.apache.hadoop.yarn.util.YarnVersionInfo
类名称:YarnVersionInfo
方法名:getBranch
[英]Get the branch on which this originated.
[中]找到这根树枝。
代码示例来源: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"));
}
}
内容来源于网络,如有侵权,请联系作者删除!