Examples of sizeInBytes()


Examples of org.apache.lucene.store.RAMDirectory.sizeInBytes()

      // enough free disk space and addIndexes should
      // succeed and index should show all documents were
      // added.

      // String[] files = startDir.list();
      long diskUsage = startDir.sizeInBytes();

      long startDiskUsage = 0;
      String[] files = startDir.list();
      for(int i=0;i<files.length;i++) {
        startDiskUsage += startDir.fileLength(files[i]);
View Full Code Here

Examples of org.apache.lucene.store.RAMDirectory.sizeInBytes()

      // enough free disk space and addIndexes should
      // succeed and index should show all documents were
      // added.

      // String[] files = startDir.list();
      long diskUsage = startDir.sizeInBytes();

      long startDiskUsage = 0;
      String[] files = startDir.list();
      for(int i=0;i<files.length;i++) {
        startDiskUsage += startDir.fileLength(files[i]);
View Full Code Here

Examples of org.apache.lucene.store.RAMDirectory.sizeInBytes()

      // enough free disk space and addIndexes should
      // succeed and index should show all documents were
      // added.

      // String[] files = startDir.list();
      long diskUsage = startDir.sizeInBytes();

      long startDiskUsage = 0;
      String[] files = startDir.list();
      for(int i=0;i<files.length;i++) {
        startDiskUsage += startDir.fileLength(files[i]);
View Full Code Here

Examples of org.apache.lucene.store.RAMDirectory.sizeInBytes()

                        Field.Index.TOKENIZED));
        writer.addDocument(d);
      }
      writer.close();

      long diskUsage = startDir.sizeInBytes();
      long diskFree = diskUsage + 10;

      IOException err = null;

      boolean done = false;
View Full Code Here

Examples of org.elasticsearch.index.cache.field.data.FieldDataCache.sizeInBytes()

            FieldDataCache fieldData = indexService.cache().fieldData();
            for (DocumentMapper mapper : indexService.mapperService()) {
                for (FieldMapper fieldMapper : mapper.mappers()) {
                    String field = fieldMapper.names().indexName();
                    logger.debug("Calculating size for field {}",field);
                    long size = fieldData.sizeInBytes(field);
                    if (size > 0) {
                        logger.debug("Size for field {}: {}",field,size);
                        entries.add(new CacheStatsPerFieldStats.FieldEntry(field,size));
                    }
                    else logger.debug("Field {} is has no cache. Skipping.",field);
View Full Code Here

Examples of org.elasticsearch.index.field.data.FieldData.sizeInBytes()

    @Override public long sizeInBytes(String fieldName) {
        long sizeInBytes = 0;
        for (ConcurrentMap<String, FieldData> map : cache.values()) {
            FieldData fieldData = map.get(fieldName);
            if (fieldData != null) {
                sizeInBytes += fieldData.sizeInBytes();
            }
        }
        return sizeInBytes;
    }
View Full Code Here

Examples of voldemort.versioning.VectorClock.sizeInBytes()

            byte[] object = value.getValue();
            dataStream.writeInt(object.length);
            dataStream.write(object);

            VectorClock clock = (VectorClock) value.getVersion();
            dataStream.writeInt(clock.sizeInBytes());
            dataStream.write(clock.toBytes());
        }

        return stream.toByteArray();
    }
View Full Code Here

Examples of voldemort.versioning.VectorClock.sizeInBytes()

    public Versioned<T> toObject(byte[] bytes) {
        VectorClock vectorClock = getVectorClock(bytes);

        int size = 1;
        if(vectorClock != null)
            size = vectorClock.sizeInBytes();

        T t = innerSerializer.toObject(ByteUtils.copy(bytes, size, bytes.length));
        return new Versioned<T>(t, vectorClock);
    }
View Full Code Here

Examples of voldemort.versioning.VectorClock.sizeInBytes()

                            + (System.currentTimeMillis() - startTime) / 1000 + " secs");

            // read the value as a versioned Object
            VectorClock clock = new VectorClock(valueEntry.getData());
            byte[] bytes = ByteUtils.copy(valueEntry.getData(),
                                          clock.sizeInBytes(),
                                          valueEntry.getData().length);
            Versioned<byte[]> value = new Versioned<byte[]>(bytes, clock);
            byte[] key = keyEntry.getData();

            if(prevKey != null && (ByteUtils.compare(prevKey, key) != 0)) {
View Full Code Here

Examples of voldemort.versioning.VectorClock.sizeInBytes()

            outputStream.writeByte(routingType.getRoutingTypeCode());
        }
        outputStream.writeInt(key.length());
        outputStream.write(key.get());
        VectorClock clock = version;
        outputStream.writeShort(clock.sizeInBytes());
        outputStream.write(clock.toBytes());
    }

    public boolean isCompleteDeleteResponse(ByteBuffer buffer) {
        return isCompleteResponse(buffer, VoldemortOpCode.DELETE_OP_CODE);
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.