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

How to use
createRandom
method
in
alluxio.wire.WorkerInfoTest

Best Java code snippets using alluxio.wire.WorkerInfoTest.createRandom (Showing top 4 results out of 315)

origin: Alluxio/alluxio

@Test
public void json() throws Exception {
 WorkerInfo workerInfo = createRandom();
 ObjectMapper mapper = new ObjectMapper();
 WorkerInfo other =
   mapper.readValue(mapper.writeValueAsBytes(workerInfo), WorkerInfo.class);
 checkEquality(workerInfo, other);
}
origin: Alluxio/alluxio

private static int compareLostWorkersWithTimes(int time1, int time2) {
 WorkerInfo.LastContactSecComparator comparator =
   new WorkerInfo.LastContactSecComparator();
 WorkerInfo worker1 = createRandom();
 WorkerInfo worker2 = createRandom();
 worker1.setLastContactSec(time1);
 worker2.setLastContactSec(time2);
 return comparator.compare(worker1, worker2);
}
origin: Alluxio/alluxio

@Test
public void proto() {
 WorkerInfo workerInfo = createRandom();
 WorkerInfo other = GrpcUtils.fromProto(GrpcUtils.toProto(workerInfo));
 checkEquality(workerInfo, other);
}
origin: Alluxio/alluxio

long numLostWorkers = random.nextInt(10);
for (int i = 0; i < numLostWorkers; i++) {
 lostWorkers.add(WorkerInfoTest.createRandom());
long numWorkers = random.nextInt(10);
for (int i = 0; i < numWorkers; i++) {
 workers.add(WorkerInfoTest.createRandom());
alluxio.wireWorkerInfoTestcreateRandom

Popular methods of WorkerInfoTest

  • checkEquality
  • compareLostWorkersWithTimes

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • runOnUiThread (Activity)
  • setRequestProperty (URLConnection)
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • CodeWhisperer alternatives
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