Java Code Examples for org.apache.cassandra.io.util.FileUtils#stringifyFileSize()
The following examples show how to use
org.apache.cassandra.io.util.FileUtils#stringifyFileSize() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SnapshotDetailsTabularData.java From stratio-cassandra with Apache License 2.0 | 5 votes |
public static void from(final String snapshot, final String ks, final String cf, Map.Entry<String, Pair<Long,Long>> snapshotDetail, TabularDataSupport result) { try { final String totalSize = FileUtils.stringifyFileSize(snapshotDetail.getValue().left); final String liveSize = FileUtils.stringifyFileSize(snapshotDetail.getValue().right); result.put(new CompositeDataSupport(COMPOSITE_TYPE, ITEM_NAMES, new Object[]{ snapshot, ks, cf, liveSize, totalSize })); } catch (OpenDataException e) { throw new RuntimeException(e); } }
Example 2
Source File: StorageService.java From stratio-cassandra with Apache License 2.0 | 4 votes |
public String getLoadString() { return FileUtils.stringifyFileSize(getLoad()); }
Example 3
Source File: NodeTool.java From stratio-cassandra with Apache License 2.0 | 4 votes |
private String format(long bytes, boolean humanReadable) { return humanReadable ? FileUtils.stringifyFileSize(bytes) : Long.toString(bytes); }