Package edu.brown.api.results

Examples of edu.brown.api.results.ResponseEntries$Entry


        int count = 0;
        for (ClientStatusThread t : m_statusThreads) {
            count += t.getResponseEntries().size();
        } // FOR
        LOG.info(String.format("Merging %d ClientResponse entries together...", count));
        ResponseEntries fullDump = new ResponseEntries();
        for (ClientStatusThread t : m_statusThreads) {
            fullDump.addAll(t.getResponseEntries());
        } // FOR
        if (fullDump.isEmpty()) {
            LOG.warn("No ClientResponse results were returned!");
            return;
        }
       
        // Convert to a VoltTable and then write out to a CSV file
        LOG.info(String.format("Writing %d ClientResponse entries to '%s'", fullDump.size(), outputPath));
        String txnNames[] = currentResults.getTransactionNames();
        FileWriter out = new FileWriter(outputPath);
        VoltTable vt = ResponseEntries.toVoltTable(fullDump, txnNames);
        VoltTableUtil.csv(out, vt, true);
        out.close();
        if (debug.val)
            LOG.debug(String.format("Wrote %d response entries information to '%s'",
                      fullDump.size(), outputPath));
    }
View Full Code Here


        m_countDisplayNames = getTransactionDisplayNames();
        if (m_countDisplayNames != null) {
            Map<Integer, String> debugLabels = new TreeMap<Integer, String>();
           
            m_enableResponseEntries = (m_hstoreConf.client.output_responses != null);
            m_responseEntries = new ResponseEntries();
           
            for (int i = 0; i < m_countDisplayNames.length; i++) {
                m_txnStats.transactions.put(i, 0);
                m_txnStats.dtxns.put(i, 0);
                m_txnStats.specexecs.put(i, 0);
View Full Code Here

        this.m_txnStats.clear(false);
        this.printControlMessage(m_controlState, copy.toJSONString());
    }
   
    protected void answerDumpTxns() {
        ResponseEntries copy = new ResponseEntries(this.m_responseEntries);
        this.m_responseEntries.clear();
        this.printControlMessage(ControlState.DUMPING, copy.toJSONString());
    }
View Full Code Here

                }
                // ----------------------------------------------------------------------------
                // DUMPING
                // ----------------------------------------------------------------------------
                case DUMPING: {
                    ResponseEntries newEntries = new ResponseEntries();
                    String json_line = getPayload(control_line, parts);
                    JSONObject json_object;
                    if (debug.val) LOG.debug("Processing response dump");
                    try {
                        json_object = new JSONObject(json_line);
                        newEntries.fromJSON(json_object, catalog_db);
                    } catch (JSONException ex) {
                        LOG.error("Invalid response:\n" + json_line);
                        throw new RuntimeException(ex);
                    }
                    this.responseEntries.addAll(newEntries);
View Full Code Here

  }

  @Override
  protected void doDelete(HttpServletRequest req, HttpServletResponse resp)
      throws ServletException, IOException {
    Entry e = entry(req);
    S3Object remove = map.remove(e);
    if (remove == null) {
      resp.sendError(404, "Not found " + e);
    } else {
      resp.sendError(HttpURLConnection.HTTP_NO_CONTENT, "Deleted");
View Full Code Here

    }

  }

  private Entry entry(HttpServletRequest req) {
    return new Entry(key(uri(req)));
  }
View Full Code Here

        log("doGet " + uri);
    if ("/".equals(uri.getPath())) {
      list(req, resp);
    } else {
      String key = uri.getPath().substring(1);
      Entry e = new Entry(key);
      S3Object obj = map.get(e);
        if (debug)
          log("map.get(" + key + ") = " + obj);
      if (obj == null) {
        resp.sendError(404, "Not here: " + e);
View Full Code Here

    if (maxKeysStr != null)
      maxKeys = Integer.parseInt(maxKeysStr);
    Writer w = new Writer();
    SortedMap<Entry, S3Object> submap = new TreeMap<Entry, S3Object>(map);
    if (prefix != null)
      submap = submap.tailMap(new Entry(prefix));
    int keyCount = 0;
    boolean truncated = false;
    String nextMarker = null;
    for (Entry e : submap.keySet()) {
      if (++keyCount > maxKeys) {
View Full Code Here

    log("doPut " + uri);
    if ("/".equals(uri.getPath())) {
      log("create bucket");
      bucket = true;
    } else {
      Entry e = new Entry(key(uri));
      e.setLastModified(new Date());
      e.setSize(req.getContentLength());
      e.setOwner(new Owner("id", "name"));
      ByteArrayOutputStream os = new ByteArrayOutputStream();
      ServletInputStream is = req.getInputStream();
      byte b[] = new byte[128];
      while (true) {
        int len = is.read(b);
View Full Code Here

                    for (TestMethod testMethod : inputTestData.getTestMethod()) {
                        List<TestRecord> originalTestRecords = testMethod.getTestRecord();
                        for (TestRecord originalTestRecord : originalTestRecords) {
                            if (originalTestRecord.getId().equals(testRecord.get(RECORD_POSITION))) {
                                OutputData outputData = new OutputData();
                                Entry outputEntry = new Entry();
                                outputEntry.setKey(ACTUAL_RESULT);
                                outputEntry.setValue(testRecord.get(ACTUAL_RESULT).toString());
                                outputData.getEntry().add(outputEntry);
                                originalTestRecord.setOutputData(outputData);
                                outputDataAdded = true;
                                break;
                            }
View Full Code Here

TOP

Related Classes of edu.brown.api.results.ResponseEntries$Entry

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.