本文整理汇总了Java中org.apache.hadoop.hbase.rest.model.VersionModel.getOSVersion方法的典型用法代码示例。如果您正苦于以下问题:Java VersionModel.getOSVersion方法的具体用法?Java VersionModel.getOSVersion怎么用?Java VersionModel.getOSVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.hbase.rest.model.VersionModel
的用法示例。
在下文中一共展示了VersionModel.getOSVersion方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validate
import org.apache.hadoop.hbase.rest.model.VersionModel; //导入方法依赖的package包/类
private static void validate(VersionModel model) {
assertNotNull(model);
assertNotNull(model.getRESTVersion());
assertEquals(model.getRESTVersion(), RESTServlet.VERSION_STRING);
String osVersion = model.getOSVersion();
assertNotNull(osVersion);
assertTrue(osVersion.contains(System.getProperty("os.name")));
assertTrue(osVersion.contains(System.getProperty("os.version")));
assertTrue(osVersion.contains(System.getProperty("os.arch")));
String jvmVersion = model.getJVMVersion();
assertNotNull(jvmVersion);
assertTrue(jvmVersion.contains(System.getProperty("java.vm.vendor")));
assertTrue(jvmVersion.contains(System.getProperty("java.version")));
assertTrue(jvmVersion.contains(System.getProperty("java.vm.version")));
assertNotNull(model.getServerVersion());
String jerseyVersion = model.getJerseyVersion();
assertNotNull(jerseyVersion);
assertEquals(jerseyVersion, ServletContainer.class.getPackage()
.getImplementationVersion());
}
示例2: validate
import org.apache.hadoop.hbase.rest.model.VersionModel; //导入方法依赖的package包/类
private static void validate(VersionModel model) {
assertNotNull(model);
assertNotNull(model.getRESTVersion());
assertEquals(RESTServlet.VERSION_STRING, model.getRESTVersion());
String osVersion = model.getOSVersion();
assertNotNull(osVersion);
assertTrue(osVersion.contains(System.getProperty("os.name")));
assertTrue(osVersion.contains(System.getProperty("os.version")));
assertTrue(osVersion.contains(System.getProperty("os.arch")));
String jvmVersion = model.getJVMVersion();
assertNotNull(jvmVersion);
assertTrue(jvmVersion.contains(System.getProperty("java.vm.vendor")));
assertTrue(jvmVersion.contains(System.getProperty("java.version")));
assertTrue(jvmVersion.contains(System.getProperty("java.vm.version")));
assertNotNull(model.getServerVersion());
String jerseyVersion = model.getJerseyVersion();
assertNotNull(jerseyVersion);
// TODO: fix when we actually get a jersey version
// assertEquals(jerseyVersion, ServletContainer.class.getPackage().getImplementationVersion());
}