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

项目:ditb    文件:SnapshotManager.java   
/**
 * Take a snapshot using the specified handler.
 * On failure the snapshot temporary working directory is removed.
 * NOTE: prepareToTakeSnapshot() called before this one takes care of the rejecting the
 *       snapshot request if the table is busy with another snapshot/restore operation.
 * @param snapshot the snapshot description
 * @param handler the snapshot handler
 */
private synchronized void snapshotTable(SnapshotDescription snapshot,
    final TakeSnapshotHandler handler) throws HBaseSnapshotException {
  try {
    handler.prepare();
    this.executorService.submit(handler);
    this.snapshotHandlers.put(TableName.valueOf(snapshot.getTable()), handler);
  } catch (Exception e) {
    // cleanup the working directory by trying to delete it from the fs.
    Path workingDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(snapshot, rootDir);
    try {
      if (!this.master.getMasterFileSystem().getFileSystem().delete(workingDir, true)) {
        LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
            ClientSnapshotDescriptionUtils.toString(snapshot));
      }
    } catch (IOException e1) {
      LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
          ClientSnapshotDescriptionUtils.toString(snapshot));
    }
    // fail the snapshot
    throw new SnapshotCreationException("Could not build snapshot handler", e, snapshot);
  }
}
项目:ditb    文件:HBaseAdmin.java   
/**
 * Take a snapshot without waiting for the server to complete that snapshot (asynchronous)
 * <p>
 * Only a single snapshot should be taken at a time, or results may be undefined.
 * @param snapshot snapshot to take
 * @return response from the server indicating the max time to wait for the snapshot
 * @throws IOException if the snapshot did not succeed or we lose contact with the master.
 * @throws SnapshotCreationException if snapshot creation failed
 * @throws IllegalArgumentException if the snapshot request is formatted incorrectly
 */
@Override
public SnapshotResponse takeSnapshotAsync(SnapshotDescription snapshot) throws IOException,
    SnapshotCreationException {
  ClientSnapshotDescriptionUtils.assertSnapshotRequestIsValid(snapshot);
  final SnapshotRequest request = SnapshotRequest.newBuilder().setSnapshot(snapshot)
      .build();
  // run the snapshot on the master
  return executeCallable(new MasterCallable<SnapshotResponse>(getConnection()) {
    @Override
    public SnapshotResponse call(int callTimeout) throws ServiceException {
      PayloadCarryingRpcController controller = rpcControllerFactory.newController();
      controller.setCallTimeout(callTimeout);
      return master.snapshot(controller, request);
    }
  });
}
项目:LCIndex-HBase-0.94.16    文件:SnapshotManager.java   
/**
 * Take a snapshot using the specified handler.
 * On failure the snapshot temporary working directory is removed.
 * NOTE: prepareToTakeSnapshot() called before this one takes care of the rejecting the
 *       snapshot request if the table is busy with another snapshot/restore operation.
 * @param snapshot the snapshot description
 * @param handler the snapshot handler
 */
private synchronized void snapshotTable(SnapshotDescription snapshot,
    final TakeSnapshotHandler handler) throws HBaseSnapshotException {
  try {
    handler.prepare();
    this.executorService.submit(handler);
    this.snapshotHandlers.put(snapshot.getTable(), handler);
  } catch (Exception e) {
    // cleanup the working directory by trying to delete it from the fs.
    Path workingDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(snapshot, rootDir);
    try {
      if (!this.master.getMasterFileSystem().getFileSystem().delete(workingDir, true)) {
        LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
            SnapshotDescriptionUtils.toString(snapshot));
      }
    } catch (IOException e1) {
      LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
          SnapshotDescriptionUtils.toString(snapshot));
    }
    // fail the snapshot
    throw new SnapshotCreationException("Could not build snapshot handler", e, snapshot);
  }
}
项目:pbase    文件:SnapshotManager.java   
/**
 * Take a snapshot using the specified handler.
 * On failure the snapshot temporary working directory is removed.
 * NOTE: prepareToTakeSnapshot() called before this one takes care of the rejecting the
 *       snapshot request if the table is busy with another snapshot/restore operation.
 * @param snapshot the snapshot description
 * @param handler the snapshot handler
 */
private synchronized void snapshotTable(SnapshotDescription snapshot,
    final TakeSnapshotHandler handler) throws HBaseSnapshotException {
  try {
    handler.prepare();
    this.executorService.submit(handler);
    this.snapshotHandlers.put(TableName.valueOf(snapshot.getTable()), handler);
  } catch (Exception e) {
    // cleanup the working directory by trying to delete it from the fs.
    Path workingDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(snapshot, rootDir);
    try {
      if (!this.master.getMasterFileSystem().getFileSystem().delete(workingDir, true)) {
        LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
            ClientSnapshotDescriptionUtils.toString(snapshot));
      }
    } catch (IOException e1) {
      LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
          ClientSnapshotDescriptionUtils.toString(snapshot));
    }
    // fail the snapshot
    throw new SnapshotCreationException("Could not build snapshot handler", e, snapshot);
  }
}
项目:HIndex    文件:SnapshotManager.java   
/**
 * Take a snapshot using the specified handler.
 * On failure the snapshot temporary working directory is removed.
 * NOTE: prepareToTakeSnapshot() called before this one takes care of the rejecting the
 *       snapshot request if the table is busy with another snapshot/restore operation.
 * @param snapshot the snapshot description
 * @param handler the snapshot handler
 */
private synchronized void snapshotTable(SnapshotDescription snapshot,
    final TakeSnapshotHandler handler) throws HBaseSnapshotException {
  try {
    handler.prepare();
    this.executorService.submit(handler);
    this.snapshotHandlers.put(TableName.valueOf(snapshot.getTable()), handler);
  } catch (Exception e) {
    // cleanup the working directory by trying to delete it from the fs.
    Path workingDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(snapshot, rootDir);
    try {
      if (!this.master.getMasterFileSystem().getFileSystem().delete(workingDir, true)) {
        LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
            ClientSnapshotDescriptionUtils.toString(snapshot));
      }
    } catch (IOException e1) {
      LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
          ClientSnapshotDescriptionUtils.toString(snapshot));
    }
    // fail the snapshot
    throw new SnapshotCreationException("Could not build snapshot handler", e, snapshot);
  }
}
项目:IRIndex    文件:SnapshotManager.java   
/**
 * Take a snapshot using the specified handler.
 * On failure the snapshot temporary working directory is removed.
 * NOTE: prepareToTakeSnapshot() called before this one takes care of the rejecting the
 *       snapshot request if the table is busy with another snapshot/restore operation.
 * @param snapshot the snapshot description
 * @param handler the snapshot handler
 */
private synchronized void snapshotTable(SnapshotDescription snapshot,
    final TakeSnapshotHandler handler) throws HBaseSnapshotException {
  try {
    handler.prepare();
    this.executorService.submit(handler);
    this.snapshotHandlers.put(snapshot.getTable(), handler);
  } catch (Exception e) {
    // cleanup the working directory by trying to delete it from the fs.
    Path workingDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(snapshot, rootDir);
    try {
      if (!this.master.getMasterFileSystem().getFileSystem().delete(workingDir, true)) {
        LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
            SnapshotDescriptionUtils.toString(snapshot));
      }
    } catch (IOException e1) {
      LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
          SnapshotDescriptionUtils.toString(snapshot));
    }
    // fail the snapshot
    throw new SnapshotCreationException("Could not build snapshot handler", e, snapshot);
  }
}
项目:hbase    文件:SnapshotManager.java   
/**
 * Take a snapshot using the specified handler.
 * On failure the snapshot temporary working directory is removed.
 * NOTE: prepareToTakeSnapshot() called before this one takes care of the rejecting the
 *       snapshot request if the table is busy with another snapshot/restore operation.
 * @param snapshot the snapshot description
 * @param handler the snapshot handler
 */
private synchronized void snapshotTable(SnapshotDescription snapshot,
    final TakeSnapshotHandler handler) throws HBaseSnapshotException {
  try {
    handler.prepare();
    this.executorService.submit(handler);
    this.snapshotHandlers.put(TableName.valueOf(snapshot.getTable()), handler);
  } catch (Exception e) {
    // cleanup the working directory by trying to delete it from the fs.
    Path workingDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(snapshot, rootDir);
    try {
      if (!this.master.getMasterFileSystem().getFileSystem().delete(workingDir, true)) {
        LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
            ClientSnapshotDescriptionUtils.toString(snapshot));
      }
    } catch (IOException e1) {
      LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
          ClientSnapshotDescriptionUtils.toString(snapshot));
    }
    // fail the snapshot
    throw new SnapshotCreationException("Could not build snapshot handler", e,
      ProtobufUtil.createSnapshotDesc(snapshot));
  }
}
项目:PyroDB    文件:SnapshotManager.java   
/**
 * Take a snapshot using the specified handler.
 * On failure the snapshot temporary working directory is removed.
 * NOTE: prepareToTakeSnapshot() called before this one takes care of the rejecting the
 *       snapshot request if the table is busy with another snapshot/restore operation.
 * @param snapshot the snapshot description
 * @param handler the snapshot handler
 */
private synchronized void snapshotTable(SnapshotDescription snapshot,
    final TakeSnapshotHandler handler) throws HBaseSnapshotException {
  try {
    handler.prepare();
    this.executorService.submit(handler);
    this.snapshotHandlers.put(TableName.valueOf(snapshot.getTable()), handler);
  } catch (Exception e) {
    // cleanup the working directory by trying to delete it from the fs.
    Path workingDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(snapshot, rootDir);
    try {
      if (!this.master.getMasterFileSystem().getFileSystem().delete(workingDir, true)) {
        LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
            ClientSnapshotDescriptionUtils.toString(snapshot));
      }
    } catch (IOException e1) {
      LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
          ClientSnapshotDescriptionUtils.toString(snapshot));
    }
    // fail the snapshot
    throw new SnapshotCreationException("Could not build snapshot handler", e, snapshot);
  }
}
项目:c5    文件:SnapshotManager.java   
/**
 * Take a snapshot using the specified handler.
 * On failure the snapshot temporary working directory is removed.
 * NOTE: prepareToTakeSnapshot() called before this one takes care of the rejecting the
 *       snapshot request if the table is busy with another snapshot/restore operation.
 * @param snapshot the snapshot description
 * @param handler the snapshot handler
 */
private synchronized void snapshotTable(SnapshotDescription snapshot,
    final TakeSnapshotHandler handler) throws HBaseSnapshotException {
  try {
    handler.prepare();
    this.executorService.submit(handler);
    this.snapshotHandlers.put(TableName.valueOf(snapshot.getTable()), handler);
  } catch (Exception e) {
    // cleanup the working directory by trying to delete it from the fs.
    Path workingDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(snapshot, rootDir);
    try {
      if (!this.master.getMasterFileSystem().getFileSystem().delete(workingDir, true)) {
        LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
            ClientSnapshotDescriptionUtils.toString(snapshot));
      }
    } catch (IOException e1) {
      LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
          ClientSnapshotDescriptionUtils.toString(snapshot));
    }
    // fail the snapshot
    throw new SnapshotCreationException("Could not build snapshot handler", e, snapshot);
  }
}
项目:HBase-Research    文件:SnapshotManager.java   
/**
 * Take a snapshot using the specified handler.
 * On failure the snapshot temporary working directory is removed.
 * NOTE: prepareToTakeSnapshot() called before this one takes care of the rejecting the
 *       snapshot request if the table is busy with another snapshot/restore operation.
 * @param snapshot the snapshot description
 * @param handler the snapshot handler
 */
private synchronized void snapshotTable(SnapshotDescription snapshot,
    final TakeSnapshotHandler handler) throws HBaseSnapshotException {
  try {
    handler.prepare();
    this.executorService.submit(handler);
    this.snapshotHandlers.put(snapshot.getTable(), handler);
  } catch (Exception e) {
    // cleanup the working directory by trying to delete it from the fs.
    Path workingDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(snapshot, rootDir);
    try {
      if (!this.master.getMasterFileSystem().getFileSystem().delete(workingDir, true)) {
        LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
            SnapshotDescriptionUtils.toString(snapshot));
      }
    } catch (IOException e1) {
      LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
          SnapshotDescriptionUtils.toString(snapshot));
    }
    // fail the snapshot
    throw new SnapshotCreationException("Could not build snapshot handler", e, snapshot);
  }
}
项目:hbase-0.94.8-qod    文件:SnapshotManager.java   
/**
 * Take a snapshot using the specified handler.
 * On failure the snapshot temporary working directory is removed.
 * NOTE: prepareToTakeSnapshot() called before this one takes care of the rejecting the
 *       snapshot request if the table is busy with another snapshot/restore operation.
 * @param snapshot the snapshot description
 * @param handler the snapshot handler
 */
private synchronized void snapshotTable(SnapshotDescription snapshot,
    final TakeSnapshotHandler handler) throws HBaseSnapshotException {
  try {
    handler.prepare();
    this.executorService.submit(handler);
    this.snapshotHandlers.put(snapshot.getTable(), handler);
  } catch (Exception e) {
    // cleanup the working directory by trying to delete it from the fs.
    Path workingDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(snapshot, rootDir);
    try {
      if (!this.master.getMasterFileSystem().getFileSystem().delete(workingDir, true)) {
        LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
            SnapshotDescriptionUtils.toString(snapshot));
      }
    } catch (IOException e1) {
      LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
          SnapshotDescriptionUtils.toString(snapshot));
    }
    // fail the snapshot
    throw new SnapshotCreationException("Could not build snapshot handler", e, snapshot);
  }
}
项目:hbase-0.94.8-qod    文件:SnapshotManager.java   
/**
 * Take a snapshot using the specified handler.
 * On failure the snapshot temporary working directory is removed.
 * NOTE: prepareToTakeSnapshot() called before this one takes care of the rejecting the
 *       snapshot request if the table is busy with another snapshot/restore operation.
 * @param snapshot the snapshot description
 * @param handler the snapshot handler
 */
private synchronized void snapshotTable(SnapshotDescription snapshot,
    final TakeSnapshotHandler handler) throws HBaseSnapshotException {
  try {
    handler.prepare();
    this.executorService.submit(handler);
    this.snapshotHandlers.put(snapshot.getTable(), handler);
  } catch (Exception e) {
    // cleanup the working directory by trying to delete it from the fs.
    Path workingDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(snapshot, rootDir);
    try {
      if (!this.master.getMasterFileSystem().getFileSystem().delete(workingDir, true)) {
        LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
            SnapshotDescriptionUtils.toString(snapshot));
      }
    } catch (IOException e1) {
      LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
          SnapshotDescriptionUtils.toString(snapshot));
    }
    // fail the snapshot
    throw new SnapshotCreationException("Could not build snapshot handler", e, snapshot);
  }
}
项目:hindex    文件:SnapshotManager.java   
/**
 * Take a snapshot using the specified handler.
 * On failure the snapshot temporary working directory is removed.
 * NOTE: prepareToTakeSnapshot() called before this one takes care of the rejecting the
 *       snapshot request if the table is busy with another snapshot/restore operation.
 * @param snapshot the snapshot description
 * @param handler the snapshot handler
 */
private synchronized void snapshotTable(SnapshotDescription snapshot,
    final TakeSnapshotHandler handler) throws HBaseSnapshotException {
  try {
    handler.prepare();
    this.executorService.submit(handler);
    this.snapshotHandlers.put(snapshot.getTable(), handler);
  } catch (Exception e) {
    // cleanup the working directory by trying to delete it from the fs.
    Path workingDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(snapshot, rootDir);
    try {
      if (!this.master.getMasterFileSystem().getFileSystem().delete(workingDir, true)) {
        LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
            SnapshotDescriptionUtils.toString(snapshot));
      }
    } catch (IOException e1) {
      LOG.error("Couldn't delete working directory (" + workingDir + " for snapshot:" +
          SnapshotDescriptionUtils.toString(snapshot));
    }
    // fail the snapshot
    throw new SnapshotCreationException("Could not build snapshot handler", e, snapshot);
  }
}
项目:ditb    文件:TakeSnapshotHandler.java   
/**
 * Reset the manager to allow another snapshot to proceed
 *
 * @param snapshotDir final path of the snapshot
 * @param workingDir directory where the in progress snapshot was built
 * @param fs {@link FileSystem} where the snapshot was built
 * @throws SnapshotCreationException if the snapshot could not be moved
 * @throws IOException the filesystem could not be reached
 */
public void completeSnapshot(Path snapshotDir, Path workingDir, FileSystem fs)
    throws SnapshotCreationException, IOException {
  LOG.debug("Sentinel is done, just moving the snapshot from " + workingDir + " to "
      + snapshotDir);
  if (!fs.rename(workingDir, snapshotDir)) {
    throw new SnapshotCreationException("Failed to move working directory(" + workingDir
        + ") to completed directory(" + snapshotDir + ").");
  }
  finished = true;
}
项目:LCIndex-HBase-0.94.16    文件:TakeSnapshotHandler.java   
/**
 * Reset the manager to allow another snapshot to proceed
 *
 * @param snapshotDir final path of the snapshot
 * @param workingDir directory where the in progress snapshot was built
 * @param fs {@link FileSystem} where the snapshot was built
 * @throws SnapshotCreationException if the snapshot could not be moved
 * @throws IOException the filesystem could not be reached
 */
public void completeSnapshot(Path snapshotDir, Path workingDir, FileSystem fs)
    throws SnapshotCreationException, IOException {
  LOG.debug("Sentinel is done, just moving the snapshot from " + workingDir + " to "
      + snapshotDir);
  if (!fs.rename(workingDir, snapshotDir)) {
    throw new SnapshotCreationException("Failed to move working directory(" + workingDir
        + ") to completed directory(" + snapshotDir + ").");
  }
  finished = true;
}
项目:pbase    文件:TakeSnapshotHandler.java   
/**
 * Reset the manager to allow another snapshot to proceed
 *
 * @param snapshotDir final path of the snapshot
 * @param workingDir directory where the in progress snapshot was built
 * @param fs {@link FileSystem} where the snapshot was built
 * @throws SnapshotCreationException if the snapshot could not be moved
 * @throws IOException the filesystem could not be reached
 */
public void completeSnapshot(Path snapshotDir, Path workingDir, FileSystem fs)
    throws SnapshotCreationException, IOException {
  LOG.debug("Sentinel is done, just moving the snapshot from " + workingDir + " to "
      + snapshotDir);
  if (!fs.rename(workingDir, snapshotDir)) {
    throw new SnapshotCreationException("Failed to move working directory(" + workingDir
        + ") to completed directory(" + snapshotDir + ").");
  }
  finished = true;
}
项目:pbase    文件:HBaseAdmin.java   
/**
 * Take a snapshot without waiting for the server to complete that snapshot (asynchronous)
 * <p>
 * Only a single snapshot should be taken at a time, or results may be undefined.
 * @param snapshot snapshot to take
 * @return response from the server indicating the max time to wait for the snapshot
 * @throws IOException if the snapshot did not succeed or we lose contact with the master.
 * @throws SnapshotCreationException if snapshot creation failed
 * @throws IllegalArgumentException if the snapshot request is formatted incorrectly
 */
@Override
public SnapshotResponse takeSnapshotAsync(SnapshotDescription snapshot) throws IOException,
    SnapshotCreationException {
  ClientSnapshotDescriptionUtils.assertSnapshotRequestIsValid(snapshot);
  final SnapshotRequest request = SnapshotRequest.newBuilder().setSnapshot(snapshot)
      .build();
  // run the snapshot on the master
  return executeCallable(new MasterCallable<SnapshotResponse>(getConnection()) {
    @Override
    public SnapshotResponse call(int callTimeout) throws ServiceException {
      return master.snapshot(null, request);
    }
  });
}
项目:HIndex    文件:TakeSnapshotHandler.java   
/**
 * Reset the manager to allow another snapshot to proceed
 *
 * @param snapshotDir final path of the snapshot
 * @param workingDir directory where the in progress snapshot was built
 * @param fs {@link FileSystem} where the snapshot was built
 * @throws SnapshotCreationException if the snapshot could not be moved
 * @throws IOException the filesystem could not be reached
 */
public void completeSnapshot(Path snapshotDir, Path workingDir, FileSystem fs)
    throws SnapshotCreationException, IOException {
  LOG.debug("Sentinel is done, just moving the snapshot from " + workingDir + " to "
      + snapshotDir);
  if (!fs.rename(workingDir, snapshotDir)) {
    throw new SnapshotCreationException("Failed to move working directory(" + workingDir
        + ") to completed directory(" + snapshotDir + ").");
  }
  finished = true;
}
项目:HIndex    文件:HBaseAdmin.java   
/**
 * Take a snapshot without waiting for the server to complete that snapshot (asynchronous)
 * <p>
 * Only a single snapshot should be taken at a time, or results may be undefined.
 * @param snapshot snapshot to take
 * @return response from the server indicating the max time to wait for the snapshot
 * @throws IOException if the snapshot did not succeed or we lose contact with the master.
 * @throws SnapshotCreationException if snapshot creation failed
 * @throws IllegalArgumentException if the snapshot request is formatted incorrectly
 */
public SnapshotResponse takeSnapshotAsync(SnapshotDescription snapshot) throws IOException,
    SnapshotCreationException {
  ClientSnapshotDescriptionUtils.assertSnapshotRequestIsValid(snapshot);
  final SnapshotRequest request = SnapshotRequest.newBuilder().setSnapshot(snapshot)
      .build();
  // run the snapshot on the master
  return executeCallable(new MasterCallable<SnapshotResponse>(getConnection()) {
    @Override
    public SnapshotResponse call() throws ServiceException {
      return master.snapshot(null, request);
    }
  });
}
项目:IRIndex    文件:TakeSnapshotHandler.java   
/**
 * Reset the manager to allow another snapshot to proceed
 *
 * @param snapshotDir final path of the snapshot
 * @param workingDir directory where the in progress snapshot was built
 * @param fs {@link FileSystem} where the snapshot was built
 * @throws SnapshotCreationException if the snapshot could not be moved
 * @throws IOException the filesystem could not be reached
 */
public void completeSnapshot(Path snapshotDir, Path workingDir, FileSystem fs)
    throws SnapshotCreationException, IOException {
  LOG.debug("Sentinel is done, just moving the snapshot from " + workingDir + " to "
      + snapshotDir);
  if (!fs.rename(workingDir, snapshotDir)) {
    throw new SnapshotCreationException("Failed to move working directory(" + workingDir
        + ") to completed directory(" + snapshotDir + ").");
  }
  finished = true;
}
项目:hbase    文件:TakeSnapshotHandler.java   
/**
 * Reset the manager to allow another snapshot to proceed
 *
 * @param snapshotDir final path of the snapshot
 * @param workingDir directory where the in progress snapshot was built
 * @param fs {@link FileSystem} where the snapshot was built
 * @throws SnapshotCreationException if the snapshot could not be moved
 * @throws IOException the filesystem could not be reached
 */
public void completeSnapshot(Path snapshotDir, Path workingDir, FileSystem fs)
    throws SnapshotCreationException, IOException {
  LOG.debug("Sentinel is done, just moving the snapshot from " + workingDir + " to "
      + snapshotDir);
  if (!fs.rename(workingDir, snapshotDir)) {
    throw new SnapshotCreationException("Failed to move working directory(" + workingDir
        + ") to completed directory(" + snapshotDir + ").");
  }
  finished = true;
}
项目:PyroDB    文件:TakeSnapshotHandler.java   
/**
 * Reset the manager to allow another snapshot to proceed
 *
 * @param snapshotDir final path of the snapshot
 * @param workingDir directory where the in progress snapshot was built
 * @param fs {@link FileSystem} where the snapshot was built
 * @throws SnapshotCreationException if the snapshot could not be moved
 * @throws IOException the filesystem could not be reached
 */
public void completeSnapshot(Path snapshotDir, Path workingDir, FileSystem fs)
    throws SnapshotCreationException, IOException {
  LOG.debug("Sentinel is done, just moving the snapshot from " + workingDir + " to "
      + snapshotDir);
  if (!fs.rename(workingDir, snapshotDir)) {
    throw new SnapshotCreationException("Failed to move working directory(" + workingDir
        + ") to completed directory(" + snapshotDir + ").");
  }
  finished = true;
}
项目:PyroDB    文件:HBaseAdmin.java   
/**
 * Take a snapshot without waiting for the server to complete that snapshot (asynchronous)
 * <p>
 * Only a single snapshot should be taken at a time, or results may be undefined.
 * @param snapshot snapshot to take
 * @return response from the server indicating the max time to wait for the snapshot
 * @throws IOException if the snapshot did not succeed or we lose contact with the master.
 * @throws SnapshotCreationException if snapshot creation failed
 * @throws IllegalArgumentException if the snapshot request is formatted incorrectly
 */
public SnapshotResponse takeSnapshotAsync(SnapshotDescription snapshot) throws IOException,
    SnapshotCreationException {
  ClientSnapshotDescriptionUtils.assertSnapshotRequestIsValid(snapshot);
  final SnapshotRequest request = SnapshotRequest.newBuilder().setSnapshot(snapshot)
      .build();
  // run the snapshot on the master
  return executeCallable(new MasterCallable<SnapshotResponse>(getConnection()) {
    @Override
    public SnapshotResponse call(int callTimeout) throws ServiceException {
      return master.snapshot(null, request);
    }
  });
}
项目:c5    文件:TakeSnapshotHandler.java   
/**
 * Reset the manager to allow another snapshot to proceed
 *
 * @param snapshotDir final path of the snapshot
 * @param workingDir directory where the in progress snapshot was built
 * @param fs {@link FileSystem} where the snapshot was built
 * @throws SnapshotCreationException if the snapshot could not be moved
 * @throws IOException the filesystem could not be reached
 */
public void completeSnapshot(Path snapshotDir, Path workingDir, FileSystem fs)
    throws SnapshotCreationException, IOException {
  LOG.debug("Sentinel is done, just moving the snapshot from " + workingDir + " to "
      + snapshotDir);
  if (!fs.rename(workingDir, snapshotDir)) {
    throw new SnapshotCreationException("Failed to move working directory(" + workingDir
        + ") to completed directory(" + snapshotDir + ").");
  }
  finished = true;
}
项目:c5    文件:HBaseAdmin.java   
/**
 * Take a snapshot without waiting for the server to complete that snapshot (asynchronous)
 * <p>
 * Only a single snapshot should be taken at a time, or results may be undefined.
 * @param snapshot snapshot to take
 * @return response from the server indicating the max time to wait for the snapshot
 * @throws IOException if the snapshot did not succeed or we lose contact with the master.
 * @throws SnapshotCreationException if snapshot creation failed
 * @throws IllegalArgumentException if the snapshot request is formatted incorrectly
 */
public SnapshotResponse takeSnapshotAsync(SnapshotDescription snapshot) throws IOException,
    SnapshotCreationException {
  ClientSnapshotDescriptionUtils.assertSnapshotRequestIsValid(snapshot);
  final SnapshotRequest request = SnapshotRequest.newBuilder().setSnapshot(snapshot)
      .build();
  // run the snapshot on the master
  return executeCallable(new MasterCallable<SnapshotResponse>(getConnection()) {
    @Override
    public SnapshotResponse call() throws ServiceException {
      return master.snapshot(null, request);
    }
  });
}
项目:HBase-Research    文件:TakeSnapshotHandler.java   
/**
 * Reset the manager to allow another snapshot to proceed
 *
 * @param snapshotDir final path of the snapshot
 * @param workingDir directory where the in progress snapshot was built
 * @param fs {@link FileSystem} where the snapshot was built
 * @throws SnapshotCreationException if the snapshot could not be moved
 * @throws IOException the filesystem could not be reached
 */
public void completeSnapshot(Path snapshotDir, Path workingDir, FileSystem fs)
    throws SnapshotCreationException, IOException {
  LOG.debug("Sentinel is done, just moving the snapshot from " + workingDir + " to "
      + snapshotDir);
  if (!fs.rename(workingDir, snapshotDir)) {
    throw new SnapshotCreationException("Failed to move working directory(" + workingDir
        + ") to completed directory(" + snapshotDir + ").");
  }
  finished = true;
}
项目:hbase-0.94.8-qod    文件:TakeSnapshotHandler.java   
/**
 * Reset the manager to allow another snapshot to proceed
 *
 * @param snapshotDir final path of the snapshot
 * @param workingDir directory where the in progress snapshot was built
 * @param fs {@link FileSystem} where the snapshot was built
 * @throws SnapshotCreationException if the snapshot could not be moved
 * @throws IOException the filesystem could not be reached
 */
public void completeSnapshot(Path snapshotDir, Path workingDir, FileSystem fs)
    throws SnapshotCreationException, IOException {
  LOG.debug("Sentinel is done, just moving the snapshot from " + workingDir + " to "
      + snapshotDir);
  if (!fs.rename(workingDir, snapshotDir)) {
    throw new SnapshotCreationException("Failed to move working directory(" + workingDir
        + ") to completed directory(" + snapshotDir + ").");
  }
  finished = true;
}
项目:hbase-0.94.8-qod    文件:TakeSnapshotHandler.java   
/**
 * Reset the manager to allow another snapshot to proceed
 *
 * @param snapshotDir final path of the snapshot
 * @param workingDir directory where the in progress snapshot was built
 * @param fs {@link FileSystem} where the snapshot was built
 * @throws SnapshotCreationException if the snapshot could not be moved
 * @throws IOException the filesystem could not be reached
 */
public void completeSnapshot(Path snapshotDir, Path workingDir, FileSystem fs)
    throws SnapshotCreationException, IOException {
  LOG.debug("Sentinel is done, just moving the snapshot from " + workingDir + " to "
      + snapshotDir);
  if (!fs.rename(workingDir, snapshotDir)) {
    throw new SnapshotCreationException("Failed to move working directory(" + workingDir
        + ") to completed directory(" + snapshotDir + ").");
  }
  finished = true;
}
项目:hindex    文件:TakeSnapshotHandler.java   
/**
 * Reset the manager to allow another snapshot to proceed
 *
 * @param snapshotDir final path of the snapshot
 * @param workingDir directory where the in progress snapshot was built
 * @param fs {@link FileSystem} where the snapshot was built
 * @throws SnapshotCreationException if the snapshot could not be moved
 * @throws IOException the filesystem could not be reached
 */
public void completeSnapshot(Path snapshotDir, Path workingDir, FileSystem fs)
    throws SnapshotCreationException, IOException {
  LOG.debug("Sentinel is done, just moving the snapshot from " + workingDir + " to "
      + snapshotDir);
  if (!fs.rename(workingDir, snapshotDir)) {
    throw new SnapshotCreationException("Failed to move working directory(" + workingDir
        + ") to completed directory(" + snapshotDir + ").");
  }
  finished = true;
}
项目:ditb    文件:HBaseAdmin.java   
public void snapshot(final String snapshotName,
                     final String tableName) throws IOException,
    SnapshotCreationException, IllegalArgumentException {
  snapshot(snapshotName, TableName.valueOf(tableName),
      SnapshotDescription.Type.FLUSH);
}
项目:ditb    文件:HBaseAdmin.java   
public void snapshot(final byte[] snapshotName,
                     final byte[] tableName) throws IOException,
    SnapshotCreationException, IllegalArgumentException {
  snapshot(Bytes.toString(snapshotName), TableName.valueOf(tableName),
    SnapshotDescription.Type.FLUSH);
}
项目:ditb    文件:HBaseAdmin.java   
public void snapshot(final String snapshotName,
                     final String tableName,
                    SnapshotDescription.Type type) throws IOException, SnapshotCreationException,
    IllegalArgumentException {
  snapshot(snapshotName, TableName.valueOf(tableName), type);
}
项目:ditb    文件:HBaseAdmin.java   
public void snapshot(final String snapshotName,
                     final byte[] tableName,
                    SnapshotDescription.Type type) throws IOException, SnapshotCreationException,
    IllegalArgumentException {
  snapshot(snapshotName, TableName.valueOf(tableName), type);
}
项目:ColumnManagerForHBase    文件:MAdmin.java   
@Override
public void snapshot(String string, TableName tn) throws IOException, SnapshotCreationException, IllegalArgumentException {
  wrappedHbaseAdmin.snapshot(string, tn);
}
项目:ColumnManagerForHBase    文件:MAdmin.java   
@Override
public void snapshot(byte[] name, TableName tn) throws IOException, SnapshotCreationException, IllegalArgumentException {
  wrappedHbaseAdmin.snapshot(name, tn);
}
项目:ColumnManagerForHBase    文件:MAdmin.java   
@Override
public void snapshot(String string, TableName tn, Type type) throws IOException, SnapshotCreationException, IllegalArgumentException {
  wrappedHbaseAdmin.snapshot(string, tn, type);
}
项目:ColumnManagerForHBase    文件:MAdmin.java   
@Override
public void snapshot(SnapshotDescription sd) throws IOException, SnapshotCreationException, IllegalArgumentException {
  wrappedHbaseAdmin.snapshot(sd);
}
项目:ColumnManagerForHBase    文件:MAdmin.java   
@Override
public SnapshotResponse takeSnapshotAsync(SnapshotDescription sd) throws IOException, SnapshotCreationException {
  return wrappedHbaseAdmin.takeSnapshotAsync(sd);
}
项目:cloud-bigtable-client    文件:BigtableAdmin.java   
@Override
public void snapshot(String snapshotName, TableName tableName)
    throws IOException, SnapshotCreationException, IllegalArgumentException {
  throw new UnsupportedOperationException("snapshot");  // TODO
}
项目:cloud-bigtable-client    文件:BigtableAdmin.java   
@Override
public void snapshot(byte[] snapshotName, TableName tableName)
    throws IOException, SnapshotCreationException, IllegalArgumentException {
  throw new UnsupportedOperationException("snapshot");  // TODO
}