Package org.apache.aurora.codec.ThriftBinaryCodec

Examples of org.apache.aurora.codec.ThriftBinaryCodec.CodingException


        byte[] chunkData = chunkFrame.getChunk().getData();
        digest.update(chunkData);
        chunks[i] = chunkData;
      }
      if (!Arrays.equals(header.getChecksum(), digest.digest())) {
        throw new CodingException("Read back a framed log entry that failed its checksum");
      }
      return Entries.thriftBinaryDecode(Bytes.concat(chunks));
    }
View Full Code Here


      }

      COMPRESSION_BYTES_SAVED.addAndGet(bytesSaved);
      return LogEntry.deflatedEntry(ByteBuffer.wrap(deflatedData));
    } catch (IOException e) {
      throw new CodingException("Failed to deflate snapshot: " + e, e);
    }
  }
View Full Code Here

      ByteStreams.copy(inflater, inflated);
      byte[] inflatedData = inflated.toByteArray();
      LOG.info("Inflated log entry size: " + inflatedData.length);
      return thriftBinaryDecode(inflatedData);
    } catch (IOException e) {
      throw new CodingException("Failed to inflate compressed log entry.", e);
    }
  }
View Full Code Here

      byte[] chunkData = chunkFrame.getChunk().getData();
      hasher.putBytes(chunkData);
      chunks[i] = chunkData;
    }
    if (!Arrays.equals(header.getChecksum(), hasher.hash().asBytes())) {
      throw new CodingException("Read back a framed log entry that failed its checksum");
    }
    return Entries.thriftBinaryDecode(Bytes.concat(chunks));
  }
View Full Code Here

        int taskConfigId = partialTask.getTaskConfigId();
        TaskConfig config;
        try {
          config = deduplicatedSnapshot.getTaskConfigs().get(taskConfigId);
        } catch (IndexOutOfBoundsException e) {
          throw new CodingException(
              "DeduplicatedScheduledTask referenced invalid task index " + taskConfigId, e);
        }
        scheduledTask.getAssignedTask().setTask(config);
        snapshot.addToTasks(scheduledTask);
      }
View Full Code Here

TOP

Related Classes of org.apache.aurora.codec.ThriftBinaryCodec.CodingException

Copyright © 2018 www.massapicom. 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.