Package org.voltdb.types

Examples of org.voltdb.types.TimestampType


                              this.executor.getHStoreSite().getSiteName(),
                              this.gcTime.debug()));
                VoltTable vt = new VoltTable(nodeResultsColumns);
                vt.addRow(this.executor.getHStoreSite().getSiteName(),
                          (int)this.gcTime.getTotalThinkTimeMS(),
                          new TimestampType());
                result = new DependencySet(SysProcFragmentId.PF_gcDistribute, vt);
                break;
            }
            // Aggregate Results
            case SysProcFragmentId.PF_gcAggregate:
View Full Code Here


            throw new VoltAbortException(ErrorType.RESERVATION_NOT_FOUND +
                                         String.format(" Customer %d does not have an existing reservation on flight #%d", c_id, f_id));
        }
      
        // Update the seat reservation for the customer
        TimestampType timestamp = new TimestampType();
        voltQueueSQL(ReserveSeats[(int)attr_idx], seatnum, timestamp, attr_val, r_id, c_id, f_id);
        final VoltTable[] results = voltExecuteSQL(true);
        assert results.length == 1;
        for (int i = 0; i < results.length - 1; i++) {
            if (results[i].getRowCount() != 1) {
View Full Code Here

    private Object[] cleanParams(Object[] orig) {
        // We need to switch java.util.Dates to the stupid volt TimestampType
        for (int i = 0; i < orig.length; i++) {
            if (orig[i] instanceof Date) {
                orig[i] = new TimestampType(((Date) orig[i]).getTime());
            }
        } // FOR
        return (orig);
    }
View Full Code Here

        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) - h_amount;
        final double c_ytd_payment = customer.getDouble(C_YTD_PAYMENT_IDX) + h_amount;
View Full Code Here

                Object row[] = {
                    this.hstore_site.getSiteId(),
                    this.hstore_site.getSiteName(),
                    this.executor.getPartitionId(),
                    Status.OK.name(),
                    new TimestampType(),
                };
                vt.addRow(row);
                result = new DependencySet(SysProcFragmentId.PF_quiesceDistribute, vt);
                break;
            }
View Full Code Here

                      dbg.getBlockedSpecExecCount(),
                      (currentTxnId != null  ? currentTxnId.longValue()  : VoltType.NULL_BIGINT),
                      (currentDtxnId != null ? currentDtxnId.longValue() : VoltType.NULL_BIGINT),
                      (lastExecuted != null  ? lastExecuted.longValue()  : VoltType.NULL_BIGINT),
                      (lastCommitted != null ? lastCommitted.longValue() : VoltType.NULL_BIGINT),
                      new TimestampType());
        } // FOR
       
        DependencySet result = new DependencySet(SysProcFragmentId.PF_execStatus, vt);
        return (result);
    }
View Full Code Here

                    LOG.debug(String.format("Moved log file '%s' to '%s'", path.getName(), backup_file.getName()));
            }
           
            try {
                fw = new FileWriter(path);
                fw.write("# " + new TimestampType().toString() + "\n");
            } catch (Exception ex) {
                throw new RuntimeException("Failed to create output writer for " + processName, ex);
            }
            if (debug.val)
                LOG.debug(String.format("Logging %s output to '%s'", processName, path));
View Full Code Here

        Integer distance = this.getDistance(depart_airport, arrive_airport);
        assert(distance != null) :
            String.format("The calculated distance between '%s' and '%s' is null",
                          depart_airport, arrive_airport);
        long flight_time = Math.round(distance / SEATSConstants.FLIGHT_TRAVEL_RATE) * 3600000000l; // 60 sec * 60 min * 1,000,000
        return (new TimestampType(depart_time.getTime() + flight_time));
    }
View Full Code Here

                            int size = catalog_col.getSize();
                            data[i] = rng.astring(rng.nextInt(size - 1), size);

                        // Timestamps
                        } else if (types[i] == VoltType.TIMESTAMP) {
                            data[i] = new TimestampType();
                       
                        // Ints/Longs
                        } else {
                            data[i] = rng.number(0, 1<<30);
                        }
View Full Code Here

        @Override
        protected int populateRow(UserId seller_id, short remaining) {
            int col = 0;
           
            ItemId itemId = new ItemId(seller_id, remaining);
            TimestampType endDate = this.getRandomEndTimestamp();
            TimestampType startDate = this.getRandomStartTimestamp(endDate);
           
            //LOG.info("endDate = " + endDate + " : startDate = " + startDate);
            long bidDurationDay = ((endDate.getTime() - startDate.getTime()) / AuctionMarkConstants.MICROSECONDS_IN_A_DAY);
            if (this.item_bid_watch_zipfs.containsKey(bidDurationDay) == false) {
                Zipf randomNumBids = new Zipf(profile.rng,
                        AuctionMarkConstants.ITEM_MIN_BIDS_PER_DAY * (int)bidDurationDay,
                        AuctionMarkConstants.ITEM_MAX_BIDS_PER_DAY * (int)bidDurationDay,
                        1.001);
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.