本文整理汇总了Java中org.apache.hadoop.hbase.snapshot.SnapshotTask类的典型用法代码示例。如果您正苦于以下问题:Java SnapshotTask类的具体用法?Java SnapshotTask怎么用?Java SnapshotTask使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SnapshotTask类属于org.apache.hadoop.hbase.snapshot包,在下文中一共展示了SnapshotTask类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testErrorPropagation
import org.apache.hadoop.hbase.snapshot.SnapshotTask; //导入依赖的package包/类
/**
* Check that errors from running the task get propagated back to the error listener.
*/
@Test
public void testErrorPropagation() throws Exception {
ForeignExceptionDispatcher error = mock(ForeignExceptionDispatcher.class);
SnapshotDescription snapshot = SnapshotDescription.newBuilder().setName("snapshot")
.setTable("table").build();
final Exception thrown = new Exception("Failed!");
SnapshotTask fail = new SnapshotTask(snapshot, error) {
@Override
public Void call() {
snapshotFailure("Injected failure", thrown);
return null;
}
};
fail.call();
verify(error, Mockito.times(1)).receive(any(ForeignException.class));
}