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

How to use
setCapacityBytesOnTiers
method
in
alluxio.wire.WorkerInfo

Best Java code snippets using alluxio.wire.WorkerInfo.setCapacityBytesOnTiers (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_ON_TIERS:
 info.setCapacityBytesOnTiers(mTotalBytesOnTiers);
 break;
case ID:
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_ON_TIERS:
 info.setCapacityBytesOnTiers(mTotalBytesOnTiers);
 break;
case ID:
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.wireWorkerInfosetCapacityBytesOnTiers

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

Popular in Java

  • Reactive rest calls using spring rest template
  • setScale (BigDecimal)
  • getExternalFilesDir (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • 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