本文整理匯總了Java中org.apache.hive.common.util.HiveVersionInfo類的典型用法代碼示例。如果您正苦於以下問題:Java HiveVersionInfo類的具體用法?Java HiveVersionInfo怎麽用?Java HiveVersionInfo使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
HiveVersionInfo類屬於org.apache.hive.common.util包,在下文中一共展示了HiveVersionInfo類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setup
import org.apache.hive.common.util.HiveVersionInfo; //導入依賴的package包/類
@Before
public void setup() throws ClassNotFoundException {
mockStatic(HiveVersionInfo.class);
}
示例2: throwsWhenSupportingClassDoesNotExist
import org.apache.hive.common.util.HiveVersionInfo; //導入依賴的package包/類
@Test(expected = RuntimeException.class)
public void throwsWhenSupportingClassDoesNotExist() {
when(HiveVersionInfo.getShortVersion()).thenReturn("this.is.not.a.real.hive.version");
ShimsLoader.clearShimClass();
ShimsLoader.getHiveShims();
}
示例3: assertGetsCorrectShimsClassForVersion
import org.apache.hive.common.util.HiveVersionInfo; //導入依賴的package包/類
private void assertGetsCorrectShimsClassForVersion(Class expectedClass, String version) {
when(HiveVersionInfo.getShortVersion()).thenReturn(version);
DynamoDbHiveShims shims = ShimsLoader.getHiveShims();
assertTrue(expectedClass.isInstance(shims));
ShimsLoader.clearShimClass();
}