congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
MountPointInfo.getUfsCapacityBytes
Code IndexAdd Tabnine to your IDE (free)

How to use
getUfsCapacityBytes
method
in
alluxio.wire.MountPointInfo

Best Java code snippets using alluxio.wire.MountPointInfo.getUfsCapacityBytes (Showing top 7 results out of 315)

origin: Alluxio/alluxio

/**
 * Prints mount information for a mount table.
 *
 * @param mountTable the mount table to get information from
 */
public static void printMountInfo(Map<String, MountPointInfo> mountTable) {
 for (Map.Entry<String, MountPointInfo> entry : mountTable.entrySet()) {
  String mMountPoint = entry.getKey();
  MountPointInfo mountPointInfo = entry.getValue();
  long capacityBytes = mountPointInfo.getUfsCapacityBytes();
  long usedBytes = mountPointInfo.getUfsUsedBytes();
  String usedPercentageInfo = "";
  if (capacityBytes > 0) {
   int usedPercentage = (int) (100L * usedBytes / capacityBytes);
   usedPercentageInfo = String.format("(%s%%)", usedPercentage);
  }
  String leftAlignFormat = getAlignFormat(mountTable);
  System.out.format(leftAlignFormat, mountPointInfo.getUfsUri(), mMountPoint,
    mountPointInfo.getUfsType(), FormatUtils.getSizeFromBytes(capacityBytes),
    FormatUtils.getSizeFromBytes(usedBytes) + usedPercentageInfo,
    mountPointInfo.getReadOnly() ? "" : "not ",
    mountPointInfo.getShared() ? "" : "not ");
  System.out.println("properties=" + mountPointInfo.getProperties() + ")");
 }
}
origin: Alluxio/alluxio

private Capacity getUfsCapacityInternal() {
 MountPointInfo mountInfo = mFileSystemMaster.getMountTable().get(MountTable.ROOT);
 if (mountInfo == null) {
  return new Capacity().setTotal(-1).setUsed(-1);
 }
 long capacityBytes = mountInfo.getUfsCapacityBytes();
 long usedBytes = mountInfo.getUfsUsedBytes();
 return new Capacity().setTotal(capacityBytes).setUsed(usedBytes);
}
origin: Alluxio/alluxio

mountInfo = mFileSystemMaster.getMountPointInfo(new AlluxioURI(MountTable.ROOT));
long capacityBytes = mountInfo.getUfsCapacityBytes();
long usedBytes = mountInfo.getUfsUsedBytes();
long freeBytes = -1;
origin: Alluxio/alluxio

/**
 * Converts wire type to proto type.
 *
 * @param info the wire representation to convert
 * @return converted proto representation
 */
public static alluxio.grpc.MountPointInfo toProto(MountPointInfo info) {
 return alluxio.grpc.MountPointInfo.newBuilder().setUfsUri(info.getUfsUri())
   .setUfsType(info.getUfsType()).setUfsCapacityBytes(info.getUfsCapacityBytes())
   .setReadOnly(info.getReadOnly()).putAllProperties(info.getProperties())
   .setShared(info.getShared()).build();
}
origin: Alluxio/alluxio

public void checkEquality(MountPointInfo a, MountPointInfo b) {
 Assert.assertEquals(a.getUfsUri(), b.getUfsUri());
 Assert.assertEquals(a.getUfsType(), b.getUfsType());
 Assert.assertEquals(a.getUfsCapacityBytes(), b.getUfsCapacityBytes());
 Assert.assertEquals(a.getUfsUsedBytes(), b.getUfsUsedBytes());
 Assert.assertEquals(a.getReadOnly(), b.getReadOnly());
 Assert.assertEquals(a.getProperties(), b.getProperties());
 Assert.assertEquals(a, b);
}
origin: org.alluxio/alluxio-core-server-master

long capacityBytes = mountInfo.getUfsCapacityBytes();
long usedBytes = mountInfo.getUfsUsedBytes();
long freeBytes = -1;
origin: org.alluxio/alluxio-core-server-master

private Capacity getUfsCapacityInternal() {
 MountPointInfo mountInfo = mFileSystemMaster.getMountTable().get(MountTable.ROOT);
 if (mountInfo == null) {
  return new Capacity().setTotal(-1).setUsed(-1);
 }
 long capacityBytes = mountInfo.getUfsCapacityBytes();
 long usedBytes = mountInfo.getUfsUsedBytes();
 return new Capacity().setTotal(capacityBytes).setUsed(usedBytes);
}
alluxio.wireMountPointInfogetUfsCapacityBytes

Popular methods of MountPointInfo

  • getReadOnly
  • getUfsUri
  • <init>
    Creates a new instance of MountPointInfo.
  • getProperties
  • getUfsType
  • getUfsUsedBytes
  • setProperties
  • setReadOnly
  • setUfsCapacityBytes
  • setUfsType
  • setUfsUri
  • setUfsUsedBytes
  • setUfsUri,
  • setUfsUsedBytes,
  • getShared,
  • setShared,
  • toThrift

Popular in Java

  • Start an intent from android
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
  • getSupportFragmentManager (FragmentActivity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now