Examples of ChecksumException


Examples of betsy.bpel.virtual.common.exceptions.ChecksumException

    private final static Logger log = Logger.getLogger(DeployOperation.class);

    public static DeployResponse deployOperation(DeployRequest request) throws DeployException, ChecksumException, ConnectionException {
        if (request.getFileMessage().isInvalid()) {
            throw new ChecksumException("Given data is invalid");
        }
        log.info("Received file is valid");

        Path pathToPackageFile = saveFileToDisk(request);
View Full Code Here

Examples of com.alibaba.otter.node.etl.common.io.signature.ChecksumException

    public static byte[] decrypt(EncryptedData encode) {
        String destCrc = ChecksumUtils.checksum(encode.getData());
        //验证sign
        if (false == StringUtils.equals(encode.getCrc(), destCrc)) {
            throw new ChecksumException(String.format("orig: %s, parsed: %s not match", encode.getCrc(), destCrc));
        }

        // 调用加密工具类
        AESUtils aes = new AESUtils();
        aes.setSecretKeyString(encode.getKey());
View Full Code Here

Examples of org.apache.hadoop.fs.ChecksumException

         
          if (verifyChecksum) {
            checksum.reset();
            checksum.update(buf, 0, len);
            if (!checksum.compare(buf, len)) {
              throw new ChecksumException("Checksum failed at " + offset, len);
            }
          }
        } catch (IOException e) {
          LOG.warn(" Could not read or failed to veirfy checksum for data" +
                   " at offset " + offset + " for block " + block + " got : "
View Full Code Here

Examples of org.apache.hadoop.fs.ChecksumException

      if (crc != null) {
        crc.reset();
        CheckedInputStream chk = new CheckedInputStream(in, crc);
        IOUtils.readFully(chk, buf.array(), 0, size);
        if (chk.getChecksum().getValue() != in.readLong()) {
          throw new ChecksumException("Checksum error reading spill index: " +
                                indexFileName, -1);
        }
      } else {
        IOUtils.readFully(in, buf.array(), 0, size);
      }
View Full Code Here

Examples of org.apache.hadoop.fs.ChecksumException

        for (int i=0; i<numChunks; i++) {
          checksum.reset();
          int dLen = Math.min(dLeft, bytesPerChecksum);
          checksum.update(buf, dOff, dLen);
          if (!checksum.compare(buf, cOff)) {
            throw new ChecksumException("Checksum failed at " +
                                        (offset + len - dLeft), len);
          }
          dLeft -= dLen;
          dOff += dLen;
          cOff += checksumSize;
View Full Code Here

Examples of org.apache.hadoop.fs.ChecksumException

          (sum[1] << 16 & 0xff0000) |
          (sum[2] << 8 & 0xff00) |
          sum[3] & 0xff;
        if (calculated != stored) {
          long errPos = basePos + data.position() - startDataPos - n;
          throw new ChecksumException(
              "Checksum error: "+ fileName + " at "+ errPos +
              " exp: " + stored + " got: " + calculated, errPos);
        }
      }
    } finally {
View Full Code Here

Examples of org.apache.hadoop.fs.ChecksumException

        (checksums[checksumsOff + 2] << 8 & 0xff00) |
        checksums[checksumsOff + 3] & 0xff;
      checksumsOff += 4;
      if (calculated != stored) {
        long errPos = basePos + dataPos - n;
        throw new ChecksumException(
            "Checksum error: "+ fileName + " at "+ errPos +
            " exp: " + stored + " got: " + calculated, errPos);
      }
    }
  }
View Full Code Here

Examples of org.apache.hadoop.fs.ChecksumException

        for (int i=0; i<numChunks; i++) {
          checksum.reset();
          int dLen = Math.min(dLeft, bytesPerChecksum);
          checksum.update(buf, dOff, dLen);
          if (!checksum.compare(buf, cOff)) {
            throw new ChecksumException("Checksum failed at " +
                                        (offset + len - dLeft), len);
          }
          dLeft -= dLen;
          dOff += dLen;
          cOff += checksumSize;
View Full Code Here

Examples of org.apache.hadoop.fs.ChecksumException

      checksum.reset();
      int dLen = Math.min(dLeft, chunkSize);
      checksum.update(buf, dOff, dLen);
      if (!checksum.compare(buf, cOff)) {
        long failedPos = offset + datalen - dLeft;
        throw new ChecksumException("Checksum failed at " + failedPos,
            failedPos);
      }
      dLeft -= dLen;
      dOff += dLen;
      cOff += checksumSize;
View Full Code Here

Examples of org.apache.hadoop.fs.ChecksumException

        throws IOException {
      if (checksum != null) {
        int calculatedChecksum = (int)checksum.getValue();
        int readChecksum = in.readInt(); // read in checksum
        if (readChecksum != calculatedChecksum) {
          throw new ChecksumException(
              "Transaction is corrupt. Calculated checksum is " +
              calculatedChecksum + " but read checksum " + readChecksum, txid);
        }
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.