Examples of CodingException


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

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

      }

      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

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

      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

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

      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

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

        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

Examples of org.raist.common.codec.CodingException

    if( dest == null || dest.isEmpty() )
      return null;

    E result = map.get(dest);
    if( result == null )
      throw new CodingException(type.getSimpleName() + " not found: " + dest);

    return result;
  }
View Full Code Here

Examples of org.raist.common.codec.CodingException

    if (val.equalsIgnoreCase("true"))
      return Boolean.TRUE;
    else if (val.equalsIgnoreCase("false"))
      return Boolean.FALSE;
    else
      throw new CodingException("Invalid boolean value expression: " + val);
  }
View Full Code Here

Examples of org.raist.common.codec.CodingException

  public char decodeChar(String val) {

    if (val.length() == 1)
      return val.charAt(0);
    else
      throw new CodingException("Invalid char value expression: " + val);
  }
View Full Code Here

Examples of org.raist.common.codec.CodingException

      return Integer.parseInt(val);
    }
    catch (NumberFormatException ex) {

      throw new CodingException(ex.getMessage(), ex);
    }
  }
View Full Code Here

Examples of org.raist.common.codec.CodingException

      return Long.parseLong(val);
    }
    catch (NumberFormatException ex) {

      throw new CodingException(ex.getMessage(), ex);
    }
  }
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.