Tabnine Logo
MountPointInfo.getProperties
Code IndexAdd Tabnine to your IDE (free)

How to use
getProperties
method
in
alluxio.wire.MountPointInfo

Best Java code snippets using alluxio.wire.MountPointInfo.getProperties (Showing top 3 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

/**
 * 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);
}
alluxio.wireMountPointInfogetProperties

Popular methods of MountPointInfo

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • onCreateOptionsMenu (Activity)
  • compareTo (BigDecimal)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Top Sublime Text plugins
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