Java 类org.apache.hadoop.hbase.snapshot.SnapshotTask 实例源码

项目:LCIndex-HBase-0.94.16    文件:TestSnapshotTask.java   
/**
 * 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));
}
项目:IRIndex    文件:TestSnapshotTask.java   
/**
 * 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));
}
项目:HBase-Research    文件:TestSnapshotTask.java   
/**
 * 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));
}
项目:hbase-0.94.8-qod    文件:TestSnapshotTask.java   
/**
 * 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));
}
项目:hbase-0.94.8-qod    文件:TestSnapshotTask.java   
/**
 * 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));
}
项目:hindex    文件:TestSnapshotTask.java   
/**
 * 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));
}