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

How to use
setCapacityBytes
method
in
alluxio.wire.WorkerInfo

Best Java code snippets using alluxio.wire.WorkerInfo.setCapacityBytes (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

 break;
case WORKER_CAPACITY_BYTES:
 info.setCapacityBytes(mCapacityBytes);
 break;
case WORKER_CAPACITY_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

 break;
case CAPACITY_BYTES:
 info.setCapacityBytes(mCapacityBytes);
 break;
case CAPACITY_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.wireWorkerInfosetCapacityBytes

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,
  • setCapacityBytesOnTiers,
  • setUsedBytes,
  • setUsedBytesOnTiers,
  • toThrift

Popular in Java

  • Creating JSON documents from java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setScale (BigDecimal)
  • getSystemService (Context)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Top Vim 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