Package org.voltdb.types

Examples of org.voltdb.types.TimestampType


        final byte[] c_street_2 = customer.getStringAsBytes(C_STREET_2_IDX);
        final byte[] c_city = customer.getStringAsBytes(C_CITY_IDX);
        final byte[] c_state = customer.getStringAsBytes(C_STATE_IDX);
        final byte[] c_zip = customer.getStringAsBytes(C_ZIP_IDX);
        final byte[] c_phone = customer.getStringAsBytes(C_PHONE_IDX);
        final TimestampType c_since = customer.getTimestampAsTimestamp(C_SINCE_IDX);
        final byte[] c_credit = customer.getStringAsBytes(C_CREDIT_IDX);
        final double c_credit_lim = customer.getDouble(C_CREDIT_LIM_IDX);
        final double c_discount = customer.getDouble(C_DISCOUNT_IDX);
        final double c_balance = customer.getDouble(C_BALANCE_IDX) - paymentAmount;
        final double c_ytd_payment = customer.getDouble(C_YTD_PAYMENT_IDX) + paymentAmount;
View Full Code Here


            4L,
            5.01f,
            6.02,
            "string",
            new byte[] { 'b', 'y', 't', 'e', 's' },
            new TimestampType(99),
            new BigDecimal(7654321).setScale(VoltDecimalHelper.kDefaultScale),
            new Object(),
        };

        for (Object o : primitives) {
View Full Code Here

        short      s1 = (short)2;
        int        i1 = 3;
        long       l1 = Long.MIN_VALUE + 1;
        double     f1 = 3.5;
        String     S1 = "A";
        TimestampType d1  = new TimestampType(0);
        BigDecimal B1 = new BigDecimal(7654321).setScale(VoltDecimalHelper.kDefaultScale);

        // create a table with one column per supported type with NULLS on the left to right diagonal.
        // tinyint is intentionally first AND last to test that wasNull is correctly cleared by the
        // the next-to-last instance and re-initialized by tinyint.
View Full Code Here

/** Clock interface to enable testing. */
public interface Clock {
    public TimestampType getDateTime();

    public static class RealTime implements Clock {
        public TimestampType getDateTime() { return new TimestampType(); }
View Full Code Here

        for (int ii = 0; ii < m_tpccConfig.num_loadthreads; ii++) {
            ScaleParameters parameters = ScaleParameters.makeWithScaleFactor(m_tpccConfig, hstore_conf.client.scalefactor);
            assert parameters != null;

            RandomGenerator generator = new RandomGenerator.Implementation();
            TimestampType generationDateTime = new TimestampType();
            // TODO(evanj): The client needs these values to set its own values
            // correctly
            RandomGenerator.NURandC loadC = RandomGenerator.NURandC.makeForLoad(generator);
            generator.setC(loadC);
View Full Code Here

            } else {
                c_last = m_generator.makeRandomLastName(m_parameters.customersPerDistrict);
            }

            String c_phone = m_generator.nstring(TPCCConstants.PHONE, TPCCConstants.PHONE);
            TimestampType c_since = m_generationDateTime;
            String c_credit = badCredit ? TPCCConstants.BAD_CREDIT : TPCCConstants.GOOD_CREDIT;
            double c_credit_lim = TPCCConstants.INITIAL_CREDIT_LIM;
            double c_discount = m_generator.fixedPoint(TPCCConstants.DISCOUNT_DECIMALS, TPCCConstants.MIN_DISCOUNT,
                    TPCCConstants.MAX_DISCOUNT);
            double c_balance = TPCCConstants.INITIAL_BALANCE;
View Full Code Here

            data_tables[IDX_STOCKS].addRow(container_stock);
        }

        /* returns the generated o_ol_cnt value. */
        public long generateOrder(long o_w_id, long o_d_id, long o_id, long o_c_id, boolean newOrder) {
            TimestampType o_entry_d = m_generationDateTime;
            long o_carrier_id;
            if (!newOrder) {
                o_carrier_id = m_generator.number(TPCCConstants.MIN_CARRIER_ID, TPCCConstants.MAX_CARRIER_ID);
            } else {
                o_carrier_id = TPCCConstants.NULL_CARRIER_ID;
View Full Code Here

        }

        public void generateOrderLine(long ol_w_id, long ol_d_id, long ol_o_id, long ol_number, boolean newOrder) {
            long ol_i_id = m_generator.number(1, m_parameters.num_items);
            long ol_supply_w_id = ol_w_id;
            TimestampType ol_delivery_d = m_generationDateTime;
            long ol_quantity = TPCCConstants.INITIAL_QUANTITY;

            double ol_amount;
            if (!newOrder) {
                ol_amount = 0.00;
View Full Code Here

        // private long max_hid = 0;
        public void generateHistory(long h_c_w_id, long h_c_d_id, long h_c_id) {
            long h_w_id = h_c_w_id;
            long h_d_id = h_c_d_id;
            TimestampType h_date = m_generationDateTime;
            double h_amount = TPCCConstants.INITIAL_AMOUNT;
            String h_data = m_generator.astring(TPCCConstants.MIN_DATA, TPCCConstants.MAX_DATA);

            data_tables[IDX_HISTORIES].addRow(h_c_id, h_c_d_id, h_c_w_id, h_d_id, h_w_id, h_date, h_amount, h_data);
        }
View Full Code Here

            assert c_w_id != w_id;
            c_d_id = generateDistrict();
        }
        double h_amount = generator.fixedPoint(2, TPCCConstants.MIN_PAYMENT,
                                                  TPCCConstants.MAX_PAYMENT);
        TimestampType now = clock.getDateTime();

        if (generator.number(1, 100) <= 60) {
            // 60%: payment by last name
            String c_last = generator.makeRandomLastName(parameters.customersPerDistrict);
            client.callPaymentByName(w_id, d_id, h_amount, c_w_id, c_d_id, c_last, now);
View Full Code Here

TOP

Related Classes of org.voltdb.types.TimestampType

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.