Package org.voltdb

Examples of org.voltdb.VoltTable.addRow()


                    Object row[] = {
                        executor.getSiteId(),
                        confNames[i],
                        hstore_conf.get(confNames[i]).toString(),
                    };
                    vt.addRow(row);
                } // FOR
                result = new DependencySet(DISTRIBUTE_ID, vt);
                if (debug.val)
                    LOG.info(String.format("%s - Sending back result for partition %d",
                             hstore_site.getTransaction(txn_id), this.executor.getPartitionId()));
View Full Code Here


                    else if (values.size() > 1) {
                        String msg = String.format("Unexpected multiple values for '%s': %s",
                                                   confNames[i], values);
                        throw new VoltAbortException(msg);
                    }
                    vt.addRow(confNames[i], CollectionUtil.first(values).toString(), timestamp);
                } // FOR
                result = new DependencySet(AGGREGATE_ID, vt);
                break;
            default:
                String msg = "Unexpected sysproc fragmentId '" + fragmentId + "'";
View Full Code Here

                        sb.append('|');
                    }
                    LOG.trace("Table[" + tableName + "], Tuple[" + row_idx + "]: "+ sb);
                }

                vt.addRow(tuple);
                row_idx++;
               
                if (row_idx % batchSize == 0) {
                    LOG.debug("Storing batch of " + batchSize + " tuples for " + tableName + " [total=" + row_idx + "]");
                    this.loadVoltTable(tableName, vt);
View Full Code Here

                        sb.append('|');
                    }
                    LOG.trace("Table[" + catalog_tbl.getName() + "], Tuple[" + row_idx + "]: "+ sb);
                }

                vt.addRow(tuple);
                row_idx++;
                if (row_idx % batch_size == 0) {
                    LOG.debug("Storing batch of " + batch_size + " tuples for " + catalog_tbl.getName() + " [total=" + row_idx + "]");
                    this.loadVoltTable(catalog_tbl.getName(), vt);
                    vt.clearRowData();
View Full Code Here

        // #1 -> Number of users updated
        // #2 -> Number of pages updated

        VoltTable result = new VoltTable(WikipediaConstants.GET_USER_PAGE_UPDATE_COLS);
       
        result.addRow(user_revision_ctr.length, page_last_rev_length.length);
       
        return (result);
    }

}
View Full Code Here

                            if (savefile.isReplicated()) {
                                is_replicated = "TRUE";
                            }
                            int partitionIds[] = savefile.getPartitionIds();
                            for (int pid : partitionIds) {
                                result.addRow(m_hostId, hostname, savefile.getHostId(), savefile.getHostname(), savefile.getClusterName(), savefile.getDatabaseName(), savefile.getTableName(),
                                        is_replicated, pid, savefile.getTotalPartitions());
                            }
                        } finally {
                            savefile.close();
                        }
View Full Code Here

        }
        String old_text = rs[1].getString(0);
       
        VoltTable result = new VoltTable(WikipediaConstants.GETPAGE_OUTPUT_COLS);
        if (forSelect == false) {
            result.addRow(pageId,       // PAGE_ID
                          pageTitle,    // PAGE_TITLE
                          old_text,     // OLD_TEXT
                          textId,       // TEXT_ID
                          revisionId,   // REVISION_ID
                          user_text);   // USER_TEXT
View Full Code Here

            try {
                savefile = getTableSaveFile(getSaveFileForReplicatedTable(table_name), 3, null);
                assert (savefile.getCompleted());
            } catch (IOException e) {
                VoltTable result = constructResultsTable();
                result.addRow(m_hostId, hostname, m_siteId, table_name, -1, "FAILURE", "Unable to load table: " + table_name + " error: " + e.getMessage());
                return new DependencySet(dependency_id, result);
            }

            try {
View Full Code Here

                    }
                }

            } catch (IOException e) {
                VoltTable result = constructResultsTable();
                result.addRow(m_hostId, hostname, m_siteId, table_name, -1, "FAILURE", "Unable to load table: " + table_name + " error: " + e.getMessage());
                return new DependencySet(dependency_id, result);
            } catch (VoltTypeException e) {
                VoltTable result = constructResultsTable();
                result.addRow(m_hostId, hostname, m_siteId, table_name, -1, "FAILURE", "Unable to load table: " + table_name + " error: " + e.getMessage());
                return new DependencySet(dependency_id, result);
View Full Code Here

                VoltTable result = constructResultsTable();
                result.addRow(m_hostId, hostname, m_siteId, table_name, -1, "FAILURE", "Unable to load table: " + table_name + " error: " + e.getMessage());
                return new DependencySet(dependency_id, result);
            } catch (VoltTypeException e) {
                VoltTable result = constructResultsTable();
                result.addRow(m_hostId, hostname, m_siteId, table_name, -1, "FAILURE", "Unable to load table: " + table_name + " error: " + e.getMessage());
                return new DependencySet(dependency_id, result);
            }

            VoltTable result = constructResultsTable();
            result.addRow(m_hostId, hostname, m_siteId, table_name, -1, result_str, error_msg);
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.