Receives an output stream from the output service and writes "Hello REEF!" on it.

@param memento the memento objected passed down by the driver.
@return null
@throws java.io.IOException
518585
@Override
  public byte[] call(final byte[] memento) throws IOException {
    try (final DataOutputStream outputStream = outputStreamProvider.create("hello")) {
      outputStream.writeBytes("Hello REEF!");
    }
    return null;
  }
787057
private function __connect(Memento\Key $key = null)
    {
        $connectKey = $this->groupKey ? $this->groupKey : $key;
        $config = $this->getServer($connectKey, $this->config);
        if (!array_key_exists('host', $config)) {
            throw new \Exception("Invalid redis configuration");
        }

        if (!array_key_exists('port', $config)) {
            $config['port'] = 11211;
        }

        // instantiate to the redis interface
        $this->redis = new Predis\Client($config);
    }
952582
public void dump(Writer writer) throws IOException {
		Iterator<SaxBit> i = this.saxbits.iterator();
		while (i.hasNext()) {
			final SaxBit saxbit = i.next();
			saxbit.dump(writer);
		}
		writer.flush();
	}
990054
public byte[] sendEnquireLink(OutputStream out, int sequenceNumber)
            throws IOException {
        synchronized (out) {
            return pduSender.sendEnquireLink(out, sequenceNumber);
        }
    }
1024538
public byte[] sendEnquireLink(OutputStream os, int sequenceNumber)
            throws IOException {

        byte[] b = pduComposer.enquireLink(sequenceNumber);
        writeAndFlush(os, b);
        return b;
    }
1036247
public void dump(Object o, OutputStream stream) throws IOException, PickleException {
		out = stream;
		recurse = 0;
		if(useMemo)
			memo = new HashMap<Integer, Memo>();
		out.write(Opcodes.PROTO);
		out.write(PROTOCOL);
		save(o);
		memo = null;  // get rid of the memo table
		out.write(Opcodes.STOP);
		out.flush();
		if(recurse!=0)  // sanity check
			throw new PickleException("recursive structure error, please report this problem");
	}
62408
@Override
  public byte[] call(final byte[] memento) throws Exception {
    final ExecutorService schedulerThread = Executors.newSingleThreadExecutor();
    final ExecutorService commandExecutor = Executors.newFixedThreadPool(numOfThreads);
    final ConcurrentMap<Integer, Future> futures = new ConcurrentHashMap<>();

    // Scheduling thread starts
    schedulerThread.execute(new Runnable() {
      @SuppressWarnings("InfiniteLoopStatement") // Scheduler is supposed to run forever.
      @Override
      public void run() {
        while (true) {
          // Scheduler Thread: Pick a command to execute (For now, simple FIFO order)
          final byte[] message;
          try {
            message = pendingRequests.takeFirst();
          } catch (InterruptedException e) {
            throw new RuntimeException(e);
          }

          // Command Executor: Deserialize the command
          final MasterToWorkerRequest masterToWorkerRequest = (MasterToWorkerRequest)kryoUtils.deserialize(message);

          switch (masterToWorkerRequest.getType()) {
            case AggregateTasklets:
              final TaskletAggregationRequest taskletAggregationRequest =
                  (TaskletAggregationRequest) masterToWorkerRequest;
              aggregates.put(taskletAggregationRequest.getAggregateFunctionId(),
                  new AggregateContainer(heartBeatTriggerManager, kryoUtils, workerReports,
                      taskletAggregationRequest));
              break;
            case ExecuteAggregateTasklet:
              executeAggregateTasklet(commandExecutor, masterToWorkerRequest);
              break;
            case ExecuteTasklet:
              executeTasklet(commandExecutor, futures, masterToWorkerRequest);
              break;
            case CancelTasklet:
              final TaskletCancellationRequest cancellationRequest = (TaskletCancellationRequest) masterToWorkerRequest;
              LOG.log(Level.FINE, "Cancelling Tasklet with ID {0}.", cancellationRequest.getTaskletId());
              final Future future = futures.get(cancellationRequest.getTaskletId());
              if (future != null) {
                future.cancel(true);
              }
              break;
            default:
              throw new RuntimeException("Unknown Command");
          }
        }
      }
    });

    terminated.await();
    return null;
  }
481319
public void writer() throws IOException {
    // [START writer]
    byte[] content = "Hello, World!".getBytes(UTF_8);
    try (WriteChannel writer = blob.writer()) {
      try {
        writer.write(ByteBuffer.wrap(content, 0, content.length));
      } catch (Exception ex) {
        // handle exception
      }
    }
    // [END writer]
  }
843
protected void writeObject(Object o)
	{
		if (o == null)
		{
			return;
		}
		getPersistenceDelegate(o.getClass()).writeObject(o, this);
	}
215947
public void dump_memory(Writer out)
    throws IOException
    {
        int qlist_num;

        out.write("First quick size: " + first_quick_size + "\n");
        out.write("Last quick size: " + last_quick_size + "\n");
        out.write("Grain size: " + grain_size + "\n");
        out.write("Acceptable waste: " + acceptable_waste + "\n");
        out.write("Tail pointer in memory: " + tail_ptr + "\n");
        out.write("First allocatable byte: " + start() + "\n\n");
        out.write("Free lists from memory structures\n");
        for (qlist_num = 0; qlist_num <= last_ql_index;
            qlist_num++) {
            out.write(qlist_num + ": ");
            out.write("Length = " +
                      ql_heads[qlist_num].length + "; ");
            print_memory_freelist(out, ql_heads[qlist_num].first_block);
        };
        out.write("Nonempty free lists: " + nonempty_lists + "\n");
        out.write("Tail pointer in memory: " + tail_ptr + "\n");
        out.write("First allocatable byte: " + start() + "\n\n");
    }
378729
public void setOutputStream(FLACOutputStream fos) {
    if(fos == null)
      throw new IllegalArgumentException("FLACOutputStream fos must not be null.");
    if(flacWriter == null)
      flacWriter = new FLACStreamController(fos,streamConfig);
    else
      flacWriter.setFLACOutputStream(fos);
  }
741568
public Output output(Object value) throws IOException {
        if (value != null) {
            writer.write(value.toString());
        }
        return this;
    }
1339824
private void emit(DerOutputStream out)
        throws IOException, CertificateEncodingException
    {
        DerOutputStream tagged = new DerOutputStream();

        if (forward != null) {
            DerOutputStream tmp = new DerOutputStream();
            tmp.putDerValue(new DerValue(forward.getEncoded()));
            tagged.write(DerValue.createTag(DerValue.TAG_CONTEXT,
                         true, TAG_FORWARD), tmp);
        }

        if (reverse != null) {
            DerOutputStream tmp = new DerOutputStream();
            tmp.putDerValue(new DerValue(reverse.getEncoded()));
            tagged.write(DerValue.createTag(DerValue.TAG_CONTEXT,
                         true, TAG_REVERSE), tmp);
        }

        out.write(DerValue.tag_Sequence, tagged);
    }
25076
public void restoreState(IMemento memento) {
		setMemberFilters(
			new int[] {FILTER_FIELDS, FILTER_STATIC, FILTER_NONPUBLIC, FILTER_LOCALTYPES},
			new boolean[] {
				Boolean.valueOf(memento.getString(TAG_HIDEFIELDS)).booleanValue(),
				Boolean.valueOf(memento.getString(TAG_HIDESTATIC)).booleanValue(),
				Boolean.valueOf(memento.getString(TAG_HIDENONPUBLIC)).booleanValue(),
				Boolean.valueOf(memento.getString(TAG_HIDELOCALTYPES)).booleanValue()
			}, false);
	}
1362091
@Override
  public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);

    // Encode flag
    out.writeBoolean(isPruned);
    // Encode size
    out.writeVInt(size);
    // Encode type of encoding
    out.writeVInt(termsEncoding.ordinal());
    // Encode terms
    out.writeBytesRef(encodedTerms);
    // Release terms
    encodedTerms = null;
  }
379197
public void write(OutputStream os)
    throws IOException
  {
    ByteCodeWriter out = new ByteCodeWriter(os, this);

    out.writeInt(MAGIC);
    out.writeShort(_minor);
    out.writeShort(_major);

    _constantPool.write(out);

    out.writeShort(_accessFlags);
    out.writeClass(_thisClass);
    out.writeClass(_superClass);

    out.writeShort(_interfaces.size());
    for (int i = 0; i < _interfaces.size(); i++) {
      String className = _interfaces.get(i);

      out.writeClass(className);
    }

    out.writeShort(_fields.size());
    for (int i = 0; i < _fields.size(); i++) {
      JavaField field = _fields.get(i);

      field.write(out);
    }

    out.writeShort(_methods.size());
    for (int i = 0; i < _methods.size(); i++) {
      JavaMethod method = _methods.get(i);

      method.write(out);
    }

    out.writeShort(_attributes.size());
    for (int i = 0; i < _attributes.size(); i++) {
      Attribute attr = _attributes.get(i);

      attr.write(out);
    }
  }
442276
String mementoFor(final ExcelModuleDemoToDoItemBulkUpdateManager tdieim) {
        final Memento memento = mementoService.create();
        memento.set("fileName", tdieim.getFileName());
        memento.set("category", tdieim.getCategory());
        memento.set("subcategory", tdieim.getSubcategory());
        memento.set("completed", tdieim.isComplete());
        return memento.asString();
    }