code: String writeSpec() throws RiakException
      {
          final ByteArrayOutputStream out = new ByteArrayOutputStream();
  
          try
          {
              JsonGenerator jg = new JsonFactory().createGenerator(out, JsonEncoding.UTF8);
  
              jg.setCodec(mrObjectMapper);
  
              List<MapReducePhase> phases = spec.getPhases();
              phases.get(phases.size() - 1).setKeep(true);
              jg.writeObject(spec);
  
              jg.flush();
  
              return out.toString("UTF-8");
          }
          catch (IOException e)
          {
              throw new RiakException(e);
          }
      }
docs: Creates the JSON string of the M/R job for submitting to the client
  <p/>
  Uses Jackson to write out the JSON string. I'm not very happy with this method, it is a candidate for change.
  <p/>
  TODO re-evaluate this method, look for something smaller and more elegant.
  
  @return a String of JSON
  @throws RiakException if, for some reason, we can't create a JSON string.