in server/src/main/java/org/apache/cassandra/sidecar/utils/FileUtils.java [84:104]
public static long storageUnitToBytes(String unit)
{
if (unit == null)
{
return 1;
}
switch (unit)
{
case "GiB":
return 1 << 30;
case "MiB":
return 1 << 20;
case "KiB":
return 1024;
case "":
case "B":
return 1;
}
throw new IllegalStateException("Unexpected data storage unit: " + unit);
}