Examples of TOP


Examples of com.barchart.feed.api.model.data.Book.Top

        final StringBuilder sb = new StringBuilder(value.instrument().marketGUID())
          .append(" ")
          .append(" EventTime=")
          .append(value.updated());

        final Top top = value.book().top();
       
        Entry entry = top.ask();
       
        if (!entry.isNull()) {
          sb.append(" ASK TOP").append(" price=")
              .append(entry.price().asDouble())
              .append(" qty=").append(entry.size().asDouble());
        }
       
        entry = top.bid();
       
        if (!entry.isNull()) {
          sb.append(" BID TOP").append(" price=")
              .append(entry.price().asDouble())
              .append(" qty=").append(entry.size().asDouble());
View Full Code Here

Examples of com.prupe.mcpatcher.ctm.TileOverrideImpl$Top

                      logger.error("%s: unknown method \"%s\"", new Object[] {propertiesFile, method});
                    } else {
                      override = new TileOverrideImpl$Repeat(propertiesFile, properties, tileLoader);
                    }
                  } else {
                    override = new TileOverrideImpl$Top(propertiesFile, properties, tileLoader);
                  }
                } else {
                  override = new TileOverrideImpl$VerticalHorizontal(propertiesFile, properties, tileLoader);
                }
              } else {
View Full Code Here

Examples of io.fabric8.docker.api.container.Top

    @Test
    public void testContainerTop() throws IOException {
        recordResponse("container/container-top");

        Top top = docker.containerTop("e90e34656806");
        assertNotNull(top);
        assertEquals(top.getProcesses().length, 2);
    }
View Full Code Here

Examples of net.sf.jsqlparser.statement.select.Top

    this.expressionVisitor = expressionVisitor;
  }

  public void visit(PlainSelect plainSelect) {
    buffer.append("SELECT ");
    Top top = plainSelect.getTop();
    if (top != null)
      top.toString();
    if (plainSelect.getDistinct() != null) {
      buffer.append("DISTINCT ");
      if (plainSelect.getDistinct().getOnSelectItems() != null) {
        buffer.append("ON (");
        for (Iterator iter = plainSelect.getDistinct().getOnSelectItems().iterator(); iter.hasNext();) {
View Full Code Here

Examples of net.sf.jsqlparser.statement.select.Top

        Expression where = null;
        List orderByElements;
        List groupByColumnReferences = null;
        Expression having = null;
        Limit limit = null;
        Top top = null;
    jj_consume_token(K_SELECT);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_ALL:
    case K_DISTINCT:
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
View Full Code Here

Examples of net.sf.jsqlparser.statement.select.Top

                {if (true) return limit;}
    throw new Error("Missing return statement in function");
  }

  final public Top Top() throws ParseException {
        Top top = new Top();
        Token token = null;
    jj_consume_token(K_TOP);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case S_INTEGER:
      token = jj_consume_token(S_INTEGER);
                                    top.setRowCount(Long.parseLong(token.image));
      break;
    case 83:
      jj_consume_token(83);
                      top.setRowCountJdbcParameter(true);
      break;
    default:
      jj_la1[78] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
View Full Code Here

Examples of org.apache.pig.builtin.TOP

        Tuple output = tt.exec(input);
        assertTrue(!(input == output));
        assertEquals(input, output);
       
        TOP top = new TOP();
        TupleFactory tupleFactory = TupleFactory.getInstance();
        BagFactory bagFactory = DefaultBagFactory.getInstance();
        Tuple inputTuple = tupleFactory.newTuple(3);
        DataBag dBag = bagFactory.newDefaultBag();
       
        // set N = 10 i.e retain top 10 tuples
        inputTuple.set(0, 10);
        // compare tuples by field number 1
        inputTuple.set(1, 1);
        // set the data bag containing the tuples
        inputTuple.set(2, dBag);

        // generate tuples of the form (group-1, 1), (group-2, 2) ...
        for (long i = 0; i < 100; i++) {
            Tuple nestedTuple = tupleFactory.newTuple(2);
            nestedTuple.set(0, "group-" + i);
            nestedTuple.set(1, i);
            dBag.add(nestedTuple);
        }
       
        DataBag outBag = top.exec(inputTuple);
        assertEquals(outBag.size(), 10L);
        checkItemsGT(outBag, 1, 89);
       
        // two initial results
        Tuple init1 = (new TOP.Initial()).exec(inputTuple);
View Full Code Here

Examples of org.apache.pig.builtin.TOP

        Tuple output = tt.exec(input);
        assertTrue(!(input == output));
        assertEquals(input, output);
       
        TOP top = new TOP();
        TupleFactory tupleFactory = TupleFactory.getInstance();
        BagFactory bagFactory = DefaultBagFactory.getInstance();
        Tuple inputTuple = tupleFactory.newTuple(3);
        DataBag dBag = bagFactory.newDefaultBag();
       
        // set N = 10 i.e retain top 10 tuples
        inputTuple.set(0, 10);
        // compare tuples by field number 1
        inputTuple.set(1, 1);
        // set the data bag containing the tuples
        inputTuple.set(2, dBag);

        // generate tuples of the form (group-1, 1), (group-2, 2) ...
        for (long i = 0; i < 100; i++) {
            Tuple nestedTuple = tupleFactory.newTuple(2);
            nestedTuple.set(0, "group-" + i);
            nestedTuple.set(1, i);
            dBag.add(nestedTuple);
        }
       
        DataBag outBag = top.exec(inputTuple);
        assertEquals(outBag.size(), 10L);
        checkItemsGT(outBag, 1, 89);
       
        // two initial results
        Tuple init1 = (new TOP.Initial()).exec(inputTuple);
View Full Code Here

Examples of org.apache.pig.builtin.TOP

  assertEquals("", m.get("k1"), 1);
  assertEquals("", m.get("k2"), 2.0);
  assertEquals("", m.get("k3"), "foo");

       
        TOP top = new TOP();
        TupleFactory tupleFactory = TupleFactory.getInstance();
        BagFactory bagFactory = DefaultBagFactory.getInstance();
        Tuple inputTuple = tupleFactory.newTuple(3);
        DataBag dBag = bagFactory.newDefaultBag();
       
        // set N = 10 i.e retain top 10 tuples
        inputTuple.set(0, 10);
        // compare tuples by field number 1
        inputTuple.set(1, 1);
        // set the data bag containing the tuples
        inputTuple.set(2, dBag);

        // generate tuples of the form (group-1, 1), (group-2, 2) ...
        for (long i = 0; i < 100; i++) {
            Tuple nestedTuple = tupleFactory.newTuple(2);
            nestedTuple.set(0, "group-" + i);
            nestedTuple.set(1, i);
            dBag.add(nestedTuple);
        }
       
        DataBag outBag = top.exec(inputTuple);
        assertEquals(outBag.size(), 10L);
        checkItemsGT(outBag, 1, 89);
       
        // two initial results
        Tuple init1 = (new TOP.Initial()).exec(inputTuple);
View Full Code Here

Examples of org.apache.pig.builtin.TOP

  assertEquals("", m.get("k1"), 1);
  assertEquals("", m.get("k2"), 2.0);
  assertEquals("", m.get("k3"), "foo");


        TOP top = new TOP();
        TupleFactory tupleFactory = TupleFactory.getInstance();
        BagFactory bagFactory = DefaultBagFactory.getInstance();
        Tuple inputTuple = tupleFactory.newTuple(3);
        DataBag dBag = bagFactory.newDefaultBag();

        // set N = 10 i.e retain top 10 tuples
        inputTuple.set(0, 10);
        // compare tuples by field number 1
        inputTuple.set(1, 1);
        // set the data bag containing the tuples
        inputTuple.set(2, dBag);

        // generate tuples of the form (group-1, 1), (group-2, 2) ...
        for (long i = 0; i < 100; i++) {
            Tuple nestedTuple = tupleFactory.newTuple(2);
            nestedTuple.set(0, "group-" + i);
            nestedTuple.set(1, i);
            dBag.add(nestedTuple);
        }

        DataBag outBag = top.exec(inputTuple);
        assertEquals(outBag.size(), 10L);
        checkItemsGT(outBag, 1, 89);

        // two initial results
        Tuple init1 = (new TOP.Initial()).exec(inputTuple);
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.