Package org.voltdb

Examples of org.voltdb.VoltTable.addRow()


                    row[col++] = new Integer(fid);
                    row[col++] = new Integer(seatnum);
                    for (int j=0; j < 9; ++j) {
                        row[col++] = number(1, 1<<30);
                    }
                    reservationTbl.addRow(row);
                    if (reservationTbl.getRowCount() >= kReservationBatchSize) {
                        System.err.printf("RESERVATIONS: loading %d rows (fid %d of %d)\n",
                                          reservationTbl.getRowCount(), fid, maxfids);
                        loadTable("RESERVATIONS", reservationTbl);
                        reservationTbl.clearRowData();
View Full Code Here


            VoltTableRow ts_row = ts.fetchRow(i);
           
            String status_name = ts_row.getString("ST_NAME");
            long trade_id = ts_row.getLong("T_ID");
           
            result.addRow(status_name, trade_id);
        }
       
        return new VoltTable[] {result};
    }
}
View Full Code Here

        VoltTableComparator comparator = new VoltTableComparator(table, cols);
        Arrays.sort(rows, comparator);
       
        VoltTable clone = new VoltTable(table);
        for (int i = 0; i < rows.length; i++) {
            clone.addRow(rows[i]);
        } // FOR
       
        return (clone);
    }
   
View Full Code Here

        }
       
        // creating send_to_market info
        VoltTable stm = stm_template.clone(512);
        for (TradeRequest req: tradeRequestBuffer) {
            stm.addRow(req.symbol, req.trade_id, req.price_quote, req.trade_qty, req.trade_type);
        }
       
        return new VoltTable[] {stm};
    }
}
View Full Code Here

       
        assert bal.getRowCount() == 1;
        double acct_bal = bal.fetchRow(0).getDouble("CA_BAL");
       
        VoltTable ret_values = trade_result_ret_template.clone(64);
        ret_values.addRow(acct_bal);
       
        return new VoltTable[] {ret_values};
    }
}
View Full Code Here

       
        VoltTable news = voltExecuteSQL()[0];
        int news_len = news.getRowCount();
       
        VoltTable res = ret_template.clone(64);
        res.addRow(last_vol, news_len);
       
        return new VoltTable[] {res};
    }
}
View Full Code Here

        }
       
        double pct_change = 100 * (new_mkt_cap / old_mkt_cap - 1);

        VoltTable res = new VoltTable(new VoltTable.ColumnInfo("pct_change", VoltType.FLOAT));
        res.addRow(pct_change);
       
        return new VoltTable[] {res};
    }
}
View Full Code Here

    public String formatFinalResults(BenchmarkResults br) {
        if (this.stop) return (null);
       
        VoltTable vt = new VoltTable(COLUMNS);
        for (Object row[] : this.results) {
            vt.addRow(row);
        }
       
        try {
            FileWriter writer = new FileWriter(this.outputPath);
            VoltTableUtil.csv(writer, vt, true);
View Full Code Here

        for (Entry<Long, Double> e: cust_holds_list) {
            long acct_id = e.getKey();
            double total_assets = e.getValue();
            double cash_bal = cust_bal.get(acct_id);
           
            assets_res.addRow(acct_id, total_assets, cash_bal);
        }
       
        return new VoltTable[] {cust_res, assets_res};
    }
}
View Full Code Here

       
        // frame 6: commit (nothing to do) and send_to_market, which is returned with the result
        int eAction = (type_is_market == 1) ? TPCEConstants.eMEEProcessOrder : TPCEConstants.eMEESetLimitOrderTrigger;
       
        VoltTable ret_values = trade_order_ret_template.clone(128);
        ret_values.addRow(buy_value, sell_value, tax_amount, trade_id, eAction);
       
        return new VoltTable[] {ret_values};
    }
}
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.