Examples of Table


Examples of org.springframework.xd.shell.util.Table

  @Test
  public void testListContainers() {
    logger.info("List runtime containers");
    CommandResult cmdResult = executeCommand("runtime containers");
    Table table = (Table) cmdResult.getResult();
    for (TableRow row : table.getRows()) {
      // Verify host name & ip address are not empty
      assertTrue(StringUtils.hasText(row.getValue(2)) && StringUtils.hasText(row.getValue(3)));
    }
    // Verify there should be at least one container in the list.
    assertTrue(table.getRows().size() > 0);
  }
View Full Code Here

Examples of org.springframework.yarn.support.console.Table

   *
   * @param applications the applications
   * @return the application report table
   */
  private static Table getApplicationReportTable(List<ApplicationReport> applications) {
    Table table = new Table();
    table.addHeader(1, new TableHeader("Id"))
        .addHeader(2, new TableHeader("User"))
        .addHeader(3, new TableHeader("Name"))
        .addHeader(4, new TableHeader("Queue"))
        .addHeader(5, new TableHeader("StartTime"))
        .addHeader(6, new TableHeader("FinishTime"))
        .addHeader(7, new TableHeader("State"))
        .addHeader(8, new TableHeader("FinalStatus"));

    for (ApplicationReport a : applications) {
      final TableRow row = new TableRow();
      row.addValue(1, a.getApplicationId().toString())
          .addValue(2, a.getUser())
          .addValue(3, a.getName())
          .addValue(4, a.getQueue())
          .addValue(5, DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT).format(
              new Date(a.getStartTime())))
          .addValue(6, DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT).format(
              new Date(a.getFinishTime())))
          .addValue(7, a.getYarnApplicationState().toString())
          .addValue(8, a.getFinalApplicationStatus().toString());
      table.getRows().add(row);
    }
    return table;
  }
View Full Code Here

Examples of org.sql2o.data.Table

            .addParameter("val", "something").addToBatch()
            .addParameter("val", "something else").addToBatch()
            .addParameter("val", "hello").addToBatch()
            .executeBatch();
       
        Table table = sql2o.createQuery("select * from issue4table").executeAndFetchTable();

        Row row0 = table.rows().get(0);
        String row0Val = row0.getString("vAl");
       
        assertEquals("something", row0Val);
       
        Row row1 = table.rows().get(1);
        boolean failed = false;
       
        try{
            String row1Value = row1.getString("ahsHashah"); // Should fail with an sql2o exception
        }
View Full Code Here

Examples of org.teiid.metadata.Table

        long lsb = new BigInteger(randomBytes).longValue();
        record.setUUID("mmuid:"+new UUID(msb, lsb)); //$NON-NLS-1$
  }
 
  private Table createView(String name) throws TranslatorException {
    Table t = addTable(name);
    t.setSystem(true);
    t.setSupportsUpdate(false);
    t.setVirtual(true);
    t.setTableType(Type.Table);
    return t;
  }
View Full Code Here

Examples of org.uispec4j.Table

  }

  public Table getAttributeTable() throws ComponentAmbiguityException, ItemNotFoundException {
    if (table == null) {
      final Component jtable = getFinder().getComponent(attributeTableMatcher);
      table = new Table((JTable) jtable);
    }
    return table;
  }
View Full Code Here

Examples of org.voltdb.catalog.Table

     * @param tableName
     * @return an brand-new empty VoltTable whose corresponds tableName
     */
    public static VoltTable initVoltTable(String tableName)
    {
        Table t = getTable(tableName);
        VoltTable.ColumnInfo[] vtCols = new VoltTable.ColumnInfo[t.getColumns().size()];
        Iterator<Column> iCols = t.getColumns().iterator();
        while (iCols.hasNext())
        {
            Column c = iCols.next();
            vtCols[c.getIndex()] = new VoltTable.ColumnInfo(c.getName(), VoltType.get((byte) c.getType()));
        }
View Full Code Here

Examples of org.voltdb.sysprocs.SnapshotRegistry.Snapshot.Table

    @SuppressWarnings("unchecked")
    @Override
    protected void updateStatsRow(Object rowKey, Object[] rowValues) {
        Pair<Snapshot, Table> p = (Pair<Snapshot, Table>) rowKey;
        Snapshot s = p.getFirst();
        Table t = p.getSecond();
        double duration = 0;
        double throughput = 0;
        if (s.timeFinished != 0) {
            duration = (s.timeFinished - s.timeStarted) / 1000.0;
            throughput = (s.bytesWritten / (1024.0 * 1024.0)) / duration;
View Full Code Here

Examples of org.wicketstuff.table.Table

  public TableTestPanel(String id)
  {
    super(id);

    table = new Table("table", createTableModelUnderTest())
    {
      @Override
      protected void onSelection(AjaxRequestTarget target)
      {
        target.addComponent(viewSelection);
View Full Code Here

Examples of org.xorm.datastore.Table

    private boolean distinct;
    private List parameters = new ArrayList();

    public SQLQuery(Selector selector) {
        this.selector = selector;
        Table table = selector.getTable();
        Alias alias = makeAlias(selector);
        parse(alias, selector);
    }
View Full Code Here

Examples of prefuse.data.Table

  Table table;

  @Override
  protected void setUp() throws Exception {
    super.setUp();
    this.table = new Table();
    this.table.addColumn("String", String.class);
    this.table.addColumn("int", int.class);
    this.table.addColumn("Integer[]", Integer[].class);
    for (int i = 0; i < 10; i++) {
      int r = this.table.addRow();
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.