id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
61,100
VoltDB/voltdb
src/frontend/org/voltdb/VoltZK.java
VoltZK.getMigratePartitionLeaderInfo
public static MigratePartitionLeaderInfo getMigratePartitionLeaderInfo(ZooKeeper zk) { try { byte[] data = zk.getData(migrate_partition_leader_info, null, null); if (data != null) { MigratePartitionLeaderInfo info = new MigratePartitionLeaderInfo(data); re...
java
public static MigratePartitionLeaderInfo getMigratePartitionLeaderInfo(ZooKeeper zk) { try { byte[] data = zk.getData(migrate_partition_leader_info, null, null); if (data != null) { MigratePartitionLeaderInfo info = new MigratePartitionLeaderInfo(data); re...
[ "public", "static", "MigratePartitionLeaderInfo", "getMigratePartitionLeaderInfo", "(", "ZooKeeper", "zk", ")", "{", "try", "{", "byte", "[", "]", "data", "=", "zk", ".", "getData", "(", "migrate_partition_leader_info", ",", "null", ",", "null", ")", ";", "if", ...
get MigratePartitionLeader information
[ "get", "MigratePartitionLeader", "information" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltZK.java#L593-L603
61,101
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionLogical.java
ExpressionLogical.convertDateTimeLiteral
private boolean convertDateTimeLiteral(Session session, Expression a, Expression b) { if (a.dataType.isDateTimeType()) {} else if (b.dataType.isDateTimeType()) { Expression c = a; a = b; b = c; } else { ...
java
private boolean convertDateTimeLiteral(Session session, Expression a, Expression b) { if (a.dataType.isDateTimeType()) {} else if (b.dataType.isDateTimeType()) { Expression c = a; a = b; b = c; } else { ...
[ "private", "boolean", "convertDateTimeLiteral", "(", "Session", "session", ",", "Expression", "a", ",", "Expression", "b", ")", "{", "if", "(", "a", ".", "dataType", ".", "isDateTimeType", "(", ")", ")", "{", "}", "else", "if", "(", "b", ".", "dataType",...
for compatibility, convert a datetime character string to a datetime value for comparison
[ "for", "compatibility", "convert", "a", "datetime", "character", "string", "to", "a", "datetime", "value", "for", "comparison" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionLogical.java#L730-L756
61,102
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionLogical.java
ExpressionLogical.distributeOr
void distributeOr() { if (opType != OpTypes.OR) { return; } if (nodes[LEFT].opType == OpTypes.AND) { opType = OpTypes.AND; Expression temp = new ExpressionLogical(OpTypes.OR, nodes[LEFT].nodes[RIGHT], nodes[RIGHT]); nodes[LEFT]....
java
void distributeOr() { if (opType != OpTypes.OR) { return; } if (nodes[LEFT].opType == OpTypes.AND) { opType = OpTypes.AND; Expression temp = new ExpressionLogical(OpTypes.OR, nodes[LEFT].nodes[RIGHT], nodes[RIGHT]); nodes[LEFT]....
[ "void", "distributeOr", "(", ")", "{", "if", "(", "opType", "!=", "OpTypes", ".", "OR", ")", "{", "return", ";", "}", "if", "(", "nodes", "[", "LEFT", "]", ".", "opType", "==", "OpTypes", ".", "AND", ")", "{", "opType", "=", "OpTypes", ".", "AND"...
Converts an OR containing an AND to an AND
[ "Converts", "an", "OR", "containing", "an", "AND", "to", "an", "AND" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionLogical.java#L1482-L1510
61,103
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionLogical.java
ExpressionLogical.isSimpleBound
boolean isSimpleBound() { if (opType == OpTypes.IS_NULL) { return true; } if (nodes[RIGHT] != null) { if (nodes[RIGHT].opType == OpTypes.VALUE) { // also true for all parameters return true; } if (nodes[RIGHT].op...
java
boolean isSimpleBound() { if (opType == OpTypes.IS_NULL) { return true; } if (nodes[RIGHT] != null) { if (nodes[RIGHT].opType == OpTypes.VALUE) { // also true for all parameters return true; } if (nodes[RIGHT].op...
[ "boolean", "isSimpleBound", "(", ")", "{", "if", "(", "opType", "==", "OpTypes", ".", "IS_NULL", ")", "{", "return", "true", ";", "}", "if", "(", "nodes", "[", "RIGHT", "]", "!=", "null", ")", "{", "if", "(", "nodes", "[", "RIGHT", "]", ".", "opT...
Called only on comparison expressions after reordering which have a COLUMN left leaf
[ "Called", "only", "on", "comparison", "expressions", "after", "reordering", "which", "have", "a", "COLUMN", "left", "leaf" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionLogical.java#L1581-L1602
61,104
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionLogical.java
ExpressionLogical.swapCondition
void swapCondition() { int i = OpTypes.EQUAL; switch (opType) { case OpTypes.GREATER_EQUAL : i = OpTypes.SMALLER_EQUAL; break; case OpTypes.SMALLER_EQUAL : i = OpTypes.GREATER_EQUAL; break; case OpTy...
java
void swapCondition() { int i = OpTypes.EQUAL; switch (opType) { case OpTypes.GREATER_EQUAL : i = OpTypes.SMALLER_EQUAL; break; case OpTypes.SMALLER_EQUAL : i = OpTypes.GREATER_EQUAL; break; case OpTy...
[ "void", "swapCondition", "(", ")", "{", "int", "i", "=", "OpTypes", ".", "EQUAL", ";", "switch", "(", "opType", ")", "{", "case", "OpTypes", ".", "GREATER_EQUAL", ":", "i", "=", "OpTypes", ".", "SMALLER_EQUAL", ";", "break", ";", "case", "OpTypes", "."...
Swap the condition with its complement
[ "Swap", "the", "condition", "with", "its", "complement" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionLogical.java#L1607-L1647
61,105
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionLogical.java
ExpressionLogical.voltConvertBinaryIntegerLiteral
private boolean voltConvertBinaryIntegerLiteral(Session session, Expression lhs, Expression rhs) { Expression nonIntegralExpr; int whichChild; if (lhs.dataType.isIntegralType()) { nonIntegralExpr = rhs; whichChild = RIGHT; } else if (rhs.dataType.isIntegra...
java
private boolean voltConvertBinaryIntegerLiteral(Session session, Expression lhs, Expression rhs) { Expression nonIntegralExpr; int whichChild; if (lhs.dataType.isIntegralType()) { nonIntegralExpr = rhs; whichChild = RIGHT; } else if (rhs.dataType.isIntegra...
[ "private", "boolean", "voltConvertBinaryIntegerLiteral", "(", "Session", "session", ",", "Expression", "lhs", ",", "Expression", "rhs", ")", "{", "Expression", "nonIntegralExpr", ";", "int", "whichChild", ";", "if", "(", "lhs", ".", "dataType", ".", "isIntegralTyp...
If one child is an integer, and the other is a VARBINARY literal, try to convert the literal to an integer.
[ "If", "one", "child", "is", "an", "integer", "and", "the", "other", "is", "a", "VARBINARY", "literal", "try", "to", "convert", "the", "literal", "to", "an", "integer", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionLogical.java#L1739-L1754
61,106
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/RowStoreAVL.java
RowStoreAVL.delete
public final void delete(Row row) { for (int i = indexList.length - 1; i >= 0; i--) { indexList[i].delete(this, row); } remove(row.getPos()); }
java
public final void delete(Row row) { for (int i = indexList.length - 1; i >= 0; i--) { indexList[i].delete(this, row); } remove(row.getPos()); }
[ "public", "final", "void", "delete", "(", "Row", "row", ")", "{", "for", "(", "int", "i", "=", "indexList", ".", "length", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "indexList", "[", "i", "]", ".", "delete", "(", "this", ",", "...
Basic delete with no logging or referential checks.
[ "Basic", "delete", "with", "no", "logging", "or", "referential", "checks", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/RowStoreAVL.java#L117-L124
61,107
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java
HsqlTimer.compare
public int compare(final Object a, final Object b) { final long awhen = ((Task) (a)).getNextScheduled(); final long bwhen = ((Task) (b)).getNextScheduled(); return (awhen < bwhen) ? -1 : (awhen == bwhen) ? 0 : 1; ...
java
public int compare(final Object a, final Object b) { final long awhen = ((Task) (a)).getNextScheduled(); final long bwhen = ((Task) (b)).getNextScheduled(); return (awhen < bwhen) ? -1 : (awhen == bwhen) ? 0 : 1; ...
[ "public", "int", "compare", "(", "final", "Object", "a", ",", "final", "Object", "b", ")", "{", "final", "long", "awhen", "=", "(", "(", "Task", ")", "(", "a", ")", ")", ".", "getNextScheduled", "(", ")", ";", "final", "long", "bwhen", "=", "(", ...
Required to back the priority queue for scheduled tasks. @param a the first Task @param b the second Task @return 0 if equal, < 0 if a < b, > 0 if a > b
[ "Required", "to", "back", "the", "priority", "queue", "for", "scheduled", "tasks", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java#L106-L114
61,108
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java
HsqlTimer.scheduleAfter
public Object scheduleAfter(final long delay, final Runnable runnable) throws IllegalArgumentException { if (runnable == null) { throw new IllegalArgumentException("runnable == null"); } return this.addTask(now() + del...
java
public Object scheduleAfter(final long delay, final Runnable runnable) throws IllegalArgumentException { if (runnable == null) { throw new IllegalArgumentException("runnable == null"); } return this.addTask(now() + del...
[ "public", "Object", "scheduleAfter", "(", "final", "long", "delay", ",", "final", "Runnable", "runnable", ")", "throws", "IllegalArgumentException", "{", "if", "(", "runnable", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"runnable ==...
Causes the specified Runnable to be executed once in the background after the specified delay. @param delay in milliseconds @param runnable the Runnable to execute. @return opaque reference to the internal task @throws IllegalArgumentException if runnable is null
[ "Causes", "the", "specified", "Runnable", "to", "be", "executed", "once", "in", "the", "background", "after", "the", "specified", "delay", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java#L177-L186
61,109
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java
HsqlTimer.scheduleAt
public Object scheduleAt(final Date date, final Runnable runnable) throws IllegalArgumentException { if (date == null) { throw new IllegalArgumentException("date == null"); } else if (runnable == null) { throw new Illegal...
java
public Object scheduleAt(final Date date, final Runnable runnable) throws IllegalArgumentException { if (date == null) { throw new IllegalArgumentException("date == null"); } else if (runnable == null) { throw new Illegal...
[ "public", "Object", "scheduleAt", "(", "final", "Date", "date", ",", "final", "Runnable", "runnable", ")", "throws", "IllegalArgumentException", "{", "if", "(", "date", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"date == null\"", ...
Causes the specified Runnable to be executed once in the background at the specified time. @param date time at which to execute the specified Runnable @param runnable the Runnable to execute. @return opaque reference to the internal task @throws IllegalArgumentException if date or runnable is null
[ "Causes", "the", "specified", "Runnable", "to", "be", "executed", "once", "in", "the", "background", "at", "the", "specified", "time", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java#L197-L208
61,110
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java
HsqlTimer.schedulePeriodicallyAt
public Object schedulePeriodicallyAt(final Date date, final long period, final Runnable runnable, final boolean relative) throws IllegalArgumentException { if (date == null) { ...
java
public Object schedulePeriodicallyAt(final Date date, final long period, final Runnable runnable, final boolean relative) throws IllegalArgumentException { if (date == null) { ...
[ "public", "Object", "schedulePeriodicallyAt", "(", "final", "Date", "date", ",", "final", "long", "period", ",", "final", "Runnable", "runnable", ",", "final", "boolean", "relative", ")", "throws", "IllegalArgumentException", "{", "if", "(", "date", "==", "null"...
Causes the specified Runnable to be executed periodically in the background, starting at the specified time. @return opaque reference to the internal task @param period the cycle period @param relative if true, fixed rate sheduling else fixed delay scheduling @param date time at which to execute the specified Runnable...
[ "Causes", "the", "specified", "Runnable", "to", "be", "executed", "periodically", "in", "the", "background", "starting", "at", "the", "specified", "time", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java#L222-L236
61,111
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java
HsqlTimer.schedulePeriodicallyAfter
public Object schedulePeriodicallyAfter(final long delay, final long period, final Runnable runnable, final boolean relative) throws IllegalArgumentException { if (period <= 0) { throw new IllegalArgumentException("period <= 0"); } else if (runnable == null) { ...
java
public Object schedulePeriodicallyAfter(final long delay, final long period, final Runnable runnable, final boolean relative) throws IllegalArgumentException { if (period <= 0) { throw new IllegalArgumentException("period <= 0"); } else if (runnable == null) { ...
[ "public", "Object", "schedulePeriodicallyAfter", "(", "final", "long", "delay", ",", "final", "long", "period", ",", "final", "Runnable", "runnable", ",", "final", "boolean", "relative", ")", "throws", "IllegalArgumentException", "{", "if", "(", "period", "<=", ...
Causes the specified Runnable to be executed periodically in the background, starting after the specified delay. @return opaque reference to the internal task @param period the cycle period @param relative if true, fixed rate sheduling else fixed delay scheduling @param delay in milliseconds @param runnable the Runnab...
[ "Causes", "the", "specified", "Runnable", "to", "be", "executed", "periodically", "in", "the", "background", "starting", "after", "the", "specified", "delay", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java#L249-L260
61,112
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java
HsqlTimer.shutdownImmediately
public synchronized void shutdownImmediately() { if (!this.isShutdown) { final Thread runner = this.taskRunnerThread; this.isShutdown = true; if (runner != null && runner.isAlive()) { runner.interrupt(); } this.taskQueue.cancelAllTa...
java
public synchronized void shutdownImmediately() { if (!this.isShutdown) { final Thread runner = this.taskRunnerThread; this.isShutdown = true; if (runner != null && runner.isAlive()) { runner.interrupt(); } this.taskQueue.cancelAllTa...
[ "public", "synchronized", "void", "shutdownImmediately", "(", ")", "{", "if", "(", "!", "this", ".", "isShutdown", ")", "{", "final", "Thread", "runner", "=", "this", ".", "taskRunnerThread", ";", "this", ".", "isShutdown", "=", "true", ";", "if", "(", "...
Shuts down this timer immediately, interrupting the wait state associated with the current head of the task queue or the wait state internal to the currently executing task, if any such state is currently in effect. After this call, the timer has permanently entered the shutdown state; attempting to schedule any new t...
[ "Shuts", "down", "this", "timer", "immediately", "interrupting", "the", "wait", "state", "associated", "with", "the", "current", "head", "of", "the", "task", "queue", "or", "the", "wait", "state", "internal", "to", "the", "currently", "executing", "task", "if"...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java#L300-L313
61,113
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java
HsqlTimer.isFixedRate
public static boolean isFixedRate(final Object task) { if (task instanceof Task) { final Task ltask = (Task) task; return (ltask.relative && ltask.period > 0); } else { return false; } }
java
public static boolean isFixedRate(final Object task) { if (task instanceof Task) { final Task ltask = (Task) task; return (ltask.relative && ltask.period > 0); } else { return false; } }
[ "public", "static", "boolean", "isFixedRate", "(", "final", "Object", "task", ")", "{", "if", "(", "task", "instanceof", "Task", ")", "{", "final", "Task", "ltask", "=", "(", "Task", ")", "task", ";", "return", "(", "ltask", ".", "relative", "&&", "lta...
Retrieves whether the specified argument references a task scheduled periodically using fixed rate scheduling. @param task a task reference @return true if the task is scheduled at a fixed rate
[ "Retrieves", "whether", "the", "specified", "argument", "references", "a", "task", "scheduled", "periodically", "using", "fixed", "rate", "scheduling", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java#L347-L356
61,114
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java
HsqlTimer.isFixedDelay
public static boolean isFixedDelay(final Object task) { if (task instanceof Task) { final Task ltask = (Task) task; return (!ltask.relative && ltask.period > 0); } else { return false; } }
java
public static boolean isFixedDelay(final Object task) { if (task instanceof Task) { final Task ltask = (Task) task; return (!ltask.relative && ltask.period > 0); } else { return false; } }
[ "public", "static", "boolean", "isFixedDelay", "(", "final", "Object", "task", ")", "{", "if", "(", "task", "instanceof", "Task", ")", "{", "final", "Task", "ltask", "=", "(", "Task", ")", "task", ";", "return", "(", "!", "ltask", ".", "relative", "&&"...
Retrieves whether the specified argument references a task scheduled periodically using fixed delay scheduling. @param task a task reference @return true if the reference is scheduled using a fixed delay
[ "Retrieves", "whether", "the", "specified", "argument", "references", "a", "task", "scheduled", "periodically", "using", "fixed", "delay", "scheduling", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java#L365-L374
61,115
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java
HsqlTimer.getLastScheduled
public static Date getLastScheduled(Object task) { if (task instanceof Task) { final Task ltask = (Task) task; final long last = ltask.getLastScheduled(); return (last == 0) ? null : new Date(last); } else { return null; ...
java
public static Date getLastScheduled(Object task) { if (task instanceof Task) { final Task ltask = (Task) task; final long last = ltask.getLastScheduled(); return (last == 0) ? null : new Date(last); } else { return null; ...
[ "public", "static", "Date", "getLastScheduled", "(", "Object", "task", ")", "{", "if", "(", "task", "instanceof", "Task", ")", "{", "final", "Task", "ltask", "=", "(", "Task", ")", "task", ";", "final", "long", "last", "=", "ltask", ".", "getLastSchedule...
Retrieves the last time the referenced task was executed, as a Date object. If the task has never been executed, null is returned. @param task a task reference @return the last time the referenced task was executed; null if never
[ "Retrieves", "the", "last", "time", "the", "referenced", "task", "was", "executed", "as", "a", "Date", "object", ".", "If", "the", "task", "has", "never", "been", "executed", "null", "is", "returned", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java#L395-L406
61,116
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java
HsqlTimer.getNextScheduled
public static Date getNextScheduled(Object task) { if (task instanceof Task) { final Task ltask = (Task) task; final long next = ltask.isCancelled() ? 0 : ltask.getNextScheduled(); return next == 0 ? null ...
java
public static Date getNextScheduled(Object task) { if (task instanceof Task) { final Task ltask = (Task) task; final long next = ltask.isCancelled() ? 0 : ltask.getNextScheduled(); return next == 0 ? null ...
[ "public", "static", "Date", "getNextScheduled", "(", "Object", "task", ")", "{", "if", "(", "task", "instanceof", "Task", ")", "{", "final", "Task", "ltask", "=", "(", "Task", ")", "task", ";", "final", "long", "next", "=", "ltask", ".", "isCancelled", ...
Retrieves the next time the referenced task is due to be executed, as a Date object. If the referenced task is cancelled, null is returned. @param task a task reference @return the next time the referenced task is due to be executed
[ "Retrieves", "the", "next", "time", "the", "referenced", "task", "is", "due", "to", "be", "executed", "as", "a", "Date", "object", ".", "If", "the", "referenced", "task", "is", "cancelled", "null", "is", "returned", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java#L439-L451
61,117
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java
HsqlTimer.addTask
protected Task addTask(final long first, final Runnable runnable, final long period, boolean relative) { if (this.isShutdown) { throw new IllegalStateException("shutdown"); } final Task task = new Task(first, runnable, period, relative); // sychr...
java
protected Task addTask(final long first, final Runnable runnable, final long period, boolean relative) { if (this.isShutdown) { throw new IllegalStateException("shutdown"); } final Task task = new Task(first, runnable, period, relative); // sychr...
[ "protected", "Task", "addTask", "(", "final", "long", "first", ",", "final", "Runnable", "runnable", ",", "final", "long", "period", ",", "boolean", "relative", ")", "{", "if", "(", "this", ".", "isShutdown", ")", "{", "throw", "new", "IllegalStateException"...
Adds to the task queue a new Task object encapsulating the supplied Runnable and scheduling arguments. @param first the time of the task's first execution @param runnable the Runnable to execute @param period the task's periodicity @param relative if true, use fixed rate else use fixed delay scheduling @return an opaq...
[ "Adds", "to", "the", "task", "queue", "a", "new", "Task", "object", "encapsulating", "the", "supplied", "Runnable", "and", "scheduling", "arguments", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java#L463-L479
61,118
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java
HsqlTimer.nextTask
protected Task nextTask() { try { while (!this.isShutdown || Thread.interrupted()) { long now; long next; long wait; Task task; // synchronized to ensure removeTask // applies only to the peeked task, ...
java
protected Task nextTask() { try { while (!this.isShutdown || Thread.interrupted()) { long now; long next; long wait; Task task; // synchronized to ensure removeTask // applies only to the peeked task, ...
[ "protected", "Task", "nextTask", "(", ")", "{", "try", "{", "while", "(", "!", "this", ".", "isShutdown", "||", "Thread", ".", "interrupted", "(", ")", ")", "{", "long", "now", ";", "long", "next", ";", "long", "wait", ";", "Task", "task", ";", "//...
Retrieves the next task to execute, or null if this timer is shutdown, the current thread is interrupted, or there are no queued tasks. @return the next task to execute, or null
[ "Retrieves", "the", "next", "task", "to", "execute", "or", "null", "if", "this", "timer", "is", "shutdown", "the", "current", "thread", "is", "interrupted", "or", "there", "are", "no", "queued", "tasks", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java#L498-L568
61,119
VoltDB/voltdb
src/frontend/org/voltdb/iv2/Site.java
Site.initializeEE
ExecutionEngine initializeEE() { String hostname = CoreUtils.getHostnameOrAddress(); HashinatorConfig hashinatorConfig = TheHashinator.getCurrentConfig(); ExecutionEngine eeTemp = null; Deployment deploy = m_context.cluster.getDeployment().get("deployment"); final int default...
java
ExecutionEngine initializeEE() { String hostname = CoreUtils.getHostnameOrAddress(); HashinatorConfig hashinatorConfig = TheHashinator.getCurrentConfig(); ExecutionEngine eeTemp = null; Deployment deploy = m_context.cluster.getDeployment().get("deployment"); final int default...
[ "ExecutionEngine", "initializeEE", "(", ")", "{", "String", "hostname", "=", "CoreUtils", ".", "getHostnameOrAddress", "(", ")", ";", "HashinatorConfig", "hashinatorConfig", "=", "TheHashinator", ".", "getCurrentConfig", "(", ")", ";", "ExecutionEngine", "eeTemp", "...
Create a native VoltDB execution engine
[ "Create", "a", "native", "VoltDB", "execution", "engine" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/Site.java#L727-L815
61,120
VoltDB/voltdb
src/frontend/org/voltdb/iv2/Site.java
Site.handleUndoLog
private static void handleUndoLog(List<UndoAction> undoLog, boolean undo) { if (undoLog == null) { return; } if (undo) { undoLog = Lists.reverse(undoLog); } for (UndoAction action : undoLog) { if (undo) { action.undo(); ...
java
private static void handleUndoLog(List<UndoAction> undoLog, boolean undo) { if (undoLog == null) { return; } if (undo) { undoLog = Lists.reverse(undoLog); } for (UndoAction action : undoLog) { if (undo) { action.undo(); ...
[ "private", "static", "void", "handleUndoLog", "(", "List", "<", "UndoAction", ">", "undoLog", ",", "boolean", "undo", ")", "{", "if", "(", "undoLog", "==", "null", ")", "{", "return", ";", "}", "if", "(", "undo", ")", "{", "undoLog", "=", "Lists", "....
Java level related stuffs that are also needed to roll back @param undoLog @param undo
[ "Java", "level", "related", "stuffs", "that", "are", "also", "needed", "to", "roll", "back" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/Site.java#L1167-L1185
61,121
VoltDB/voltdb
src/frontend/org/voltdb/iv2/Site.java
Site.updateCatalog
public boolean updateCatalog(String diffCmds, CatalogContext context, boolean requiresSnapshotIsolationboolean, boolean isMPI, long txnId, long uniqueId, ...
java
public boolean updateCatalog(String diffCmds, CatalogContext context, boolean requiresSnapshotIsolationboolean, boolean isMPI, long txnId, long uniqueId, ...
[ "public", "boolean", "updateCatalog", "(", "String", "diffCmds", ",", "CatalogContext", "context", ",", "boolean", "requiresSnapshotIsolationboolean", ",", "boolean", "isMPI", ",", "long", "txnId", ",", "long", "uniqueId", ",", "long", "spHandle", ",", "boolean", ...
Update the catalog. If we're the MPI, don't bother with the EE.
[ "Update", "the", "catalog", ".", "If", "we", "re", "the", "MPI", "don", "t", "bother", "with", "the", "EE", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/Site.java#L1603-L1684
61,122
VoltDB/voltdb
src/frontend/org/voltdb/iv2/Site.java
Site.updateSettings
public boolean updateSettings(CatalogContext context) { m_context = context; // here you could bring the timeout settings m_loadedProcedures.loadProcedures(m_context); m_ee.loadFunctions(m_context); return true; }
java
public boolean updateSettings(CatalogContext context) { m_context = context; // here you could bring the timeout settings m_loadedProcedures.loadProcedures(m_context); m_ee.loadFunctions(m_context); return true; }
[ "public", "boolean", "updateSettings", "(", "CatalogContext", "context", ")", "{", "m_context", "=", "context", ";", "// here you could bring the timeout settings", "m_loadedProcedures", ".", "loadProcedures", "(", "m_context", ")", ";", "m_ee", ".", "loadFunctions", "(...
Update the system settings @param context catalog context @return true if it succeeds
[ "Update", "the", "system", "settings" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/Site.java#L1691-L1697
61,123
VoltDB/voltdb
src/frontend/org/voltdb/iv2/Site.java
Site.validatePartitioning
@Override public long[] validatePartitioning(long[] tableIds, byte[] hashinatorConfig) { ByteBuffer paramBuffer = m_ee.getParamBufferForExecuteTask(4 + (8 * tableIds.length) + 4 + hashinatorConfig.length); paramBuffer.putInt(tableIds.length); for (long tableId : tableIds) { param...
java
@Override public long[] validatePartitioning(long[] tableIds, byte[] hashinatorConfig) { ByteBuffer paramBuffer = m_ee.getParamBufferForExecuteTask(4 + (8 * tableIds.length) + 4 + hashinatorConfig.length); paramBuffer.putInt(tableIds.length); for (long tableId : tableIds) { param...
[ "@", "Override", "public", "long", "[", "]", "validatePartitioning", "(", "long", "[", "]", "tableIds", ",", "byte", "[", "]", "hashinatorConfig", ")", "{", "ByteBuffer", "paramBuffer", "=", "m_ee", ".", "getParamBufferForExecuteTask", "(", "4", "+", "(", "8...
For the specified list of table ids, return the number of mispartitioned rows using the provided hashinator config
[ "For", "the", "specified", "list", "of", "table", "ids", "return", "the", "number", "of", "mispartitioned", "rows", "using", "the", "provided", "hashinator", "config" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/Site.java#L1753-L1768
61,124
VoltDB/voltdb
src/frontend/org/voltdb/iv2/Site.java
Site.generateDREvent
public void generateDREvent(EventType type, long txnId, long uniqueId, long lastCommittedSpHandle, long spHandle, byte[] payloads) { m_ee.quiesce(lastCommittedSpHandle); ByteBuffer paramBuffer = m_ee.getParamBufferForExecuteTask(32 + 16 + payloads.length); paramBuffer.putInt(type.ord...
java
public void generateDREvent(EventType type, long txnId, long uniqueId, long lastCommittedSpHandle, long spHandle, byte[] payloads) { m_ee.quiesce(lastCommittedSpHandle); ByteBuffer paramBuffer = m_ee.getParamBufferForExecuteTask(32 + 16 + payloads.length); paramBuffer.putInt(type.ord...
[ "public", "void", "generateDREvent", "(", "EventType", "type", ",", "long", "txnId", ",", "long", "uniqueId", ",", "long", "lastCommittedSpHandle", ",", "long", "spHandle", ",", "byte", "[", "]", "payloads", ")", "{", "m_ee", ".", "quiesce", "(", "lastCommit...
Generate a in-stream DR event which pushes an event buffer to topend
[ "Generate", "a", "in", "-", "stream", "DR", "event", "which", "pushes", "an", "event", "buffer", "to", "topend" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/Site.java#L1864-L1878
61,125
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpPromoteAlgo.java
MpPromoteAlgo.areRepairLogsComplete
public boolean areRepairLogsComplete() { for (Entry<Long, ReplicaRepairStruct> entry : m_replicaRepairStructs.entrySet()) { if (!entry.getValue().logsComplete()) { return false; } } return true; }
java
public boolean areRepairLogsComplete() { for (Entry<Long, ReplicaRepairStruct> entry : m_replicaRepairStructs.entrySet()) { if (!entry.getValue().logsComplete()) { return false; } } return true; }
[ "public", "boolean", "areRepairLogsComplete", "(", ")", "{", "for", "(", "Entry", "<", "Long", ",", "ReplicaRepairStruct", ">", "entry", ":", "m_replicaRepairStructs", ".", "entrySet", "(", ")", ")", "{", "if", "(", "!", "entry", ".", "getValue", "(", ")",...
Have all survivors supplied a full repair log?
[ "Have", "all", "survivors", "supplied", "a", "full", "repair", "log?" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpPromoteAlgo.java#L242-L250
61,126
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpPromoteAlgo.java
MpPromoteAlgo.repairSurvivors
public void repairSurvivors() { // cancel() and repair() must be synchronized by the caller (the deliver lock, // currently). If cancelled and the last repair message arrives, don't send // out corrections! if (this.m_promotionResult.isCancelled()) { repairLogger.debug(m_...
java
public void repairSurvivors() { // cancel() and repair() must be synchronized by the caller (the deliver lock, // currently). If cancelled and the last repair message arrives, don't send // out corrections! if (this.m_promotionResult.isCancelled()) { repairLogger.debug(m_...
[ "public", "void", "repairSurvivors", "(", ")", "{", "// cancel() and repair() must be synchronized by the caller (the deliver lock,", "// currently). If cancelled and the last repair message arrives, don't send", "// out corrections!", "if", "(", "this", ".", "m_promotionResult", ".", ...
Send missed-messages to survivors. Exciting!
[ "Send", "missed", "-", "messages", "to", "survivors", ".", "Exciting!" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpPromoteAlgo.java#L259-L289
61,127
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpPromoteAlgo.java
MpPromoteAlgo.addToRepairLog
void addToRepairLog(Iv2RepairLogResponseMessage msg) { // don't add the null payload from the first message ack to the repair log if (msg.getPayload() == null) { return; } // MP repair log has at most two messages, complete message for prior transaction // and fra...
java
void addToRepairLog(Iv2RepairLogResponseMessage msg) { // don't add the null payload from the first message ack to the repair log if (msg.getPayload() == null) { return; } // MP repair log has at most two messages, complete message for prior transaction // and fra...
[ "void", "addToRepairLog", "(", "Iv2RepairLogResponseMessage", "msg", ")", "{", "// don't add the null payload from the first message ack to the repair log", "if", "(", "msg", ".", "getPayload", "(", ")", "==", "null", ")", "{", "return", ";", "}", "// MP repair log has at...
replace old messages with complete transaction messages.
[ "replace", "old", "messages", "with", "complete", "transaction", "messages", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpPromoteAlgo.java#L303-L328
61,128
VoltDB/voltdb
src/frontend/org/voltdb/compiler/VoltCompilerFileReader.java
VoltCompilerFileReader.getSchemaPath
static String getSchemaPath(String projectFilePath, String path) throws IOException { File file = null; if (path.contains(".jar!")) { String ddlText = null; ddlText = VoltCompilerUtils.readFileFromJarfile(path); file = VoltProjectBuilder.writeStringToTempFile(ddl...
java
static String getSchemaPath(String projectFilePath, String path) throws IOException { File file = null; if (path.contains(".jar!")) { String ddlText = null; ddlText = VoltCompilerUtils.readFileFromJarfile(path); file = VoltProjectBuilder.writeStringToTempFile(ddl...
[ "static", "String", "getSchemaPath", "(", "String", "projectFilePath", ",", "String", "path", ")", "throws", "IOException", "{", "File", "file", "=", "null", ";", "if", "(", "path", ".", "contains", "(", "\".jar!\"", ")", ")", "{", "String", "ddlText", "="...
Get the path of a schema file, optionally relative to a project.xml file's path.
[ "Get", "the", "path", "of", "a", "schema", "file", "optionally", "relative", "to", "a", "project", ".", "xml", "file", "s", "path", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltCompilerFileReader.java#L91-L116
61,129
VoltDB/voltdb
src/frontend/org/voltdb/UserDefinedFunctionManager.java
UserDefinedFunctionManager.loadFunctions
public void loadFunctions(CatalogContext catalogContext) { final CatalogMap<Function> catalogFunctions = catalogContext.database.getFunctions(); // Remove obsolete tokens for (UserDefinedFunctionRunner runner : m_udfs.values()) { // The function that the current UserDefinedFunctionRu...
java
public void loadFunctions(CatalogContext catalogContext) { final CatalogMap<Function> catalogFunctions = catalogContext.database.getFunctions(); // Remove obsolete tokens for (UserDefinedFunctionRunner runner : m_udfs.values()) { // The function that the current UserDefinedFunctionRu...
[ "public", "void", "loadFunctions", "(", "CatalogContext", "catalogContext", ")", "{", "final", "CatalogMap", "<", "Function", ">", "catalogFunctions", "=", "catalogContext", ".", "database", ".", "getFunctions", "(", ")", ";", "// Remove obsolete tokens", "for", "("...
Load all the UDFs recorded in the catalog. Instantiate and register them in the system.
[ "Load", "all", "the", "UDFs", "recorded", "in", "the", "catalog", ".", "Instantiate", "and", "register", "them", "in", "the", "system", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/UserDefinedFunctionManager.java#L63-L105
61,130
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/util/DatabaseManagerCommon.java
DatabaseManagerCommon.readFile
static String readFile(String file) { try { FileReader reader = new FileReader(file); BufferedReader read = new BufferedReader(reader); StringBuffer b = new StringBuffer(); String s = null; int count = 0; ...
java
static String readFile(String file) { try { FileReader reader = new FileReader(file); BufferedReader read = new BufferedReader(reader); StringBuffer b = new StringBuffer(); String s = null; int count = 0; ...
[ "static", "String", "readFile", "(", "String", "file", ")", "{", "try", "{", "FileReader", "reader", "=", "new", "FileReader", "(", "file", ")", ";", "BufferedReader", "read", "=", "new", "BufferedReader", "(", "reader", ")", ";", "StringBuffer", "b", "=",...
Redid this file to remove sizing requirements and to make it faster Speeded it up 10 fold. @param file
[ "Redid", "this", "file", "to", "remove", "sizing", "requirements", "and", "to", "make", "it", "faster", "Speeded", "it", "up", "10", "fold", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/DatabaseManagerCommon.java#L305-L328
61,131
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/Driver.java
Driver.getServersFromURL
static String[] getServersFromURL(String url) { // get everything between the prefix and the ? String prefix = URL_PREFIX + "//"; int end = url.length(); if (url.indexOf("?") > 0) { end = url.indexOf("?"); } String servstring = url.substring(prefix.length(), e...
java
static String[] getServersFromURL(String url) { // get everything between the prefix and the ? String prefix = URL_PREFIX + "//"; int end = url.length(); if (url.indexOf("?") > 0) { end = url.indexOf("?"); } String servstring = url.substring(prefix.length(), e...
[ "static", "String", "[", "]", "getServersFromURL", "(", "String", "url", ")", "{", "// get everything between the prefix and the ?", "String", "prefix", "=", "URL_PREFIX", "+", "\"//\"", ";", "int", "end", "=", "url", ".", "length", "(", ")", ";", "if", "(", ...
Static so it's unit-testable, yes, lazy me
[ "Static", "so", "it", "s", "unit", "-", "testable", "yes", "lazy", "me" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/Driver.java#L54-L63
61,132
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportGeneration.java
ExportGeneration.initializeGenerationFromDisk
private void initializeGenerationFromDisk(final CatalogMap<Connector> connectors, final ExportDataProcessor processor, File[] files, List<Pair<Integer, Integer>> localPartitionsToSites, long genId) { List<Integer> onDiskPartitions = new ArrayList<Integer>(); Navigabl...
java
private void initializeGenerationFromDisk(final CatalogMap<Connector> connectors, final ExportDataProcessor processor, File[] files, List<Pair<Integer, Integer>> localPartitionsToSites, long genId) { List<Integer> onDiskPartitions = new ArrayList<Integer>(); Navigabl...
[ "private", "void", "initializeGenerationFromDisk", "(", "final", "CatalogMap", "<", "Connector", ">", "connectors", ",", "final", "ExportDataProcessor", "processor", ",", "File", "[", "]", "files", ",", "List", "<", "Pair", "<", "Integer", ",", "Integer", ">", ...
Initialize generation from disk, creating data sources from the PBD files. Called immediately before calling {@code initializeGenerationFromCatalog}. @param connectors @param messenger @param processor new {@code ExportDataProcessor}, with decoders not started yet @param files the contents of the export overflow dire...
[ "Initialize", "generation", "from", "disk", "creating", "data", "sources", "from", "the", "PBD", "files", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportGeneration.java#L159-L224
61,133
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportGeneration.java
ExportGeneration.initializeGenerationFromCatalog
void initializeGenerationFromCatalog(CatalogContext catalogContext, final CatalogMap<Connector> connectors, final ExportDataProcessor processor, int hostId, List<Pair<Integer, Integer>> localPartitionsToSites, boolean isCatalogUpdate) { // Update c...
java
void initializeGenerationFromCatalog(CatalogContext catalogContext, final CatalogMap<Connector> connectors, final ExportDataProcessor processor, int hostId, List<Pair<Integer, Integer>> localPartitionsToSites, boolean isCatalogUpdate) { // Update c...
[ "void", "initializeGenerationFromCatalog", "(", "CatalogContext", "catalogContext", ",", "final", "CatalogMap", "<", "Connector", ">", "connectors", ",", "final", "ExportDataProcessor", "processor", ",", "int", "hostId", ",", "List", "<", "Pair", "<", "Integer", ","...
Initialize generation from catalog. Notes on catalog update: - If present, the old {@code ExportDataProcessor} has been shut down. - the new {@code ExportDataProcessor} has not started its decoders. @param catalogContext @param connectors @param processor @param hostId @param messenger @param localPartitionsToSites
[ "Initialize", "generation", "from", "catalog", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportGeneration.java#L240-L293
61,134
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportGeneration.java
ExportGeneration.updateStreamStatus
private void updateStreamStatus( Set<String> exportedTables) { synchronized(m_dataSourcesByPartition) { for (Iterator<Map<String, ExportDataSource>> it = m_dataSourcesByPartition.values().iterator(); it.hasNext();) { Map<String, ExportDataSource> sources = it.next(); ...
java
private void updateStreamStatus( Set<String> exportedTables) { synchronized(m_dataSourcesByPartition) { for (Iterator<Map<String, ExportDataSource>> it = m_dataSourcesByPartition.values().iterator(); it.hasNext();) { Map<String, ExportDataSource> sources = it.next(); ...
[ "private", "void", "updateStreamStatus", "(", "Set", "<", "String", ">", "exportedTables", ")", "{", "synchronized", "(", "m_dataSourcesByPartition", ")", "{", "for", "(", "Iterator", "<", "Map", "<", "String", ",", "ExportDataSource", ">", ">", "it", "=", "...
Mark a DataSource as dropped if its not present in the connectors.
[ "Mark", "a", "DataSource", "as", "dropped", "if", "its", "not", "present", "in", "the", "connectors", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportGeneration.java#L296-L310
61,135
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportGeneration.java
ExportGeneration.sendDummyTakeMastershipResponse
private void sendDummyTakeMastershipResponse(long sourceHsid, long requestId, int partitionId, byte[] signatureBytes) { // msg type(1) + partition:int(4) + length:int(4) + signaturesBytes.length // requestId(8) int msgLen = 1 + 4 + 4 + signatureBytes.length + 8; ByteBuffer buf = ByteBuff...
java
private void sendDummyTakeMastershipResponse(long sourceHsid, long requestId, int partitionId, byte[] signatureBytes) { // msg type(1) + partition:int(4) + length:int(4) + signaturesBytes.length // requestId(8) int msgLen = 1 + 4 + 4 + signatureBytes.length + 8; ByteBuffer buf = ByteBuff...
[ "private", "void", "sendDummyTakeMastershipResponse", "(", "long", "sourceHsid", ",", "long", "requestId", ",", "int", "partitionId", ",", "byte", "[", "]", "signatureBytes", ")", "{", "// msg type(1) + partition:int(4) + length:int(4) + signaturesBytes.length", "// requestId...
Auto reply a response when the requested stream is no longer exists
[ "Auto", "reply", "a", "response", "when", "the", "requested", "stream", "is", "no", "longer", "exists" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportGeneration.java#L447-L465
61,136
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportGeneration.java
ExportGeneration.updateAckMailboxes
public void updateAckMailboxes(int partition, Set<Long> newHSIds) { ImmutableList<Long> replicaHSIds = m_replicasHSIds.get(partition); synchronized (m_dataSourcesByPartition) { Map<String, ExportDataSource> partitionMap = m_dataSourcesByPartition.get(partition); if (partitionMap ...
java
public void updateAckMailboxes(int partition, Set<Long> newHSIds) { ImmutableList<Long> replicaHSIds = m_replicasHSIds.get(partition); synchronized (m_dataSourcesByPartition) { Map<String, ExportDataSource> partitionMap = m_dataSourcesByPartition.get(partition); if (partitionMap ...
[ "public", "void", "updateAckMailboxes", "(", "int", "partition", ",", "Set", "<", "Long", ">", "newHSIds", ")", "{", "ImmutableList", "<", "Long", ">", "replicaHSIds", "=", "m_replicasHSIds", ".", "get", "(", "partition", ")", ";", "synchronized", "(", "m_da...
Access by multiple threads
[ "Access", "by", "multiple", "threads" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportGeneration.java#L468-L487
61,137
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportGeneration.java
ExportGeneration.addDataSources
private void addDataSources(Table table, int hostId, List<Pair<Integer, Integer>> localPartitionsToSites, Set<Integer> partitionsInUse, final ExportDataProcessor processor, final long genId, boolean isCatalogUpdate) { for (Pair<Integer, Integer> pa...
java
private void addDataSources(Table table, int hostId, List<Pair<Integer, Integer>> localPartitionsToSites, Set<Integer> partitionsInUse, final ExportDataProcessor processor, final long genId, boolean isCatalogUpdate) { for (Pair<Integer, Integer> pa...
[ "private", "void", "addDataSources", "(", "Table", "table", ",", "int", "hostId", ",", "List", "<", "Pair", "<", "Integer", ",", "Integer", ">", ">", "localPartitionsToSites", ",", "Set", "<", "Integer", ">", "partitionsInUse", ",", "final", "ExportDataProcess...
Add datasources for a catalog table in all partitions @param table @param hostId @param localPartitionsToSites @param partitionsInUse @param processor
[ "Add", "datasources", "for", "a", "catalog", "table", "in", "all", "partitions" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportGeneration.java#L727-L799
61,138
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportGeneration.java
ExportGeneration.onSourceDrained
@Override public void onSourceDrained(int partitionId, String tableName) { ExportDataSource source; synchronized(m_dataSourcesByPartition) { Map<String, ExportDataSource> sources = m_dataSourcesByPartition.get(partitionId); if (sources == null) { if (!m_remov...
java
@Override public void onSourceDrained(int partitionId, String tableName) { ExportDataSource source; synchronized(m_dataSourcesByPartition) { Map<String, ExportDataSource> sources = m_dataSourcesByPartition.get(partitionId); if (sources == null) { if (!m_remov...
[ "@", "Override", "public", "void", "onSourceDrained", "(", "int", "partitionId", ",", "String", "tableName", ")", "{", "ExportDataSource", "source", ";", "synchronized", "(", "m_dataSourcesByPartition", ")", "{", "Map", "<", "String", ",", "ExportDataSource", ">",...
The Export Data Source reports it is drained on an unused partition.
[ "The", "Export", "Data", "Source", "reports", "it", "is", "drained", "on", "an", "unused", "partition", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportGeneration.java#L845-L878
61,139
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlArrayList.java
HsqlArrayList.add
public void add(int index, Object element) { // reporter.updateCounter++; if (index > elementCount) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + ">" + elementCount); } if (index < 0) { thr...
java
public void add(int index, Object element) { // reporter.updateCounter++; if (index > elementCount) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + ">" + elementCount); } if (index < 0) { thr...
[ "public", "void", "add", "(", "int", "index", ",", "Object", "element", ")", "{", "// reporter.updateCounter++;", "if", "(", "index", ">", "elementCount", ")", "{", "throw", "new", "IndexOutOfBoundsException", "(", "\"Index out of bounds: \"", "+", "index", ...
Inserts an element at the given index
[ "Inserts", "an", "element", "at", "the", "given", "index" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlArrayList.java#L118-L142
61,140
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlArrayList.java
HsqlArrayList.add
public boolean add(Object element) { // reporter.updateCounter++; if (elementCount >= elementData.length) { increaseCapacity(); } elementData[elementCount] = element; elementCount++; return true; }
java
public boolean add(Object element) { // reporter.updateCounter++; if (elementCount >= elementData.length) { increaseCapacity(); } elementData[elementCount] = element; elementCount++; return true; }
[ "public", "boolean", "add", "(", "Object", "element", ")", "{", "// reporter.updateCounter++;", "if", "(", "elementCount", ">=", "elementData", ".", "length", ")", "{", "increaseCapacity", "(", ")", ";", "}", "elementData", "[", "elementCount", "]", "=", ...
Appends an element to the end of the list
[ "Appends", "an", "element", "to", "the", "end", "of", "the", "list" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlArrayList.java#L145-L157
61,141
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlArrayList.java
HsqlArrayList.get
public Object get(int index) { if (index >= elementCount) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " >= " + elementCount); } if (index < 0) { t...
java
public Object get(int index) { if (index >= elementCount) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " >= " + elementCount); } if (index < 0) { t...
[ "public", "Object", "get", "(", "int", "index", ")", "{", "if", "(", "index", ">=", "elementCount", ")", "{", "throw", "new", "IndexOutOfBoundsException", "(", "\"Index out of bounds: \"", "+", "index", "+", "\" >= \"", "+", "elementCount", ")", ";", "}", "i...
Gets the element at given position
[ "Gets", "the", "element", "at", "given", "position" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlArrayList.java#L160-L174
61,142
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlArrayList.java
HsqlArrayList.remove
public Object remove(int index) { if (index >= elementCount) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " >= " + elementCount); } if (index < 0) { ...
java
public Object remove(int index) { if (index >= elementCount) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " >= " + elementCount); } if (index < 0) { ...
[ "public", "Object", "remove", "(", "int", "index", ")", "{", "if", "(", "index", ">=", "elementCount", ")", "{", "throw", "new", "IndexOutOfBoundsException", "(", "\"Index out of bounds: \"", "+", "index", "+", "\" >= \"", "+", "elementCount", ")", ";", "}", ...
Removes and returns the element at given position
[ "Removes", "and", "returns", "the", "element", "at", "given", "position" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlArrayList.java#L199-L227
61,143
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlArrayList.java
HsqlArrayList.set
public Object set(int index, Object element) { if (index >= elementCount) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " >= " + elementCount); } if (index < 0)...
java
public Object set(int index, Object element) { if (index >= elementCount) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " >= " + elementCount); } if (index < 0)...
[ "public", "Object", "set", "(", "int", "index", ",", "Object", "element", ")", "{", "if", "(", "index", ">=", "elementCount", ")", "{", "throw", "new", "IndexOutOfBoundsException", "(", "\"Index out of bounds: \"", "+", "index", "+", "\" >= \"", "+", "elementC...
Replaces the element at given position
[ "Replaces", "the", "element", "at", "given", "position" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlArrayList.java#L230-L248
61,144
VoltDB/voltdb
third_party/java/src/org/apache/jute_voltpatches/Utils.java
Utils.bufEquals
public static boolean bufEquals(byte onearray[], byte twoarray[]) { if (onearray == twoarray) return true; boolean ret = (onearray.length == twoarray.length); if (!ret) { return ret; } for (int idx = 0; idx < onearray.length; idx++) { if (onear...
java
public static boolean bufEquals(byte onearray[], byte twoarray[]) { if (onearray == twoarray) return true; boolean ret = (onearray.length == twoarray.length); if (!ret) { return ret; } for (int idx = 0; idx < onearray.length; idx++) { if (onear...
[ "public", "static", "boolean", "bufEquals", "(", "byte", "onearray", "[", "]", ",", "byte", "twoarray", "[", "]", ")", "{", "if", "(", "onearray", "==", "twoarray", ")", "return", "true", ";", "boolean", "ret", "=", "(", "onearray", ".", "length", "=="...
equals function that actually compares two buffers. @param onearray First buffer @param twoarray Second buffer @return true if one and two contain exactly the same content, else false.
[ "equals", "function", "that", "actually", "compares", "two", "buffers", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/jute_voltpatches/Utils.java#L43-L56
61,145
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/RCData.java
RCData.getConnection
public Connection getConnection(String curDriverIn, String curCharsetIn, String curTrustStoreIn) throws ClassNotFoundException, MalformedURLException, SQLExceptio...
java
public Connection getConnection(String curDriverIn, String curCharsetIn, String curTrustStoreIn) throws ClassNotFoundException, MalformedURLException, SQLExceptio...
[ "public", "Connection", "getConnection", "(", "String", "curDriverIn", ",", "String", "curCharsetIn", ",", "String", "curTrustStoreIn", ")", "throws", "ClassNotFoundException", ",", "MalformedURLException", ",", "SQLException", "{", "// Local vars to satisfy compiler warnings...
Gets a JDBC Connection using the data of this RCData object with specified override elements @return New JDBC Connection
[ "Gets", "a", "JDBC", "Connection", "using", "the", "data", "of", "this", "RCData", "object", "with", "specified", "override", "elements" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/RCData.java#L312-L398
61,146
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/RCData.java
RCData.tiToString
static public String tiToString(int ti) { switch (ti) { case Connection.TRANSACTION_READ_UNCOMMITTED: return "TRANSACTION_READ_UNCOMMITTED"; case Connection.TRANSACTION_READ_COMMITTED: return "TRANSACTION_READ_COMMITTED"; case Connection.TRANSA...
java
static public String tiToString(int ti) { switch (ti) { case Connection.TRANSACTION_READ_UNCOMMITTED: return "TRANSACTION_READ_UNCOMMITTED"; case Connection.TRANSACTION_READ_COMMITTED: return "TRANSACTION_READ_COMMITTED"; case Connection.TRANSA...
[ "static", "public", "String", "tiToString", "(", "int", "ti", ")", "{", "switch", "(", "ti", ")", "{", "case", "Connection", ".", "TRANSACTION_READ_UNCOMMITTED", ":", "return", "\"TRANSACTION_READ_UNCOMMITTED\"", ";", "case", "Connection", ".", "TRANSACTION_READ_COM...
Return String for numerical java.sql.Connection Transaction level. Returns null, since DB implementations are free to provide their own transaction isolation levels.
[ "Return", "String", "for", "numerical", "java", ".", "sql", ".", "Connection", "Transaction", "level", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/RCData.java#L468-L482
61,147
VoltDB/voltdb
src/frontend/org/voltdb/OpsAgent.java
OpsAgent.handleJSONMessageAsDummy
protected void handleJSONMessageAsDummy(JSONObject obj) throws Exception { hostLog.info("Generating dummy response for ops request " + obj); sendOpsResponse(null, obj, OPS_DUMMY); }
java
protected void handleJSONMessageAsDummy(JSONObject obj) throws Exception { hostLog.info("Generating dummy response for ops request " + obj); sendOpsResponse(null, obj, OPS_DUMMY); }
[ "protected", "void", "handleJSONMessageAsDummy", "(", "JSONObject", "obj", ")", "throws", "Exception", "{", "hostLog", ".", "info", "(", "\"Generating dummy response for ops request \"", "+", "obj", ")", ";", "sendOpsResponse", "(", "null", ",", "obj", ",", "OPS_DUM...
For OPS actions generate a dummy response to the distributed work to avoid startup initialization dependencies. Startup can take a long time and we don't want to prevent other agents from making progress
[ "For", "OPS", "actions", "generate", "a", "dummy", "response", "to", "the", "distributed", "work", "to", "avoid", "startup", "initialization", "dependencies", ".", "Startup", "can", "take", "a", "long", "time", "and", "we", "don", "t", "want", "to", "prevent...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/OpsAgent.java#L151-L154
61,148
VoltDB/voltdb
src/frontend/org/voltdb/OpsAgent.java
OpsAgent.performOpsAction
public void performOpsAction(final Connection c, final long clientHandle, final OpsSelector selector, final ParameterSet params) throws Exception { m_es.submit(new Runnable() { @Override public void run() { try { collectStatsImpl(c, cli...
java
public void performOpsAction(final Connection c, final long clientHandle, final OpsSelector selector, final ParameterSet params) throws Exception { m_es.submit(new Runnable() { @Override public void run() { try { collectStatsImpl(c, cli...
[ "public", "void", "performOpsAction", "(", "final", "Connection", "c", ",", "final", "long", "clientHandle", ",", "final", "OpsSelector", "selector", ",", "final", "ParameterSet", "params", ")", "throws", "Exception", "{", "m_es", ".", "submit", "(", "new", "R...
Perform the action associated with this agent, using the provided ParameterSet. This is the entry point to the OPS system.
[ "Perform", "the", "action", "associated", "with", "this", "agent", "using", "the", "provided", "ParameterSet", ".", "This", "is", "the", "entry", "point", "to", "the", "OPS", "system", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/OpsAgent.java#L283-L300
61,149
VoltDB/voltdb
src/frontend/org/voltdb/OpsAgent.java
OpsAgent.distributeOpsWork
protected void distributeOpsWork(PendingOpsRequest newRequest, JSONObject obj) throws Exception { if (m_pendingRequests.size() > MAX_IN_FLIGHT_REQUESTS) { /* * Defensively check for an expired request not caught * by timeout check. Should never happen. ...
java
protected void distributeOpsWork(PendingOpsRequest newRequest, JSONObject obj) throws Exception { if (m_pendingRequests.size() > MAX_IN_FLIGHT_REQUESTS) { /* * Defensively check for an expired request not caught * by timeout check. Should never happen. ...
[ "protected", "void", "distributeOpsWork", "(", "PendingOpsRequest", "newRequest", ",", "JSONObject", "obj", ")", "throws", "Exception", "{", "if", "(", "m_pendingRequests", ".", "size", "(", ")", ">", "MAX_IN_FLIGHT_REQUESTS", ")", "{", "/*\n * Defensively...
For OPS actions which run on every node, this method will distribute the necessary parameters to its peers on the other cluster nodes. Additionally, it will pre-check for excessive outstanding requests, and initialize the tracking and timeout of the new request. Subclasses of OpsAgent should use this when they need t...
[ "For", "OPS", "actions", "which", "run", "on", "every", "node", "this", "method", "will", "distribute", "the", "necessary", "parameters", "to", "its", "peers", "on", "the", "other", "cluster", "nodes", ".", "Additionally", "it", "will", "pre", "-", "check", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/OpsAgent.java#L308-L355
61,150
VoltDB/voltdb
src/frontend/org/voltdb/OpsAgent.java
OpsAgent.sendClientResponse
protected void sendClientResponse(PendingOpsRequest request) { byte statusCode = ClientResponse.SUCCESS; String statusString = null; /* * It is possible not to receive a table response if a feature is not enabled */ // All of the null/empty table handling/detecting/gene...
java
protected void sendClientResponse(PendingOpsRequest request) { byte statusCode = ClientResponse.SUCCESS; String statusString = null; /* * It is possible not to receive a table response if a feature is not enabled */ // All of the null/empty table handling/detecting/gene...
[ "protected", "void", "sendClientResponse", "(", "PendingOpsRequest", "request", ")", "{", "byte", "statusCode", "=", "ClientResponse", ".", "SUCCESS", ";", "String", "statusString", "=", "null", ";", "/*\n * It is possible not to receive a table response if a feature ...
Send the final response stored in the PendingOpsRequest to the client which initiated the action. Will be called automagically after aggregating cluster-wide responses, but may be called directly by subclasses if necessary.
[ "Send", "the", "final", "response", "stored", "in", "the", "PendingOpsRequest", "to", "the", "client", "which", "initiated", "the", "action", ".", "Will", "be", "called", "automagically", "after", "aggregating", "cluster", "-", "wide", "responses", "but", "may",...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/OpsAgent.java#L379-L404
61,151
VoltDB/voltdb
src/frontend/org/voltdb/OpsAgent.java
OpsAgent.sendOpsResponse
private void sendOpsResponse(VoltTable[] results, JSONObject obj, byte payloadType) throws Exception { long requestId = obj.getLong("requestId"); long returnAddress = obj.getLong("returnAddress"); // Send a response with no data since the stats is not supported or not yet available i...
java
private void sendOpsResponse(VoltTable[] results, JSONObject obj, byte payloadType) throws Exception { long requestId = obj.getLong("requestId"); long returnAddress = obj.getLong("returnAddress"); // Send a response with no data since the stats is not supported or not yet available i...
[ "private", "void", "sendOpsResponse", "(", "VoltTable", "[", "]", "results", ",", "JSONObject", "obj", ",", "byte", "payloadType", ")", "throws", "Exception", "{", "long", "requestId", "=", "obj", ".", "getLong", "(", "\"requestId\"", ")", ";", "long", "retu...
Return the results of distributed work to the original requesting agent. Used by subclasses to respond after they've done their local work.
[ "Return", "the", "results", "of", "distributed", "work", "to", "the", "original", "requesting", "agent", ".", "Used", "by", "subclasses", "to", "respond", "after", "they", "ve", "done", "their", "local", "work", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/OpsAgent.java#L414-L449
61,152
VoltDB/voltdb
src/frontend/org/voltdb/compiler/StatementCompiler.java
StatementCompiler.addUDFDependences
private static void addUDFDependences(Function function, Statement catalogStmt) { Procedure procedure = (Procedure)catalogStmt.getParent(); addFunctionDependence(function, procedure, catalogStmt); addStatementDependence(function, catalogStmt); }
java
private static void addUDFDependences(Function function, Statement catalogStmt) { Procedure procedure = (Procedure)catalogStmt.getParent(); addFunctionDependence(function, procedure, catalogStmt); addStatementDependence(function, catalogStmt); }
[ "private", "static", "void", "addUDFDependences", "(", "Function", "function", ",", "Statement", "catalogStmt", ")", "{", "Procedure", "procedure", "=", "(", "Procedure", ")", "catalogStmt", ".", "getParent", "(", ")", ";", "addFunctionDependence", "(", "function"...
Add all statement dependences, both ways. @param function The function to add as dependee. @param procedure The procedure of the statement. @param catalogStmt The statement to add as depender.
[ "Add", "all", "statement", "dependences", "both", "ways", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/StatementCompiler.java#L372-L376
61,153
VoltDB/voltdb
src/frontend/org/voltdb/compiler/StatementCompiler.java
StatementCompiler.addFunctionDependence
private static void addFunctionDependence(Function function, Procedure procedure, Statement catalogStmt) { String funcDeps = function.getStmtdependers(); Set<String> stmtSet = new TreeSet<>(); for (String stmtName : funcDeps.split(",")) { if (! stmtName.isEmpty()) { s...
java
private static void addFunctionDependence(Function function, Procedure procedure, Statement catalogStmt) { String funcDeps = function.getStmtdependers(); Set<String> stmtSet = new TreeSet<>(); for (String stmtName : funcDeps.split(",")) { if (! stmtName.isEmpty()) { s...
[ "private", "static", "void", "addFunctionDependence", "(", "Function", "function", ",", "Procedure", "procedure", ",", "Statement", "catalogStmt", ")", "{", "String", "funcDeps", "=", "function", ".", "getStmtdependers", "(", ")", ";", "Set", "<", "String", ">",...
Add a dependence to a function of a statement. The function's dependence string is altered with this function. @param function The function to add as dependee. @param procedure The procedure of the statement. @param catalogStmt The statement to add as depender.
[ "Add", "a", "dependence", "to", "a", "function", "of", "a", "statement", ".", "The", "function", "s", "dependence", "string", "is", "altered", "with", "this", "function", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/StatementCompiler.java#L386-L418
61,154
VoltDB/voltdb
src/frontend/org/voltdb/compiler/StatementCompiler.java
StatementCompiler.addStatementDependence
private static void addStatementDependence(Function function, Statement catalogStmt) { String fnDeps = catalogStmt.getFunctiondependees(); Set<String> fnSet = new TreeSet<>(); for (String fnName : fnDeps.split(",")) { if (! fnName.isEmpty()) { fnSet.add(fnName); ...
java
private static void addStatementDependence(Function function, Statement catalogStmt) { String fnDeps = catalogStmt.getFunctiondependees(); Set<String> fnSet = new TreeSet<>(); for (String fnName : fnDeps.split(",")) { if (! fnName.isEmpty()) { fnSet.add(fnName); ...
[ "private", "static", "void", "addStatementDependence", "(", "Function", "function", ",", "Statement", "catalogStmt", ")", "{", "String", "fnDeps", "=", "catalogStmt", ".", "getFunctiondependees", "(", ")", ";", "Set", "<", "String", ">", "fnSet", "=", "new", "...
Add a dependence of a statement to a function. The statement's dependence string is altered with this function. @param function The function to add as dependee. @param catalogStmt The statement to add as depender.
[ "Add", "a", "dependence", "of", "a", "statement", "to", "a", "function", ".", "The", "statement", "s", "dependence", "string", "is", "altered", "with", "this", "function", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/StatementCompiler.java#L427-L449
61,155
VoltDB/voltdb
src/frontend/org/voltdb/compiler/StatementCompiler.java
StatementCompiler.fragmentReferencesPersistentTable
static boolean fragmentReferencesPersistentTable(AbstractPlanNode node) { if (node == null) return false; // these nodes can read/modify persistent tables if (node instanceof AbstractScanPlanNode) return true; if (node instanceof InsertPlanNode) retur...
java
static boolean fragmentReferencesPersistentTable(AbstractPlanNode node) { if (node == null) return false; // these nodes can read/modify persistent tables if (node instanceof AbstractScanPlanNode) return true; if (node instanceof InsertPlanNode) retur...
[ "static", "boolean", "fragmentReferencesPersistentTable", "(", "AbstractPlanNode", "node", ")", "{", "if", "(", "node", "==", "null", ")", "return", "false", ";", "// these nodes can read/modify persistent tables", "if", "(", "node", "instanceof", "AbstractScanPlanNode", ...
Check through a plan graph and return true if it ever touches a persistent table.
[ "Check", "through", "a", "plan", "graph", "and", "return", "true", "if", "it", "ever", "touches", "a", "persistent", "table", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/StatementCompiler.java#L480-L503
61,156
VoltDB/voltdb
src/frontend/org/voltdb/compiler/StatementCompiler.java
StatementCompiler.compileNibbleDeleteProcedure
public static Procedure compileNibbleDeleteProcedure(Table catTable, String procName, Column col, ComparisonOperation comp) { Procedure newCatProc = addProcedure(catTable, procName); String countingQuery = genSelectSqlForNibbleDelete(catTable, col, comp); addStatement(catTable, newC...
java
public static Procedure compileNibbleDeleteProcedure(Table catTable, String procName, Column col, ComparisonOperation comp) { Procedure newCatProc = addProcedure(catTable, procName); String countingQuery = genSelectSqlForNibbleDelete(catTable, col, comp); addStatement(catTable, newC...
[ "public", "static", "Procedure", "compileNibbleDeleteProcedure", "(", "Table", "catTable", ",", "String", "procName", ",", "Column", "col", ",", "ComparisonOperation", "comp", ")", "{", "Procedure", "newCatProc", "=", "addProcedure", "(", "catTable", ",", "procName"...
Generate small deletion queries by using count - select - delete pattern. 1) First query finds number of rows meet the delete condition. 2) Second query finds the cut-off value if number of rows to be deleted is higher than maximum delete chunk size. 3) Third query deletes rows selected by above queries.
[ "Generate", "small", "deletion", "queries", "by", "using", "count", "-", "select", "-", "delete", "pattern", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/StatementCompiler.java#L796-L810
61,157
VoltDB/voltdb
src/frontend/org/voltdb/compiler/StatementCompiler.java
StatementCompiler.compileMigrateProcedure
public static Procedure compileMigrateProcedure(Table table, String procName, Column column, ComparisonOperation comparison) { Procedure proc = addProcedure(table, procName); // Select count(*) StringBuilder sb = new StringBuilder(); sb.append("SELECT COUNT(*) FROM " + table...
java
public static Procedure compileMigrateProcedure(Table table, String procName, Column column, ComparisonOperation comparison) { Procedure proc = addProcedure(table, procName); // Select count(*) StringBuilder sb = new StringBuilder(); sb.append("SELECT COUNT(*) FROM " + table...
[ "public", "static", "Procedure", "compileMigrateProcedure", "(", "Table", "table", ",", "String", "procName", ",", "Column", "column", ",", "ComparisonOperation", "comparison", ")", "{", "Procedure", "proc", "=", "addProcedure", "(", "table", ",", "procName", ")",...
Generate migrate queries by using count - select - migrate pattern. 1) First query finds number of rows meet the migrate condition. 2) Second query finds the cut-off value if number of rows to be migrate is higher than maximum migrate chunk size. 3) Third query migrates rows selected by above queries.
[ "Generate", "migrate", "queries", "by", "using", "count", "-", "select", "-", "migrate", "pattern", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/StatementCompiler.java#L820-L848
61,158
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/Constraints.java
Constraints.constrainedCollection
public static <E> Collection<E> constrainedCollection( Collection<E> collection, Constraint<? super E> constraint) { return new ConstrainedCollection<E>(collection, constraint); }
java
public static <E> Collection<E> constrainedCollection( Collection<E> collection, Constraint<? super E> constraint) { return new ConstrainedCollection<E>(collection, constraint); }
[ "public", "static", "<", "E", ">", "Collection", "<", "E", ">", "constrainedCollection", "(", "Collection", "<", "E", ">", "collection", ",", "Constraint", "<", "?", "super", "E", ">", "constraint", ")", "{", "return", "new", "ConstrainedCollection", "<", ...
Returns a constrained view of the specified collection, using the specified constraint. Any operations that add new elements to the collection will call the provided constraint. However, this method does not verify that existing elements satisfy the constraint. <p>The returned collection is not serializable. @param c...
[ "Returns", "a", "constrained", "view", "of", "the", "specified", "collection", "using", "the", "specified", "constraint", ".", "Any", "operations", "that", "add", "new", "elements", "to", "the", "collection", "will", "call", "the", "provided", "constraint", ".",...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/Constraints.java#L51-L54
61,159
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/Constraints.java
Constraints.constrainedSet
public static <E> Set<E> constrainedSet(Set<E> set, Constraint<? super E> constraint) { return new ConstrainedSet<E>(set, constraint); }
java
public static <E> Set<E> constrainedSet(Set<E> set, Constraint<? super E> constraint) { return new ConstrainedSet<E>(set, constraint); }
[ "public", "static", "<", "E", ">", "Set", "<", "E", ">", "constrainedSet", "(", "Set", "<", "E", ">", "set", ",", "Constraint", "<", "?", "super", "E", ">", "constraint", ")", "{", "return", "new", "ConstrainedSet", "<", "E", ">", "(", "set", ",", ...
Returns a constrained view of the specified set, using the specified constraint. Any operations that add new elements to the set will call the provided constraint. However, this method does not verify that existing elements satisfy the constraint. <p>The returned set is not serializable. @param set the set to constra...
[ "Returns", "a", "constrained", "view", "of", "the", "specified", "set", "using", "the", "specified", "constraint", ".", "Any", "operations", "that", "add", "new", "elements", "to", "the", "set", "will", "call", "the", "provided", "constraint", ".", "However", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/Constraints.java#L95-L97
61,160
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/Constraints.java
Constraints.constrainedSortedSet
public static <E> SortedSet<E> constrainedSortedSet( SortedSet<E> sortedSet, Constraint<? super E> constraint) { return new ConstrainedSortedSet<E>(sortedSet, constraint); }
java
public static <E> SortedSet<E> constrainedSortedSet( SortedSet<E> sortedSet, Constraint<? super E> constraint) { return new ConstrainedSortedSet<E>(sortedSet, constraint); }
[ "public", "static", "<", "E", ">", "SortedSet", "<", "E", ">", "constrainedSortedSet", "(", "SortedSet", "<", "E", ">", "sortedSet", ",", "Constraint", "<", "?", "super", "E", ">", "constraint", ")", "{", "return", "new", "ConstrainedSortedSet", "<", "E", ...
Returns a constrained view of the specified sorted set, using the specified constraint. Any operations that add new elements to the sorted set will call the provided constraint. However, this method does not verify that existing elements satisfy the constraint. <p>The returned set is not serializable. @param sortedSe...
[ "Returns", "a", "constrained", "view", "of", "the", "specified", "sorted", "set", "using", "the", "specified", "constraint", ".", "Any", "operations", "that", "add", "new", "elements", "to", "the", "sorted", "set", "will", "call", "the", "provided", "constrain...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/Constraints.java#L138-L141
61,161
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/Constraints.java
Constraints.constrainedList
public static <E> List<E> constrainedList(List<E> list, Constraint<? super E> constraint) { return (list instanceof RandomAccess) ? new ConstrainedRandomAccessList<E>(list, constraint) : new ConstrainedList<E>(list, constraint); }
java
public static <E> List<E> constrainedList(List<E> list, Constraint<? super E> constraint) { return (list instanceof RandomAccess) ? new ConstrainedRandomAccessList<E>(list, constraint) : new ConstrainedList<E>(list, constraint); }
[ "public", "static", "<", "E", ">", "List", "<", "E", ">", "constrainedList", "(", "List", "<", "E", ">", "list", ",", "Constraint", "<", "?", "super", "E", ">", "constraint", ")", "{", "return", "(", "list", "instanceof", "RandomAccess", ")", "?", "n...
Returns a constrained view of the specified list, using the specified constraint. Any operations that add new elements to the list will call the provided constraint. However, this method does not verify that existing elements satisfy the constraint. <p>If {@code list} implements {@link RandomAccess}, so will the retur...
[ "Returns", "a", "constrained", "view", "of", "the", "specified", "list", "using", "the", "specified", "constraint", ".", "Any", "operations", "that", "add", "new", "elements", "to", "the", "list", "will", "call", "the", "provided", "constraint", ".", "However"...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/Constraints.java#L198-L202
61,162
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/Constraints.java
Constraints.constrainedListIterator
private static <E> ListIterator<E> constrainedListIterator( ListIterator<E> listIterator, Constraint<? super E> constraint) { return new ConstrainedListIterator<E>(listIterator, constraint); }
java
private static <E> ListIterator<E> constrainedListIterator( ListIterator<E> listIterator, Constraint<? super E> constraint) { return new ConstrainedListIterator<E>(listIterator, constraint); }
[ "private", "static", "<", "E", ">", "ListIterator", "<", "E", ">", "constrainedListIterator", "(", "ListIterator", "<", "E", ">", "listIterator", ",", "Constraint", "<", "?", "super", "E", ">", "constraint", ")", "{", "return", "new", "ConstrainedListIterator"...
Returns a constrained view of the specified list iterator, using the specified constraint. Any operations that would add new elements to the underlying list will be verified by the constraint. @param listIterator the iterator for which to return a constrained view @param constraint the constraint for elements in the l...
[ "Returns", "a", "constrained", "view", "of", "the", "specified", "list", "iterator", "using", "the", "specified", "constraint", ".", "Any", "operations", "that", "would", "add", "new", "elements", "to", "the", "underlying", "list", "will", "be", "verified", "b...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/Constraints.java#L280-L283
61,163
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/TableBase.java
TableBase.createIndex
public final Index createIndex(PersistentStore store, HsqlName name, int[] columns, boolean[] descending, boolean[] nullsLast, boolean unique, boolean migrating, boolean constraint, boolean forward) { Index...
java
public final Index createIndex(PersistentStore store, HsqlName name, int[] columns, boolean[] descending, boolean[] nullsLast, boolean unique, boolean migrating, boolean constraint, boolean forward) { Index...
[ "public", "final", "Index", "createIndex", "(", "PersistentStore", "store", ",", "HsqlName", "name", ",", "int", "[", "]", "columns", ",", "boolean", "[", "]", "descending", ",", "boolean", "[", "]", "nullsLast", ",", "boolean", "unique", ",", "boolean", "...
Create new memory-resident index. For MEMORY and TEXT tables.
[ "Create", "new", "memory", "-", "resident", "index", ".", "For", "MEMORY", "and", "TEXT", "tables", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TableBase.java#L492-L501
61,164
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/types/BitType.java
BitType.getCombinedType
public Type getCombinedType(Type other, int operation) { if (operation != OpTypes.CONCAT) { return getAggregateType(other); } Type newType; long newPrecision = precision + other.precision; switch (other.typeCode) { case Types.SQL_ALL_TYPES : ...
java
public Type getCombinedType(Type other, int operation) { if (operation != OpTypes.CONCAT) { return getAggregateType(other); } Type newType; long newPrecision = precision + other.precision; switch (other.typeCode) { case Types.SQL_ALL_TYPES : ...
[ "public", "Type", "getCombinedType", "(", "Type", "other", ",", "int", "operation", ")", "{", "if", "(", "operation", "!=", "OpTypes", ".", "CONCAT", ")", "{", "return", "getAggregateType", "(", "other", ")", ";", "}", "Type", "newType", ";", "long", "ne...
Returns type for concat
[ "Returns", "type", "for", "concat" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/types/BitType.java#L149-L191
61,165
VoltDB/voltdb
src/frontend/org/voltdb/sysprocs/Pause.java
Pause.run
public VoltTable[] run(SystemProcedureExecutionContext ctx) { // Choose the lowest site ID on this host to actually flip the bit if (ctx.isLowestSiteId()) { VoltDBInterface voltdb = VoltDB.instance(); OperationMode opMode = voltdb.getMode(); if (LOG.isDebugEnabled())...
java
public VoltTable[] run(SystemProcedureExecutionContext ctx) { // Choose the lowest site ID on this host to actually flip the bit if (ctx.isLowestSiteId()) { VoltDBInterface voltdb = VoltDB.instance(); OperationMode opMode = voltdb.getMode(); if (LOG.isDebugEnabled())...
[ "public", "VoltTable", "[", "]", "run", "(", "SystemProcedureExecutionContext", "ctx", ")", "{", "// Choose the lowest site ID on this host to actually flip the bit", "if", "(", "ctx", ".", "isLowestSiteId", "(", ")", ")", "{", "VoltDBInterface", "voltdb", "=", "VoltDB"...
Enter admin mode @param ctx Internal parameter. Not user-accessible. @return Standard STATUS table.
[ "Enter", "admin", "mode" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/Pause.java#L68-L131
61,166
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java
StatementDMQL.setGeneratedColumnInfo
@Override public void setGeneratedColumnInfo(int generate, ResultMetaData meta) { // can support INSERT_SELECT also if (type != StatementTypes.INSERT) { return; } int colIndex = baseTable.getIdentityColumnIndex(); if (colIndex == -1) { return; ...
java
@Override public void setGeneratedColumnInfo(int generate, ResultMetaData meta) { // can support INSERT_SELECT also if (type != StatementTypes.INSERT) { return; } int colIndex = baseTable.getIdentityColumnIndex(); if (colIndex == -1) { return; ...
[ "@", "Override", "public", "void", "setGeneratedColumnInfo", "(", "int", "generate", ",", "ResultMetaData", "meta", ")", "{", "// can support INSERT_SELECT also", "if", "(", "type", "!=", "StatementTypes", ".", "INSERT", ")", "{", "return", ";", "}", "int", "col...
For the creation of the statement
[ "For", "the", "creation", "of", "the", "statement" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java#L240-L300
61,167
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java
StatementDMQL.checkAccessRights
void checkAccessRights(Session session) { if (targetTable != null && !targetTable.isTemp()) { targetTable.checkDataReadOnly(); session.checkReadWrite(); } if (session.isAdmin()) { return; } for (int i = 0; i < sequences.length; i++) { ...
java
void checkAccessRights(Session session) { if (targetTable != null && !targetTable.isTemp()) { targetTable.checkDataReadOnly(); session.checkReadWrite(); } if (session.isAdmin()) { return; } for (int i = 0; i < sequences.length; i++) { ...
[ "void", "checkAccessRights", "(", "Session", "session", ")", "{", "if", "(", "targetTable", "!=", "null", "&&", "!", "targetTable", ".", "isTemp", "(", ")", ")", "{", "targetTable", ".", "checkDataReadOnly", "(", ")", ";", "session", ".", "checkReadWrite", ...
Determines if the authorizations are adequate to execute the compiled object. Completion requires the list of all database objects in a compiled statement.
[ "Determines", "if", "the", "authorizations", "are", "adequate", "to", "execute", "the", "compiled", "object", ".", "Completion", "requires", "the", "list", "of", "all", "database", "objects", "in", "a", "compiled", "statement", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java#L437-L506
61,168
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java
StatementDMQL.getResultMetaData
@Override public ResultMetaData getResultMetaData() { switch (type) { case StatementTypes.DELETE_WHERE : case StatementTypes.INSERT : case StatementTypes.UPDATE_WHERE : case StatementTypes.MIGRATE_WHERE : return ResultMetaData.emptyResultMeta...
java
@Override public ResultMetaData getResultMetaData() { switch (type) { case StatementTypes.DELETE_WHERE : case StatementTypes.INSERT : case StatementTypes.UPDATE_WHERE : case StatementTypes.MIGRATE_WHERE : return ResultMetaData.emptyResultMeta...
[ "@", "Override", "public", "ResultMetaData", "getResultMetaData", "(", ")", "{", "switch", "(", "type", ")", "{", "case", "StatementTypes", ".", "DELETE_WHERE", ":", "case", "StatementTypes", ".", "INSERT", ":", "case", "StatementTypes", ".", "UPDATE_WHERE", ":"...
Returns the metadata, which is empty if the CompiledStatement does not generate a Result.
[ "Returns", "the", "metadata", "which", "is", "empty", "if", "the", "CompiledStatement", "does", "not", "generate", "a", "Result", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java#L524-L540
61,169
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java
StatementDMQL.describe
@Override public String describe(Session session) { try { return describeImpl(session); } catch (Exception e) { e.printStackTrace(); return e.toString(); } }
java
@Override public String describe(Session session) { try { return describeImpl(session); } catch (Exception e) { e.printStackTrace(); return e.toString(); } }
[ "@", "Override", "public", "String", "describe", "(", "Session", "session", ")", "{", "try", "{", "return", "describeImpl", "(", "session", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "return", "...
Retrieves a String representation of this object.
[ "Retrieves", "a", "String", "representation", "of", "this", "object", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java#L615-L626
61,170
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java
StatementDMQL.isGroupByColumn
static boolean isGroupByColumn(QuerySpecification select, int index) { if (!select.isGrouped) { return false; } for (int ii = 0; ii < select.groupIndex.getColumnCount(); ii++) { if (index == select.groupIndex.getColumns()[ii]) { return true; } ...
java
static boolean isGroupByColumn(QuerySpecification select, int index) { if (!select.isGrouped) { return false; } for (int ii = 0; ii < select.groupIndex.getColumnCount(); ii++) { if (index == select.groupIndex.getColumns()[ii]) { return true; } ...
[ "static", "boolean", "isGroupByColumn", "(", "QuerySpecification", "select", ",", "int", "index", ")", "{", "if", "(", "!", "select", ".", "isGrouped", ")", "{", "return", "false", ";", "}", "for", "(", "int", "ii", "=", "0", ";", "ii", "<", "select", ...
Returns true if the specified exprColumn index is in the list of column indices specified by groupIndex @return true/false
[ "Returns", "true", "if", "the", "specified", "exprColumn", "index", "is", "in", "the", "list", "of", "column", "indices", "specified", "by", "groupIndex" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java#L854-L864
61,171
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java
StatementDMQL.getDisplayColumnsForSetOp
private static List<Expression> getDisplayColumnsForSetOp(QueryExpression queryExpr) { assert(queryExpr != null); if (queryExpr.getLeftQueryExpression() == null) { // end of recursion. This is a QuerySpecification assert(queryExpr instanceof QuerySpecification); Query...
java
private static List<Expression> getDisplayColumnsForSetOp(QueryExpression queryExpr) { assert(queryExpr != null); if (queryExpr.getLeftQueryExpression() == null) { // end of recursion. This is a QuerySpecification assert(queryExpr instanceof QuerySpecification); Query...
[ "private", "static", "List", "<", "Expression", ">", "getDisplayColumnsForSetOp", "(", "QueryExpression", "queryExpr", ")", "{", "assert", "(", "queryExpr", "!=", "null", ")", ";", "if", "(", "queryExpr", ".", "getLeftQueryExpression", "(", ")", "==", "null", ...
Return a list of the display columns for the left most statement from a set op @returnn
[ "Return", "a", "list", "of", "the", "display", "columns", "for", "the", "left", "most", "statement", "from", "a", "set", "op" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java#L1027-L1038
61,172
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java
StatementDMQL.voltGetLimitOffsetXMLFromSortAndSlice
protected static List<VoltXMLElement> voltGetLimitOffsetXMLFromSortAndSlice(Session session, SortAndSlice sortAndSlice) throws HSQLParseException { List<VoltXMLElement> result = new ArrayList<>(); if (sortAndSlice == null || sortAndSlice == SortAndSlice.noSort) { return result; ...
java
protected static List<VoltXMLElement> voltGetLimitOffsetXMLFromSortAndSlice(Session session, SortAndSlice sortAndSlice) throws HSQLParseException { List<VoltXMLElement> result = new ArrayList<>(); if (sortAndSlice == null || sortAndSlice == SortAndSlice.noSort) { return result; ...
[ "protected", "static", "List", "<", "VoltXMLElement", ">", "voltGetLimitOffsetXMLFromSortAndSlice", "(", "Session", "session", ",", "SortAndSlice", "sortAndSlice", ")", "throws", "HSQLParseException", "{", "List", "<", "VoltXMLElement", ">", "result", "=", "new", "Arr...
return a list of VoltXMLElements that need to be added to the statement XML for LIMIT and OFFSET
[ "return", "a", "list", "of", "VoltXMLElements", "that", "need", "to", "be", "added", "to", "the", "statement", "XML", "for", "LIMIT", "and", "OFFSET" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java#L1041-L1096
61,173
VoltDB/voltdb
src/frontend/org/voltdb/utils/VoltTypeUtil.java
VoltTypeUtil.getObjectFromString
public static Object getObjectFromString(VoltType type, String value) throws ParseException { Object ret = null; switch (type) { // NOTE: All runtime integer parameters are actually Longs,so we will have problems // if we actually try to convert the object to one of the s...
java
public static Object getObjectFromString(VoltType type, String value) throws ParseException { Object ret = null; switch (type) { // NOTE: All runtime integer parameters are actually Longs,so we will have problems // if we actually try to convert the object to one of the s...
[ "public", "static", "Object", "getObjectFromString", "(", "VoltType", "type", ",", "String", "value", ")", "throws", "ParseException", "{", "Object", "ret", "=", "null", ";", "switch", "(", "type", ")", "{", "// NOTE: All runtime integer parameters are actually Longs,...
Returns a casted object of the input value string based on the given type @throws ParseException
[ "Returns", "a", "casted", "object", "of", "the", "input", "value", "string", "based", "on", "the", "given", "type" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/VoltTypeUtil.java#L220-L286
61,174
VoltDB/voltdb
src/frontend/org/voltdb/utils/VoltTypeUtil.java
VoltTypeUtil.getNumericLiteralType
public static VoltType getNumericLiteralType(VoltType vt, String value) { try { Long.parseLong(value); } catch (NumberFormatException e) { // Our DECIMAL may not be bigger/smaller enough to store the constant value return VoltType.DECIMAL; } return vt;...
java
public static VoltType getNumericLiteralType(VoltType vt, String value) { try { Long.parseLong(value); } catch (NumberFormatException e) { // Our DECIMAL may not be bigger/smaller enough to store the constant value return VoltType.DECIMAL; } return vt;...
[ "public", "static", "VoltType", "getNumericLiteralType", "(", "VoltType", "vt", ",", "String", "value", ")", "{", "try", "{", "Long", ".", "parseLong", "(", "value", ")", ";", "}", "catch", "(", "NumberFormatException", "e", ")", "{", "// Our DECIMAL may not b...
If the type is NUMERIC from hsqldb, VoltDB has to decide its real type. It's either INTEGER or DECIMAL according to the SQL Standard. Thanks for Hsqldb 1.9, FLOAT literal values have been handled well with E sign. @param vt @param value @return
[ "If", "the", "type", "is", "NUMERIC", "from", "hsqldb", "VoltDB", "has", "to", "decide", "its", "real", "type", ".", "It", "s", "either", "INTEGER", "or", "DECIMAL", "according", "to", "the", "SQL", "Standard", ".", "Thanks", "for", "Hsqldb", "1", ".", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/VoltTypeUtil.java#L352-L360
61,175
VoltDB/voltdb
src/frontend/org/voltdb/client/ProcedureInvocationExtensions.java
ProcedureInvocationExtensions.writeLength
private static void writeLength(ByteBuffer buf, int length) { assert(length >= 0); assert(length == (length & (~length + 1))); // check if power of two // shockingly fast log_2 uses intrinsics in JDK >= 1.7 byte log2size = (byte) (32 - Integer.numberOfLeadingZeros(length)); buf...
java
private static void writeLength(ByteBuffer buf, int length) { assert(length >= 0); assert(length == (length & (~length + 1))); // check if power of two // shockingly fast log_2 uses intrinsics in JDK >= 1.7 byte log2size = (byte) (32 - Integer.numberOfLeadingZeros(length)); buf...
[ "private", "static", "void", "writeLength", "(", "ByteBuffer", "buf", ",", "int", "length", ")", "{", "assert", "(", "length", ">=", "0", ")", ";", "assert", "(", "length", "==", "(", "length", "&", "(", "~", "length", "+", "1", ")", ")", ")", ";",...
Over-clever way to store lots of lengths in a single byte Length must be a power of two >= 0.
[ "Over", "-", "clever", "way", "to", "store", "lots", "of", "lengths", "in", "a", "single", "byte", "Length", "must", "be", "a", "power", "of", "two", ">", "=", "0", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/ProcedureInvocationExtensions.java#L99-L107
61,176
VoltDB/voltdb
src/frontend/org/voltdb/OpsRegistrar.java
OpsRegistrar.getAgent
public OpsAgent getAgent(OpsSelector selector) { OpsAgent agent = m_agents.get(selector); assert (agent != null); return agent; }
java
public OpsAgent getAgent(OpsSelector selector) { OpsAgent agent = m_agents.get(selector); assert (agent != null); return agent; }
[ "public", "OpsAgent", "getAgent", "(", "OpsSelector", "selector", ")", "{", "OpsAgent", "agent", "=", "m_agents", ".", "get", "(", "selector", ")", ";", "assert", "(", "agent", "!=", "null", ")", ";", "return", "agent", ";", "}" ]
Return the OpsAgent for the specified selector.
[ "Return", "the", "OpsAgent", "for", "the", "specified", "selector", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/OpsRegistrar.java#L79-L83
61,177
VoltDB/voltdb
src/frontend/org/voltdb/OpsRegistrar.java
OpsRegistrar.shutdown
public void shutdown() { for (Entry<OpsSelector, OpsAgent> entry : m_agents.entrySet()) { try { entry.getValue().shutdown(); } catch (InterruptedException e) {} } m_agents.clear(); }
java
public void shutdown() { for (Entry<OpsSelector, OpsAgent> entry : m_agents.entrySet()) { try { entry.getValue().shutdown(); } catch (InterruptedException e) {} } m_agents.clear(); }
[ "public", "void", "shutdown", "(", ")", "{", "for", "(", "Entry", "<", "OpsSelector", ",", "OpsAgent", ">", "entry", ":", "m_agents", ".", "entrySet", "(", ")", ")", "{", "try", "{", "entry", ".", "getValue", "(", ")", ".", "shutdown", "(", ")", ";...
Shutdown all the OpsAgent's executor services. Should be possible to eventually consolidate all of them into a single executor service.
[ "Shutdown", "all", "the", "OpsAgent", "s", "executor", "services", ".", "Should", "be", "possible", "to", "eventually", "consolidate", "all", "of", "them", "into", "a", "single", "executor", "service", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/OpsRegistrar.java#L89-L97
61,178
VoltDB/voltdb
src/frontend/org/voltdb/compiler/VoltDDLElementTracker.java
VoltDDLElementTracker.add
public String add(ProcedureDescriptor descriptor) throws VoltCompilerException { assert descriptor != null; String className = descriptor.m_className; assert className != null && ! className.trim().isEmpty(); String shortName = deriveShortProcedureName(className); if( m_pr...
java
public String add(ProcedureDescriptor descriptor) throws VoltCompilerException { assert descriptor != null; String className = descriptor.m_className; assert className != null && ! className.trim().isEmpty(); String shortName = deriveShortProcedureName(className); if( m_pr...
[ "public", "String", "add", "(", "ProcedureDescriptor", "descriptor", ")", "throws", "VoltCompilerException", "{", "assert", "descriptor", "!=", "null", ";", "String", "className", "=", "descriptor", ".", "m_className", ";", "assert", "className", "!=", "null", "&&...
Tracks the given procedure descriptor if it is not already tracked @param descriptor a {@link VoltCompiler.ProcedureDescriptor} @return name added to procedure map @throws VoltCompilerException if it is already tracked
[ "Tracks", "the", "given", "procedure", "descriptor", "if", "it", "is", "not", "already", "tracked" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltDDLElementTracker.java#L105-L122
61,179
VoltDB/voltdb
src/frontend/org/voltdb/compiler/VoltDDLElementTracker.java
VoltDDLElementTracker.removeProcedure
public void removeProcedure(String procName, boolean ifExists) throws VoltCompilerException { assert procName != null && ! procName.trim().isEmpty(); String shortName = deriveShortProcedureName(procName); if( m_procedureMap.containsKey(shortName)) { m_procedureMap.remove(shortN...
java
public void removeProcedure(String procName, boolean ifExists) throws VoltCompilerException { assert procName != null && ! procName.trim().isEmpty(); String shortName = deriveShortProcedureName(procName); if( m_procedureMap.containsKey(shortName)) { m_procedureMap.remove(shortN...
[ "public", "void", "removeProcedure", "(", "String", "procName", ",", "boolean", "ifExists", ")", "throws", "VoltCompilerException", "{", "assert", "procName", "!=", "null", "&&", "!", "procName", ".", "trim", "(", ")", ".", "isEmpty", "(", ")", ";", "String"...
Searches for and removes the Procedure provided in prior DDL statements @param Name of procedure being removed @throws VoltCompilerException if the procedure does not exist
[ "Searches", "for", "and", "removes", "the", "Procedure", "provided", "in", "prior", "DDL", "statements" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltDDLElementTracker.java#L129-L142
61,180
VoltDB/voltdb
src/frontend/org/voltdb/compiler/VoltDDLElementTracker.java
VoltDDLElementTracker.addProcedurePartitionInfoTo
public void addProcedurePartitionInfoTo(String procedureName, ProcedurePartitionData data) throws VoltCompilerException { ProcedureDescriptor descriptor = m_procedureMap.get(procedureName); if( descriptor == null) { throw m_compiler.new VoltCompilerException(String.format( ...
java
public void addProcedurePartitionInfoTo(String procedureName, ProcedurePartitionData data) throws VoltCompilerException { ProcedureDescriptor descriptor = m_procedureMap.get(procedureName); if( descriptor == null) { throw m_compiler.new VoltCompilerException(String.format( ...
[ "public", "void", "addProcedurePartitionInfoTo", "(", "String", "procedureName", ",", "ProcedurePartitionData", "data", ")", "throws", "VoltCompilerException", "{", "ProcedureDescriptor", "descriptor", "=", "m_procedureMap", ".", "get", "(", "procedureName", ")", ";", "...
Associates the given partition info to the given tracked procedure @param procedureName the short name of the procedure name @param partitionInfo the partition info to associate with the procedure @throws VoltCompilerException when there is no corresponding tracked procedure
[ "Associates", "the", "given", "partition", "info", "to", "the", "given", "tracked", "procedure" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltDDLElementTracker.java#L151-L179
61,181
VoltDB/voltdb
src/frontend/org/voltdb/compiler/VoltDDLElementTracker.java
VoltDDLElementTracker.addExportedTable
void addExportedTable(String tableName, String targetName, boolean isStream) { assert tableName != null && ! tableName.trim().isEmpty(); assert targetName != null && ! targetName.trim().isEmpty(); // store uppercase in the catalog as typename targetName = targetName.toUpperCase(); ...
java
void addExportedTable(String tableName, String targetName, boolean isStream) { assert tableName != null && ! tableName.trim().isEmpty(); assert targetName != null && ! targetName.trim().isEmpty(); // store uppercase in the catalog as typename targetName = targetName.toUpperCase(); ...
[ "void", "addExportedTable", "(", "String", "tableName", ",", "String", "targetName", ",", "boolean", "isStream", ")", "{", "assert", "tableName", "!=", "null", "&&", "!", "tableName", ".", "trim", "(", ")", ".", "isEmpty", "(", ")", ";", "assert", "targetN...
Track an exported table @param tableName a table name @param targetName @throws VoltCompilerException when the given table is already exported
[ "Track", "an", "exported", "table" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltDDLElementTracker.java#L195-L214
61,182
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/ImmutableList.java
ImmutableList.asImmutableList
static <E> ImmutableList<E> asImmutableList(Object[] elements, int length) { switch (length) { case 0: return of(); case 1: @SuppressWarnings("unchecked") // collection had only Es in it ImmutableList<E> list = new SingletonImmutableList<E>((E) elements[0]); return list; ...
java
static <E> ImmutableList<E> asImmutableList(Object[] elements, int length) { switch (length) { case 0: return of(); case 1: @SuppressWarnings("unchecked") // collection had only Es in it ImmutableList<E> list = new SingletonImmutableList<E>((E) elements[0]); return list; ...
[ "static", "<", "E", ">", "ImmutableList", "<", "E", ">", "asImmutableList", "(", "Object", "[", "]", "elements", ",", "int", "length", ")", "{", "switch", "(", "length", ")", "{", "case", "0", ":", "return", "of", "(", ")", ";", "case", "1", ":", ...
Views the array as an immutable list. Copies if the specified range does not cover the complete array. Does not check for nulls.
[ "Views", "the", "array", "as", "an", "immutable", "list", ".", "Copies", "if", "the", "specified", "range", "does", "not", "cover", "the", "complete", "array", ".", "Does", "not", "check", "for", "nulls", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/ImmutableList.java#L297-L311
61,183
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/Ordering.java
Ordering.min
@CanIgnoreReturnValue // TODO(kak): Consider removing this public <E extends T> E min(Iterable<E> iterable) { return min(iterable.iterator()); }
java
@CanIgnoreReturnValue // TODO(kak): Consider removing this public <E extends T> E min(Iterable<E> iterable) { return min(iterable.iterator()); }
[ "@", "CanIgnoreReturnValue", "// TODO(kak): Consider removing this", "public", "<", "E", "extends", "T", ">", "E", "min", "(", "Iterable", "<", "E", ">", "iterable", ")", "{", "return", "min", "(", "iterable", ".", "iterator", "(", ")", ")", ";", "}" ]
Returns the least of the specified values according to this ordering. If there are multiple least values, the first of those is returned. <p><b>Java 8 users:</b> If {@code iterable} is a {@link Collection}, use {@code Collections.min(collection, thisComparator)} instead. Otherwise, continue to use this method for now....
[ "Returns", "the", "least", "of", "the", "specified", "values", "according", "to", "this", "ordering", ".", "If", "there", "are", "multiple", "least", "values", "the", "first", "of", "those", "is", "returned", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/Ordering.java#L576-L579
61,184
VoltDB/voltdb
src/frontend/org/voltdb/StatsProcInputTable.java
StatsProcInputTable.calculateAverage
static long calculateAverage(long currAvg, long currInvoc, long rowAvg, long rowInvoc) { long currTtl = currAvg * currInvoc; long rowTtl = rowAvg * rowInvoc; // If both are 0, then currTtl, rowTtl are also 0. if ((currInvoc + rowInvoc) == 0L) { return 0L; } else ...
java
static long calculateAverage(long currAvg, long currInvoc, long rowAvg, long rowInvoc) { long currTtl = currAvg * currInvoc; long rowTtl = rowAvg * rowInvoc; // If both are 0, then currTtl, rowTtl are also 0. if ((currInvoc + rowInvoc) == 0L) { return 0L; } else ...
[ "static", "long", "calculateAverage", "(", "long", "currAvg", ",", "long", "currInvoc", ",", "long", "rowAvg", ",", "long", "rowInvoc", ")", "{", "long", "currTtl", "=", "currAvg", "*", "currInvoc", ";", "long", "rowTtl", "=", "rowAvg", "*", "rowInvoc", ";...
Given a running average and the running invocation total as well as a new row's average and invocation total, return a new running average
[ "Given", "a", "running", "average", "and", "the", "running", "invocation", "total", "as", "well", "as", "a", "new", "row", "s", "average", "and", "invocation", "total", "return", "a", "new", "running", "average" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/StatsProcInputTable.java#L97-L108
61,185
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/util/ConnectionDialogCommon.java
ConnectionDialogCommon.addToRecentConnectionSettings
static void addToRecentConnectionSettings(Hashtable settings, ConnectionSetting newSetting) throws IOException { settings.put(newSetting.getName(), newSetting); ConnectionDialogCommon.storeRecentConnectionSettings(settings); }
java
static void addToRecentConnectionSettings(Hashtable settings, ConnectionSetting newSetting) throws IOException { settings.put(newSetting.getName(), newSetting); ConnectionDialogCommon.storeRecentConnectionSettings(settings); }
[ "static", "void", "addToRecentConnectionSettings", "(", "Hashtable", "settings", ",", "ConnectionSetting", "newSetting", ")", "throws", "IOException", "{", "settings", ".", "put", "(", "newSetting", ".", "getName", "(", ")", ",", "newSetting", ")", ";", "Connectio...
Adds the new settings name if it does not nexist, or overwrites the old one.
[ "Adds", "the", "new", "settings", "name", "if", "it", "does", "not", "nexist", "or", "overwrites", "the", "old", "one", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ConnectionDialogCommon.java#L236-L240
61,186
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/util/ConnectionDialogCommon.java
ConnectionDialogCommon.storeRecentConnectionSettings
private static void storeRecentConnectionSettings(Hashtable settings) { try { if (recentSettings == null) { setHomeDir(); if (homedir == null) { return; } recentSettings = new File(homedir, fileName); ...
java
private static void storeRecentConnectionSettings(Hashtable settings) { try { if (recentSettings == null) { setHomeDir(); if (homedir == null) { return; } recentSettings = new File(homedir, fileName); ...
[ "private", "static", "void", "storeRecentConnectionSettings", "(", "Hashtable", "settings", ")", "{", "try", "{", "if", "(", "recentSettings", "==", "null", ")", "{", "setHomeDir", "(", ")", ";", "if", "(", "homedir", "==", "null", ")", "{", "return", ";",...
Here's a non-secure method of storing recent connection settings. @param settings ConnectionSetting[] @throw IOException if something goes wrong while writing
[ "Here", "s", "a", "non", "-", "secure", "method", "of", "storing", "recent", "connection", "settings", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ConnectionDialogCommon.java#L248-L283
61,187
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/util/ConnectionDialogCommon.java
ConnectionDialogCommon.deleteRecentConnectionSettings
static void deleteRecentConnectionSettings() { try { if (recentSettings == null) { setHomeDir(); if (homedir == null) { return; } recentSettings = new File(homedir, fileName); } if (!recen...
java
static void deleteRecentConnectionSettings() { try { if (recentSettings == null) { setHomeDir(); if (homedir == null) { return; } recentSettings = new File(homedir, fileName); } if (!recen...
[ "static", "void", "deleteRecentConnectionSettings", "(", ")", "{", "try", "{", "if", "(", "recentSettings", "==", "null", ")", "{", "setHomeDir", "(", ")", ";", "if", "(", "homedir", "==", "null", ")", "{", "return", ";", "}", "recentSettings", "=", "new...
Removes the recent connection settings file store.
[ "Removes", "the", "recent", "connection", "settings", "file", "store", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ConnectionDialogCommon.java#L288-L311
61,188
VoltDB/voltdb
src/frontend/org/voltdb/client/ClientStatsContext.java
ClientStatsContext.getAffinityStats
public Map<Integer, ClientAffinityStats> getAffinityStats() { Map<Integer, ClientAffinityStats> retval = new TreeMap<Integer, ClientAffinityStats>(); for (Entry<Integer, ClientAffinityStats> e : m_currentAffinity.entrySet()) { if (m_baselineAffinity.containsKey(e.getKey())) { ...
java
public Map<Integer, ClientAffinityStats> getAffinityStats() { Map<Integer, ClientAffinityStats> retval = new TreeMap<Integer, ClientAffinityStats>(); for (Entry<Integer, ClientAffinityStats> e : m_currentAffinity.entrySet()) { if (m_baselineAffinity.containsKey(e.getKey())) { ...
[ "public", "Map", "<", "Integer", ",", "ClientAffinityStats", ">", "getAffinityStats", "(", ")", "{", "Map", "<", "Integer", ",", "ClientAffinityStats", ">", "retval", "=", "new", "TreeMap", "<", "Integer", ",", "ClientAffinityStats", ">", "(", ")", ";", "for...
Get the client affinity stats. Will only be populated if client affinity is enabled. @return A map from an internal partition id to a {@link ClientAffinityStats} instance.
[ "Get", "the", "client", "affinity", "stats", ".", "Will", "only", "be", "populated", "if", "client", "affinity", "is", "enabled", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/ClientStatsContext.java#L212-L224
61,189
VoltDB/voltdb
src/frontend/org/voltdb/client/ClientStatsContext.java
ClientStatsContext.getAggregateAffinityStats
public ClientAffinityStats getAggregateAffinityStats() { long afWrites = 0; long afReads = 0; long rrWrites = 0; long rrReads = 0; Map<Integer, ClientAffinityStats> affinityStats = getAffinityStats(); for (Entry<Integer, ClientAffinityStats> e : affinityStats.entrySet...
java
public ClientAffinityStats getAggregateAffinityStats() { long afWrites = 0; long afReads = 0; long rrWrites = 0; long rrReads = 0; Map<Integer, ClientAffinityStats> affinityStats = getAffinityStats(); for (Entry<Integer, ClientAffinityStats> e : affinityStats.entrySet...
[ "public", "ClientAffinityStats", "getAggregateAffinityStats", "(", ")", "{", "long", "afWrites", "=", "0", ";", "long", "afReads", "=", "0", ";", "long", "rrWrites", "=", "0", ";", "long", "rrReads", "=", "0", ";", "Map", "<", "Integer", ",", "ClientAffini...
Roll up the per-partition affinity stats and return the totals for each of the four categories. Will only be populated if client affinity is enabled. @return A {@link ClientAffinityStats} instance covering all partitions.
[ "Roll", "up", "the", "per", "-", "partition", "affinity", "stats", "and", "return", "the", "totals", "for", "each", "of", "the", "four", "categories", ".", "Will", "only", "be", "populated", "if", "client", "affinity", "is", "enabled", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/ClientStatsContext.java#L232-L248
61,190
VoltDB/voltdb
src/frontend/org/voltdb/parser/HSQLLexer.java
HSQLLexer.preprocessHSQLDDL
public static HSQLDDLInfo preprocessHSQLDDL(String ddl) { ddl = SQLLexer.stripComments(ddl); Matcher matcher = HSQL_DDL_PREPROCESSOR.matcher(ddl); if (matcher.find()) { String verbString = matcher.group("verb"); HSQLDDLInfo.Verb verb = HSQLDDLInfo.Verb.get(verbString); ...
java
public static HSQLDDLInfo preprocessHSQLDDL(String ddl) { ddl = SQLLexer.stripComments(ddl); Matcher matcher = HSQL_DDL_PREPROCESSOR.matcher(ddl); if (matcher.find()) { String verbString = matcher.group("verb"); HSQLDDLInfo.Verb verb = HSQLDDLInfo.Verb.get(verbString); ...
[ "public", "static", "HSQLDDLInfo", "preprocessHSQLDDL", "(", "String", "ddl", ")", "{", "ddl", "=", "SQLLexer", ".", "stripComments", "(", "ddl", ")", ";", "Matcher", "matcher", "=", "HSQL_DDL_PREPROCESSOR", ".", "matcher", "(", "ddl", ")", ";", "if", "(", ...
Glean some basic info about DDL statements sent to HSQLDB
[ "Glean", "some", "basic", "info", "about", "DDL", "statements", "sent", "to", "HSQLDB" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/HSQLLexer.java#L61-L108
61,191
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpProcedureTask.java
MpProcedureTask.doRestart
public void doRestart(List<Long> masters, Map<Integer, Long> partitionMasters) { List<Long> copy = new ArrayList<Long>(masters); m_restartMasters.set(copy); m_restartMastersMap.set(Maps.newHashMap(partitionMasters)); }
java
public void doRestart(List<Long> masters, Map<Integer, Long> partitionMasters) { List<Long> copy = new ArrayList<Long>(masters); m_restartMasters.set(copy); m_restartMastersMap.set(Maps.newHashMap(partitionMasters)); }
[ "public", "void", "doRestart", "(", "List", "<", "Long", ">", "masters", ",", "Map", "<", "Integer", ",", "Long", ">", "partitionMasters", ")", "{", "List", "<", "Long", ">", "copy", "=", "new", "ArrayList", "<", "Long", ">", "(", "masters", ")", ";"...
Update the list of partition masters to be used when this transaction is restarted. Currently thread-safe because we call this before poisoning the MP Transaction to restart it, and only do this sequentially from the repairing thread.
[ "Update", "the", "list", "of", "partition", "masters", "to", "be", "used", "when", "this", "transaction", "is", "restarted", ".", "Currently", "thread", "-", "safe", "because", "we", "call", "this", "before", "poisoning", "the", "MP", "Transaction", "to", "r...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpProcedureTask.java#L98-L104
61,192
VoltDB/voltdb
src/frontend/org/voltdb/TableStreamer.java
TableStreamer.activate
public boolean activate(SystemProcedureExecutionContext context, boolean undo, byte[] predicates) { if (!context.activateTableStream(m_tableId, m_type, undo, predicates)) { String tableName = CatalogUtil.getTableNameFromId(context.getDatabase(), m_tableId); log.debug("Attempted to ac...
java
public boolean activate(SystemProcedureExecutionContext context, boolean undo, byte[] predicates) { if (!context.activateTableStream(m_tableId, m_type, undo, predicates)) { String tableName = CatalogUtil.getTableNameFromId(context.getDatabase(), m_tableId); log.debug("Attempted to ac...
[ "public", "boolean", "activate", "(", "SystemProcedureExecutionContext", "context", ",", "boolean", "undo", ",", "byte", "[", "]", "predicates", ")", "{", "if", "(", "!", "context", ".", "activateTableStream", "(", "m_tableId", ",", "m_type", ",", "undo", ",",...
Activate the stream with the given predicates on the given table. @param context Context @param undoToken The undo token @param predicates Predicates associated with the stream @return true if activation succeeded.
[ "Activate", "the", "stream", "with", "the", "given", "predicates", "on", "the", "given", "table", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/TableStreamer.java#L80-L89
61,193
VoltDB/voltdb
src/frontend/org/voltdb/TableStreamer.java
TableStreamer.streamMore
public Pair<ListenableFuture<?>, Boolean> streamMore(SystemProcedureExecutionContext context, List<DBBPool.BBContainer> outputBuffers, int[] rowCountAccumulator) { ListenableFuture<?> writeFuture = nu...
java
public Pair<ListenableFuture<?>, Boolean> streamMore(SystemProcedureExecutionContext context, List<DBBPool.BBContainer> outputBuffers, int[] rowCountAccumulator) { ListenableFuture<?> writeFuture = nu...
[ "public", "Pair", "<", "ListenableFuture", "<", "?", ">", ",", "Boolean", ">", "streamMore", "(", "SystemProcedureExecutionContext", "context", ",", "List", "<", "DBBPool", ".", "BBContainer", ">", "outputBuffers", ",", "int", "[", "]", "rowCountAccumulator", ")...
Streams more tuples from the table. @param context Context @param outputBuffers Allocated buffers to hold output tuples @param rowCountAccumulator an array of a single int use to accumulate streamed rows count @return A future for all writes to data targets, and a boolean indicating if there's more left in ...
[ "Streams", "more", "tuples", "from", "the", "table", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/TableStreamer.java#L101-L135
61,194
VoltDB/voltdb
src/frontend/org/voltdb/TableStreamer.java
TableStreamer.prepareBuffers
private void prepareBuffers(List<DBBPool.BBContainer> buffers) { Preconditions.checkArgument(buffers.size() == m_tableTasks.size()); UnmodifiableIterator<SnapshotTableTask> iterator = m_tableTasks.iterator(); for (DBBPool.BBContainer container : buffers) { int headerSize = itera...
java
private void prepareBuffers(List<DBBPool.BBContainer> buffers) { Preconditions.checkArgument(buffers.size() == m_tableTasks.size()); UnmodifiableIterator<SnapshotTableTask> iterator = m_tableTasks.iterator(); for (DBBPool.BBContainer container : buffers) { int headerSize = itera...
[ "private", "void", "prepareBuffers", "(", "List", "<", "DBBPool", ".", "BBContainer", ">", "buffers", ")", "{", "Preconditions", ".", "checkArgument", "(", "buffers", ".", "size", "(", ")", "==", "m_tableTasks", ".", "size", "(", ")", ")", ";", "Unmodifiab...
Set the positions of the buffers to the start of the content, leaving some room for the headers.
[ "Set", "the", "positions", "of", "the", "buffers", "to", "the", "start", "of", "the", "content", "leaving", "some", "room", "for", "the", "headers", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/TableStreamer.java#L158-L169
61,195
VoltDB/voltdb
src/frontend/org/voltdb/TableStreamer.java
TableStreamer.writeBlocksToTargets
private ListenableFuture<?> writeBlocksToTargets(Collection<DBBPool.BBContainer> outputBuffers, int[] serialized) { Preconditions.checkArgument(m_tableTasks.size() == serialized.length); Preconditions.checkArgument(outputBuffers.size() == serializ...
java
private ListenableFuture<?> writeBlocksToTargets(Collection<DBBPool.BBContainer> outputBuffers, int[] serialized) { Preconditions.checkArgument(m_tableTasks.size() == serialized.length); Preconditions.checkArgument(outputBuffers.size() == serializ...
[ "private", "ListenableFuture", "<", "?", ">", "writeBlocksToTargets", "(", "Collection", "<", "DBBPool", ".", "BBContainer", ">", "outputBuffers", ",", "int", "[", "]", "serialized", ")", "{", "Preconditions", ".", "checkArgument", "(", "m_tableTasks", ".", "siz...
Finalize the output buffers and write them to the corresponding data targets @return A future that can used to wait for all targets to finish writing the buffers
[ "Finalize", "the", "output", "buffers", "and", "write", "them", "to", "the", "corresponding", "data", "targets" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/TableStreamer.java#L176-L214
61,196
VoltDB/voltdb
third_party/java/src/org/HdrHistogram_voltpatches/Recorder.java
Recorder.recordValue
public void recordValue(final long value) throws ArrayIndexOutOfBoundsException { long criticalValueAtEnter = recordingPhaser.writerCriticalSectionEnter(); try { activeHistogram.recordValue(value); } finally { recordingPhaser.writerCriticalSectionExit(criticalValueAtEnter...
java
public void recordValue(final long value) throws ArrayIndexOutOfBoundsException { long criticalValueAtEnter = recordingPhaser.writerCriticalSectionEnter(); try { activeHistogram.recordValue(value); } finally { recordingPhaser.writerCriticalSectionExit(criticalValueAtEnter...
[ "public", "void", "recordValue", "(", "final", "long", "value", ")", "throws", "ArrayIndexOutOfBoundsException", "{", "long", "criticalValueAtEnter", "=", "recordingPhaser", ".", "writerCriticalSectionEnter", "(", ")", ";", "try", "{", "activeHistogram", ".", "recordV...
Record a value @param value the value to record @throws ArrayIndexOutOfBoundsException (may throw) if value is exceeds highestTrackableValue
[ "Record", "a", "value" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/HdrHistogram_voltpatches/Recorder.java#L97-L104
61,197
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/HashBiMap.java
HashBiMap.create
public static <K, V> HashBiMap<K, V> create(int expectedSize) { return new HashBiMap<K, V>(expectedSize); }
java
public static <K, V> HashBiMap<K, V> create(int expectedSize) { return new HashBiMap<K, V>(expectedSize); }
[ "public", "static", "<", "K", ",", "V", ">", "HashBiMap", "<", "K", ",", "V", ">", "create", "(", "int", "expectedSize", ")", "{", "return", "new", "HashBiMap", "<", "K", ",", "V", ">", "(", "expectedSize", ")", ";", "}" ]
Constructs a new, empty bimap with the specified expected size. @param expectedSize the expected number of entries @throws IllegalArgumentException if the specified expected size is negative
[ "Constructs", "a", "new", "empty", "bimap", "with", "the", "specified", "expected", "size", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/HashBiMap.java#L72-L74
61,198
VoltDB/voltdb
src/frontend/org/voltdb/iv2/SpPromoteAlgo.java
SpPromoteAlgo.repairSurvivors
public void repairSurvivors() { // cancel() and repair() must be synchronized by the caller (the deliver lock, // currently). If cancelled and the last repair message arrives, don't send // out corrections! if (this.m_promotionResult.isCancelled()) { repairLogger.debug(m_...
java
public void repairSurvivors() { // cancel() and repair() must be synchronized by the caller (the deliver lock, // currently). If cancelled and the last repair message arrives, don't send // out corrections! if (this.m_promotionResult.isCancelled()) { repairLogger.debug(m_...
[ "public", "void", "repairSurvivors", "(", ")", "{", "// cancel() and repair() must be synchronized by the caller (the deliver lock,", "// currently). If cancelled and the last repair message arrives, don't send", "// out corrections!", "if", "(", "this", ".", "m_promotionResult", ".", ...
Send missed-messages to survivors.
[ "Send", "missed", "-", "messages", "to", "survivors", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpPromoteAlgo.java#L222-L265
61,199
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSetMetaData.java
JDBCResultSetMetaData.init
void init(ResultMetaData meta, HsqlProperties props) throws SQLException { resultMetaData = meta; columnCount = resultMetaData.getColumnCount(); // fredt - props is null for internal connections, so always use the // default behaviour in this case // JDBCDriver.get...
java
void init(ResultMetaData meta, HsqlProperties props) throws SQLException { resultMetaData = meta; columnCount = resultMetaData.getColumnCount(); // fredt - props is null for internal connections, so always use the // default behaviour in this case // JDBCDriver.get...
[ "void", "init", "(", "ResultMetaData", "meta", ",", "HsqlProperties", "props", ")", "throws", "SQLException", "{", "resultMetaData", "=", "meta", ";", "columnCount", "=", "resultMetaData", ".", "getColumnCount", "(", ")", ";", "// fredt - props is null for internal c...
Initializes this JDBCResultSetMetaData object from the specified Result and HsqlProperties objects. @param meta the ResultMetaData object from which to initialize this JDBCResultSetMetaData object @param props the HsqlProperties object from which to initialize this JDBCResultSetMetaData object @throws SQLException if ...
[ "Initializes", "this", "JDBCResultSetMetaData", "object", "from", "the", "specified", "Result", "and", "HsqlProperties", "objects", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSetMetaData.java#L918-L930