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
partition
stringclasses
1 value
VoltDB/voltdb
src/frontend/org/voltcore/zk/LeaderElector.java
LeaderElector.watchNextLowerNode
private boolean watchNextLowerNode() throws KeeperException, InterruptedException { /* * Iterate through the sorted list of children and find the given node, * then setup a electionWatcher on the previous node if it exists, otherwise the * previous of the previous...until we reach the...
java
private boolean watchNextLowerNode() throws KeeperException, InterruptedException { /* * Iterate through the sorted list of children and find the given node, * then setup a electionWatcher on the previous node if it exists, otherwise the * previous of the previous...until we reach the...
[ "private", "boolean", "watchNextLowerNode", "(", ")", "throws", "KeeperException", ",", "InterruptedException", "{", "/*\n * Iterate through the sorted list of children and find the given node,\n * then setup a electionWatcher on the previous node if it exists, otherwise the\n ...
Set a watch on the node that comes before the specified node in the directory. @return {@code true} if this node is the lowest node and therefore leader @throws Exception
[ "Set", "a", "watch", "on", "the", "node", "that", "comes", "before", "the", "specified", "node", "in", "the", "directory", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/LeaderElector.java#L186-L216
train
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/escape/CharEscaperBuilder.java
CharEscaperBuilder.addEscape
@CanIgnoreReturnValue public CharEscaperBuilder addEscape(char c, String r) { map.put(c, checkNotNull(r)); if (c > max) { max = c; } return this; }
java
@CanIgnoreReturnValue public CharEscaperBuilder addEscape(char c, String r) { map.put(c, checkNotNull(r)); if (c > max) { max = c; } return this; }
[ "@", "CanIgnoreReturnValue", "public", "CharEscaperBuilder", "addEscape", "(", "char", "c", ",", "String", "r", ")", "{", "map", ".", "put", "(", "c", ",", "checkNotNull", "(", "r", ")", ")", ";", "if", "(", "c", ">", "max", ")", "{", "max", "=", "...
Add a new mapping from an index to an object to the escaping.
[ "Add", "a", "new", "mapping", "from", "an", "index", "to", "an", "object", "to", "the", "escaping", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/escape/CharEscaperBuilder.java#L88-L95
train
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/escape/CharEscaperBuilder.java
CharEscaperBuilder.addEscapes
@CanIgnoreReturnValue public CharEscaperBuilder addEscapes(char[] cs, String r) { checkNotNull(r); for (char c : cs) { addEscape(c, r); } return this; }
java
@CanIgnoreReturnValue public CharEscaperBuilder addEscapes(char[] cs, String r) { checkNotNull(r); for (char c : cs) { addEscape(c, r); } return this; }
[ "@", "CanIgnoreReturnValue", "public", "CharEscaperBuilder", "addEscapes", "(", "char", "[", "]", "cs", ",", "String", "r", ")", "{", "checkNotNull", "(", "r", ")", ";", "for", "(", "char", "c", ":", "cs", ")", "{", "addEscape", "(", "c", ",", "r", "...
Add multiple mappings at once for a particular index.
[ "Add", "multiple", "mappings", "at", "once", "for", "a", "particular", "index", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/escape/CharEscaperBuilder.java#L100-L107
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/SpScheduler.java
SpScheduler.deliverReadyTxns
private void deliverReadyTxns() { // First, pull all the sequenced messages, if any. VoltMessage m = m_replaySequencer.poll(); while(m != null) { deliver(m); m = m_replaySequencer.poll(); } // Then, try to pull all the drainable messages, if any. m...
java
private void deliverReadyTxns() { // First, pull all the sequenced messages, if any. VoltMessage m = m_replaySequencer.poll(); while(m != null) { deliver(m); m = m_replaySequencer.poll(); } // Then, try to pull all the drainable messages, if any. m...
[ "private", "void", "deliverReadyTxns", "(", ")", "{", "// First, pull all the sequenced messages, if any.", "VoltMessage", "m", "=", "m_replaySequencer", ".", "poll", "(", ")", ";", "while", "(", "m", "!=", "null", ")", "{", "deliver", "(", "m", ")", ";", "m",...
Poll the replay sequencer and process the messages until it returns null
[ "Poll", "the", "replay", "sequencer", "and", "process", "the", "messages", "until", "it", "returns", "null" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L361-L382
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/SpScheduler.java
SpScheduler.sequenceForReplay
@Override public boolean sequenceForReplay(VoltMessage message) { boolean canDeliver = false; long sequenceWithUniqueId = Long.MIN_VALUE; boolean commandLog = (message instanceof TransactionInfoBaseMessage && (((TransactionInfoBaseMessage)message).isForReplay())); ...
java
@Override public boolean sequenceForReplay(VoltMessage message) { boolean canDeliver = false; long sequenceWithUniqueId = Long.MIN_VALUE; boolean commandLog = (message instanceof TransactionInfoBaseMessage && (((TransactionInfoBaseMessage)message).isForReplay())); ...
[ "@", "Override", "public", "boolean", "sequenceForReplay", "(", "VoltMessage", "message", ")", "{", "boolean", "canDeliver", "=", "false", ";", "long", "sequenceWithUniqueId", "=", "Long", ".", "MIN_VALUE", ";", "boolean", "commandLog", "=", "(", "message", "ins...
Sequence the message for replay if it's for CL or DR. @param message @return true if the message can be delivered directly to the scheduler, false if the message is queued
[ "Sequence", "the", "message", "for", "replay", "if", "it", "s", "for", "CL", "or", "DR", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L391-L447
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/SpScheduler.java
SpScheduler.doLocalInitiateOffer
private void doLocalInitiateOffer(Iv2InitiateTaskMessage msg) { final VoltTrace.TraceEventBatch traceLog = VoltTrace.log(VoltTrace.Category.SPI); if (traceLog != null) { final String threadName = Thread.currentThread().getName(); // Thread name has to be materialized here tra...
java
private void doLocalInitiateOffer(Iv2InitiateTaskMessage msg) { final VoltTrace.TraceEventBatch traceLog = VoltTrace.log(VoltTrace.Category.SPI); if (traceLog != null) { final String threadName = Thread.currentThread().getName(); // Thread name has to be materialized here tra...
[ "private", "void", "doLocalInitiateOffer", "(", "Iv2InitiateTaskMessage", "msg", ")", "{", "final", "VoltTrace", ".", "TraceEventBatch", "traceLog", "=", "VoltTrace", ".", "log", "(", "VoltTrace", ".", "Category", ".", "SPI", ")", ";", "if", "(", "traceLog", "...
Do the work necessary to turn the Iv2InitiateTaskMessage into a TransactionTask which can be queued to the TransactionTaskQueue. This is reused by both the normal message handling path and the repair path, and assumes that the caller has dealt with or ensured that the necessary ID, SpHandles, and replication issues are...
[ "Do", "the", "work", "necessary", "to", "turn", "the", "Iv2InitiateTaskMessage", "into", "a", "TransactionTask", "which", "can", "be", "queued", "to", "the", "TransactionTaskQueue", ".", "This", "is", "reused", "by", "both", "the", "normal", "message", "handling...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L650-L688
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/SpScheduler.java
SpScheduler.handleBorrowTaskMessage
private void handleBorrowTaskMessage(BorrowTaskMessage message) { // borrows do not advance the sp handle. The handle would // move backwards anyway once the next message is received // from the SP leader. long newSpHandle = getMaxScheduledTxnSpHandle(); Iv2Trace.logFragmentTaskM...
java
private void handleBorrowTaskMessage(BorrowTaskMessage message) { // borrows do not advance the sp handle. The handle would // move backwards anyway once the next message is received // from the SP leader. long newSpHandle = getMaxScheduledTxnSpHandle(); Iv2Trace.logFragmentTaskM...
[ "private", "void", "handleBorrowTaskMessage", "(", "BorrowTaskMessage", "message", ")", "{", "// borrows do not advance the sp handle. The handle would", "// move backwards anyway once the next message is received", "// from the SP leader.", "long", "newSpHandle", "=", "getMaxScheduledTx...
to perform replicated reads or aggregation fragment work.
[ "to", "perform", "replicated", "reads", "or", "aggregation", "fragment", "work", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L895-L941
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/SpScheduler.java
SpScheduler.handleFragmentTaskMessage
void handleFragmentTaskMessage(FragmentTaskMessage message) { FragmentTaskMessage msg = message; long newSpHandle; //The site has been marked as non-leader. The follow-up batches or fragments are processed here if (!message.isForReplica() && (m_isLeader || message.isExecutedOnPreviou...
java
void handleFragmentTaskMessage(FragmentTaskMessage message) { FragmentTaskMessage msg = message; long newSpHandle; //The site has been marked as non-leader. The follow-up batches or fragments are processed here if (!message.isForReplica() && (m_isLeader || message.isExecutedOnPreviou...
[ "void", "handleFragmentTaskMessage", "(", "FragmentTaskMessage", "message", ")", "{", "FragmentTaskMessage", "msg", "=", "message", ";", "long", "newSpHandle", ";", "//The site has been marked as non-leader. The follow-up batches or fragments are processed here", "if", "(", "!", ...
doesn't matter, it isn't going to be used for anything.
[ "doesn", "t", "matter", "it", "isn", "t", "going", "to", "be", "used", "for", "anything", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L952-L1046
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/SpScheduler.java
SpScheduler.offerPendingMPTasks
public void offerPendingMPTasks(long txnId) { Queue<TransactionTask> pendingTasks = m_mpsPendingDurability.get(txnId); if (pendingTasks != null) { for (TransactionTask task : pendingTasks) { if (task instanceof SpProcedureTask) { final VoltTrace.TraceE...
java
public void offerPendingMPTasks(long txnId) { Queue<TransactionTask> pendingTasks = m_mpsPendingDurability.get(txnId); if (pendingTasks != null) { for (TransactionTask task : pendingTasks) { if (task instanceof SpProcedureTask) { final VoltTrace.TraceE...
[ "public", "void", "offerPendingMPTasks", "(", "long", "txnId", ")", "{", "Queue", "<", "TransactionTask", ">", "pendingTasks", "=", "m_mpsPendingDurability", ".", "get", "(", "txnId", ")", ";", "if", "(", "pendingTasks", "!=", "null", ")", "{", "for", "(", ...
Offer all fragment tasks and complete transaction tasks queued for durability for the given MP transaction, and remove the entry from the pending map so that future ones won't be queued. @param txnId The MP transaction ID.
[ "Offer", "all", "fragment", "tasks", "and", "complete", "transaction", "tasks", "queued", "for", "durability", "for", "the", "given", "MP", "transaction", "and", "remove", "the", "entry", "from", "the", "pending", "map", "so", "that", "future", "ones", "won", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L1149-L1172
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/SpScheduler.java
SpScheduler.queueOrOfferMPTask
private void queueOrOfferMPTask(TransactionTask task) { // The pending map will only have an entry for the transaction if the first fragment is // still pending durability. Queue<TransactionTask> pendingTasks = m_mpsPendingDurability.get(task.getTxnId()); if (pendingTasks != null) { ...
java
private void queueOrOfferMPTask(TransactionTask task) { // The pending map will only have an entry for the transaction if the first fragment is // still pending durability. Queue<TransactionTask> pendingTasks = m_mpsPendingDurability.get(task.getTxnId()); if (pendingTasks != null) { ...
[ "private", "void", "queueOrOfferMPTask", "(", "TransactionTask", "task", ")", "{", "// The pending map will only have an entry for the transaction if the first fragment is", "// still pending durability.", "Queue", "<", "TransactionTask", ">", "pendingTasks", "=", "m_mpsPendingDurabi...
Check if the MP task has to be queued because the first fragment is still being logged synchronously to the command log. If not, offer it to the transaction task queue. @param task A fragment task or a complete transaction task
[ "Check", "if", "the", "MP", "task", "has", "to", "be", "queued", "because", "the", "first", "fragment", "is", "still", "being", "logged", "synchronously", "to", "the", "command", "log", ".", "If", "not", "offer", "it", "to", "the", "transaction", "task", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L1180-L1190
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/SpScheduler.java
SpScheduler.handleIv2LogFaultMessage
private void handleIv2LogFaultMessage(Iv2LogFaultMessage message) { //call the internal log write with the provided SP handle and wait for the fault log IO to complete SettableFuture<Boolean> written = writeIv2ViableReplayEntryInternal(message.getSpHandle()); // Get the Fault Log Status her...
java
private void handleIv2LogFaultMessage(Iv2LogFaultMessage message) { //call the internal log write with the provided SP handle and wait for the fault log IO to complete SettableFuture<Boolean> written = writeIv2ViableReplayEntryInternal(message.getSpHandle()); // Get the Fault Log Status her...
[ "private", "void", "handleIv2LogFaultMessage", "(", "Iv2LogFaultMessage", "message", ")", "{", "//call the internal log write with the provided SP handle and wait for the fault log IO to complete", "SettableFuture", "<", "Boolean", ">", "written", "=", "writeIv2ViableReplayEntryInterna...
Should only receive these messages at replicas, when told by the leader
[ "Should", "only", "receive", "these", "messages", "at", "replicas", "when", "told", "by", "the", "leader" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L1396-L1411
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/SpScheduler.java
SpScheduler.blockFaultLogWriteStatus
private void blockFaultLogWriteStatus(SettableFuture<Boolean> written) { boolean logWritten = false; if (written != null) { try { logWritten = written.get(); } catch (InterruptedException e) { } catch (ExecutionException e) { if (tmLog...
java
private void blockFaultLogWriteStatus(SettableFuture<Boolean> written) { boolean logWritten = false; if (written != null) { try { logWritten = written.get(); } catch (InterruptedException e) { } catch (ExecutionException e) { if (tmLog...
[ "private", "void", "blockFaultLogWriteStatus", "(", "SettableFuture", "<", "Boolean", ">", "written", ")", "{", "boolean", "logWritten", "=", "false", ";", "if", "(", "written", "!=", "null", ")", "{", "try", "{", "logWritten", "=", "written", ".", "get", ...
Wait to get the status of a fault log write
[ "Wait", "to", "get", "the", "status", "of", "a", "fault", "log", "write" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L1416-L1432
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/SpScheduler.java
SpScheduler.writeIv2ViableReplayEntryInternal
SettableFuture<Boolean> writeIv2ViableReplayEntryInternal(long spHandle) { SettableFuture<Boolean> written = null; if (m_replayComplete) { written = m_cl.logIv2Fault(m_mailbox.getHSId(), new HashSet<Long>(m_replicaHSIds), m_partitionId, spHandle); } return...
java
SettableFuture<Boolean> writeIv2ViableReplayEntryInternal(long spHandle) { SettableFuture<Boolean> written = null; if (m_replayComplete) { written = m_cl.logIv2Fault(m_mailbox.getHSId(), new HashSet<Long>(m_replicaHSIds), m_partitionId, spHandle); } return...
[ "SettableFuture", "<", "Boolean", ">", "writeIv2ViableReplayEntryInternal", "(", "long", "spHandle", ")", "{", "SettableFuture", "<", "Boolean", ">", "written", "=", "null", ";", "if", "(", "m_replayComplete", ")", "{", "written", "=", "m_cl", ".", "logIv2Fault"...
Write the viable replay set to the command log with the provided SP Handle. Pass back the future that is set after the fault log is written to disk.
[ "Write", "the", "viable", "replay", "set", "to", "the", "command", "log", "with", "the", "provided", "SP", "Handle", ".", "Pass", "back", "the", "future", "that", "is", "set", "after", "the", "fault", "log", "is", "written", "to", "disk", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L1590-L1598
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/SpScheduler.java
SpScheduler.updateReplicasFromMigrationLeaderFailedHost
public void updateReplicasFromMigrationLeaderFailedHost(int failedHostId) { List<Long> replicas = new ArrayList<>(); for (long hsid : m_replicaHSIds) { if (failedHostId != CoreUtils.getHostIdFromHSId(hsid)) { replicas.add(hsid); } } ((InitiatorMail...
java
public void updateReplicasFromMigrationLeaderFailedHost(int failedHostId) { List<Long> replicas = new ArrayList<>(); for (long hsid : m_replicaHSIds) { if (failedHostId != CoreUtils.getHostIdFromHSId(hsid)) { replicas.add(hsid); } } ((InitiatorMail...
[ "public", "void", "updateReplicasFromMigrationLeaderFailedHost", "(", "int", "failedHostId", ")", "{", "List", "<", "Long", ">", "replicas", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "long", "hsid", ":", "m_replicaHSIds", ")", "{", "if", "(",...
update the duplicated counters after the host failure.
[ "update", "the", "duplicated", "counters", "after", "the", "host", "failure", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L1790-L1798
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/SpScheduler.java
SpScheduler.forwardPendingTaskToRejoinNode
public void forwardPendingTaskToRejoinNode(long[] replicasAdded, long snapshotSpHandle) { if (tmLog.isDebugEnabled()) { tmLog.debug("Forward pending tasks in backlog to rejoin node: " + Arrays.toString(replicasAdded)); } if (replicasAdded.length == 0) { return; } ...
java
public void forwardPendingTaskToRejoinNode(long[] replicasAdded, long snapshotSpHandle) { if (tmLog.isDebugEnabled()) { tmLog.debug("Forward pending tasks in backlog to rejoin node: " + Arrays.toString(replicasAdded)); } if (replicasAdded.length == 0) { return; } ...
[ "public", "void", "forwardPendingTaskToRejoinNode", "(", "long", "[", "]", "replicasAdded", ",", "long", "snapshotSpHandle", ")", "{", "if", "(", "tmLog", ".", "isDebugEnabled", "(", ")", ")", "{", "tmLog", ".", "debug", "(", "\"Forward pending tasks in backlog to...
first fragment of stream snapshot and site runs the first fragment.
[ "first", "fragment", "of", "stream", "snapshot", "and", "site", "runs", "the", "first", "fragment", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L1804-L1831
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/SpScheduler.java
SpScheduler.cleanupTransactionBacklogOnRepair
@Override public void cleanupTransactionBacklogOnRepair() { if (m_isLeader && m_sendToHSIds.length > 0) { m_mailbox.send(m_sendToHSIds, new MPBacklogFlushMessage()); } Iterator<Entry<Long, TransactionState>> iter = m_outstandingTxns.entrySet().iterator(); while (iter.hasN...
java
@Override public void cleanupTransactionBacklogOnRepair() { if (m_isLeader && m_sendToHSIds.length > 0) { m_mailbox.send(m_sendToHSIds, new MPBacklogFlushMessage()); } Iterator<Entry<Long, TransactionState>> iter = m_outstandingTxns.entrySet().iterator(); while (iter.hasN...
[ "@", "Override", "public", "void", "cleanupTransactionBacklogOnRepair", "(", ")", "{", "if", "(", "m_isLeader", "&&", "m_sendToHSIds", ".", "length", ">", "0", ")", "{", "m_mailbox", ".", "send", "(", "m_sendToHSIds", ",", "new", "MPBacklogFlushMessage", "(", ...
site leaders also forward the message to its replicas.
[ "site", "leaders", "also", "forward", "the", "message", "to", "its", "replicas", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L1839-L1859
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java
StatementManager.reset
synchronized void reset() { schemaMap.clear(); sqlLookup.clear(); csidMap.clear(); sessionUseMap.clear(); useMap.clear(); next_cs_id = 0; }
java
synchronized void reset() { schemaMap.clear(); sqlLookup.clear(); csidMap.clear(); sessionUseMap.clear(); useMap.clear(); next_cs_id = 0; }
[ "synchronized", "void", "reset", "(", ")", "{", "schemaMap", ".", "clear", "(", ")", ";", "sqlLookup", ".", "clear", "(", ")", ";", "csidMap", ".", "clear", "(", ")", ";", "sessionUseMap", ".", "clear", "(", ")", ";", "useMap", ".", "clear", "(", "...
Clears all internal data structures, removing any references to compiled statements.
[ "Clears", "all", "internal", "data", "structures", "removing", "any", "references", "to", "compiled", "statements", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java#L128-L137
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java
StatementManager.resetStatements
synchronized void resetStatements() { Iterator it = csidMap.values().iterator(); while (it.hasNext()) { Statement cs = (Statement) it.next(); cs.clearVariables(); } }
java
synchronized void resetStatements() { Iterator it = csidMap.values().iterator(); while (it.hasNext()) { Statement cs = (Statement) it.next(); cs.clearVariables(); } }
[ "synchronized", "void", "resetStatements", "(", ")", "{", "Iterator", "it", "=", "csidMap", ".", "values", "(", ")", ".", "iterator", "(", ")", ";", "while", "(", "it", ".", "hasNext", "(", ")", ")", "{", "Statement", "cs", "=", "(", "Statement", ")"...
Used after a DDL change that could impact the compiled statements. Clears references to CompiledStatement objects while keeping the counts and references to the sql strings.
[ "Used", "after", "a", "DDL", "change", "that", "could", "impact", "the", "compiled", "statements", ".", "Clears", "references", "to", "CompiledStatement", "objects", "while", "keeping", "the", "counts", "and", "references", "to", "the", "sql", "strings", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java#L144-L153
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java
StatementManager.getStatementID
private long getStatementID(HsqlName schema, String sql) { LongValueHashMap sqlMap = (LongValueHashMap) schemaMap.get(schema.hashCode()); if (sqlMap == null) { return -1; } return sqlMap.get(sql, -1); }
java
private long getStatementID(HsqlName schema, String sql) { LongValueHashMap sqlMap = (LongValueHashMap) schemaMap.get(schema.hashCode()); if (sqlMap == null) { return -1; } return sqlMap.get(sql, -1); }
[ "private", "long", "getStatementID", "(", "HsqlName", "schema", ",", "String", "sql", ")", "{", "LongValueHashMap", "sqlMap", "=", "(", "LongValueHashMap", ")", "schemaMap", ".", "get", "(", "schema", ".", "hashCode", "(", ")", ")", ";", "if", "(", "sqlMap...
Retrieves the registered compiled statement identifier associated with the specified SQL String, or a value less than zero, if no such statement has been registered. @param schema the schema id @param sql the SQL String @return the compiled statement identifier associated with the specified SQL String
[ "Retrieves", "the", "registered", "compiled", "statement", "identifier", "associated", "with", "the", "specified", "SQL", "String", "or", "a", "value", "less", "than", "zero", "if", "no", "such", "statement", "has", "been", "registered", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java#L177-L187
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java
StatementManager.getStatement
public synchronized Statement getStatement(Session session, long csid) { Statement cs = (Statement) csidMap.get(csid); if (cs == null) { return null; } if (!cs.isValid()) { String sql = (String) sqlLookup.get(csid); // revalidate with the original ...
java
public synchronized Statement getStatement(Session session, long csid) { Statement cs = (Statement) csidMap.get(csid); if (cs == null) { return null; } if (!cs.isValid()) { String sql = (String) sqlLookup.get(csid); // revalidate with the original ...
[ "public", "synchronized", "Statement", "getStatement", "(", "Session", "session", ",", "long", "csid", ")", "{", "Statement", "cs", "=", "(", "Statement", ")", "csidMap", ".", "get", "(", "csid", ")", ";", "if", "(", "cs", "==", "null", ")", "{", "retu...
Returns an existing CompiledStatement object with the given statement identifier. Returns null if the CompiledStatement object has been invalidated and cannot be recompiled @param session the session @param csid the identifier of the requested CompiledStatement object @return the requested CompiledStatement object
[ "Returns", "an", "existing", "CompiledStatement", "object", "with", "the", "given", "statement", "identifier", ".", "Returns", "null", "if", "the", "CompiledStatement", "object", "has", "been", "invalidated", "and", "cannot", "be", "recompiled" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java#L198-L226
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java
StatementManager.linkSession
private void linkSession(long csid, long sessionID) { LongKeyIntValueHashMap scsMap; scsMap = (LongKeyIntValueHashMap) sessionUseMap.get(sessionID); if (scsMap == null) { scsMap = new LongKeyIntValueHashMap(); sessionUseMap.put(sessionID, scsMap); } i...
java
private void linkSession(long csid, long sessionID) { LongKeyIntValueHashMap scsMap; scsMap = (LongKeyIntValueHashMap) sessionUseMap.get(sessionID); if (scsMap == null) { scsMap = new LongKeyIntValueHashMap(); sessionUseMap.put(sessionID, scsMap); } i...
[ "private", "void", "linkSession", "(", "long", "csid", ",", "long", "sessionID", ")", "{", "LongKeyIntValueHashMap", "scsMap", ";", "scsMap", "=", "(", "LongKeyIntValueHashMap", ")", "sessionUseMap", ".", "get", "(", "sessionID", ")", ";", "if", "(", "scsMap",...
Links a session with a registered compiled statement. If this session has not already been linked with the given statement, then the statement use count is incremented. @param csid the compiled statement identifier @param sessionID the session identifier
[ "Links", "a", "session", "with", "a", "registered", "compiled", "statement", ".", "If", "this", "session", "has", "not", "already", "been", "linked", "with", "the", "given", "statement", "then", "the", "statement", "use", "count", "is", "incremented", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java#L236-L255
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java
StatementManager.registerStatement
private long registerStatement(long csid, Statement cs) { if (csid < 0) { csid = nextID(); int schemaid = cs.getSchemaName().hashCode(); LongValueHashMap sqlMap = (LongValueHashMap) schemaMap.get(schemaid); if (sqlMap == null) { ...
java
private long registerStatement(long csid, Statement cs) { if (csid < 0) { csid = nextID(); int schemaid = cs.getSchemaName().hashCode(); LongValueHashMap sqlMap = (LongValueHashMap) schemaMap.get(schemaid); if (sqlMap == null) { ...
[ "private", "long", "registerStatement", "(", "long", "csid", ",", "Statement", "cs", ")", "{", "if", "(", "csid", "<", "0", ")", "{", "csid", "=", "nextID", "(", ")", ";", "int", "schemaid", "=", "cs", ".", "getSchemaName", "(", ")", ".", "hashCode",...
Registers a compiled statement to be managed. The only caller should be a Session that is attempting to prepare a statement for the first time or process a statement that has been invalidated due to DDL changes. @param csid existing id or negative if the statement is not yet managed @param cs The CompiledStatement to...
[ "Registers", "a", "compiled", "statement", "to", "be", "managed", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java#L269-L292
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java
StatementManager.removeSession
synchronized void removeSession(long sessionID) { LongKeyIntValueHashMap scsMap; long csid; Iterator i; scsMap = (LongKeyIntValueHashMap) sessionUseMap.remove(sessionID); if (scsMap == null) { return; } i = scsMap.ke...
java
synchronized void removeSession(long sessionID) { LongKeyIntValueHashMap scsMap; long csid; Iterator i; scsMap = (LongKeyIntValueHashMap) sessionUseMap.remove(sessionID); if (scsMap == null) { return; } i = scsMap.ke...
[ "synchronized", "void", "removeSession", "(", "long", "sessionID", ")", "{", "LongKeyIntValueHashMap", "scsMap", ";", "long", "csid", ";", "Iterator", "i", ";", "scsMap", "=", "(", "LongKeyIntValueHashMap", ")", "sessionUseMap", ".", "remove", "(", "sessionID", ...
Releases the link betwen the session and all compiled statement objects it is linked to. If any such statement is not linked with any other session, it is removed from management. @param sessionID the session identifier
[ "Releases", "the", "link", "betwen", "the", "session", "and", "all", "compiled", "statement", "objects", "it", "is", "linked", "to", ".", "If", "any", "such", "statement", "is", "not", "linked", "with", "any", "other", "session", "it", "is", "removed", "fr...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java#L362-L398
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java
StatementManager.compile
synchronized Statement compile(Session session, Result cmd) throws Throwable { String sql = cmd.getMainString(); long csid = getStatementID(session.currentSchema, sql); Statement cs = (Statement) csidMap.get(csid); if (cs == null || !cs.isV...
java
synchronized Statement compile(Session session, Result cmd) throws Throwable { String sql = cmd.getMainString(); long csid = getStatementID(session.currentSchema, sql); Statement cs = (Statement) csidMap.get(csid); if (cs == null || !cs.isV...
[ "synchronized", "Statement", "compile", "(", "Session", "session", ",", "Result", "cmd", ")", "throws", "Throwable", "{", "String", "sql", "=", "cmd", ".", "getMainString", "(", ")", ";", "long", "csid", "=", "getStatementID", "(", "session", ".", "currentSc...
Compiles an SQL statement and returns a CompiledStatement Object @param session the session @throws Throwable @return CompiledStatement
[ "Compiles", "an", "SQL", "statement", "and", "returns", "a", "CompiledStatement", "Object" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java#L407-L425
train
VoltDB/voltdb
src/frontend/org/voltdb/largequery/LargeBlockManager.java
LargeBlockManager.startupInstance
private void startupInstance() throws IOException { assert (m_blockPathMap.isEmpty()); try { clearSwapDir(); } catch (Exception e) { throw new IOException("Unable to clear large query swap directory: " + e.getMessage()); } }
java
private void startupInstance() throws IOException { assert (m_blockPathMap.isEmpty()); try { clearSwapDir(); } catch (Exception e) { throw new IOException("Unable to clear large query swap directory: " + e.getMessage()); } }
[ "private", "void", "startupInstance", "(", ")", "throws", "IOException", "{", "assert", "(", "m_blockPathMap", ".", "isEmpty", "(", ")", ")", ";", "try", "{", "clearSwapDir", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", ...
On startup, clear out the large query swap directory. @throws IOException
[ "On", "startup", "clear", "out", "the", "large", "query", "swap", "directory", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/largequery/LargeBlockManager.java#L114-L122
train
VoltDB/voltdb
src/frontend/org/voltdb/largequery/LargeBlockManager.java
LargeBlockManager.storeBlock
void storeBlock(BlockId blockId, ByteBuffer block) throws IOException { synchronized (m_accessLock) { if (m_blockPathMap.containsKey(blockId)) { throw new IllegalArgumentException("Request to store block that is already stored: " + ...
java
void storeBlock(BlockId blockId, ByteBuffer block) throws IOException { synchronized (m_accessLock) { if (m_blockPathMap.containsKey(blockId)) { throw new IllegalArgumentException("Request to store block that is already stored: " + ...
[ "void", "storeBlock", "(", "BlockId", "blockId", ",", "ByteBuffer", "block", ")", "throws", "IOException", "{", "synchronized", "(", "m_accessLock", ")", "{", "if", "(", "m_blockPathMap", ".", "containsKey", "(", "blockId", ")", ")", "{", "throw", "new", "Il...
Store the given block with the given ID to disk. @param blockId the ID of the block @param block the bytes for the block @throws IOException
[ "Store", "the", "given", "block", "with", "the", "given", "ID", "to", "disk", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/largequery/LargeBlockManager.java#L172-L191
train
VoltDB/voltdb
src/frontend/org/voltdb/largequery/LargeBlockManager.java
LargeBlockManager.loadBlock
void loadBlock(BlockId blockId, ByteBuffer block) throws IOException { synchronized (m_accessLock) { if (! m_blockPathMap.containsKey(blockId)) { throw new IllegalArgumentException("Request to load block that is not stored: " + blockId); } int origPosition = ...
java
void loadBlock(BlockId blockId, ByteBuffer block) throws IOException { synchronized (m_accessLock) { if (! m_blockPathMap.containsKey(blockId)) { throw new IllegalArgumentException("Request to load block that is not stored: " + blockId); } int origPosition = ...
[ "void", "loadBlock", "(", "BlockId", "blockId", ",", "ByteBuffer", "block", ")", "throws", "IOException", "{", "synchronized", "(", "m_accessLock", ")", "{", "if", "(", "!", "m_blockPathMap", ".", "containsKey", "(", "blockId", ")", ")", "{", "throw", "new",...
Read the block with the given ID into the given byte buffer. @param blockId block id of the block to load @param block The block to write the bytes to @return The original address of the block @throws IOException
[ "Read", "the", "block", "with", "the", "given", "ID", "into", "the", "given", "byte", "buffer", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/largequery/LargeBlockManager.java#L200-L216
train
VoltDB/voltdb
src/frontend/org/voltdb/largequery/LargeBlockManager.java
LargeBlockManager.releaseBlock
void releaseBlock(BlockId blockId) throws IOException { synchronized (m_accessLock) { if (! m_blockPathMap.containsKey(blockId)) { throw new IllegalArgumentException("Request to release block that is not stored: " + blockId); } Path blockPath = m_blockPathMap...
java
void releaseBlock(BlockId blockId) throws IOException { synchronized (m_accessLock) { if (! m_blockPathMap.containsKey(blockId)) { throw new IllegalArgumentException("Request to release block that is not stored: " + blockId); } Path blockPath = m_blockPathMap...
[ "void", "releaseBlock", "(", "BlockId", "blockId", ")", "throws", "IOException", "{", "synchronized", "(", "m_accessLock", ")", "{", "if", "(", "!", "m_blockPathMap", ".", "containsKey", "(", "blockId", ")", ")", "{", "throw", "new", "IllegalArgumentException", ...
The block with the given site id and block counter is no longer needed, so delete it from disk. @param blockId The blockId of the block to release. @throws IOException
[ "The", "block", "with", "the", "given", "site", "id", "and", "block", "counter", "is", "no", "longer", "needed", "so", "delete", "it", "from", "disk", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/largequery/LargeBlockManager.java#L223-L233
train
VoltDB/voltdb
src/frontend/org/voltdb/largequery/LargeBlockManager.java
LargeBlockManager.releaseAllBlocks
private void releaseAllBlocks() throws IOException { synchronized (m_accessLock) { Set<Map.Entry<BlockId, Path>> entries = m_blockPathMap.entrySet(); while (! entries.isEmpty()) { Map.Entry<BlockId, Path> entry = entries.iterator().next(); Files.delete(ent...
java
private void releaseAllBlocks() throws IOException { synchronized (m_accessLock) { Set<Map.Entry<BlockId, Path>> entries = m_blockPathMap.entrySet(); while (! entries.isEmpty()) { Map.Entry<BlockId, Path> entry = entries.iterator().next(); Files.delete(ent...
[ "private", "void", "releaseAllBlocks", "(", ")", "throws", "IOException", "{", "synchronized", "(", "m_accessLock", ")", "{", "Set", "<", "Map", ".", "Entry", "<", "BlockId", ",", "Path", ">", ">", "entries", "=", "m_blockPathMap", ".", "entrySet", "(", ")...
Release all the blocks that are on disk, and delete them from the map that tracks them. @throws IOException
[ "Release", "all", "the", "blocks", "that", "are", "on", "disk", "and", "delete", "them", "from", "the", "map", "that", "tracks", "them", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/largequery/LargeBlockManager.java#L240-L250
train
VoltDB/voltdb
src/frontend/org/voltdb/largequery/LargeBlockManager.java
LargeBlockManager.makeBlockPath
Path makeBlockPath(BlockId id) { String filename = id.fileNameString(); return m_largeQuerySwapPath.resolve(filename); }
java
Path makeBlockPath(BlockId id) { String filename = id.fileNameString(); return m_largeQuerySwapPath.resolve(filename); }
[ "Path", "makeBlockPath", "(", "BlockId", "id", ")", "{", "String", "filename", "=", "id", ".", "fileNameString", "(", ")", ";", "return", "m_largeQuerySwapPath", ".", "resolve", "(", "filename", ")", ";", "}" ]
Given package visibility for unit testing purposes.
[ "Given", "package", "visibility", "for", "unit", "testing", "purposes", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/largequery/LargeBlockManager.java#L254-L257
train
VoltDB/voltdb
src/frontend/org/voltdb/importclient/kinesis/KinesisStreamImporterConfig.java
KinesisStreamImporterConfig.discoverShards
public static List<Shard> discoverShards(String regionName, String streamName, String accessKey, String secretKey, String appName) { try { Region region = RegionUtils.getRegion(regionName); if (region != null) { final AWSCredentials credentials = new BasicAWSC...
java
public static List<Shard> discoverShards(String regionName, String streamName, String accessKey, String secretKey, String appName) { try { Region region = RegionUtils.getRegion(regionName); if (region != null) { final AWSCredentials credentials = new BasicAWSC...
[ "public", "static", "List", "<", "Shard", ">", "discoverShards", "(", "String", "regionName", ",", "String", "streamName", ",", "String", "accessKey", ",", "String", "secretKey", ",", "String", "appName", ")", "{", "try", "{", "Region", "region", "=", "Regio...
connect to kinesis stream to discover the shards on the stream @param regionName The region name where the stream resides @param streamName The kinesis stream name @param accessKey The user access key @param secretKey The user secret key @param appName The name of stream application @return a list of shards
[ "connect", "to", "kinesis", "stream", "to", "discover", "the", "shards", "on", "the", "stream" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importclient/kinesis/KinesisStreamImporterConfig.java#L185-L207
train
VoltDB/voltdb
src/frontend/org/voltdb/importclient/kinesis/KinesisStreamImporterConfig.java
KinesisStreamImporterConfig.getProperty
public static String getProperty(Properties props, String propertyName, String defaultValue) { String value = props.getProperty(propertyName, defaultValue).trim(); if (value.isEmpty()) { throw new IllegalArgumentException( "Property " + propertyName + " is missing in Kine...
java
public static String getProperty(Properties props, String propertyName, String defaultValue) { String value = props.getProperty(propertyName, defaultValue).trim(); if (value.isEmpty()) { throw new IllegalArgumentException( "Property " + propertyName + " is missing in Kine...
[ "public", "static", "String", "getProperty", "(", "Properties", "props", ",", "String", "propertyName", ",", "String", "defaultValue", ")", "{", "String", "value", "=", "props", ".", "getProperty", "(", "propertyName", ",", "defaultValue", ")", ".", "trim", "(...
get property value. If no value is available, throw IllegalArgumentException @param props The properties @param propertyName property name @param defaultValue The default value @return property value
[ "get", "property", "value", ".", "If", "no", "value", "is", "available", "throw", "IllegalArgumentException" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importclient/kinesis/KinesisStreamImporterConfig.java#L216-L223
train
VoltDB/voltdb
src/frontend/org/voltdb/importclient/kinesis/KinesisStreamImporterConfig.java
KinesisStreamImporterConfig.getPropertyAsLong
public static long getPropertyAsLong(Properties props, String propertyName, long defaultValue) { String value = props.getProperty(propertyName, "").trim(); if (value.isEmpty()) { return defaultValue; } try { long val = Long.parseLong(value); if (val <=...
java
public static long getPropertyAsLong(Properties props, String propertyName, long defaultValue) { String value = props.getProperty(propertyName, "").trim(); if (value.isEmpty()) { return defaultValue; } try { long val = Long.parseLong(value); if (val <=...
[ "public", "static", "long", "getPropertyAsLong", "(", "Properties", "props", ",", "String", "propertyName", ",", "long", "defaultValue", ")", "{", "String", "value", "=", "props", ".", "getProperty", "(", "propertyName", ",", "\"\"", ")", ".", "trim", "(", "...
get property value as long. @param props The properties @param propertyName property name @param defaultValue The default value @return property value
[ "get", "property", "value", "as", "long", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importclient/kinesis/KinesisStreamImporterConfig.java#L232-L248
train
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/DataNode.java
DataNode.addChild
public synchronized boolean addChild(String child) { if (children == null) { // let's be conservative on the typical number of children children = new HashSet<String>(8); } return children.add(child); }
java
public synchronized boolean addChild(String child) { if (children == null) { // let's be conservative on the typical number of children children = new HashSet<String>(8); } return children.add(child); }
[ "public", "synchronized", "boolean", "addChild", "(", "String", "child", ")", "{", "if", "(", "children", "==", "null", ")", "{", "// let's be conservative on the typical number of children", "children", "=", "new", "HashSet", "<", "String", ">", "(", "8", ")", ...
Method that inserts a child into the children set @param child to be inserted @return true if this set did not already contain the specified element
[ "Method", "that", "inserts", "a", "child", "into", "the", "children", "set" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/DataNode.java#L96-L102
train
VoltDB/voltdb
src/frontend/org/voltdb/utils/VoltBaseServlet.java
VoltBaseServlet.getHostHeader
protected String getHostHeader() { if (m_hostHeader != null) { return m_hostHeader; } if (!httpAdminListener.m_publicIntf.isEmpty()) { m_hostHeader = httpAdminListener.m_publicIntf; return m_hostHeader; } InetAddress addr = null; int ...
java
protected String getHostHeader() { if (m_hostHeader != null) { return m_hostHeader; } if (!httpAdminListener.m_publicIntf.isEmpty()) { m_hostHeader = httpAdminListener.m_publicIntf; return m_hostHeader; } InetAddress addr = null; int ...
[ "protected", "String", "getHostHeader", "(", ")", "{", "if", "(", "m_hostHeader", "!=", "null", ")", "{", "return", "m_hostHeader", ";", "}", "if", "(", "!", "httpAdminListener", ".", "m_publicIntf", ".", "isEmpty", "(", ")", ")", "{", "m_hostHeader", "=",...
like behind a NATed network.
[ "like", "behind", "a", "NATed", "network", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/VoltBaseServlet.java#L65-L94
train
VoltDB/voltdb
src/frontend/org/voltdb/utils/VoltBaseServlet.java
VoltBaseServlet.handleReportPage
void handleReportPage(HttpServletRequest request, HttpServletResponse response) { try { String report = ReportMaker.liveReport(); response.setContentType(HTML_CONTENT_TYPE); response.setStatus(HttpServletResponse.SC_OK); response.getWriter().print(report); ...
java
void handleReportPage(HttpServletRequest request, HttpServletResponse response) { try { String report = ReportMaker.liveReport(); response.setContentType(HTML_CONTENT_TYPE); response.setStatus(HttpServletResponse.SC_OK); response.getWriter().print(report); ...
[ "void", "handleReportPage", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "{", "try", "{", "String", "report", "=", "ReportMaker", ".", "liveReport", "(", ")", ";", "response", ".", "setContentType", "(", "HTML_CONTENT_TYPE", "...
Draw the catalog report page, mostly by pulling it from the JAR.
[ "Draw", "the", "catalog", "report", "page", "mostly", "by", "pulling", "it", "from", "the", "JAR", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/VoltBaseServlet.java#L118-L129
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java
HsqlProperties.getIntegerProperty
public int getIntegerProperty(String key, int defaultValue, int[] values) { String prop = getProperty(key); int value = defaultValue; try { if (prop != null) { value = Integer.parseInt(prop); } } catch (NumberFormatException e) {} if...
java
public int getIntegerProperty(String key, int defaultValue, int[] values) { String prop = getProperty(key); int value = defaultValue; try { if (prop != null) { value = Integer.parseInt(prop); } } catch (NumberFormatException e) {} if...
[ "public", "int", "getIntegerProperty", "(", "String", "key", ",", "int", "defaultValue", ",", "int", "[", "]", "values", ")", "{", "String", "prop", "=", "getProperty", "(", "key", ")", ";", "int", "value", "=", "defaultValue", ";", "try", "{", "if", "...
Choice limited to values list, defaultValue must be in the values list.
[ "Choice", "limited", "to", "values", "list", "defaultValue", "must", "be", "in", "the", "values", "list", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java#L175-L191
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java
HsqlProperties.save
public void save() throws Exception { if (fileName == null || fileName.length() == 0) { throw new java.io.FileNotFoundException( Error.getMessage(ErrorCode.M_HsqlProperties_load)); } String filestring = fileName + ".properties"; save(filestring); }
java
public void save() throws Exception { if (fileName == null || fileName.length() == 0) { throw new java.io.FileNotFoundException( Error.getMessage(ErrorCode.M_HsqlProperties_load)); } String filestring = fileName + ".properties"; save(filestring); }
[ "public", "void", "save", "(", ")", "throws", "Exception", "{", "if", "(", "fileName", "==", "null", "||", "fileName", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "java", ".", "io", ".", "FileNotFoundException", "(", "Error", ".", "...
Saves the properties.
[ "Saves", "the", "properties", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java#L276-L286
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java
HsqlProperties.save
public void save(String fileString) throws Exception { // oj@openoffice.org fa.createParentDirs(fileString); OutputStream fos = fa.openOutputStreamElement(fileString); FileAccess.FileSync outDescriptor = fa.getFileSync(fos); JavaSystem.saveProperties( stringProps, ...
java
public void save(String fileString) throws Exception { // oj@openoffice.org fa.createParentDirs(fileString); OutputStream fos = fa.openOutputStreamElement(fileString); FileAccess.FileSync outDescriptor = fa.getFileSync(fos); JavaSystem.saveProperties( stringProps, ...
[ "public", "void", "save", "(", "String", "fileString", ")", "throws", "Exception", "{", "// oj@openoffice.org", "fa", ".", "createParentDirs", "(", "fileString", ")", ";", "OutputStream", "fos", "=", "fa", ".", "openOutputStreamElement", "(", "fileString", ")", ...
Saves the properties using JDK2 method if present, otherwise JDK1.
[ "Saves", "the", "properties", "using", "JDK2", "method", "if", "present", "otherwise", "JDK1", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java#L291-L308
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java
HsqlProperties.addError
private void addError(int code, String key) { errorCodes = (int[]) ArrayUtil.resizeArray(errorCodes, errorCodes.length + 1); errorKeys = (String[]) ArrayUtil.resizeArray(errorKeys, errorKeys.length + 1); errorCodes[errorCodes.length - 1] = code; errorKeys...
java
private void addError(int code, String key) { errorCodes = (int[]) ArrayUtil.resizeArray(errorCodes, errorCodes.length + 1); errorKeys = (String[]) ArrayUtil.resizeArray(errorKeys, errorKeys.length + 1); errorCodes[errorCodes.length - 1] = code; errorKeys...
[ "private", "void", "addError", "(", "int", "code", ",", "String", "key", ")", "{", "errorCodes", "=", "(", "int", "[", "]", ")", "ArrayUtil", ".", "resizeArray", "(", "errorCodes", ",", "errorCodes", ".", "length", "+", "1", ")", ";", "errorKeys", "=",...
Adds the error code and the key to the list of errors. This list is populated during construction or addition of elements and is used outside this class to act upon the errors.
[ "Adds", "the", "error", "code", "and", "the", "key", "to", "the", "list", "of", "errors", ".", "This", "list", "is", "populated", "during", "construction", "or", "addition", "of", "elements", "and", "is", "used", "outside", "this", "class", "to", "act", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java#L315-L323
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/rights/User.java
User.checkPassword
public void checkPassword(String value) { if (!value.equals(password)) { throw Error.error(ErrorCode.X_28000); } }
java
public void checkPassword(String value) { if (!value.equals(password)) { throw Error.error(ErrorCode.X_28000); } }
[ "public", "void", "checkPassword", "(", "String", "value", ")", "{", "if", "(", "!", "value", ".", "equals", "(", "password", ")", ")", "{", "throw", "Error", ".", "error", "(", "ErrorCode", ".", "X_28000", ")", ";", "}", "}" ]
Checks if this object's password attibute equals specified argument, else throws.
[ "Checks", "if", "this", "object", "s", "password", "attibute", "equals", "specified", "argument", "else", "throws", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/User.java#L94-L99
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/rights/User.java
User.getCreateUserSQL
public String getCreateUserSQL() { StringBuffer sb = new StringBuffer(64); sb.append(Tokens.T_CREATE).append(' '); sb.append(Tokens.T_USER).append(' '); sb.append(getStatementName()).append(' '); sb.append(Tokens.T_PASSWORD).append(' '); sb.append(StringConverter.toQuot...
java
public String getCreateUserSQL() { StringBuffer sb = new StringBuffer(64); sb.append(Tokens.T_CREATE).append(' '); sb.append(Tokens.T_USER).append(' '); sb.append(getStatementName()).append(' '); sb.append(Tokens.T_PASSWORD).append(' '); sb.append(StringConverter.toQuot...
[ "public", "String", "getCreateUserSQL", "(", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", "64", ")", ";", "sb", ".", "append", "(", "Tokens", ".", "T_CREATE", ")", ".", "append", "(", "'", "'", ")", ";", "sb", ".", "append", "(", ...
Returns the DDL string sequence that creates this user.
[ "Returns", "the", "DDL", "string", "sequence", "that", "creates", "this", "user", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/User.java#L177-L188
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/rights/User.java
User.getConnectUserSQL
public String getConnectUserSQL() { StringBuffer sb = new StringBuffer(); sb.append(Tokens.T_SET).append(' '); sb.append(Tokens.T_SESSION).append(' '); sb.append(Tokens.T_AUTHORIZATION).append(' '); sb.append(StringConverter.toQuotedString(getNameString(), '\'', true)); ...
java
public String getConnectUserSQL() { StringBuffer sb = new StringBuffer(); sb.append(Tokens.T_SET).append(' '); sb.append(Tokens.T_SESSION).append(' '); sb.append(Tokens.T_AUTHORIZATION).append(' '); sb.append(StringConverter.toQuotedString(getNameString(), '\'', true)); ...
[ "public", "String", "getConnectUserSQL", "(", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", ")", ";", "sb", ".", "append", "(", "Tokens", ".", "T_SET", ")", ".", "append", "(", "'", "'", ")", ";", "sb", ".", "append", "(", "Tokens"...
Retrieves the redo log character sequence for connecting this user @return the redo log character sequence for connecting this user
[ "Retrieves", "the", "redo", "log", "character", "sequence", "for", "connecting", "this", "user" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/User.java#L197-L207
train
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/thirdparty/publicsuffix/TrieParser.java
TrieParser.parseTrie
static ImmutableMap<String, PublicSuffixType> parseTrie(CharSequence encoded) { ImmutableMap.Builder<String, PublicSuffixType> builder = ImmutableMap.builder(); int encodedLen = encoded.length(); int idx = 0; while (idx < encodedLen) { idx += doParseTrieToBuilder( Lists.<Ch...
java
static ImmutableMap<String, PublicSuffixType> parseTrie(CharSequence encoded) { ImmutableMap.Builder<String, PublicSuffixType> builder = ImmutableMap.builder(); int encodedLen = encoded.length(); int idx = 0; while (idx < encodedLen) { idx += doParseTrieToBuilder( Lists.<Ch...
[ "static", "ImmutableMap", "<", "String", ",", "PublicSuffixType", ">", "parseTrie", "(", "CharSequence", "encoded", ")", "{", "ImmutableMap", ".", "Builder", "<", "String", ",", "PublicSuffixType", ">", "builder", "=", "ImmutableMap", ".", "builder", "(", ")", ...
Parses a serialized trie representation of a map of reversed public suffixes into an immutable map of public suffixes.
[ "Parses", "a", "serialized", "trie", "representation", "of", "a", "map", "of", "reversed", "public", "suffixes", "into", "an", "immutable", "map", "of", "public", "suffixes", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/thirdparty/publicsuffix/TrieParser.java#L36-L46
train
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/thirdparty/publicsuffix/TrieParser.java
TrieParser.doParseTrieToBuilder
private static int doParseTrieToBuilder( List<CharSequence> stack, CharSequence encoded, ImmutableMap.Builder<String, PublicSuffixType> builder) { int encodedLen = encoded.length(); int idx = 0; char c = '\0'; // Read all of the characters for this node. for (; idx < encodedLen; ...
java
private static int doParseTrieToBuilder( List<CharSequence> stack, CharSequence encoded, ImmutableMap.Builder<String, PublicSuffixType> builder) { int encodedLen = encoded.length(); int idx = 0; char c = '\0'; // Read all of the characters for this node. for (; idx < encodedLen; ...
[ "private", "static", "int", "doParseTrieToBuilder", "(", "List", "<", "CharSequence", ">", "stack", ",", "CharSequence", "encoded", ",", "ImmutableMap", ".", "Builder", "<", "String", ",", "PublicSuffixType", ">", "builder", ")", "{", "int", "encodedLen", "=", ...
Parses a trie node and returns the number of characters consumed. @param stack The prefixes that preceed the characters represented by this node. Each entry of the stack is in reverse order. @param encoded The serialized trie. @param builder A map builder to which all entries will be added. @return The number of chara...
[ "Parses", "a", "trie", "node", "and", "returns", "the", "number", "of", "characters", "consumed", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/thirdparty/publicsuffix/TrieParser.java#L57-L101
train
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportManager.java
ExportManager.initialize
public static synchronized void initialize( int myHostId, CatalogContext catalogContext, boolean isRejoin, boolean forceCreate, HostMessenger messenger, List<Pair<Integer, Integer>> partitions) throws ExportManager.SetupException { ...
java
public static synchronized void initialize( int myHostId, CatalogContext catalogContext, boolean isRejoin, boolean forceCreate, HostMessenger messenger, List<Pair<Integer, Integer>> partitions) throws ExportManager.SetupException { ...
[ "public", "static", "synchronized", "void", "initialize", "(", "int", "myHostId", ",", "CatalogContext", "catalogContext", ",", "boolean", "isRejoin", ",", "boolean", "forceCreate", ",", "HostMessenger", "messenger", ",", "List", "<", "Pair", "<", "Integer", ",", ...
FIXME - this synchronizes on the ExportManager class, but everyone else synchronizes on the instance.
[ "FIXME", "-", "this", "synchronizes", "on", "the", "ExportManager", "class", "but", "everyone", "else", "synchronizes", "on", "the", "instance", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportManager.java#L250-L270
train
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportManager.java
ExportManager.initialize
private void initialize(CatalogContext catalogContext, List<Pair<Integer, Integer>> localPartitionsToSites, boolean isRejoin) { try { CatalogMap<Connector> connectors = CatalogUtil.getConnectors(catalogContext); if (exportLog.isDebugEnabled()) { exportLog.debu...
java
private void initialize(CatalogContext catalogContext, List<Pair<Integer, Integer>> localPartitionsToSites, boolean isRejoin) { try { CatalogMap<Connector> connectors = CatalogUtil.getConnectors(catalogContext); if (exportLog.isDebugEnabled()) { exportLog.debu...
[ "private", "void", "initialize", "(", "CatalogContext", "catalogContext", ",", "List", "<", "Pair", "<", "Integer", ",", "Integer", ">", ">", "localPartitionsToSites", ",", "boolean", "isRejoin", ")", "{", "try", "{", "CatalogMap", "<", "Connector", ">", "conn...
Creates the initial export processor if export is enabled
[ "Creates", "the", "initial", "export", "processor", "if", "export", "is", "enabled" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportManager.java#L454-L489
train
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportManager.java
ExportManager.swapWithNewProcessor
private void swapWithNewProcessor( final CatalogContext catalogContext, ExportGeneration generation, CatalogMap<Connector> connectors, List<Pair<Integer, Integer>> partitions, Map<String, Pair<Properties, Set<String>>> config) { ExportDataProcessor...
java
private void swapWithNewProcessor( final CatalogContext catalogContext, ExportGeneration generation, CatalogMap<Connector> connectors, List<Pair<Integer, Integer>> partitions, Map<String, Pair<Properties, Set<String>>> config) { ExportDataProcessor...
[ "private", "void", "swapWithNewProcessor", "(", "final", "CatalogContext", "catalogContext", ",", "ExportGeneration", "generation", ",", "CatalogMap", "<", "Connector", ">", "connectors", ",", "List", "<", "Pair", "<", "Integer", ",", "Integer", ">", ">", "partiti...
remove and install new processor
[ "remove", "and", "install", "new", "processor" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportManager.java#L588-L629
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/ParsedInsertStmt.java
ParsedInsertStmt.calculateContentDeterminismMessage
@Override public String calculateContentDeterminismMessage() { String ans = getContentDeterminismMessage(); if (ans != null) { return ans; } if (m_subquery != null) { updateContentDeterminismMessage(m_subquery.calculateContentDeterminismMessage()); ...
java
@Override public String calculateContentDeterminismMessage() { String ans = getContentDeterminismMessage(); if (ans != null) { return ans; } if (m_subquery != null) { updateContentDeterminismMessage(m_subquery.calculateContentDeterminismMessage()); ...
[ "@", "Override", "public", "String", "calculateContentDeterminismMessage", "(", ")", "{", "String", "ans", "=", "getContentDeterminismMessage", "(", ")", ";", "if", "(", "ans", "!=", "null", ")", "{", "return", "ans", ";", "}", "if", "(", "m_subquery", "!=",...
Return the content determinism string of the subquery if there is one.
[ "Return", "the", "content", "determinism", "string", "of", "the", "subquery", "if", "there", "is", "one", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedInsertStmt.java#L257-L277
train
VoltDB/voltdb
src/frontend/org/voltdb/expressions/WindowFunctionExpression.java
WindowFunctionExpression.getSortIndexOfOrderByExpression
public int getSortIndexOfOrderByExpression(AbstractExpression partitionByExpression) { for (int idx = 0; idx < m_orderByExpressions.size(); ++idx) { if (m_orderByExpressions.get(idx).equals(partitionByExpression)) { return idx; } } return -1; }
java
public int getSortIndexOfOrderByExpression(AbstractExpression partitionByExpression) { for (int idx = 0; idx < m_orderByExpressions.size(); ++idx) { if (m_orderByExpressions.get(idx).equals(partitionByExpression)) { return idx; } } return -1; }
[ "public", "int", "getSortIndexOfOrderByExpression", "(", "AbstractExpression", "partitionByExpression", ")", "{", "for", "(", "int", "idx", "=", "0", ";", "idx", "<", "m_orderByExpressions", ".", "size", "(", ")", ";", "++", "idx", ")", "{", "if", "(", "m_or...
Return the index of the given partition by expression in the order by list. This is used when trying to rationalize partition by and order by expressions. @param partitionByExpression @return
[ "Return", "the", "index", "of", "the", "given", "partition", "by", "expression", "in", "the", "order", "by", "list", ".", "This", "is", "used", "when", "trying", "to", "rationalize", "partition", "by", "and", "order", "by", "expressions", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/WindowFunctionExpression.java#L212-L219
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/MVQueryRewriter.java
MVQueryRewriter.rewriteSelectStmt
private boolean rewriteSelectStmt() { if (m_mvi != null) { final Table view = m_mvi.getDest(); final String viewName = view.getTypeName(); // Get the map of select stmt's display column index -> view table (column name, column index) m_selectStmt.getFinalProjectio...
java
private boolean rewriteSelectStmt() { if (m_mvi != null) { final Table view = m_mvi.getDest(); final String viewName = view.getTypeName(); // Get the map of select stmt's display column index -> view table (column name, column index) m_selectStmt.getFinalProjectio...
[ "private", "boolean", "rewriteSelectStmt", "(", ")", "{", "if", "(", "m_mvi", "!=", "null", ")", "{", "final", "Table", "view", "=", "m_mvi", ".", "getDest", "(", ")", ";", "final", "String", "viewName", "=", "view", ".", "getTypeName", "(", ")", ";", ...
Try to rewrite SELECT stmt if there is a matching materialized view. @return if SELECT stmt had been rewritten. Updates SELECT stmt transactionally.
[ "Try", "to", "rewrite", "SELECT", "stmt", "if", "there", "is", "a", "matching", "materialized", "view", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/MVQueryRewriter.java#L128-L152
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/MVQueryRewriter.java
MVQueryRewriter.rewriteTableAlias
private static boolean rewriteTableAlias(StmtSubqueryScan scan) { final AbstractParsedStmt stmt = scan.getSubqueryStmt(); return stmt instanceof ParsedSelectStmt && (new MVQueryRewriter((ParsedSelectStmt)stmt)).rewrite(); }
java
private static boolean rewriteTableAlias(StmtSubqueryScan scan) { final AbstractParsedStmt stmt = scan.getSubqueryStmt(); return stmt instanceof ParsedSelectStmt && (new MVQueryRewriter((ParsedSelectStmt)stmt)).rewrite(); }
[ "private", "static", "boolean", "rewriteTableAlias", "(", "StmtSubqueryScan", "scan", ")", "{", "final", "AbstractParsedStmt", "stmt", "=", "scan", ".", "getSubqueryStmt", "(", ")", ";", "return", "stmt", "instanceof", "ParsedSelectStmt", "&&", "(", "new", "MVQuer...
Checks for any opportunity to rewrite sub-queries @param scan target subquery @return whether rewritten was applied
[ "Checks", "for", "any", "opportunity", "to", "rewrite", "sub", "-", "queries" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/MVQueryRewriter.java#L159-L162
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/MVQueryRewriter.java
MVQueryRewriter.extractTVEIndices
private static List<Integer> extractTVEIndices(AbstractExpression e, List<Integer> accum) { if (e != null) { if (e instanceof TupleValueExpression) { accum.add(((TupleValueExpression) e).getColumnIndex()); } else { extractTVEIndices(e.getRight(), extractTV...
java
private static List<Integer> extractTVEIndices(AbstractExpression e, List<Integer> accum) { if (e != null) { if (e instanceof TupleValueExpression) { accum.add(((TupleValueExpression) e).getColumnIndex()); } else { extractTVEIndices(e.getRight(), extractTV...
[ "private", "static", "List", "<", "Integer", ">", "extractTVEIndices", "(", "AbstractExpression", "e", ",", "List", "<", "Integer", ">", "accum", ")", "{", "if", "(", "e", "!=", "null", ")", "{", "if", "(", "e", "instanceof", "TupleValueExpression", ")", ...
Helper method to extract all TVE column indices from an expression. @param e source expression to check/extract @param accum accumulator @return accumulated indices.
[ "Helper", "method", "to", "extract", "all", "TVE", "column", "indices", "from", "an", "expression", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/MVQueryRewriter.java#L208-L220
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/MVQueryRewriter.java
MVQueryRewriter.gbyMatches
private Map<Pair<String, Integer>, Pair<String, Integer>> gbyMatches(MaterializedViewInfo mv) { final FilterMatcher filter = new FilterMatcher(m_selectStmt.m_joinTree.getJoinExpression(), predicate_of(mv)); // *** Matching criteria/order: *** // 1. Filters match; // 2. Group-by-columns'...
java
private Map<Pair<String, Integer>, Pair<String, Integer>> gbyMatches(MaterializedViewInfo mv) { final FilterMatcher filter = new FilterMatcher(m_selectStmt.m_joinTree.getJoinExpression(), predicate_of(mv)); // *** Matching criteria/order: *** // 1. Filters match; // 2. Group-by-columns'...
[ "private", "Map", "<", "Pair", "<", "String", ",", "Integer", ">", ",", "Pair", "<", "String", ",", "Integer", ">", ">", "gbyMatches", "(", "MaterializedViewInfo", "mv", ")", "{", "final", "FilterMatcher", "filter", "=", "new", "FilterMatcher", "(", "m_sel...
Apply matching rules of SELECT stmt against a materialized view, and gives back column relationship between the two. @pre !m_stmt.groupByColumns().isEmpty() -- guarded by constructor: m_stmt.isGrouped() @param mv target materialized view @return the map of (select stmt's display column name, select stmt's display colum...
[ "Apply", "matching", "rules", "of", "SELECT", "stmt", "against", "a", "materialized", "view", "and", "gives", "back", "column", "relationship", "between", "the", "two", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/MVQueryRewriter.java#L249-L262
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/MVQueryRewriter.java
MVQueryRewriter.getMviAndViews
private static Map<MaterializedViewInfo, Table> getMviAndViews(List<Table> tbls) { return tbls.stream().flatMap(tbl -> StreamSupport.stream(((Iterable<MaterializedViewInfo>) () -> tbl.getViews().iterator()).spliterator(), false) .map(mv -> Pair.of(mv, mv.getDest()))) ...
java
private static Map<MaterializedViewInfo, Table> getMviAndViews(List<Table> tbls) { return tbls.stream().flatMap(tbl -> StreamSupport.stream(((Iterable<MaterializedViewInfo>) () -> tbl.getViews().iterator()).spliterator(), false) .map(mv -> Pair.of(mv, mv.getDest()))) ...
[ "private", "static", "Map", "<", "MaterializedViewInfo", ",", "Table", ">", "getMviAndViews", "(", "List", "<", "Table", ">", "tbls", ")", "{", "return", "tbls", ".", "stream", "(", ")", ".", "flatMap", "(", "tbl", "->", "StreamSupport", ".", "stream", "...
returns all materialized view info => view table from table list
[ "returns", "all", "materialized", "view", "info", "=", ">", "view", "table", "from", "table", "list" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/MVQueryRewriter.java#L361-L366
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/MVQueryRewriter.java
MVQueryRewriter.transformExpressionRidofPVE
private static AbstractExpression transformExpressionRidofPVE(AbstractExpression src) { AbstractExpression left = src.getLeft(), right = src.getRight(); if (left != null) { left = transformExpressionRidofPVE(left); } if (right != null) { right = transformExpressio...
java
private static AbstractExpression transformExpressionRidofPVE(AbstractExpression src) { AbstractExpression left = src.getLeft(), right = src.getRight(); if (left != null) { left = transformExpressionRidofPVE(left); } if (right != null) { right = transformExpressio...
[ "private", "static", "AbstractExpression", "transformExpressionRidofPVE", "(", "AbstractExpression", "src", ")", "{", "AbstractExpression", "left", "=", "src", ".", "getLeft", "(", ")", ",", "right", "=", "src", ".", "getRight", "(", ")", ";", "if", "(", "left...
For scope of ENG-2878, caching would not cause this trouble because parameter
[ "For", "scope", "of", "ENG", "-", "2878", "caching", "would", "not", "cause", "this", "trouble", "because", "parameter" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/MVQueryRewriter.java#L370-L388
train
VoltDB/voltdb
src/frontend/org/voltdb/planner/MVQueryRewriter.java
MVQueryRewriter.getGbyExpressions
private static List<AbstractExpression> getGbyExpressions(MaterializedViewInfo mv) { try { return AbstractExpression.fromJSONArrayString(mv.getGroupbyexpressionsjson(), null); } catch (JSONException e) { return new ArrayList<>(); } }
java
private static List<AbstractExpression> getGbyExpressions(MaterializedViewInfo mv) { try { return AbstractExpression.fromJSONArrayString(mv.getGroupbyexpressionsjson(), null); } catch (JSONException e) { return new ArrayList<>(); } }
[ "private", "static", "List", "<", "AbstractExpression", ">", "getGbyExpressions", "(", "MaterializedViewInfo", "mv", ")", "{", "try", "{", "return", "AbstractExpression", ".", "fromJSONArrayString", "(", "mv", ".", "getGroupbyexpressionsjson", "(", ")", ",", "null",...
Get group-by expression @param mv @return
[ "Get", "group", "-", "by", "expression" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/MVQueryRewriter.java#L404-L410
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpScheduler.java
MpScheduler.isNpTxn
private boolean isNpTxn(Iv2InitiateTaskMessage msg) { return msg.getStoredProcedureName().startsWith("@") && msg.getStoredProcedureName().equalsIgnoreCase("@BalancePartitions") && (byte) msg.getParameters()[1] != 1; // clearIndex is MP, normal rebalance is NP }
java
private boolean isNpTxn(Iv2InitiateTaskMessage msg) { return msg.getStoredProcedureName().startsWith("@") && msg.getStoredProcedureName().equalsIgnoreCase("@BalancePartitions") && (byte) msg.getParameters()[1] != 1; // clearIndex is MP, normal rebalance is NP }
[ "private", "boolean", "isNpTxn", "(", "Iv2InitiateTaskMessage", "msg", ")", "{", "return", "msg", ".", "getStoredProcedureName", "(", ")", ".", "startsWith", "(", "\"@\"", ")", "&&", "msg", ".", "getStoredProcedureName", "(", ")", ".", "equalsIgnoreCase", "(", ...
Hacky way to only run @BalancePartitions as n-partition transactions for now. @return true if it's an n-partition transaction
[ "Hacky", "way", "to", "only", "run" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpScheduler.java#L398-L403
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpScheduler.java
MpScheduler.getBalancePartitions
private Set<Integer> getBalancePartitions(Iv2InitiateTaskMessage msg) { try { JSONObject jsObj = new JSONObject((String) msg.getParameters()[0]); BalancePartitionsRequest request = new BalancePartitionsRequest(jsObj); return Sets.newHashSet(request.partitionPairs.get(0)....
java
private Set<Integer> getBalancePartitions(Iv2InitiateTaskMessage msg) { try { JSONObject jsObj = new JSONObject((String) msg.getParameters()[0]); BalancePartitionsRequest request = new BalancePartitionsRequest(jsObj); return Sets.newHashSet(request.partitionPairs.get(0)....
[ "private", "Set", "<", "Integer", ">", "getBalancePartitions", "(", "Iv2InitiateTaskMessage", "msg", ")", "{", "try", "{", "JSONObject", "jsObj", "=", "new", "JSONObject", "(", "(", "String", ")", "msg", ".", "getParameters", "(", ")", "[", "0", "]", ")", ...
Extract the two involved partitions from the @BalancePartitions request.
[ "Extract", "the", "two", "involved", "partitions", "from", "the" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpScheduler.java#L408-L420
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpScheduler.java
MpScheduler.handleInitiateResponseMessage
public void handleInitiateResponseMessage(InitiateResponseMessage message) { final VoltTrace.TraceEventBatch traceLog = VoltTrace.log(VoltTrace.Category.MPI); if (traceLog != null) { traceLog.add(() -> VoltTrace.endAsync("initmp", message.getTxnId())); } DuplicateCounter...
java
public void handleInitiateResponseMessage(InitiateResponseMessage message) { final VoltTrace.TraceEventBatch traceLog = VoltTrace.log(VoltTrace.Category.MPI); if (traceLog != null) { traceLog.add(() -> VoltTrace.endAsync("initmp", message.getTxnId())); } DuplicateCounter...
[ "public", "void", "handleInitiateResponseMessage", "(", "InitiateResponseMessage", "message", ")", "{", "final", "VoltTrace", ".", "TraceEventBatch", "traceLog", "=", "VoltTrace", ".", "log", "(", "VoltTrace", ".", "Category", ".", "MPI", ")", ";", "if", "(", "t...
see all of these messages and control their transmission.
[ "see", "all", "of", "these", "messages", "and", "control", "their", "transmission", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpScheduler.java#L490-L560
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpScheduler.java
MpScheduler.handleEOLMessage
public void handleEOLMessage() { Iv2EndOfLogMessage msg = new Iv2EndOfLogMessage(m_partitionId); MPIEndOfLogTransactionState txnState = new MPIEndOfLogTransactionState(msg); MPIEndOfLogTask task = new MPIEndOfLogTask(m_mailbox, m_pendingTasks, ...
java
public void handleEOLMessage() { Iv2EndOfLogMessage msg = new Iv2EndOfLogMessage(m_partitionId); MPIEndOfLogTransactionState txnState = new MPIEndOfLogTransactionState(msg); MPIEndOfLogTask task = new MPIEndOfLogTask(m_mailbox, m_pendingTasks, ...
[ "public", "void", "handleEOLMessage", "(", ")", "{", "Iv2EndOfLogMessage", "msg", "=", "new", "Iv2EndOfLogMessage", "(", "m_partitionId", ")", ";", "MPIEndOfLogTransactionState", "txnState", "=", "new", "MPIEndOfLogTransactionState", "(", "msg", ")", ";", "MPIEndOfLog...
Inject a task into the transaction task queue to flush it. When it executes, it will send out MPI end of log messages to all partition initiators.
[ "Inject", "a", "task", "into", "the", "transaction", "task", "queue", "to", "flush", "it", ".", "When", "it", "executes", "it", "will", "send", "out", "MPI", "end", "of", "log", "messages", "to", "all", "partition", "initiators", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpScheduler.java#L604-L611
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpScheduler.java
MpScheduler.loadNpProcedureTaskClass
private static ProClass<MpProcedureTask> loadNpProcedureTaskClass() { return ProClass .<MpProcedureTask>load("org.voltdb.iv2.NpProcedureTask", "N-Partition", MiscUtils.isPro() ? ProClass.HANDLER_LOG : ProClass.HANDLER_IGNORE) .errorHandler(tmLog::error...
java
private static ProClass<MpProcedureTask> loadNpProcedureTaskClass() { return ProClass .<MpProcedureTask>load("org.voltdb.iv2.NpProcedureTask", "N-Partition", MiscUtils.isPro() ? ProClass.HANDLER_LOG : ProClass.HANDLER_IGNORE) .errorHandler(tmLog::error...
[ "private", "static", "ProClass", "<", "MpProcedureTask", ">", "loadNpProcedureTaskClass", "(", ")", "{", "return", "ProClass", ".", "<", "MpProcedureTask", ">", "load", "(", "\"org.voltdb.iv2.NpProcedureTask\"", ",", "\"N-Partition\"", ",", "MiscUtils", ".", "isPro", ...
Load the pro class for n-partition transactions. @return null if running in community or failed to load the class
[ "Load", "the", "pro", "class", "for", "n", "-", "partition", "transactions", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpScheduler.java#L627-L635
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpScheduler.java
MpScheduler.safeAddToDuplicateCounterMap
void safeAddToDuplicateCounterMap(long dpKey, DuplicateCounter counter) { DuplicateCounter existingDC = m_duplicateCounters.get(dpKey); if (existingDC != null) { // this is a collision and is bad existingDC.logWithCollidingDuplicateCounters(counter); VoltDB.crashGloba...
java
void safeAddToDuplicateCounterMap(long dpKey, DuplicateCounter counter) { DuplicateCounter existingDC = m_duplicateCounters.get(dpKey); if (existingDC != null) { // this is a collision and is bad existingDC.logWithCollidingDuplicateCounters(counter); VoltDB.crashGloba...
[ "void", "safeAddToDuplicateCounterMap", "(", "long", "dpKey", ",", "DuplicateCounter", "counter", ")", "{", "DuplicateCounter", "existingDC", "=", "m_duplicateCounters", ".", "get", "(", "dpKey", ")", ";", "if", "(", "existingDC", "!=", "null", ")", "{", "// thi...
Just using "put" on the dup counter map is unsafe. It won't detect the case where keys collide from two different transactions.
[ "Just", "using", "put", "on", "the", "dup", "counter", "map", "is", "unsafe", ".", "It", "won", "t", "detect", "the", "case", "where", "keys", "collide", "from", "two", "different", "transactions", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpScheduler.java#L641-L651
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/dbinfo/DatabaseInformationFull.java
DatabaseInformationFull.ADMINISTRABLE_ROLE_AUTHORIZATIONS
Table ADMINISTRABLE_ROLE_AUTHORIZATIONS() { Table t = sysTables[ADMINISTRABLE_ROLE_AUTHORIZATIONS]; if (t == null) { t = createBlankTable( sysTableHsqlNames[ADMINISTRABLE_ROLE_AUTHORIZATIONS]); addColumn(t, "GRANTEE", SQL_IDENTIFIER); addColumn(t, "...
java
Table ADMINISTRABLE_ROLE_AUTHORIZATIONS() { Table t = sysTables[ADMINISTRABLE_ROLE_AUTHORIZATIONS]; if (t == null) { t = createBlankTable( sysTableHsqlNames[ADMINISTRABLE_ROLE_AUTHORIZATIONS]); addColumn(t, "GRANTEE", SQL_IDENTIFIER); addColumn(t, "...
[ "Table", "ADMINISTRABLE_ROLE_AUTHORIZATIONS", "(", ")", "{", "Table", "t", "=", "sysTables", "[", "ADMINISTRABLE_ROLE_AUTHORIZATIONS", "]", ";", "if", "(", "t", "==", "null", ")", "{", "t", "=", "createBlankTable", "(", "sysTableHsqlNames", "[", "ADMINISTRABLE_ROL...
Returns roles that are grantable by an admin user, which means all the roles @return Table
[ "Returns", "roles", "that", "are", "grantable", "by", "an", "admin", "user", "which", "means", "all", "the", "roles" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/dbinfo/DatabaseInformationFull.java#L1176-L1204
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/dbinfo/DatabaseInformationFull.java
DatabaseInformationFull.ROUTINE_ROUTINE_USAGE
Table ROUTINE_ROUTINE_USAGE() { Table t = sysTables[ROUTINE_ROUTINE_USAGE]; if (t == null) { t = createBlankTable(sysTableHsqlNames[ROUTINE_ROUTINE_USAGE]); addColumn(t, "SPECIFIC_CATALOG", SQL_IDENTIFIER); addColumn(t, "SPECIFIC_SCHEMA", SQL_IDENTIFIER); ...
java
Table ROUTINE_ROUTINE_USAGE() { Table t = sysTables[ROUTINE_ROUTINE_USAGE]; if (t == null) { t = createBlankTable(sysTableHsqlNames[ROUTINE_ROUTINE_USAGE]); addColumn(t, "SPECIFIC_CATALOG", SQL_IDENTIFIER); addColumn(t, "SPECIFIC_SCHEMA", SQL_IDENTIFIER); ...
[ "Table", "ROUTINE_ROUTINE_USAGE", "(", ")", "{", "Table", "t", "=", "sysTables", "[", "ROUTINE_ROUTINE_USAGE", "]", ";", "if", "(", "t", "==", "null", ")", "{", "t", "=", "createBlankTable", "(", "sysTableHsqlNames", "[", "ROUTINE_ROUTINE_USAGE", "]", ")", "...
needs to provide list of specific referenced routines
[ "needs", "to", "provide", "list", "of", "specific", "referenced", "routines" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/dbinfo/DatabaseInformationFull.java#L4034-L4115
train
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportDataSource.java
ExportDataSource.closeAndDelete
public ListenableFuture<?> closeAndDelete() { // We're going away, so shut ourselves from the external world m_closed = true; m_ackMailboxRefs.set(null); // Export mastership should have been released: force it. m_mastershipAccepted.set(false); // FIXME: necessary? Old...
java
public ListenableFuture<?> closeAndDelete() { // We're going away, so shut ourselves from the external world m_closed = true; m_ackMailboxRefs.set(null); // Export mastership should have been released: force it. m_mastershipAccepted.set(false); // FIXME: necessary? Old...
[ "public", "ListenableFuture", "<", "?", ">", "closeAndDelete", "(", ")", "{", "// We're going away, so shut ourselves from the external world", "m_closed", "=", "true", ";", "m_ackMailboxRefs", ".", "set", "(", "null", ")", ";", "// Export mastership should have been releas...
This is called on updateCatalog when an exporting stream is dropped. Note: The {@code ExportDataProcessor} must have been shut down prior to calling this method. @return
[ "This", "is", "called", "on", "updateCatalog", "when", "an", "exporting", "stream", "is", "dropped", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportDataSource.java#L902-L943
train
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportDataSource.java
ExportDataSource.setPendingContainer
public void setPendingContainer(AckingContainer container) { Preconditions.checkNotNull(m_pendingContainer.get() != null, "Pending container must be null."); if (m_closed) { // A very slow export decoder must have noticed the export processor shutting down exportLog.info("Discard...
java
public void setPendingContainer(AckingContainer container) { Preconditions.checkNotNull(m_pendingContainer.get() != null, "Pending container must be null."); if (m_closed) { // A very slow export decoder must have noticed the export processor shutting down exportLog.info("Discard...
[ "public", "void", "setPendingContainer", "(", "AckingContainer", "container", ")", "{", "Preconditions", ".", "checkNotNull", "(", "m_pendingContainer", ".", "get", "(", ")", "!=", "null", ",", "\"Pending container must be null.\"", ")", ";", "if", "(", "m_closed", ...
Needs to be thread-safe, EDS executor, export decoder and site thread both touch m_pendingContainer.
[ "Needs", "to", "be", "thread", "-", "safe", "EDS", "executor", "export", "decoder", "and", "site", "thread", "both", "touch", "m_pendingContainer", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportDataSource.java#L963-L972
train
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportDataSource.java
ExportDataSource.remoteAck
public void remoteAck(final long seq) { //In replicated only master will be doing this. m_es.execute(new Runnable() { @Override public void run() { try { // ENG-12282: A race condition between export data source // master p...
java
public void remoteAck(final long seq) { //In replicated only master will be doing this. m_es.execute(new Runnable() { @Override public void run() { try { // ENG-12282: A race condition between export data source // master p...
[ "public", "void", "remoteAck", "(", "final", "long", "seq", ")", "{", "//In replicated only master will be doing this.", "m_es", ".", "execute", "(", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "void", "run", "(", ")", "{", "try", "{", "// E...
Entry point for receiving acknowledgments from remote entities. @param seq acknowledged sequence number, ALWAYS last row of a transaction, or 0.
[ "Entry", "point", "for", "receiving", "acknowledgments", "from", "remote", "entities", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportDataSource.java#L1407-L1439
train
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportDataSource.java
ExportDataSource.handleDrainedSource
private void handleDrainedSource() throws IOException { if (!inCatalog() && m_committedBuffers.isEmpty()) { //Returning null indicates end of stream try { if (m_pollTask != null) { m_pollTask.setFuture(null); } } catc...
java
private void handleDrainedSource() throws IOException { if (!inCatalog() && m_committedBuffers.isEmpty()) { //Returning null indicates end of stream try { if (m_pollTask != null) { m_pollTask.setFuture(null); } } catc...
[ "private", "void", "handleDrainedSource", "(", ")", "throws", "IOException", "{", "if", "(", "!", "inCatalog", "(", ")", "&&", "m_committedBuffers", ".", "isEmpty", "(", ")", ")", "{", "//Returning null indicates end of stream", "try", "{", "if", "(", "m_pollTas...
Notify the generation when source is drained on an unused partition. @throws IOException
[ "Notify", "the", "generation", "when", "source", "is", "drained", "on", "an", "unused", "partition", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportDataSource.java#L1460-L1474
train
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportDataSource.java
ExportDataSource.acceptMastership
public synchronized void acceptMastership() { if (m_onMastership == null) { if (exportLog.isDebugEnabled()) { exportLog.debug("Mastership Runnable not yet set for table " + getTableName() + " partition " + getPartitionId()); } return; } if (m_m...
java
public synchronized void acceptMastership() { if (m_onMastership == null) { if (exportLog.isDebugEnabled()) { exportLog.debug("Mastership Runnable not yet set for table " + getTableName() + " partition " + getPartitionId()); } return; } if (m_m...
[ "public", "synchronized", "void", "acceptMastership", "(", ")", "{", "if", "(", "m_onMastership", "==", "null", ")", "{", "if", "(", "exportLog", ".", "isDebugEnabled", "(", ")", ")", "{", "exportLog", ".", "debug", "(", "\"Mastership Runnable not yet set for ta...
Trigger an execution of the mastership runnable by the associated executor service
[ "Trigger", "an", "execution", "of", "the", "mastership", "runnable", "by", "the", "associated", "executor", "service" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportDataSource.java#L1622-L1654
train
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportDataSource.java
ExportDataSource.setOnMastership
public void setOnMastership(Runnable toBeRunOnMastership) { Preconditions.checkNotNull(toBeRunOnMastership, "mastership runnable is null"); m_onMastership = toBeRunOnMastership; // If connector "replicated" property is set to true then every // replicated export stream is its own master ...
java
public void setOnMastership(Runnable toBeRunOnMastership) { Preconditions.checkNotNull(toBeRunOnMastership, "mastership runnable is null"); m_onMastership = toBeRunOnMastership; // If connector "replicated" property is set to true then every // replicated export stream is its own master ...
[ "public", "void", "setOnMastership", "(", "Runnable", "toBeRunOnMastership", ")", "{", "Preconditions", ".", "checkNotNull", "(", "toBeRunOnMastership", ",", "\"mastership runnable is null\"", ")", ";", "m_onMastership", "=", "toBeRunOnMastership", ";", "// If connector \"r...
set the runnable task that is to be executed on mastership designation @param toBeRunOnMastership a {@link @Runnable} task @param runEveryWhere Set if connector "replicated" property is set to true Like replicated table, every replicated export stream is its own master.
[ "set", "the", "runnable", "task", "that", "is", "to", "be", "executed", "on", "mastership", "designation" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportDataSource.java#L1663-L1673
train
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportDataSource.java
ExportDataSource.handleQueryMessage
public void handleQueryMessage(final long senderHSId, long requestId, long gapStart) { m_es.execute(new Runnable() { @Override public void run() { long lastSeq = Long.MIN_VALUE; Pair<Long, Long> range = m_gapTracker.getRangeContaining(g...
java
public void handleQueryMessage(final long senderHSId, long requestId, long gapStart) { m_es.execute(new Runnable() { @Override public void run() { long lastSeq = Long.MIN_VALUE; Pair<Long, Long> range = m_gapTracker.getRangeContaining(g...
[ "public", "void", "handleQueryMessage", "(", "final", "long", "senderHSId", ",", "long", "requestId", ",", "long", "gapStart", ")", "{", "m_es", ".", "execute", "(", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "void", "run", "(", ")", "{...
Query whether a master exists for the given partition, if not try to promote the local data source.
[ "Query", "whether", "a", "master", "exists", "for", "the", "given", "partition", "if", "not", "try", "to", "promote", "the", "local", "data", "source", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportDataSource.java#L1781-L1793
train
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportDataSource.java
ExportDataSource.resetStateInRejoinOrRecover
private void resetStateInRejoinOrRecover(long initialSequenceNumber, boolean isRejoin) { if (isRejoin) { if (!m_gapTracker.isEmpty()) { m_lastReleasedSeqNo = Math.max(m_lastReleasedSeqNo, m_gapTracker.getFirstSeqNo() - 1); } } else { m_lastReleasedSeqN...
java
private void resetStateInRejoinOrRecover(long initialSequenceNumber, boolean isRejoin) { if (isRejoin) { if (!m_gapTracker.isEmpty()) { m_lastReleasedSeqNo = Math.max(m_lastReleasedSeqNo, m_gapTracker.getFirstSeqNo() - 1); } } else { m_lastReleasedSeqN...
[ "private", "void", "resetStateInRejoinOrRecover", "(", "long", "initialSequenceNumber", ",", "boolean", "isRejoin", ")", "{", "if", "(", "isRejoin", ")", "{", "if", "(", "!", "m_gapTracker", ".", "isEmpty", "(", ")", ")", "{", "m_lastReleasedSeqNo", "=", "Math...
current master to tell us where to poll next buffer.
[ "current", "master", "to", "tell", "us", "where", "to", "poll", "next", "buffer", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportDataSource.java#L1980-L1992
train
VoltDB/voltdb
src/frontend/org/voltcore/TransactionIdManager.java
TransactionIdManager.getDateFromTransactionId
public static Date getDateFromTransactionId(long txnId) { long time = txnId >> (COUNTER_BITS + INITIATORID_BITS); time += VOLT_EPOCH; return new Date(time); }
java
public static Date getDateFromTransactionId(long txnId) { long time = txnId >> (COUNTER_BITS + INITIATORID_BITS); time += VOLT_EPOCH; return new Date(time); }
[ "public", "static", "Date", "getDateFromTransactionId", "(", "long", "txnId", ")", "{", "long", "time", "=", "txnId", ">>", "(", "COUNTER_BITS", "+", "INITIATORID_BITS", ")", ";", "time", "+=", "VOLT_EPOCH", ";", "return", "new", "Date", "(", "time", ")", ...
Given a transaction id, return the time of its creation by examining the embedded timestamp. @param txnId The transaction id value to examine. @return The Date object representing the time this transaction id was created.
[ "Given", "a", "transaction", "id", "return", "the", "time", "of", "its", "creation", "by", "examining", "the", "embedded", "timestamp", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/TransactionIdManager.java#L233-L237
train
VoltDB/voltdb
src/frontend/org/voltdb/RealVoltDB.java
RealVoltDB.recoverPartitions
private AbstractTopology recoverPartitions(AbstractTopology topology, String haGroup, Set<Integer> recoverPartitions) { long version = topology.version; if (!recoverPartitions.isEmpty()) { // In rejoin case, partition list from the rejoining node could be out of range if the rejoining ...
java
private AbstractTopology recoverPartitions(AbstractTopology topology, String haGroup, Set<Integer> recoverPartitions) { long version = topology.version; if (!recoverPartitions.isEmpty()) { // In rejoin case, partition list from the rejoining node could be out of range if the rejoining ...
[ "private", "AbstractTopology", "recoverPartitions", "(", "AbstractTopology", "topology", ",", "String", "haGroup", ",", "Set", "<", "Integer", ">", "recoverPartitions", ")", "{", "long", "version", "=", "topology", ".", "version", ";", "if", "(", "!", "recoverPa...
recover the partition assignment from one of lost hosts in the same placement group for rejoin Use the placement group of the recovering host to find a matched host from the lost nodes in the topology If the partition count from the lost node is the same as the site count of the recovering host, The partitions on the l...
[ "recover", "the", "partition", "assignment", "from", "one", "of", "lost", "hosts", "in", "the", "same", "placement", "group", "for", "rejoin", "Use", "the", "placement", "group", "of", "the", "recovering", "host", "to", "find", "a", "matched", "host", "from"...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L1704-L1730
train
VoltDB/voltdb
src/frontend/org/voltdb/RealVoltDB.java
RealVoltDB.stopRejoiningHost
private boolean stopRejoiningHost() { // The host failure notification could come before mesh determination, wait for the determination try { m_meshDeterminationLatch.await(); } catch (InterruptedException e) { } if (m_rejoining) { VoltDB.crashLocalVoltD...
java
private boolean stopRejoiningHost() { // The host failure notification could come before mesh determination, wait for the determination try { m_meshDeterminationLatch.await(); } catch (InterruptedException e) { } if (m_rejoining) { VoltDB.crashLocalVoltD...
[ "private", "boolean", "stopRejoiningHost", "(", ")", "{", "// The host failure notification could come before mesh determination, wait for the determination", "try", "{", "m_meshDeterminationLatch", ".", "await", "(", ")", ";", "}", "catch", "(", "InterruptedException", "e", ...
If the current node hasn't finished rejoin when another node fails, fail this node to prevent locking up.
[ "If", "the", "current", "node", "hasn", "t", "finished", "rejoin", "when", "another", "node", "fails", "fail", "this", "node", "to", "prevent", "locking", "up", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L1811-L1825
train
VoltDB/voltdb
src/frontend/org/voltdb/RealVoltDB.java
RealVoltDB.checkExportStreamMastership
private void checkExportStreamMastership() { for (Initiator initiator : m_iv2Initiators.values()) { if (initiator.getPartitionId() != MpInitiator.MP_INIT_PID) { SpInitiator spInitiator = (SpInitiator)initiator; if (spInitiator.isLeader()) { ExportM...
java
private void checkExportStreamMastership() { for (Initiator initiator : m_iv2Initiators.values()) { if (initiator.getPartitionId() != MpInitiator.MP_INIT_PID) { SpInitiator spInitiator = (SpInitiator)initiator; if (spInitiator.isLeader()) { ExportM...
[ "private", "void", "checkExportStreamMastership", "(", ")", "{", "for", "(", "Initiator", "initiator", ":", "m_iv2Initiators", ".", "values", "(", ")", ")", "{", "if", "(", "initiator", ".", "getPartitionId", "(", ")", "!=", "MpInitiator", ".", "MP_INIT_PID", ...
move back to partition leader's node.
[ "move", "back", "to", "partition", "leader", "s", "node", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L1872-L1881
train
VoltDB/voltdb
src/frontend/org/voltdb/RealVoltDB.java
RealVoltDB.scheduleDailyLoggingWorkInNextCheckTime
void scheduleDailyLoggingWorkInNextCheckTime() { DailyRollingFileAppender dailyAppender = null; Enumeration<?> appenders = Logger.getRootLogger().getAllAppenders(); while (appenders.hasMoreElements()) { Appender appender = (Appender) appenders.nextElement(); if (appender ...
java
void scheduleDailyLoggingWorkInNextCheckTime() { DailyRollingFileAppender dailyAppender = null; Enumeration<?> appenders = Logger.getRootLogger().getAllAppenders(); while (appenders.hasMoreElements()) { Appender appender = (Appender) appenders.nextElement(); if (appender ...
[ "void", "scheduleDailyLoggingWorkInNextCheckTime", "(", ")", "{", "DailyRollingFileAppender", "dailyAppender", "=", "null", ";", "Enumeration", "<", "?", ">", "appenders", "=", "Logger", ".", "getRootLogger", "(", ")", ".", "getAllAppenders", "(", ")", ";", "while...
Get the next check time for a private member in log4j library, which is not a reliable idea. It adds 30 seconds for the initial delay and uses a periodical thread to schedule the daily logging work with this delay. @return
[ "Get", "the", "next", "check", "time", "for", "a", "private", "member", "in", "log4j", "library", "which", "is", "not", "a", "reliable", "idea", ".", "It", "adds", "30", "seconds", "for", "the", "initial", "delay", "and", "uses", "a", "periodical", "thre...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L1923-L1955
train
VoltDB/voltdb
src/frontend/org/voltdb/RealVoltDB.java
RealVoltDB.schedulePeriodicWorks
private void schedulePeriodicWorks() { // JMX stats broadcast m_periodicWorks.add(scheduleWork(new Runnable() { @Override public void run() { // A null here was causing a steady stream of annoying but apparently inconsequential // NPEs during a deb...
java
private void schedulePeriodicWorks() { // JMX stats broadcast m_periodicWorks.add(scheduleWork(new Runnable() { @Override public void run() { // A null here was causing a steady stream of annoying but apparently inconsequential // NPEs during a deb...
[ "private", "void", "schedulePeriodicWorks", "(", ")", "{", "// JMX stats broadcast", "m_periodicWorks", ".", "add", "(", "scheduleWork", "(", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "void", "run", "(", ")", "{", "// A null here was causing a s...
Schedule all the periodic works
[ "Schedule", "all", "the", "periodic", "works" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L2246-L2314
train
VoltDB/voltdb
src/frontend/org/voltdb/RealVoltDB.java
RealVoltDB.determineIfEligibleAsLeader
private boolean determineIfEligibleAsLeader(Collection<Integer> partitions, Set<Integer> partitionGroupPeers, AbstractTopology topology) { if (partitions.contains(Integer.valueOf(0))) { return true; } for (Integer host : topology.getHostIdList(0)) { if (partit...
java
private boolean determineIfEligibleAsLeader(Collection<Integer> partitions, Set<Integer> partitionGroupPeers, AbstractTopology topology) { if (partitions.contains(Integer.valueOf(0))) { return true; } for (Integer host : topology.getHostIdList(0)) { if (partit...
[ "private", "boolean", "determineIfEligibleAsLeader", "(", "Collection", "<", "Integer", ">", "partitions", ",", "Set", "<", "Integer", ">", "partitionGroupPeers", ",", "AbstractTopology", "topology", ")", "{", "if", "(", "partitions", ".", "contains", "(", "Intege...
This host can be a leader if partition 0 is on it or it is in the same partition group as a node which has partition 0. This is because the partition group with partition 0 can never be removed by elastic remove. @param partitions {@link List} of partitions on this host @param partitionGroupPeers {@link List}...
[ "This", "host", "can", "be", "a", "leader", "if", "partition", "0", "is", "on", "it", "or", "it", "is", "in", "the", "same", "partition", "group", "as", "a", "node", "which", "has", "partition", "0", ".", "This", "is", "because", "the", "partition", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L2325-L2336
train
VoltDB/voltdb
src/frontend/org/voltdb/RealVoltDB.java
RealVoltDB.run
@Override public void run() { if (m_restoreAgent != null) { // start restore process m_restoreAgent.restore(); } else { onSnapshotRestoreCompletion(); onReplayCompletion(Long.MIN_VALUE, m_iv2InitiatorStartingTxnIds); } // Start...
java
@Override public void run() { if (m_restoreAgent != null) { // start restore process m_restoreAgent.restore(); } else { onSnapshotRestoreCompletion(); onReplayCompletion(Long.MIN_VALUE, m_iv2InitiatorStartingTxnIds); } // Start...
[ "@", "Override", "public", "void", "run", "(", ")", "{", "if", "(", "m_restoreAgent", "!=", "null", ")", "{", "// start restore process", "m_restoreAgent", ".", "restore", "(", ")", ";", "}", "else", "{", "onSnapshotRestoreCompletion", "(", ")", ";", "onRepl...
Start all the site's event loops. That's it.
[ "Start", "all", "the", "site", "s", "event", "loops", ".", "That", "s", "it", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L3528-L3552
train
VoltDB/voltdb
src/frontend/org/voltdb/RealVoltDB.java
RealVoltDB.cleanUpTempCatalogJar
@Override public void cleanUpTempCatalogJar() { File configInfoDir = getConfigDirectory(); if (!configInfoDir.exists()) { return; } File tempJar = new VoltFile(configInfoDir.getPath(), InMemoryJarfile.TMP_CATALOG_JAR_FILENAME); ...
java
@Override public void cleanUpTempCatalogJar() { File configInfoDir = getConfigDirectory(); if (!configInfoDir.exists()) { return; } File tempJar = new VoltFile(configInfoDir.getPath(), InMemoryJarfile.TMP_CATALOG_JAR_FILENAME); ...
[ "@", "Override", "public", "void", "cleanUpTempCatalogJar", "(", ")", "{", "File", "configInfoDir", "=", "getConfigDirectory", "(", ")", ";", "if", "(", "!", "configInfoDir", ".", "exists", "(", ")", ")", "{", "return", ";", "}", "File", "tempJar", "=", ...
Clean up the temporary jar file
[ "Clean", "up", "the", "temporary", "jar", "file" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L3835-L3847
train
VoltDB/voltdb
src/frontend/org/voltdb/RealVoltDB.java
RealVoltDB.shutdownInitiators
private void shutdownInitiators() { if (m_iv2Initiators == null) { return; } m_iv2Initiators.descendingMap().values().stream().forEach(p->p.shutdown()); }
java
private void shutdownInitiators() { if (m_iv2Initiators == null) { return; } m_iv2Initiators.descendingMap().values().stream().forEach(p->p.shutdown()); }
[ "private", "void", "shutdownInitiators", "(", ")", "{", "if", "(", "m_iv2Initiators", "==", "null", ")", "{", "return", ";", "}", "m_iv2Initiators", ".", "descendingMap", "(", ")", ".", "values", "(", ")", ".", "stream", "(", ")", ".", "forEach", "(", ...
to be done on SP sites, kill SP sites first may risk MP site to wait forever.
[ "to", "be", "done", "on", "SP", "sites", "kill", "SP", "sites", "first", "may", "risk", "MP", "site", "to", "wait", "forever", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L4210-L4215
train
VoltDB/voltdb
src/frontend/org/voltdb/RealVoltDB.java
RealVoltDB.createRuntimeReport
public void createRuntimeReport(PrintStream out) { // This function may be running in its own thread. out.print("MIME-Version: 1.0\n"); out.print("Content-type: multipart/mixed; boundary=\"reportsection\""); out.print("\n\n--reportsection\nContent-Type: text/plain\n\nClientInterface Re...
java
public void createRuntimeReport(PrintStream out) { // This function may be running in its own thread. out.print("MIME-Version: 1.0\n"); out.print("Content-type: multipart/mixed; boundary=\"reportsection\""); out.print("\n\n--reportsection\nContent-Type: text/plain\n\nClientInterface Re...
[ "public", "void", "createRuntimeReport", "(", "PrintStream", "out", ")", "{", "// This function may be running in its own thread.", "out", ".", "print", "(", "\"MIME-Version: 1.0\\n\"", ")", ";", "out", ".", "print", "(", "\"Content-type: multipart/mixed; boundary=\\\"reports...
Debugging function - creates a record of the current state of the system. @param out PrintStream to write report to.
[ "Debugging", "function", "-", "creates", "a", "record", "of", "the", "current", "state", "of", "the", "system", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L4221-L4231
train
VoltDB/voltdb
src/frontend/org/voltdb/RealVoltDB.java
RealVoltDB.initializeDRProducer
private void initializeDRProducer() { try { if (m_producerDRGateway != null) { m_producerDRGateway.startAndWaitForGlobalAgreement(); for (Initiator iv2init : m_iv2Initiators.values()) { iv2init.initDRGateway(m_config.m_startAction, ...
java
private void initializeDRProducer() { try { if (m_producerDRGateway != null) { m_producerDRGateway.startAndWaitForGlobalAgreement(); for (Initiator iv2init : m_iv2Initiators.values()) { iv2init.initDRGateway(m_config.m_startAction, ...
[ "private", "void", "initializeDRProducer", "(", ")", "{", "try", "{", "if", "(", "m_producerDRGateway", "!=", "null", ")", "{", "m_producerDRGateway", ".", "startAndWaitForGlobalAgreement", "(", ")", ";", "for", "(", "Initiator", "iv2init", ":", "m_iv2Initiators",...
Initialize the DR producer so that any binary log generated on recover will be queued. This does NOT open the DR port. That will happen after command log replay finishes.
[ "Initialize", "the", "DR", "producer", "so", "that", "any", "binary", "log", "generated", "on", "recover", "will", "be", "queued", ".", "This", "does", "NOT", "open", "the", "DR", "port", ".", "That", "will", "happen", "after", "command", "log", "replay", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L4659-L4676
train
VoltDB/voltdb
src/frontend/org/voltdb/RealVoltDB.java
RealVoltDB.computeMinimumHeapRqt
static public long computeMinimumHeapRqt(int tableCount, int sitesPerHost, int kfactor) { long baseRqt = 384; long tableRqt = 10 * tableCount; // K-safety Heap consumption drop to 8 MB (per node) // Snapshot cost 32 MB (per node) // Theoretically, 40 MB (per node) should be e...
java
static public long computeMinimumHeapRqt(int tableCount, int sitesPerHost, int kfactor) { long baseRqt = 384; long tableRqt = 10 * tableCount; // K-safety Heap consumption drop to 8 MB (per node) // Snapshot cost 32 MB (per node) // Theoretically, 40 MB (per node) should be e...
[ "static", "public", "long", "computeMinimumHeapRqt", "(", "int", "tableCount", ",", "int", "sitesPerHost", ",", "int", "kfactor", ")", "{", "long", "baseRqt", "=", "384", ";", "long", "tableRqt", "=", "10", "*", "tableCount", ";", "// K-safety Heap consumption d...
Any changes there should get reflected here and vice versa.
[ "Any", "changes", "there", "should", "get", "reflected", "here", "and", "vice", "versa", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L4932-L4941
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java
RowAction.prepareCommit
synchronized void prepareCommit(Session session) { RowActionBase action = this; do { if (action.session == session && action.commitTimestamp == 0) { action.prepared = true; } action = action.next; } while (action != null); }
java
synchronized void prepareCommit(Session session) { RowActionBase action = this; do { if (action.session == session && action.commitTimestamp == 0) { action.prepared = true; } action = action.next; } while (action != null); }
[ "synchronized", "void", "prepareCommit", "(", "Session", "session", ")", "{", "RowActionBase", "action", "=", "this", ";", "do", "{", "if", "(", "action", ".", "session", "==", "session", "&&", "action", ".", "commitTimestamp", "==", "0", ")", "{", "action...
for two-phased pre-commit
[ "for", "two", "-", "phased", "pre", "-", "commit" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java#L164-L175
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java
RowAction.rollback
synchronized void rollback(Session session, long timestamp) { RowActionBase action = this; do { if (action.session == session && action.commitTimestamp == 0) { if (action.actionTimestamp >= timestamp || action.actionTimestamp == 0) { ...
java
synchronized void rollback(Session session, long timestamp) { RowActionBase action = this; do { if (action.session == session && action.commitTimestamp == 0) { if (action.actionTimestamp >= timestamp || action.actionTimestamp == 0) { ...
[ "synchronized", "void", "rollback", "(", "Session", "session", ",", "long", "timestamp", ")", "{", "RowActionBase", "action", "=", "this", ";", "do", "{", "if", "(", "action", ".", "session", "==", "session", "&&", "action", ".", "commitTimestamp", "==", "...
Rollback actions for a session including and after the given timestamp
[ "Rollback", "actions", "for", "a", "session", "including", "and", "after", "the", "given", "timestamp" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java#L194-L210
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java
RowAction.getCommitType
synchronized int getCommitType(long timestamp) { RowActionBase action = this; int type = ACTION_NONE; do { if (action.commitTimestamp == timestamp) { type = action.type; } action = action.next; } while (action != null); ...
java
synchronized int getCommitType(long timestamp) { RowActionBase action = this; int type = ACTION_NONE; do { if (action.commitTimestamp == timestamp) { type = action.type; } action = action.next; } while (action != null); ...
[ "synchronized", "int", "getCommitType", "(", "long", "timestamp", ")", "{", "RowActionBase", "action", "=", "this", ";", "int", "type", "=", "ACTION_NONE", ";", "do", "{", "if", "(", "action", ".", "commitTimestamp", "==", "timestamp", ")", "{", "type", "=...
returns type of commit performed on timestamp. ACTION_NONE if none.
[ "returns", "type", "of", "commit", "performed", "on", "timestamp", ".", "ACTION_NONE", "if", "none", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java#L215-L229
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java
RowAction.canCommit
synchronized boolean canCommit(Session session, OrderedHashSet set) { RowActionBase action; long timestamp = session.transactionTimestamp; long commitTimestamp = 0; final boolean readCommitted = session.isolationMode == Sessi...
java
synchronized boolean canCommit(Session session, OrderedHashSet set) { RowActionBase action; long timestamp = session.transactionTimestamp; long commitTimestamp = 0; final boolean readCommitted = session.isolationMode == Sessi...
[ "synchronized", "boolean", "canCommit", "(", "Session", "session", ",", "OrderedHashSet", "set", ")", "{", "RowActionBase", "action", ";", "long", "timestamp", "=", "session", ".", "transactionTimestamp", ";", "long", "commitTimestamp", "=", "0", ";", "final", "...
returns false if another committed session has altered the same row
[ "returns", "false", "if", "another", "committed", "session", "has", "altered", "the", "same", "row" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java#L234-L284
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java
RowAction.mergeRollback
synchronized void mergeRollback(Row row) { RowActionBase action = this; RowActionBase head = null; RowActionBase tail = null; if (type == RowActionBase.ACTION_DELETE_FINAL || type == RowActionBase.ACTION_NONE) { return; } do { ...
java
synchronized void mergeRollback(Row row) { RowActionBase action = this; RowActionBase head = null; RowActionBase tail = null; if (type == RowActionBase.ACTION_DELETE_FINAL || type == RowActionBase.ACTION_NONE) { return; } do { ...
[ "synchronized", "void", "mergeRollback", "(", "Row", "row", ")", "{", "RowActionBase", "action", "=", "this", ";", "RowActionBase", "head", "=", "null", ";", "RowActionBase", "tail", "=", "null", ";", "if", "(", "type", "==", "RowActionBase", ".", "ACTION_DE...
merge rolled back actions
[ "merge", "rolled", "back", "actions" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java#L389-L430
train
VoltDB/voltdb
src/frontend/org/voltdb/exportclient/HttpExportClient.java
HttpExportClient.adjustReplicationFactorForURI
private void adjustReplicationFactorForURI(HttpPut httpPut) throws URISyntaxException{ String queryString = httpPut.getURI().getQuery(); if(!StringUtils.isEmpty(queryString) && queryString.contains("op=CREATE") && (queryString.contains("replication=") || !StringUtils.isEmpty(m_blockReplication))){ ...
java
private void adjustReplicationFactorForURI(HttpPut httpPut) throws URISyntaxException{ String queryString = httpPut.getURI().getQuery(); if(!StringUtils.isEmpty(queryString) && queryString.contains("op=CREATE") && (queryString.contains("replication=") || !StringUtils.isEmpty(m_blockReplication))){ ...
[ "private", "void", "adjustReplicationFactorForURI", "(", "HttpPut", "httpPut", ")", "throws", "URISyntaxException", "{", "String", "queryString", "=", "httpPut", ".", "getURI", "(", ")", ".", "getQuery", "(", ")", ";", "if", "(", "!", "StringUtils", ".", "isEm...
append replication factor to the URI for CREATE operation if the factor is not in URI @param httpPut HttpPut for REST request @throws URISyntaxException mis-formed URI
[ "append", "replication", "factor", "to", "the", "URI", "for", "CREATE", "operation", "if", "the", "factor", "is", "not", "in", "URI" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/HttpExportClient.java#L552-L564
train
VoltDB/voltdb
src/frontend/org/voltdb/exportclient/HttpExportClient.java
HttpExportClient.sign
private List<NameValuePair> sign(URI uri, final List<NameValuePair> params) { Preconditions.checkNotNull(m_secret); final List<NameValuePair> sortedParams = Lists.newArrayList(params); Collections.sort(sortedParams, new Comparator<NameValuePair>() { @Override public ...
java
private List<NameValuePair> sign(URI uri, final List<NameValuePair> params) { Preconditions.checkNotNull(m_secret); final List<NameValuePair> sortedParams = Lists.newArrayList(params); Collections.sort(sortedParams, new Comparator<NameValuePair>() { @Override public ...
[ "private", "List", "<", "NameValuePair", ">", "sign", "(", "URI", "uri", ",", "final", "List", "<", "NameValuePair", ">", "params", ")", "{", "Preconditions", ".", "checkNotNull", "(", "m_secret", ")", ";", "final", "List", "<", "NameValuePair", ">", "sort...
Calculate the signature of the request using the specified secret key. @param params The parameters to send in the request. @return The parameters including the signature.
[ "Calculate", "the", "signature", "of", "the", "request", "using", "the", "specified", "secret", "key", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/HttpExportClient.java#L646-L692
train
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/TreeTraverser.java
TreeTraverser.preOrderTraversal
public final FluentIterable<T> preOrderTraversal(final T root) { checkNotNull(root); return new FluentIterable<T>() { @Override public UnmodifiableIterator<T> iterator() { return preOrderIterator(root); } }; }
java
public final FluentIterable<T> preOrderTraversal(final T root) { checkNotNull(root); return new FluentIterable<T>() { @Override public UnmodifiableIterator<T> iterator() { return preOrderIterator(root); } }; }
[ "public", "final", "FluentIterable", "<", "T", ">", "preOrderTraversal", "(", "final", "T", "root", ")", "{", "checkNotNull", "(", "root", ")", ";", "return", "new", "FluentIterable", "<", "T", ">", "(", ")", "{", "@", "Override", "public", "UnmodifiableIt...
Returns an unmodifiable iterable over the nodes in a tree structure, using pre-order traversal. That is, each node's subtrees are traversed after the node itself is returned. <p>No guarantees are made about the behavior of the traversal when nodes change while iteration is in progress or when the iterators generated b...
[ "Returns", "an", "unmodifiable", "iterable", "over", "the", "nodes", "in", "a", "tree", "structure", "using", "pre", "-", "order", "traversal", ".", "That", "is", "each", "node", "s", "subtrees", "are", "traversed", "after", "the", "node", "itself", "is", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/TreeTraverser.java#L102-L110
train
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/TreeTraverser.java
TreeTraverser.breadthFirstTraversal
public final FluentIterable<T> breadthFirstTraversal(final T root) { checkNotNull(root); return new FluentIterable<T>() { @Override public UnmodifiableIterator<T> iterator() { return new BreadthFirstIterator(root); } }; }
java
public final FluentIterable<T> breadthFirstTraversal(final T root) { checkNotNull(root); return new FluentIterable<T>() { @Override public UnmodifiableIterator<T> iterator() { return new BreadthFirstIterator(root); } }; }
[ "public", "final", "FluentIterable", "<", "T", ">", "breadthFirstTraversal", "(", "final", "T", "root", ")", "{", "checkNotNull", "(", "root", ")", ";", "return", "new", "FluentIterable", "<", "T", ">", "(", ")", "{", "@", "Override", "public", "Unmodifiab...
Returns an unmodifiable iterable over the nodes in a tree structure, using breadth-first traversal. That is, all the nodes of depth 0 are returned, then depth 1, then 2, and so on. <p>No guarantees are made about the behavior of the traversal when nodes change while iteration is in progress or when the iterators gener...
[ "Returns", "an", "unmodifiable", "iterable", "over", "the", "nodes", "in", "a", "tree", "structure", "using", "breadth", "-", "first", "traversal", ".", "That", "is", "all", "the", "nodes", "of", "depth", "0", "are", "returned", "then", "depth", "1", "then...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/TreeTraverser.java#L212-L220
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCDatabaseMetaData.java
JDBCDatabaseMetaData.getUserName
public String getUserName() throws SQLException { ResultSet rs = execute("CALL USER()"); rs.next(); String result = rs.getString(1); rs.close(); return result; }
java
public String getUserName() throws SQLException { ResultSet rs = execute("CALL USER()"); rs.next(); String result = rs.getString(1); rs.close(); return result; }
[ "public", "String", "getUserName", "(", ")", "throws", "SQLException", "{", "ResultSet", "rs", "=", "execute", "(", "\"CALL USER()\"", ")", ";", "rs", ".", "next", "(", ")", ";", "String", "result", "=", "rs", ".", "getString", "(", "1", ")", ";", "rs"...
Retrieves the user name as known to this database. @return the database user name @exception SQLException if a database access error occurs
[ "Retrieves", "the", "user", "name", "as", "known", "to", "this", "database", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCDatabaseMetaData.java#L387-L398
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCDatabaseMetaData.java
JDBCDatabaseMetaData.isReadOnly
public boolean isReadOnly() throws SQLException { ResultSet rs = execute("CALL isReadOnlyDatabase()"); rs.next(); boolean result = rs.getBoolean(1); rs.close(); return result; }
java
public boolean isReadOnly() throws SQLException { ResultSet rs = execute("CALL isReadOnlyDatabase()"); rs.next(); boolean result = rs.getBoolean(1); rs.close(); return result; }
[ "public", "boolean", "isReadOnly", "(", ")", "throws", "SQLException", "{", "ResultSet", "rs", "=", "execute", "(", "\"CALL isReadOnlyDatabase()\"", ")", ";", "rs", ".", "next", "(", ")", ";", "boolean", "result", "=", "rs", ".", "getBoolean", "(", "1", ")...
Retrieves whether this database is in read-only mode. <!-- start release-specific documentation --> <div class="ReleaseSpecificDocumentation"> <h3>HSQLDB-Specific Information:</h3> <p> Starting with 1.7.2, this makes an SQL call to the new isReadOnlyDatabase function which provides correct determination of the read-o...
[ "Retrieves", "whether", "this", "database", "is", "in", "read", "-", "only", "mode", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCDatabaseMetaData.java#L416-L427
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCDatabaseMetaData.java
JDBCDatabaseMetaData.toQueryPrefixNoSelect
private StringBuffer toQueryPrefixNoSelect(String t) { StringBuffer sb = new StringBuffer(255); return sb.append(t).append(whereTrue); }
java
private StringBuffer toQueryPrefixNoSelect(String t) { StringBuffer sb = new StringBuffer(255); return sb.append(t).append(whereTrue); }
[ "private", "StringBuffer", "toQueryPrefixNoSelect", "(", "String", "t", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", "255", ")", ";", "return", "sb", ".", "append", "(", "t", ")", ".", "append", "(", "whereTrue", ")", ";", "}" ]
Retrieves "&lt;expression&gt; WHERE 1=1" in string
[ "Retrieves", "&lt", ";", "expression&gt", ";", "WHERE", "1", "=", "1", "in", "string" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCDatabaseMetaData.java#L6171-L6176
train
VoltDB/voltdb
src/frontend/org/voltdb/expressions/ConstantValueExpression.java
ConstantValueExpression.makeExpression
public static ConstantValueExpression makeExpression(VoltType dataType, String value) { ConstantValueExpression constantExpr = new ConstantValueExpression(); constantExpr.setValueType(dataType); constantExpr.setValue(value); return constantExpr; }
java
public static ConstantValueExpression makeExpression(VoltType dataType, String value) { ConstantValueExpression constantExpr = new ConstantValueExpression(); constantExpr.setValueType(dataType); constantExpr.setValue(value); return constantExpr; }
[ "public", "static", "ConstantValueExpression", "makeExpression", "(", "VoltType", "dataType", ",", "String", "value", ")", "{", "ConstantValueExpression", "constantExpr", "=", "new", "ConstantValueExpression", "(", ")", ";", "constantExpr", ".", "setValueType", "(", "...
Create a new CVE for a given type and value @param dataType @param value @return
[ "Create", "a", "new", "CVE", "for", "a", "given", "type", "and", "value" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/ConstantValueExpression.java#L493-L498
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementDML.java
StatementDML.executeUpdateStatement
Result executeUpdateStatement(Session session) { int count = 0; Expression[] colExpressions = updateExpressions; HashMappedList rowset = new HashMappedList(); Type[] colTypes = baseTable.getColumnTypes(); RangeIteratorBase it = RangeVa...
java
Result executeUpdateStatement(Session session) { int count = 0; Expression[] colExpressions = updateExpressions; HashMappedList rowset = new HashMappedList(); Type[] colTypes = baseTable.getColumnTypes(); RangeIteratorBase it = RangeVa...
[ "Result", "executeUpdateStatement", "(", "Session", "session", ")", "{", "int", "count", "=", "0", ";", "Expression", "[", "]", "colExpressions", "=", "updateExpressions", ";", "HashMappedList", "rowset", "=", "new", "HashMappedList", "(", ")", ";", "Type", "[...
Executes an UPDATE statement. It is assumed that the argument is of the correct type. @return the result of executing the statement
[ "Executes", "an", "UPDATE", "statement", ".", "It", "is", "assumed", "that", "the", "argument", "is", "of", "the", "correct", "type", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementDML.java#L341-L392
train