canceler = new Canceler(); "Failed to save in any storage directories while saving namespace."); if (canceler.isCancelled()) { deleteCancelledCheckpoint(txid);
/** * Cancel any checkpoint that's currently being made, * and prevent any new checkpoints from starting for the next * minute or so. */ public void cancelAndPreventCheckpoints(String msg) throws ServiceFailedException { synchronized (cancelLock) { // The checkpointer thread takes this lock and checks if checkpointing is // postponed. thread.preventCheckpointsFor(PREVENT_AFTER_CANCEL_MS); // Before beginning a checkpoint, the checkpointer thread // takes this lock, and creates a canceler object. // If the canceler is non-null, then a checkpoint is in // progress and we need to cancel it. If it's null, then // the operation has not started, meaning that the above // time-based prevention will take effect. if (canceler != null) { canceler.cancel(msg); } } }
public void checkCancelled() throws SaveNamespaceCancelledException { if (canceller.isCancelled()) { throw new SaveNamespaceCancelledException( canceller.getCancellationReason()); } } }
canceler = new Canceler();
if (canceler != null && canceler.isCancelled()) { return;
try { checkpointImage.saveLegacyOIVImage(namesystem, legacyOivImageDir, new Canceler()); } catch (IOException e) { LOG.warn("Failed to write legacy OIV image: ", e);
if (canceler != null && canceler.isCancelled()) { return;
if (canceler != null && canceler.isCancelled()) { throw new SaveNamespaceCancelledException( canceler.getCancellationReason());
canceler = new Canceler(); "Failed to save in any storage directories while saving namespace."); if (canceler.isCancelled()) { deleteCancelledCheckpoint(txid);
canceler = new Canceler();
/** * Cancel any checkpoint that's currently being made, * and prevent any new checkpoints from starting for the next * minute or so. */ public void cancelAndPreventCheckpoints(String msg) throws ServiceFailedException { synchronized (cancelLock) { // The checkpointer thread takes this lock and checks if checkpointing is // postponed. thread.preventCheckpointsFor(PREVENT_AFTER_CANCEL_MS); // Before beginning a checkpoint, the checkpointer thread // takes this lock, and creates a canceler object. // If the canceler is non-null, then a checkpoint is in // progress and we need to cancel it. If it's null, then // the operation has not started, meaning that the above // time-based prevention will take effect. if (canceler != null) { canceler.cancel(msg); } } }
if (canceler != null && canceler.isCancelled()) { return;
public void checkCancelled() throws SaveNamespaceCancelledException { if (canceller.isCancelled()) { throw new SaveNamespaceCancelledException( canceller.getCancellationReason()); } } }
canceler = new Canceler(); "Failed to save in any storage directories while saving namespace."); if (canceler.isCancelled()) { deleteCancelledCheckpoint(txid);
/** Save the fsimage to a temp file */ private File saveFSImageToTempFile() throws IOException { SaveNamespaceContext context = new SaveNamespaceContext(fsn, txid, new Canceler()); FSImageFormatProtobuf.Saver saver = new FSImageFormatProtobuf.Saver(context); FSImageCompression compression = FSImageCompression.createCompression(conf); File imageFile = getImageFile(testDir, txid); fsn.readLock(); try { saver.save(imageFile, compression); } finally { fsn.readUnlock(); } return imageFile; }
/** * Cancel any checkpoint that's currently being made, * and prevent any new checkpoints from starting for the next * minute or so. */ public void cancelAndPreventCheckpoints(String msg) throws ServiceFailedException { synchronized (cancelLock) { // The checkpointer thread takes this lock and checks if checkpointing is // postponed. thread.preventCheckpointsFor(PREVENT_AFTER_CANCEL_MS); // Before beginning a checkpoint, the checkpointer thread // takes this lock, and creates a canceler object. // If the canceler is non-null, then a checkpoint is in // progress and we need to cancel it. If it's null, then // the operation has not started, meaning that the above // time-based prevention will take effect. if (canceler != null) { canceler.cancel(msg); } } }
public void checkCancelled() throws SaveNamespaceCancelledException { if (canceller.isCancelled()) { throw new SaveNamespaceCancelledException( canceller.getCancellationReason()); } } }
try { checkpointImage.saveLegacyOIVImage(namesystem, legacyOivImageDir, new Canceler()); } catch (IOException e) { LOG.warn("Failed to write legacy OIV image: ", e);
@Override public Void call() throws Exception { canceler.cancel("cancelled"); return null; } });
if (canceler != null && canceler.isCancelled()) { throw new SaveNamespaceCancelledException( canceler.getCancellationReason());