Examples of incrementTime()


Examples of com.netflix.hystrix.HystrixCollapserTest.TestCollapserTimer.incrementTime()

    @Test
    public void testTwoRequests() throws Exception {
        TestCollapserTimer timer = new TestCollapserTimer();
        Future<String> response1 = new TestRequestCollapser(timer, counter, 1).observe().toBlocking().toFuture();
        Future<String> response2 = new TestRequestCollapser(timer, counter, 2).observe().toBlocking().toFuture();
        timer.incrementTime(10); // let time pass that equals the default delay/period

        assertEquals("1", response1.get());
        assertEquals("2", response2.get());

        assertEquals(1, counter.get());
View Full Code Here

Examples of gc.base.task.TaskStats.incrementTime()

   
    // make the metadata document
    long t1 = System.currentTimeMillis();
    Document dom = DomUtil.makeDom(info.Xml_Metadata,true);
    long t2 = System.currentTimeMillis();
    stats.incrementTime(tn+".makeXmlDom",t2-t1);
   
    // interrogate the metadata document
    XmlInterrogator interrogator = new XmlInterrogator();
    XmlType xmlType = interrogator.interrogate(xmlTypes,dom);
    XsltReference xsltReference = xmlType.getToSolrXslt();
View Full Code Here

Examples of gc.base.task.TaskStats.incrementTime()

    XsltTemplate xsltTemplate = XsltTemplates.getCompiledTemplate(xsltReference.getSrc());
    info.MetadataType_Key = xmlType.getKey();
    info.MetadataType_Identifier = xmlType.getIdentifier();
    info.MetadataType_Indexables_Version = xsltReference.getVersion();
    long t3 = System.currentTimeMillis();
    stats.incrementTime(tn+".interrogateXmlType",t3-t2);
   
    // append fields at the top of the document
    this.append(context,doc,info,true,false);
   
    // transform the metadata document to a Solr document
View Full Code Here

Examples of gc.base.task.TaskStats.incrementTime()

    SolrDocSaxHandler saxHandler = new SolrDocSaxHandler(doc);
    DOMSource source = new DOMSource(dom);
    SAXResult result = new SAXResult(saxHandler);
    xsltTemplate.transform(source,result,null);
    long t4 = System.currentTimeMillis();
    stats.incrementTime(tn+".transformToSolrDoc",t4-t3);
   
    // append remaining fields
    this.append(context,doc,info,false,true);
   
  }
View Full Code Here

Examples of gc.base.task.TaskStats.incrementTime()

      }
      if (info.getMaxRows() > 0) st.setMaxRows(info.getMaxRows());
      if (info.getFetchSize() > 0) st.setFetchSize(info.getFetchSize());
      ResultSet rs = st.executeQuery();
      long t2 = System.currentTimeMillis();
      stats.incrementTime(tn+".executeQuery",t2-t1);
      while (rs.next()) {
        if (Thread.interrupted()) {
          throw new InterruptedException("Interrupted while iterating ResultSet.");
        }
        rowNum++;
View Full Code Here

Examples of gc.base.task.TaskStats.incrementTime()

        }
        rowNum++;
        handler.handleSqlRow(context,con,rs,rowNum);
      }
      long t3 = System.currentTimeMillis();
      stats.incrementTime(tn+".iterate",t3-t2);
    } finally {
      try {if (st != null) st.close();}
      catch (Exception ef) {ef.printStackTrace();}
      try {if (closeCon && (con != null)) con.close();}
      catch (Exception ef) {ef.printStackTrace();}
View Full Code Here

Examples of org.apache.hadoop.hbase.util.IncrementingEnvironmentEdge.incrementTime()

      timeStamp = EnvironmentEdgeManager.currentTimeMillis();
      this.store.add(new KeyValue(row, family, qf1, timeStamp, (byte[]) null));
      this.store.add(new KeyValue(row, family, qf2, timeStamp, (byte[]) null));
      this.store.add(new KeyValue(row, family, qf3, timeStamp, (byte[]) null));
      flush(i);
      edge.incrementTime(sleepTime);
    }

    // Verify the total number of store files
    assertEquals(storeFileNum, this.store.getStorefiles().size());
View Full Code Here

Examples of org.apache.hadoop.hbase.util.IncrementingEnvironmentEdge.incrementTime()

      StoreFile compactedFile = this.store.compact(compaction).get(0);
      // It is an empty store file.
      assertEquals(0, compactedFile.getReader().getEntries());

      // Let the next store file expired.
      edge.incrementTime(sleepTime);
    }
  }

  public void testLowestModificationTime() throws Exception {
    Configuration conf = HBaseConfiguration.create();
View Full Code Here

Examples of org.apache.hadoop.hbase.util.IncrementingEnvironmentEdge.incrementTime()

      timeStamp = EnvironmentEdgeManager.currentTimeMillis();
      this.store.add(new KeyValue(row, family, qf1, timeStamp, (byte[]) null));
      this.store.add(new KeyValue(row, family, qf2, timeStamp, (byte[]) null));
      this.store.add(new KeyValue(row, family, qf3, timeStamp, (byte[]) null));
      flush(i);
      edge.incrementTime(sleepTime);
    }

    // Verify the total number of store files
    assertEquals(storeFileNum, this.store.getStorefiles().size());
View Full Code Here

Examples of org.apache.hadoop.hbase.util.IncrementingEnvironmentEdge.incrementTime()

      StoreFile compactedFile = this.store.compact(compaction).get(0);
      // It is an empty store file.
      assertEquals(0, compactedFile.getReader().getEntries());

      // Let the next store file expired.
      edge.incrementTime(sleepTime);
    }
  }

  public void testLowestModificationTime() throws Exception {
    Configuration conf = HBaseConfiguration.create();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.