Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
debugging Rejected due to restarts issue
- Loading branch information
Showing
20 changed files
with
402 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 44 additions & 8 deletions
52
src/benchmarks/edu/brown/benchmark/articles/procedures/AddComment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 40 additions & 5 deletions
45
src/benchmarks/edu/brown/benchmark/articles/procedures/GetArticle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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; | |||
} | |||
*/ | |||
} | } | ||
|
|
||
} | } |
Oops, something went wrong.