Increments the number of corrupt file fixing failures.
179050
protected synchronized void incrFileFixFailures(long incr) {
    if (incr < 0) {
      throw new IllegalArgumentException("Cannot increment by negative value " +
                                         incr);
    }
    
    RaidNodeMetrics.getInstance(RaidNodeMetrics.DEFAULT_NAMESPACE_ID).fileFixFailures.inc(incr);
    numFileFixFailures += incr;
  }
760515
def update(
        self,
        filename=None,
        batch_id=None,
        prev_batch_id=None,
        producer=None,
        count=None,
    ):
        
        # TODO: refactor model enforce unique batch_id
        # TODO: refactor model to not allow NULLs
        if not filename:
            raise BatchHistoryError("Invalid filename. Got None")
        if not batch_id:
            raise BatchHistoryError("Invalid batch_id. Got None")
        if not prev_batch_id:
            raise BatchHistoryError("Invalid prev_batch_id. Got None")
        if not producer:
            raise BatchHistoryError("Invalid producer. Got None")
        if self.exists(batch_id=batch_id):
            raise IntegrityError("Duplicate batch_id")
        try:
            obj = self.model.objects.get(batch_id=batch_id)
        except self.model.DoesNotExist:
            obj = self.model(
                filename=filename,
                batch_id=batch_id,
                prev_batch_id=prev_batch_id,
                producer=producer,
                total=count,
            )
            obj.transaction_file.name = filename
            obj.save()
        return obj
629768
private void reportFailedCheckpoint(FailedCheckpointStats failed) {
		statsReadWriteLock.lock();
		try {
			counts.incrementFailedCheckpoints();
			history.replacePendingCheckpointById(failed);

			dirty = true;
		} finally {
			statsReadWriteLock.unlock();
		}
	}
1041237
private void incrementModCounts() {
    if (externalMessageList != null) {
      externalMessageList.incrementModCount();
    }
    if (externalBuilderList != null) {
      externalBuilderList.incrementModCount();
    }
    if (externalMessageOrBuilderList != null) {
      externalMessageOrBuilderList.incrementModCount();
    }
  }
357002
private void increaseAndReset() {
		if (this.hashSize < 30) {
			this.hashSize += 1;
			this.hashfunctions.clear();
			for (List<Entry<T>> table : this.tables) {
				this.hashfunctions.add(new DietzfelbingerHash(this.hashSize,
						this.random));
				((ArrayList<Entry<T>>) table)
						.ensureCapacity(1 << this.hashSize);
			}
		} else {
			this.hashfunctions.add(new DietzfelbingerHash(this.hashSize,
					this.random));
			this.tables.add(new ArrayList<Entry<T>>(1 << this.hashSize));
			this.numTables++;
		}
		reset();
	}
487480
public void updateChecksums() {
        for (Entry<File, ChecksumData> entry : checksumsMap.entrySet()) {
            updateChecksums(entry.getKey(), entry.getValue());
        }
    }
1080178
public function retryAll()
    {
        foreach ($this->getFailedFiles() as $file) {
            // Rename the file first
            $tmpFile = dirname($file) . '/retrying-' . basename($file);
            rename($file, $tmpFile);

            $fp = @fopen($tmpFile, 'r');
            if ($fp === false) {
                fwrite(
                    STDERR,
                    sprintf('Could not open the file: %s' . PHP_EOL, $tmpFile)
                );
                continue;
            }
            while ($line = fgets($fp)) {
                $a = unserialize($line);
                $idNum = key($a);
                $job = $this->runner->getJobFromIdNum($idNum);
                if (! $job->callFunc($a[$idNum])) {
                    $this->handleFailure($idNum, $a[$idNum]);
                }
            }
            @fclose($fp);
            @unlink($tmpFile);
        }
    }
143234
def add_hard_count(self):
        
        self.wait_duration = int(numpy.ceil(self.total_corruption / self.sample_rate +  self.psd_duration))
        self.invalidate_psd()
1123825
public String increment() {
        // filename[count].jpg
        int count = 0;
        String newFilename,
               altered = filename();
        if (altered.charAt(altered.length()-1) == RIGHT) { //(last char == 'v') we assume that a suffix already has been applied
            
            int rightBracket = altered.length()-1, 
                leftBracket  = altered.lastIndexOf(LEFT);
//              leftBracket  = rightBracket-2;// '-2' because at least one char ought to be between LEFT & RIGHT
                // crawling backwards
//              while (leftBracket > 0 && altered.charAt(leftBracket) != LEFT) leftBracket--;
            
            try {
                count = Integer.parseInt(altered.substring(leftBracket+1, rightBracket));
            } catch (NumberFormatException | IndexOutOfBoundsException ignore) {
                //if it fails, we can assume that it was not a correct suffix, so we add one now
                newFilename = altered + LEFT;
            }
            
            newFilename = altered.substring(0, leftBracket+1);
        } else {
            newFilename = altered + LEFT;
        }
        newFilename += (count+1);
        newFilename += RIGHT; // to prevent the char being added as an int
            
        updateName(newFilename);
        return newFilename + EXTENSION_SEPERATOR + ext;
    }
683129
public void refresh() throws IOException {
    updateLock.writeLock().lock();
    try {
      root = new InnerDesc(fs, fs.getFileStatus(path),
        new MinFileFilter(conf.getLong(GRIDMIX_MIN_FILE, 128 * 1024 * 1024),
                          conf.getLong(GRIDMIX_MAX_TOTAL, 100L * (1L << 40))));
      if (0 == root.getSize()) {
        throw new IOException("Found no satisfactory file in " + path);
      }
    } finally {
      updateLock.writeLock().unlock();
    }
  }
1040677
def up_by_files(to_sync, remote_dir=DEFAULT_REMOTE_DIR, remote_files=None):
    """"""
    if remote_files is None:
        remote_files = command.map_files_raw(remote_dir=remote_dir)
    for local_file in to_sync:
        _sync_local_file(local_file, remote_dir, remote_files)
288902
protected synchronized void incrNumBlockFixSimulationFailures(long incr) {
    if (incr < 0) {
      throw new IllegalArgumentException("Cannot increment by negative value " +
                                         incr);
    }
    
    RaidNodeMetrics.getInstance(RaidNodeMetrics.DEFAULT_NAMESPACE_ID).
      blockFixSimulationFailures.inc(incr);
    numBlockFixSimulationFailures += incr;
  }
725679
def flush(self):
        """"""
        for fp in self.files:
            fp.flush()
            if isinstance(fp, int) or hasattr(fp, "fileno"):
                try:
                    os.fsync(fp)
                except OSError:
                    pass
733641
def update(self):
        """"""
        pids = fileops.readlines(self.paths['cgroup.procs'])
        self.pids = [int(pid) for pid in pids if pid != '']
        self.n_procs = len(pids)
730403
def recursive_file_count(files, item=None, checksum=False):
    """"""
    if not isinstance(files, (list, set)):
        files = [files]
    total_files = 0
    if checksum is True:
        md5s = [f.get('md5') for f in item.files]
    else:
        md5s = list()
    if isinstance(files, dict):
        # make sure to use local filenames.
        _files = files.values()
    else:
        if isinstance(files[0], tuple):
            _files = dict(files).values()
        else:
            _files = files
    for f in _files:
        try:
            is_dir = os.path.isdir(f)
        except TypeError:
            try:
                f = f[0]
                is_dir = os.path.isdir(f)
            except (AttributeError, TypeError):
                is_dir = False
        if is_dir:
            for x, _ in iter_directory(f):
                lmd5 = get_md5(open(x, 'rb'))
                if lmd5 in md5s:
                    continue
                else:
                    total_files += 1
        else:
            try:
                lmd5 = get_md5(open(f, 'rb'))
            except TypeError:
                # Support file-like objects.
                lmd5 = get_md5(f)
            if lmd5 in md5s:
                continue
            else:
                total_files += 1
    return total_files
147189
protected boolean isFileCorrupt(final DistributedFileSystem dfs, 
      final FileStatus fileStat) 
    throws IOException {
    return isFileCorrupt(dfs, fileStat, false, conf,
        this.numNonRaidedMissingBlks, this.numStrpMissingBlksMap); 
  }
875769
public void incrementExceptionCount(Throwable throwable) {

        if (throwable instanceof ServiceUnavailableException) {
            serviceUnavailableExceptionCounter.incrementAndGet();
        } else if (containsThrowableOfType(throwable, communicationExceptionsTypes)) {
            communicationExceptionCounter.incrementAndGet();
        } else if (containsThrowableOfType(throwable, businessExceptionsTypes)) {
            businessExceptionCounter.incrementAndGet();
        } else {
            otherExceptionCounter.incrementAndGet();
        }
    }