Examples of readInt()


Examples of org.apache.cassandra.io.util.FileDataInput.readInt()

            return;
        try
        {
            DecoratedKey keyInDisk = ssTable.getPartitioner().convertFromDiskFormat(file.readUTF());
            assert keyInDisk.equals(decoratedKey) : keyInDisk;
            file.readInt(); // data size

            /* Read the bloom filter summarizing the columns */
            BloomFilter bf = IndexHelper.defreezeBloomFilter(file);
            List<byte[]> filteredColumnNames = new ArrayList<byte[]>(columnNames.size());
            for (byte[] name : columnNames)
View Full Code Here

Examples of org.apache.cassandra.io.util.MappedFileDataInput.readInt()

            // bloom filter
            IndexHelper.defreezeBloomFilter(in1, rowSize1, false);
            IndexHelper.defreezeBloomFilter(in2, rowSize2, false);
            // index
            int indexSize1 = in1.readInt();
            int indexSize2 = in2.readInt();
            assertEquals(indexSize1, indexSize2);

            ByteBuffer bytes1 = in1.readBytes(indexSize1);
            ByteBuffer bytes2 = in2.readBytes(indexSize2);
View Full Code Here

Examples of org.apache.cassandra.io.util.RandomAccessReader.readInt()

                long claimedCRC32;
                int serializedSize;
                try
                {
                    // any of the reads may hit EOF
                    serializedSize = reader.readInt();
                    if (serializedSize == CommitLog.END_OF_SEGMENT_MARKER)
                    {
                        logger.debug("Encountered end of segment marker at " + reader.getFilePointer());
                        break;
                    }
View Full Code Here

Examples of org.apache.cassandra.utils.vint.EncodedDataInputStream.readInt()

        for (int i = 0; i < 10000; i++)
            Assert.assertEquals(i, idis.readShort());

        // assert reading Integer
        for (int i = Short.MAX_VALUE; i < ((int)Short.MAX_VALUE + 10000); i++)
            Assert.assertEquals(i, idis.readInt());

        // assert reading Long
        for (long i = Integer.MAX_VALUE; i < ((long)Integer.MAX_VALUE) + 1000; i++)
            Assert.assertEquals(i, idis.readLong());
    }
View Full Code Here

Examples of org.apache.derby.iapi.services.io.ArrayInputStream.readInt()

     throws StandardException, IOException
  {
    ArrayInputStream inStream = new ArrayInputStream(a);

    inStream.setLimit(CONTAINER_INFO_SIZE);
    int fid = inStream.readInt();
    if (fid != formatIdInteger)
        {
      throw StandardException.newException(
                SQLState.DATA_UNKNOWN_CONTAINER_FORMAT, getIdentity(),
                new Long(fid));
View Full Code Here

Examples of org.apache.derby.io.StorageRandomAccessFile.readInt()

      else
      {
        // open file for reading only
        verifyKeyFile = privAccessFile(sf,Attribute.CRYPTO_EXTERNAL_KEY_VERIFY_FILE,"r");
        // then read the checksum length
        int checksumLen = verifyKeyFile.readInt();

        byte[] originalChecksum = new byte[checksumLen];
        verifyKeyFile.readFully(originalChecksum);

        verifyKeyFile.readFully(data);
View Full Code Here

Examples of org.apache.flink.runtime.io.disk.iomanager.ChannelReaderInputView.readInt()

     
      long readStart = System.currentTimeMillis();
     
      valsLeft = NUM_INTS_WRITTEN;
      while (valsLeft-- > 0) {
        in.readInt();
//        Assert.assertTrue(rec.getValue() == valsLeft);
      }
     
      in.close();
      reader.close();
View Full Code Here

Examples of org.apache.flink.runtime.io.network.serialization.DataInputDeserializer.readInt()

    }

    try {
      DataInputDeserializer deserializer = new DataInputDeserializer(this.serializedEventList);

      int numEvents = deserializer.readInt();
      ArrayList<AbstractEvent> events = new ArrayList<AbstractEvent>(numEvents);

      for (int i = 0; i < numEvents; i++) {
        String className = deserializer.readUTF();
        Class<? extends AbstractEvent> clazz;
View Full Code Here

Examples of org.apache.hadoop.fs.FSDataInputStream.readInt()

      }

      FSDataInputStream in = fs.open(restartFile);
      try {
        // read the old count
        restartCount = in.readInt();
        ++restartCount; // increment the restart count
      } catch (IOException ioe) {
        LOG.warn("System directory is garbled. Failed to read file "
                 + restartFile);
        LOG.warn("Jobtracker recovery is not possible with garbled"
View Full Code Here

Examples of org.apache.hadoop.io.DataInputBuffer.readInt()

    DataOutputBuffer ob = new DataOutputBuffer(c.getSerializedSizeEstimate());
    try {
      c.write(ob);
      DataInputBuffer ib = new DataInputBuffer();
      ib.reset(ob.getData(), c.getSerializedSizeEstimate());
      int version = ib.readInt();
      assertEquals(version, ChunkImpl.PROTOCOL_VERSION);
    } catch (IOException e) {
      e.printStackTrace();
      fail("Should nor raise any exception");
    }
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.