Package eu.stratosphere.nephele.types

Examples of eu.stratosphere.nephele.types.IntegerRecord


    try {

      synchronized (this.globalInputSplitProvider) {
        final InputSplitWrapper wrapper = this.globalInputSplitProvider.requestNextInputSplit(this.jobID,
          this.executionVertexID, new IntegerRecord(this.sequenceNumber.getAndIncrement()));
        return wrapper.getInputSplit();
      }

    } catch (IOException ioe) {
      // Convert IOException into a RuntimException and let the regular fault tolerance routines take care of the
View Full Code Here


      Runtime.getRuntime().addShutdownHook(this.jobCleanUp);
    }

    long sleep = 0;
    try {
      final IntegerRecord interval = this.jobSubmitClient.getRecommendedPollingInterval();
      sleep = interval.getValue() * 1000;
    } catch (IOException ioe) {
      Runtime.getRuntime().removeShutdownHook(this.jobCleanUp);
      // Rethrow error
      throw ioe;
    }
View Full Code Here

    // set up the event handler
    int numEventsTillEndOfSuperstep = taskConfig.getNumberOfEventsUntilInterruptInIterativeGate(0);
    eventHandler = new SyncEventHandler(numEventsTillEndOfSuperstep, aggregators, userCodeClassLoader);
    headEventReader.subscribeToEvent(eventHandler, WorkerDoneEvent.class);

    IntegerRecord dummy = new IntegerRecord();
   
    while (!terminationRequested()) {

//      notifyMonitor(IterationMonitoring.Event.SYNC_STARTING, currentIteration);
      if (log.isInfoEnabled()) {
View Full Code Here


  @Override
  public IntegerRecord getRecommendedPollingInterval() throws IOException {

    return new IntegerRecord(this.recommendedClientPollingInterval);
  }
View Full Code Here

   
  }
   
  private final void speedTestStream(int bufferSize) throws IOException {
    final Channel.ID tmpChannel = ioManager.createChannel();
    final IntegerRecord rec = new IntegerRecord(0);
   
    File tempFile = null;
    DataOutputStream daos = null;
    DataInputStream dais = null;
   
    try {
      tempFile = new File(tmpChannel.getPath());
     
      FileOutputStream fos = new FileOutputStream(tempFile);
      daos = new DataOutputStream(new BufferedOutputStream(fos, bufferSize));
     
      long writeStart = System.currentTimeMillis();
     
      int valsLeft = NUM_INTS_WRITTEN;
      while (valsLeft-- > 0) {
        rec.setValue(valsLeft);
        rec.write(daos);
      }
      daos.close();
      daos = null;
     
      long writeElapsed = System.currentTimeMillis() - writeStart;
     
      // ----------------------------------------------------------------
     
      FileInputStream fis = new FileInputStream(tempFile);
      dais = new DataInputStream(new BufferedInputStream(fis, bufferSize));
     
      long readStart = System.currentTimeMillis();
     
      valsLeft = NUM_INTS_WRITTEN;
      while (valsLeft-- > 0) {
        rec.read(dais);
      }
      dais.close();
      dais = null;
     
      long readElapsed = System.currentTimeMillis() - readStart;
View Full Code Here

TOP

Related Classes of eu.stratosphere.nephele.types.IntegerRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.