Tabnine Logo
WorkerInfo.setUsedBytes
Code IndexAdd Tabnine to your IDE (free)

How to use
setUsedBytes
method
in
alluxio.wire.WorkerInfo

Best Java code snippets using alluxio.wire.WorkerInfo.setUsedBytes (Showing top 5 results out of 315)

origin: Alluxio/alluxio

 public static WorkerInfo createRandom() {
  WorkerInfo result = new WorkerInfo();
  Random random = new Random();

  long id = random.nextLong();
  WorkerNetAddress address = WorkerNetAddressTest.createRandom();
  int lastContactSec = random.nextInt();
  long capacityBytes = random.nextLong();
  long usedBytes = random.nextLong();
  long startTimeMs = random.nextLong();
  Map<String, Long> capacityBytesOnTiers = new HashMap<>();
  capacityBytesOnTiers.put("MEM", capacityBytes);
  Map<String, Long> usedBytesOnTiers = new HashMap<>();
  usedBytesOnTiers.put("MEM", usedBytes);
  String state = random.nextInt(1) == 1 ? "In Service" : "Out of Service";

  result.setId(id);
  result.setAddress(address);
  result.setLastContactSec(lastContactSec);
  result.setCapacityBytes(capacityBytes);
  result.setUsedBytes(usedBytes);
  result.setStartTimeMs(startTimeMs);
  result.setState(state);
  result.setCapacityBytesOnTiers(capacityBytesOnTiers);
  result.setUsedBytesOnTiers(usedBytesOnTiers);
  return result;
 }
}
origin: Alluxio/alluxio

 info.setUsedBytes(mUsedBytes);
 break;
case WORKER_USED_BYTES_ON_TIERS:
origin: Alluxio/alluxio

/**
 * Converts a proto type to a wire type.
 *
 * @param workerInfo the proto type to convert
 * @return the converted wire type
 */
public static WorkerInfo fromProto(alluxio.grpc.WorkerInfo workerInfo) {
 return new WorkerInfo().setAddress(fromProto(workerInfo.getAddress()))
   .setCapacityBytes(workerInfo.getCapacityBytes())
   .setCapacityBytesOnTiers(workerInfo.getCapacityBytesOnTiers()).setId(workerInfo.getId())
   .setLastContactSec(workerInfo.getLastContactSec())
   .setStartTimeMs(workerInfo.getStartTimeMs()).setState(workerInfo.getState())
   .setUsedBytes(workerInfo.getUsedBytes())
   .setUsedBytesOnTiers(workerInfo.getUsedBytesOnTiersMap());
}
origin: org.alluxio/alluxio-core-server-master

 info.setUsedBytes(mUsedBytes);
 break;
case USED_BYTES_ON_TIERS:
origin: org.alluxio/alluxio-core-common

/**
 * Creates a new instance of {@link WorkerInfo} from a thrift representation.
 *
 * @param workerInfo the thrift representation of a worker information
 * @return the instance
 */
public static WorkerInfo fromThrift(alluxio.thrift.WorkerInfo workerInfo) {
 return new WorkerInfo()
   .setAddress(WorkerNetAddress.fromThrift(workerInfo.getAddress()))
   .setCapacityBytes(workerInfo.getCapacityBytes())
   .setCapacityBytesOnTiers(workerInfo.getCapacityBytesOnTiers())
   .setId(workerInfo.getId())
   .setLastContactSec(workerInfo.getLastContactSec())
   .setStartTimeMs(workerInfo.getStartTimeMs())
   .setState(workerInfo.getState())
   .setUsedBytes(workerInfo.getUsedBytes())
   .setUsedBytesOnTiers(workerInfo.getUsedBytesOnTiers());
}
alluxio.wireWorkerInfosetUsedBytes

Popular methods of WorkerInfo

  • getAddress
  • getCapacityBytes
  • getUsedBytes
  • <init>
    Creates a new instance of WorkerInfo.
  • getId
  • setAddress
  • getLastContactSec
  • setId
  • getStartTimeMs
  • getState
  • setLastContactSec
  • setStartTimeMs
  • setLastContactSec,
  • setStartTimeMs,
  • setState,
  • getCapacityBytesOnTiers,
  • getUsedBytesOnTiers,
  • setCapacityBytes,
  • setCapacityBytesOnTiers,
  • setUsedBytesOnTiers,
  • toThrift

Popular in Java

  • Making http post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JOptionPane (javax.swing)
  • Top PhpStorm 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