Package org.elasticsearch.common.unit

Examples of org.elasticsearch.common.unit.ByteSizeValue


    public long getFilterSizeInBytes() {
        return this.filterSizeInBytes();
    }

    public ByteSizeValue filterSize() {
        return new ByteSizeValue(filterSize);
    }
View Full Code Here


    public long getBloomSizeInBytes() {
        return this.bloomSize;
    }

    public ByteSizeValue bloomSize() {
        return new ByteSizeValue(bloomSize);
    }
View Full Code Here

        return true;
    }

    @Override public ByteSizeValue backingStoreTotalSpace() {
        if (location == null) {
            return new ByteSizeValue(0);
        }
        long totalSpace = location.getTotalSpace();
        if (totalSpace == 0) {
            totalSpace = 0;
        }
        return new ByteSizeValue(totalSpace);
    }
View Full Code Here

        return new ByteSizeValue(totalSpace);
    }

    @Override public ByteSizeValue backingStoreFreeSpace() {
        if (location == null) {
            return new ByteSizeValue(0);
        }
        long usableSpace = location.getUsableSpace();
        if (usableSpace == 0) {
            usableSpace = 0;
        }
        return new ByteSizeValue(usableSpace);
    }
View Full Code Here

    }

    @Override public ByteSizeValue backingStoreTotalSpace() {
        if (direct) {
            // TODO, we can use sigar...
            return new ByteSizeValue(-1, ByteSizeUnit.BYTES);
        }
        return JvmInfo.jvmInfo().mem().heapMax();
    }
View Full Code Here

        return JvmInfo.jvmInfo().mem().heapMax();
    }

    @Override public ByteSizeValue backingStoreFreeSpace() {
        if (direct) {
            return new ByteSizeValue(-1, ByteSizeUnit.BYTES);
        }
        return JvmStats.jvmStats().mem().heapUsed();
    }
View Full Code Here

        if (filesToRecover.isEmpty()) {
            logger.trace("no files to recover, all exists within the local store");
        }

        if (logger.isTraceEnabled()) {
            logger.trace("recovering_files [{}] with total_size [{}], reusing_files [{}] with reused_size [{}]", numberOfFiles, new ByteSizeValue(totalSize), numberOfReusedFiles, new ByteSizeValue(reusedTotalSize));
        }

        final CountDownLatch latch = new CountDownLatch(filesToRecover.size());
        final CopyOnWriteArrayList<Throwable> failures = new CopyOnWriteArrayList<Throwable>();
View Full Code Here

                    recoveryStatus.updateStage(RecoveryStatus.Stage.DONE);

                    if (logger.isDebugEnabled()) {
                        StringBuilder sb = new StringBuilder();
                        sb.append("recovery completed from ").append(shardGateway).append(", took [").append(timeValueMillis(recoveryStatus.time())).append("]\n");
                        sb.append("    index    : files           [").append(recoveryStatus.index().numberOfFiles()).append("] with total_size [").append(new ByteSizeValue(recoveryStatus.index().totalSize())).append("], took[").append(TimeValue.timeValueMillis(recoveryStatus.index().time())).append("]\n");
                        sb.append("             : recovered_files [").append(recoveryStatus.index().numberOfRecoveredFiles()).append("] with total_size [").append(new ByteSizeValue(recoveryStatus.index().recoveredTotalSize())).append("]\n");
                        sb.append("             : reusing_files   [").append(recoveryStatus.index().numberOfReusedFiles()).append("] with total_size [").append(new ByteSizeValue(recoveryStatus.index().reusedTotalSize())).append("]\n");
                        sb.append("    translog : number_of_operations [").append(recoveryStatus.translog().currentTranslogOperations()).append("], took [").append(TimeValue.timeValueMillis(recoveryStatus.translog().time())).append("]");
                        logger.debug(sb.toString());
                    }
                    listener.onRecoveryDone();
                    scheduleSnapshotIfNeeded();
View Full Code Here

            });
            if (snapshotStatus != null) {
                if (logger.isDebugEnabled()) {
                    StringBuilder sb = new StringBuilder();
                    sb.append("snapshot (").append(reason).append(") completed to ").append(shardGateway).append(", took [").append(TimeValue.timeValueMillis(snapshotStatus.time())).append("]\n");
                    sb.append("    index    : version [").append(lastIndexVersion).append("], number_of_files [").append(snapshotStatus.index().numberOfFiles()).append("] with total_size [").append(new ByteSizeValue(snapshotStatus.index().totalSize())).append("], took [").append(TimeValue.timeValueMillis(snapshotStatus.index().time())).append("]\n");
                    sb.append("    translog : id      [").append(lastTranslogId).append("], number_of_operations [").append(snapshotStatus.translog().expectedNumberOfOperations()).append("], took [").append(TimeValue.timeValueMillis(snapshotStatus.translog().time())).append("]");
                    logger.debug(sb.toString());
                }
            }
        } catch (SnapshotFailedEngineException e) {
View Full Code Here

            }
        }
        if (bytes == -1) {
            return null;
        }
        return new ByteSizeValue(bytes);
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.unit.ByteSizeValue

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.