Skip to content

Commit

Permalink
debugging Rejected due to restarts issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Atreyee committed May 17, 2014
1 parent d920622 commit c71de4d
Show file tree
Hide file tree
Showing 20 changed files with 402 additions and 148 deletions.
33 changes: 18 additions & 15 deletions scripts/anticache/articles.sh
Expand Up @@ -26,13 +26,14 @@ BASE_PROJECT="articles"
BASE_DIR=`pwd` BASE_DIR=`pwd`
OUTPUT_DIR="~/data/articles/read-heavy/2/80-20" OUTPUT_DIR="~/data/articles/read-heavy/2/80-20"


ANTICACHE_BLOCK_SIZE=1048576 ANTICACHE_BLOCK_SIZE=500000
ANTICACHE_THRESHOLD=.5 ANTICACHE_THRESHOLD=.5


BASE_ARGS=( \ BASE_ARGS=( \
# SITE DEBUG # SITE DEBUG
"-Dsite.status_enable=false" \ "-Dsite.status_enable=false" \
#"-Dsite.status_interval=10000" \ "-Dsite.status_interval=10000" \
"-Dsite.txn_restart_limit=35" \
# "-Dsite.status_exec_info=true" \ # "-Dsite.status_exec_info=true" \
# "-Dsite.status_check_for_zombies=true" \ # "-Dsite.status_check_for_zombies=true" \
# "-Dsite.exec_profiling=true" \ # "-Dsite.exec_profiling=true" \
Expand All @@ -45,8 +46,8 @@ BASE_ARGS=( \


# Site Params # Site Params
"-Dsite.jvm_asserts=false" \ "-Dsite.jvm_asserts=false" \
#"-Dsite.specexec_enable=false" \ "-Dsite.specexec_enable=false" \
#"-Dsite.cpu_affinity_one_partition_per_core=true" \ "-Dsite.cpu_affinity_one_partition_per_core=true" \
#"-Dsite.cpu_partition_blacklist=0,2,4,6,8,10,12,14,16,18" \ #"-Dsite.cpu_partition_blacklist=0,2,4,6,8,10,12,14,16,18" \
#"-Dsite.cpu_utility_blacklist=0,2,4,6,8,10,12,14,16,18" \ #"-Dsite.cpu_utility_blacklist=0,2,4,6,8,10,12,14,16,18" \
#"-Dsite.network_incoming_limit_txns=50000" \ #"-Dsite.network_incoming_limit_txns=50000" \
Expand All @@ -69,22 +70,22 @@ BASE_ARGS=( \
"-Dclient.interval=5000" \ "-Dclient.interval=5000" \
"-Dclient.shared_connection=false" \ "-Dclient.shared_connection=false" \
"-Dclient.blocking=true" \ "-Dclient.blocking=true" \
"-Dclient.blocking_concurrent=100" \ "-Dclient.blocking_concurrent=1" \
"-Dclient.throttle_backoff=100" \ "-Dclient.throttle_backoff=100" \
"-Dclient.output_interval=5000" \ "-Dclient.output_interval=5000" \
# "-Dclient.output_anticache_evictions=evictions.csv" \ # "-Dclient.output_anticache_evictions=evictions.csv" \
# "-Dclient.output_memory=memory.csv" \ # "-Dclient.output_memory=memory.csv" \


# Anti-Caching Experiments # Anti-Caching Experiments
"-Dsite.anticache_enable=${ENABLE_ANTICACHE}" \ "-Dsite.anticache_enable=${ENABLE_ANTICACHE}" \
"-Dsite.anticache_batching=true" \ #"-Dsite.anticache_batching=true" \
# "-Dsite.anticache_profiling=true" \ # "-Dsite.anticache_profiling=true" \
"-Dsite.anticache_reset=false" \ "-Dsite.anticache_reset=false" \
"-Dsite.anticache_block_size=${ANTICACHE_BLOCK_SIZE}" \ "-Dsite.anticache_block_size=${ANTICACHE_BLOCK_SIZE}" \
"-Dsite.anticache_check_interval=5000" \ "-Dsite.anticache_check_interval=30000" \
"-Dsite.anticache_threshold_mb=5" \ "-Dsite.anticache_threshold_mb=5" \
"-Dsite.anticache_blocks_per_eviction=30" \ "-Dsite.anticache_blocks_per_eviction=16" \
"-Dsite.anticache_max_evicted_blocks=1000" \ "-Dsite.anticache_max_evicted_blocks=1600" \
# "-Dsite.anticache_evict_size=${ANTICACHE_EVICT_SIZE}" \ # "-Dsite.anticache_evict_size=${ANTICACHE_EVICT_SIZE}" \
"-Dsite.anticache_threshold=${ANTICACHE_THRESHOLD}" \ "-Dsite.anticache_threshold=${ANTICACHE_THRESHOLD}" \
"-Dclient.anticache_enable=false" \ "-Dclient.anticache_enable=false" \
Expand All @@ -93,7 +94,7 @@ BASE_ARGS=( \
"-Dclient.output_csv=results.csv" \ "-Dclient.output_csv=results.csv" \


# CLIENT DEBUG # CLIENT DEBUG
# "-Dclient.output_txn_counters=txncounters.csv" \ "-Dclient.output_txn_counters=txncounters.csv" \
"-Dclient.output_clients=false" \ "-Dclient.output_clients=false" \
"-Dclient.profiling=false" \ "-Dclient.profiling=false" \
"-Dclient.output_response_status=false" \ "-Dclient.output_response_status=false" \
Expand Down Expand Up @@ -140,16 +141,16 @@ done
wait wait


ant compile ant compile
HSTORE_HOSTS="${SITE_HOST}:0:0" HSTORE_HOSTS="${SITE_HOST}:0:0-7"
NUM_CLIENTS=`expr 1 \* $BASE_CLIENT_THREADS` NUM_CLIENTS=`expr 8 \* $BASE_CLIENT_THREADS`
SITE_MEMORY=`expr $BASE_SITE_MEMORY + \( 1 \* $BASE_SITE_MEMORY_PER_PARTITION \)` SITE_MEMORY=`expr $BASE_SITE_MEMORY + \( 8 \* $BASE_SITE_MEMORY_PER_PARTITION \)`


# BUILD PROJECT JAR # BUILD PROJECT JAR
ant hstore-prepare \ ant hstore-prepare \
-Dproject=${BASE_PROJECT} \ -Dproject=${BASE_PROJECT} \
-Dhosts=${HSTORE_HOSTS} \ -Dhosts=${HSTORE_HOSTS} \
-Dbatchevictable=${BATCHEVICTABLES} \ -Devictable=${EVICTABLES}
-Devictable=${EVICTABLES} #-Dbatchevictable=${BATCHEVICTABLES} \
test -f ${BASE_PROJECT}.jar || exit -1 test -f ${BASE_PROJECT}.jar || exit -1


# UPDATE CLIENTS # UPDATE CLIENTS
Expand Down Expand Up @@ -179,6 +180,8 @@ ant compile
-Dsite.memory=${SITE_MEMORY} \ -Dsite.memory=${SITE_MEMORY} \
-Dclient.hosts=${CLIENT_HOSTS_STR} \ -Dclient.hosts=${CLIENT_HOSTS_STR} \
-Dclient.count=${CLIENT_COUNT} -Dclient.count=${CLIENT_COUNT}
#-Dnoloader=true \
#-Dnostart=true \
result=$? result=$?
if [ $result != 0 ]; then if [ $result != 0 ]; then
exit $result exit $result
Expand Down
11 changes: 5 additions & 6 deletions scripts/anticache/ycsb.sh
Expand Up @@ -11,17 +11,15 @@ function onexit() {


# --------------------------------------------------------------------- # ---------------------------------------------------------------------


ENABLE_ANTICACHE=false ENABLE_ANTICACHE=true


SITE_HOST="istc12" SITE_HOST="istc12"


CLIENT_HOSTS=( \ CLIENT_HOSTS=( \
"istc12" \ "istc12" \
"istc13" \
"istc13" \
) )


BASE_CLIENT_THREADS=2 BASE_CLIENT_THREADS=1
BASE_SITE_MEMORY=8192 BASE_SITE_MEMORY=8192
BASE_SITE_MEMORY_PER_PARTITION=1024 BASE_SITE_MEMORY_PER_PARTITION=1024
BASE_PROJECT="ycsb" BASE_PROJECT="ycsb"
Expand Down Expand Up @@ -70,7 +68,7 @@ BASE_ARGS=( \
"-Dclient.duration=300000" \ "-Dclient.duration=300000" \
"-Dclient.interval=5000" \ "-Dclient.interval=5000" \
"-Dclient.shared_connection=false" \ "-Dclient.shared_connection=false" \
"-Dclient.blocking=false" \ "-Dclient.blocking=true" \
"-Dclient.blocking_concurrent=100" \ "-Dclient.blocking_concurrent=100" \
"-Dclient.throttle_backoff=100" \ "-Dclient.throttle_backoff=100" \
"-Dclient.output_interval=5000" \ "-Dclient.output_interval=5000" \
Expand All @@ -79,11 +77,12 @@ BASE_ARGS=( \


# Anti-Caching Experiments # Anti-Caching Experiments
"-Dsite.anticache_enable=${ENABLE_ANTICACHE}" \ "-Dsite.anticache_enable=${ENABLE_ANTICACHE}" \
"-Dsite.anticache_batching=true" \
# "-Dsite.anticache_profiling=true" \ # "-Dsite.anticache_profiling=true" \
"-Dsite.anticache_reset=false" \ "-Dsite.anticache_reset=false" \
"-Dsite.anticache_block_size=${ANTICACHE_BLOCK_SIZE}" \ "-Dsite.anticache_block_size=${ANTICACHE_BLOCK_SIZE}" \
"-Dsite.anticache_check_interval=5000" \ "-Dsite.anticache_check_interval=5000" \
"-Dsite.anticache_threshold_mb=2500" \ "-Dsite.anticache_threshold_mb=100" \
"-Dsite.anticache_blocks_per_eviction=200" \ "-Dsite.anticache_blocks_per_eviction=200" \
"-Dsite.anticache_max_evicted_blocks=325" \ "-Dsite.anticache_max_evicted_blocks=325" \
# "-Dsite.anticache_evict_size=${ANTICACHE_EVICT_SIZE}" \ # "-Dsite.anticache_evict_size=${ANTICACHE_EVICT_SIZE}" \
Expand Down
15 changes: 12 additions & 3 deletions src/benchmarks/edu/brown/benchmark/articles/ArticlesClient.java
Expand Up @@ -54,6 +54,7 @@ public ArticlesClient(String[] args) {
} }
public static enum Transaction { public static enum Transaction {
GET_ARTICLE("Get Article", ArticlesConstants.FREQUENCY_GET_ARTICLE), GET_ARTICLE("Get Article", ArticlesConstants.FREQUENCY_GET_ARTICLE),
GET_COMMENTS("Get Comments", ArticlesConstants.FREQUENCY_GET_COMMENTS),
ADD_COMMENT("Add Comment", ArticlesConstants.FREQUENCY_ADD_COMMENT), ADD_COMMENT("Add Comment", ArticlesConstants.FREQUENCY_ADD_COMMENT),
UPDATE_USER("Update User Info", ArticlesConstants.FREQUENCY_UPDATE_USER_INFO); UPDATE_USER("Update User Info", ArticlesConstants.FREQUENCY_UPDATE_USER_INFO);


Expand Down Expand Up @@ -82,13 +83,21 @@ protected boolean runOnce() throws IOException {
// ProcedureCallback callback = null; // ProcedureCallback callback = null;
switch (target) { switch (target) {
case GET_ARTICLE: { case GET_ARTICLE: {
long articlesSize = Math.round(ArticlesConstants.ARTICLES_SIZE * this.getScaleFactor()); //long articlesSize = Math.round(ArticlesConstants.ARTICLES_SIZE * this.getScaleFactor());
params = new Object[]{ articlesSize - ((Random) this.readRecord).nextInt() }; params = new Object[]{ ((Random) this.readRecord).nextInt() };
// callback = new GetCommentsCallback(this.getClientHandle(), params);
break;
}
case GET_COMMENTS: {
//long articlesSize = Math.round(ArticlesConstants.ARTICLES_SIZE * this.getScaleFactor());
params = new Object[]{ ((Random) this.readRecord).nextInt() };
// callback = new GetCommentsCallback(this.getClientHandle(), params); // callback = new GetCommentsCallback(this.getClientHandle(), params);
break; break;
} }
case ADD_COMMENT: { case ADD_COMMENT: {
int a_id = this.readRecord.nextInt(); // aid //long articlesSize = Math.round(ArticlesConstants.ARTICLES_SIZE * this.getScaleFactor());
int a_id = this.readRecord.nextInt();
//int a_id = this.readRecord.nextInt(); // aid
int u_id = this.userRecord.nextInt();// uid int u_id = this.userRecord.nextInt();// uid
String text = ArticlesUtil.astring(100, 100); String text = ArticlesUtil.astring(100, 100);
params = new Object[]{ a_id, u_id, text}; params = new Object[]{ a_id, u_id, text};
Expand Down
Expand Up @@ -6,8 +6,9 @@ public abstract class ArticlesConstants {
// STORED PROCEDURE EXECUTION FREQUENCIES (0-100) // STORED PROCEDURE EXECUTION FREQUENCIES (0-100)
// ---------------------------------------------------------------- // ----------------------------------------------------------------


public static final int FREQUENCY_GET_ARTICLE = 50; public static final int FREQUENCY_GET_ARTICLE = 35;
public static final int FREQUENCY_ADD_COMMENT = 40; public static final int FREQUENCY_ADD_COMMENT = 20;
public static final int FREQUENCY_GET_COMMENTS = 35;
public static final int FREQUENCY_UPDATE_USER_INFO = 10; public static final int FREQUENCY_UPDATE_USER_INFO = 10;


// ---------------------------------------------------------------- // ----------------------------------------------------------------
Expand All @@ -26,6 +27,6 @@ public abstract class ArticlesConstants {
TABLENAME_USERS, TABLENAME_USERS,
TABLENAME_COMMENTS TABLENAME_COMMENTS
}; };
public static final long MAX_COMMENTS_PER_ARTICLE = 10; public static final long MAX_COMMENTS_PER_ARTICLE = 5;
public static final int COMMENTS_NUM_COLUMNS = 0; public static final int COMMENTS_NUM_COLUMNS = 0;
} }
30 changes: 29 additions & 1 deletion src/benchmarks/edu/brown/benchmark/articles/ArticlesLoader.java
Expand Up @@ -73,6 +73,22 @@ void genArticles(Table catalog_tbl) {
long numComments = ArticlesUtil.number(0, this.maxComments); long numComments = ArticlesUtil.number(0, this.maxComments);
row[col++] = numComments; // number of comments row[col++] = numComments; // number of comments


row[col++] = ArticlesUtil.astring(8, 8); // text
row[col++] = ArticlesUtil.astring(8, 8); // text
row[col++] = ArticlesUtil.astring(8, 8); // text
row[col++] = ArticlesUtil.astring(8, 8); // text
row[col++] = ArticlesUtil.astring(8, 8); // text
row[col++] = ArticlesUtil.astring(8, 8); // text
row[col++] = ArticlesUtil.astring(8, 8); // text
row[col++] = ArticlesUtil.astring(8, 8); // text
row[col++] = ArticlesUtil.astring(8, 8); // text
row[col++] = ArticlesUtil.astring(8, 8); // text
row[col++] = ArticlesUtil.astring(8, 8); // text
row[col++] = ArticlesUtil.astring(8, 8); // text
row[col++] = ArticlesUtil.astring(8, 8); // text
row[col++] = ArticlesUtil.astring(8, 8); // text
row[col++] = ArticlesUtil.astring(8, 8); // text

this.articleToCommentMap.put(a_id, numComments); this.articleToCommentMap.put(a_id, numComments);
// assert col == table.getColumnCount(); // assert col == table.getColumnCount();
table.addRow(row); table.addRow(row);
Expand Down Expand Up @@ -154,7 +170,19 @@ void genComments(Table catalog_comments) {
row_spe[0] = a_id*ArticlesConstants.MAX_COMMENTS_PER_ARTICLE+i; row_spe[0] = a_id*ArticlesConstants.MAX_COMMENTS_PER_ARTICLE+i;
row_spe[1] = a_id; // random number from the article id row_spe[1] = a_id; // random number from the article id
row_spe[2] = ArticlesUtil.number(0, this.usersSize); // random number from user id row_spe[2] = ArticlesUtil.number(0, this.usersSize); // random number from user id
row_spe[3] = ArticlesUtil.astring(5, 5); // comment row_spe[3] = ArticlesUtil.astring(100, 100); // comment

row_spe[4] = ArticlesUtil.astring(8, 8); // comment
row_spe[5] = ArticlesUtil.astring(8, 8); // comment
row_spe[6] = ArticlesUtil.astring(8, 8); // comment
row_spe[7] = ArticlesUtil.astring(8, 8); // comment
row_spe[8] = ArticlesUtil.astring(8, 8); // comment
row_spe[9] = ArticlesUtil.astring(8, 8); // comment
row_spe[10] = ArticlesUtil.astring(8, 8); // comment
row_spe[11] = ArticlesUtil.astring(8, 8); // comment
row_spe[12] = ArticlesUtil.astring(8, 8); // comment
row_spe[13] = ArticlesUtil.astring(8, 8); // comment

speTbl.addRow(row_spe); speTbl.addRow(row_spe);
speTotal++; speTotal++;
if (speTbl.getRowCount() >= ArticlesConstants.BATCH_SIZE) { if (speTbl.getRowCount() >= ArticlesConstants.BATCH_SIZE) {
Expand Down
Expand Up @@ -16,12 +16,14 @@ public class ArticlesProjectBuilder extends AbstractProjectBuilder{
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static final Class<? extends VoltProcedure> PROCEDURES[] = (Class<? extends VoltProcedure>[]) new Class<?>[] { public static final Class<? extends VoltProcedure> PROCEDURES[] = (Class<? extends VoltProcedure>[]) new Class<?>[] {
GetArticle.class, GetArticle.class,
GetComments.class,
AddComment.class, AddComment.class,
UpdateUserInfo.class UpdateUserInfo.class
}; };
{ {
// Transaction Frequencies // Transaction Frequencies
addTransactionFrequency(GetArticle.class, ArticlesConstants.FREQUENCY_GET_ARTICLE); addTransactionFrequency(GetArticle.class, ArticlesConstants.FREQUENCY_GET_ARTICLE);
addTransactionFrequency(GetComments.class, ArticlesConstants.FREQUENCY_GET_COMMENTS);
addTransactionFrequency(AddComment.class, ArticlesConstants.FREQUENCY_ADD_COMMENT); addTransactionFrequency(AddComment.class, ArticlesConstants.FREQUENCY_ADD_COMMENT);
addTransactionFrequency(UpdateUserInfo.class, ArticlesConstants.FREQUENCY_UPDATE_USER_INFO); addTransactionFrequency(UpdateUserInfo.class, ArticlesConstants.FREQUENCY_UPDATE_USER_INFO);


Expand Down
@@ -1,40 +1,76 @@
package edu.brown.benchmark.articles.procedures; package edu.brown.benchmark.articles.procedures;


import org.apache.log4j.Logger;
import org.voltdb.ProcInfo; import org.voltdb.ProcInfo;
import org.voltdb.SQLStmt; import org.voltdb.SQLStmt;
import org.voltdb.VoltProcedure; import org.voltdb.VoltProcedure;
import org.voltdb.VoltTable; import org.voltdb.VoltTable;

import org.voltdb.exceptions.SerializableException;
import org.voltdb.exceptions.EvictedTupleAccessException;
import edu.brown.benchmark.articles.ArticlesConstants; import edu.brown.benchmark.articles.ArticlesConstants;
import edu.brown.logging.LoggerUtil;
import edu.brown.logging.LoggerUtil.LoggerBoolean;


@ProcInfo( @ProcInfo(
partitionParam = 1, partitionParam = 0,
singlePartition = true singlePartition = true
) )
public class AddComment extends VoltProcedure{ public class AddComment extends VoltProcedure{
// -- c_id Comment's ID // -- c_id Comment's ID
// -- a_id Article's ID // -- a_id Article's ID
// -- u_id User's ID // -- u_id User's ID
// -- c_text Actual comment text // -- c_text Actual comment text

public static final Logger LOG = Logger.getLogger(AddComment.class);
private static final LoggerBoolean debug = new LoggerBoolean();
private static final LoggerBoolean trace = new LoggerBoolean();
static {
LoggerUtil.setupLogging();
LoggerUtil.attachObserver(LOG, debug, trace);
}



public final SQLStmt GetNumComments = new SQLStmt("SELECT A_NUM_COMMENTS FROM ARTICLES WHERE A_ID=?"); public final SQLStmt GetNumComments = new SQLStmt("SELECT A_NUM_COMMENTS FROM ARTICLES WHERE A_ID=?");
public final SQLStmt AddComment = new SQLStmt("INSERT INTO COMMENTS(C_ID,C_A_ID,C_U_ID,C_TEXT) VALUES(?, ?, ?, ?)"); public final SQLStmt AddComment = new SQLStmt("INSERT INTO COMMENTS(C_ID,C_A_ID,C_U_ID,C_TEXT) VALUES(?, ?, ?, ?)");
public final SQLStmt UpdateArticle = new SQLStmt("UPDATE ARTICLES SET A_NUM_COMMENTS=? WHERE A_ID=?"); public final SQLStmt UpdateArticle = new SQLStmt("UPDATE ARTICLES SET A_NUM_COMMENTS=? WHERE A_ID=?");


public VoltTable[] run(long a_id, long u_id, String c_text) { public VoltTable[] run(long a_id, long u_id, String c_text) {

VoltTable[] results;
voltQueueSQL(GetNumComments, a_id); try {
VoltTable[] results = voltExecuteSQL(); voltQueueSQL(GetNumComments, a_id);
results = voltExecuteSQL();
} catch (SerializableException ex) {
LOG.info("After comments Num comments");
System.out.println(ex);
if(ex instanceof EvictedTupleAccessException){
EvictedTupleAccessException exception = (EvictedTupleAccessException) ex;
LOG.info(exception.block_ids[0]);
System.out.println(a_id);
}
throw ex;
}
boolean adv = results[0].advanceRow(); boolean adv = results[0].advanceRow();
//assert (adv); //assert (adv);
long num_comments = results[0].getLong(0); long num_comments = results[0].getLong(0);
if(num_comments == ArticlesConstants.MAX_COMMENTS_PER_ARTICLE){
return results;
}

long c_id = a_id*ArticlesConstants.MAX_COMMENTS_PER_ARTICLE+num_comments; long c_id = a_id*ArticlesConstants.MAX_COMMENTS_PER_ARTICLE+num_comments;
try{
voltQueueSQL(AddComment, c_id, a_id, u_id, c_text); voltQueueSQL(AddComment, c_id, a_id, u_id, c_text);
voltExecuteSQL(); voltExecuteSQL();
} catch (SerializableException ex){
LOG.info("After add comment");
throw ex;
}


voltQueueSQL(UpdateArticle, num_comments+1, a_id); try{
results = voltExecuteSQL(true); voltQueueSQL(UpdateArticle, num_comments+1, a_id);
results = voltExecuteSQL(true);
}catch (SerializableException ex){
LOG.info("After update article");
throw ex;
}
assert results.length == 1; assert results.length == 1;
return results; return results;
} }
Expand Down
@@ -1,22 +1,57 @@
package edu.brown.benchmark.articles.procedures; package edu.brown.benchmark.articles.procedures;
import org.apache.log4j.Logger;
import org.voltdb.*; import org.voltdb.*;
import org.voltdb.exceptions.EvictedTupleAccessException;
import org.voltdb.exceptions.SerializableException;

import edu.brown.logging.LoggerUtil;
import edu.brown.logging.LoggerUtil.LoggerBoolean;


@ProcInfo( @ProcInfo(
partitionParam = 0, partitionParam = 0,
singlePartition = true singlePartition = true
) )
public class GetArticle extends VoltProcedure{ public class GetArticle extends VoltProcedure{

public static final Logger LOG = Logger.getLogger(AddComment.class);
private static final LoggerBoolean debug = new LoggerBoolean();
private static final LoggerBoolean trace = new LoggerBoolean();
static {
LoggerUtil.setupLogging();
LoggerUtil.attachObserver(LOG, debug, trace);
}

public final SQLStmt GetArticle = new SQLStmt("SELECT * FROM ARTICLES WHERE A_ID = ? "); public final SQLStmt GetArticle = new SQLStmt("SELECT * FROM ARTICLES WHERE A_ID = ? ");
public final SQLStmt GetComments = new SQLStmt("SELECT * FROM COMMENTS WHERE C_A_ID = ? "); //public final SQLStmt GetComments = new SQLStmt("SELECT * FROM COMMENTS WHERE C_A_ID = ? ");
// public final SQLStmt GetUser = new SQLStmt("SELECT * FROM USERS JOIN COMMENTS ON USERS.U_ID = COMMENTS.U_ID WHERE A_ID = ? "); // public final SQLStmt GetUser = new SQLStmt("SELECT * FROM USERS JOIN COMMENTS ON USERS.U_ID = COMMENTS.U_ID WHERE A_ID = ? ");


public VoltTable[] run(long a_id) { public VoltTable[] run(long a_id) {

try {
voltQueueSQL(GetArticle, a_id); voltQueueSQL(GetArticle, a_id);
voltExecuteSQL();
voltQueueSQL(GetComments, a_id);
return voltExecuteSQL(true); return voltExecuteSQL(true);
} catch (SerializableException ex) {
LOG.info("After get article");
System.out.println(ex);
if(ex instanceof EvictedTupleAccessException){
EvictedTupleAccessException exception = (EvictedTupleAccessException) ex;
LOG.info(exception.block_ids[0]);
System.out.println(a_id);
}
throw ex;
}
/* try{
voltQueueSQL(GetComments, a_id);
return voltExecuteSQL(true);
} catch (SerializableException ex) {
LOG.info("After get comments");
System.out.println(ex);
if(ex instanceof EvictedTupleAccessException){
EvictedTupleAccessException exception = (EvictedTupleAccessException) ex;
LOG.info(exception.block_ids[0]);
System.out.println(a_id);
}
throw ex;
}
*/
} }


} }

0 comments on commit c71de4d

Please sign in to comment.