id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
62,100 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java | DataTree.approximateDataSize | public long approximateDataSize() {
long result = 0;
for (Map.Entry<String, DataNode> entry : nodes.entrySet()) {
DataNode value = entry.getValue();
synchronized (value) {
result += entry.getKey().length();
result += (value.data == null ? 0
... | java | public long approximateDataSize() {
long result = 0;
for (Map.Entry<String, DataNode> entry : nodes.entrySet()) {
DataNode value = entry.getValue();
synchronized (value) {
result += entry.getKey().length();
result += (value.data == null ? 0
... | [
"public",
"long",
"approximateDataSize",
"(",
")",
"{",
"long",
"result",
"=",
"0",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"DataNode",
">",
"entry",
":",
"nodes",
".",
"entrySet",
"(",
")",
")",
"{",
"DataNode",
"value",
"=",
"entr... | Get the size of the nodes based on path and data length.
@return size of the data | [
"Get",
"the",
"size",
"of",
"the",
"nodes",
"based",
"on",
"path",
"and",
"data",
"length",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java#L256-L267 |
62,101 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java | DataTree.isSpecialPath | boolean isSpecialPath(String path) {
if (rootZookeeper.equals(path) || procZookeeper.equals(path)
|| quotaZookeeper.equals(path)) {
return true;
}
return false;
} | java | boolean isSpecialPath(String path) {
if (rootZookeeper.equals(path) || procZookeeper.equals(path)
|| quotaZookeeper.equals(path)) {
return true;
}
return false;
} | [
"boolean",
"isSpecialPath",
"(",
"String",
"path",
")",
"{",
"if",
"(",
"rootZookeeper",
".",
"equals",
"(",
"path",
")",
"||",
"procZookeeper",
".",
"equals",
"(",
"path",
")",
"||",
"quotaZookeeper",
".",
"equals",
"(",
"path",
")",
")",
"{",
"return",... | is the path one of the special paths owned by zookeeper.
@param path
the path to be checked
@return true if a special path. false if not. | [
"is",
"the",
"path",
"one",
"of",
"the",
"special",
"paths",
"owned",
"by",
"zookeeper",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java#L309-L315 |
62,102 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java | DataTree.updateCount | public void updateCount(String lastPrefix, int diff) {
String statNode = Quotas.statPath(lastPrefix);
DataNode node = nodes.get(statNode);
StatsTrack updatedStat = null;
if (node == null) {
// should not happen
LOG.error("Missing count node for stat " + statNode);... | java | public void updateCount(String lastPrefix, int diff) {
String statNode = Quotas.statPath(lastPrefix);
DataNode node = nodes.get(statNode);
StatsTrack updatedStat = null;
if (node == null) {
// should not happen
LOG.error("Missing count node for stat " + statNode);... | [
"public",
"void",
"updateCount",
"(",
"String",
"lastPrefix",
",",
"int",
"diff",
")",
"{",
"String",
"statNode",
"=",
"Quotas",
".",
"statPath",
"(",
"lastPrefix",
")",
";",
"DataNode",
"node",
"=",
"nodes",
".",
"get",
"(",
"statNode",
")",
";",
"Stats... | update the count of this stat datanode
@param lastPrefix
the path of the node that is quotaed.
@param diff
the diff to be added to the count | [
"update",
"the",
"count",
"of",
"this",
"stat",
"datanode"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java#L351-L383 |
62,103 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java | DataTree.deleteNode | public void deleteNode(String path, long zxid)
throws KeeperException.NoNodeException {
int lastSlash = path.lastIndexOf('/');
String parentName = path.substring(0, lastSlash);
String childName = path.substring(lastSlash + 1);
DataNode node = nodes.get(path);
if (node... | java | public void deleteNode(String path, long zxid)
throws KeeperException.NoNodeException {
int lastSlash = path.lastIndexOf('/');
String parentName = path.substring(0, lastSlash);
String childName = path.substring(lastSlash + 1);
DataNode node = nodes.get(path);
if (node... | [
"public",
"void",
"deleteNode",
"(",
"String",
"path",
",",
"long",
"zxid",
")",
"throws",
"KeeperException",
".",
"NoNodeException",
"{",
"int",
"lastSlash",
"=",
"path",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
";",
"String",
"parentName",
"=",
"path",
".... | remove the path from the datatree
@param path
the path to of the node to be deleted
@param zxid
the current zxid
@throws KeeperException.NoNodeException | [
"remove",
"the",
"path",
"from",
"the",
"datatree"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java#L524-L584 |
62,104 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java | DataTree.getCounts | private void getCounts(String path, Counts counts) {
DataNode node = getNode(path);
if (node == null) {
return;
}
String[] children = null;
int len = 0;
synchronized (node) {
Set<String> childs = node.getChildren();
if (childs != null) ... | java | private void getCounts(String path, Counts counts) {
DataNode node = getNode(path);
if (node == null) {
return;
}
String[] children = null;
int len = 0;
synchronized (node) {
Set<String> childs = node.getChildren();
if (childs != null) ... | [
"private",
"void",
"getCounts",
"(",
"String",
"path",
",",
"Counts",
"counts",
")",
"{",
"DataNode",
"node",
"=",
"getNode",
"(",
"path",
")",
";",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"return",
";",
"}",
"String",
"[",
"]",
"children",
"=",
... | this method gets the count of nodes and the bytes under a subtree
@param path
the path to be used
@param bytes
the long bytes
@param count
the int count | [
"this",
"method",
"gets",
"the",
"count",
"of",
"nodes",
"and",
"the",
"bytes",
"under",
"a",
"subtree"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java#L853-L876 |
62,105 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java | DataTree.updateQuotaForPath | private void updateQuotaForPath(String path) {
Counts c = new Counts();
getCounts(path, c);
StatsTrack strack = new StatsTrack();
strack.setBytes(c.bytes);
strack.setCount(c.count);
String statPath = Quotas.quotaZookeeper + path + "/" + Quotas.statNode;
DataNode n... | java | private void updateQuotaForPath(String path) {
Counts c = new Counts();
getCounts(path, c);
StatsTrack strack = new StatsTrack();
strack.setBytes(c.bytes);
strack.setCount(c.count);
String statPath = Quotas.quotaZookeeper + path + "/" + Quotas.statNode;
DataNode n... | [
"private",
"void",
"updateQuotaForPath",
"(",
"String",
"path",
")",
"{",
"Counts",
"c",
"=",
"new",
"Counts",
"(",
")",
";",
"getCounts",
"(",
"path",
",",
"c",
")",
";",
"StatsTrack",
"strack",
"=",
"new",
"StatsTrack",
"(",
")",
";",
"strack",
".",
... | update the quota for the given path
@param path
the path to be used | [
"update",
"the",
"quota",
"for",
"the",
"given",
"path"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java#L884-L900 |
62,106 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java | DataTree.traverseNode | private void traverseNode(String path) {
DataNode node = getNode(path);
String children[] = null;
synchronized (node) {
Set<String> childs = node.getChildren();
if (childs != null) {
children = childs.toArray(new String[childs.size()]);
}
... | java | private void traverseNode(String path) {
DataNode node = getNode(path);
String children[] = null;
synchronized (node) {
Set<String> childs = node.getChildren();
if (childs != null) {
children = childs.toArray(new String[childs.size()]);
}
... | [
"private",
"void",
"traverseNode",
"(",
"String",
"path",
")",
"{",
"DataNode",
"node",
"=",
"getNode",
"(",
"path",
")",
";",
"String",
"children",
"[",
"]",
"=",
"null",
";",
"synchronized",
"(",
"node",
")",
"{",
"Set",
"<",
"String",
">",
"childs",... | this method traverses the quota path and update the path trie and sets
@param path | [
"this",
"method",
"traverses",
"the",
"quota",
"path",
"and",
"update",
"the",
"path",
"trie",
"and",
"sets"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java#L907-L937 |
62,107 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java | DataTree.setupQuota | private void setupQuota() {
String quotaPath = Quotas.quotaZookeeper;
DataNode node = getNode(quotaPath);
if (node == null) {
return;
}
traverseNode(quotaPath);
} | java | private void setupQuota() {
String quotaPath = Quotas.quotaZookeeper;
DataNode node = getNode(quotaPath);
if (node == null) {
return;
}
traverseNode(quotaPath);
} | [
"private",
"void",
"setupQuota",
"(",
")",
"{",
"String",
"quotaPath",
"=",
"Quotas",
".",
"quotaZookeeper",
";",
"DataNode",
"node",
"=",
"getNode",
"(",
"quotaPath",
")",
";",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"return",
";",
"}",
"traverseNode... | this method sets up the path trie and sets up stats for quota nodes | [
"this",
"method",
"sets",
"up",
"the",
"path",
"trie",
"and",
"sets",
"up",
"stats",
"for",
"quota",
"nodes"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java#L942-L949 |
62,108 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java | DataTree.dumpEphemerals | public void dumpEphemerals(PrintWriter pwriter) {
Set<Long> keys = ephemerals.keySet();
pwriter.println("Sessions with Ephemerals ("
+ keys.size() + "):");
for (long k : keys) {
pwriter.print("0x" + Long.toHexString(k));
pwriter.println(":");
H... | java | public void dumpEphemerals(PrintWriter pwriter) {
Set<Long> keys = ephemerals.keySet();
pwriter.println("Sessions with Ephemerals ("
+ keys.size() + "):");
for (long k : keys) {
pwriter.print("0x" + Long.toHexString(k));
pwriter.println(":");
H... | [
"public",
"void",
"dumpEphemerals",
"(",
"PrintWriter",
"pwriter",
")",
"{",
"Set",
"<",
"Long",
">",
"keys",
"=",
"ephemerals",
".",
"keySet",
"(",
")",
";",
"pwriter",
".",
"println",
"(",
"\"Sessions with Ephemerals (\"",
"+",
"keys",
".",
"size",
"(",
... | Write a text dump of all the ephemerals in the datatree.
@param pwriter the output to write to | [
"Write",
"a",
"text",
"dump",
"of",
"all",
"the",
"ephemerals",
"in",
"the",
"datatree",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java#L1104-L1118 |
62,109 | VoltDB/voltdb | src/frontend/org/voltcore/zk/ZKCountdownLatch.java | ZKCountdownLatch.getCount | public int getCount() throws InterruptedException, KeeperException {
return ByteBuffer.wrap(m_zk.getData(m_path, false, null)).getInt();
} | java | public int getCount() throws InterruptedException, KeeperException {
return ByteBuffer.wrap(m_zk.getData(m_path, false, null)).getInt();
} | [
"public",
"int",
"getCount",
"(",
")",
"throws",
"InterruptedException",
",",
"KeeperException",
"{",
"return",
"ByteBuffer",
".",
"wrap",
"(",
"m_zk",
".",
"getData",
"(",
"m_path",
",",
"false",
",",
"null",
")",
")",
".",
"getInt",
"(",
")",
";",
"}"
... | Returns the current count | [
"Returns",
"the",
"current",
"count"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/ZKCountdownLatch.java#L63-L65 |
62,110 | VoltDB/voltdb | src/frontend/org/voltcore/zk/ZKCountdownLatch.java | ZKCountdownLatch.isCountedDown | public boolean isCountedDown() throws InterruptedException, KeeperException {
if (countedDown) return true;
int count = ByteBuffer.wrap(m_zk.getData(m_path, false, null)).getInt();
if (count > 0) return false;
countedDown = true;
return true;
} | java | public boolean isCountedDown() throws InterruptedException, KeeperException {
if (countedDown) return true;
int count = ByteBuffer.wrap(m_zk.getData(m_path, false, null)).getInt();
if (count > 0) return false;
countedDown = true;
return true;
} | [
"public",
"boolean",
"isCountedDown",
"(",
")",
"throws",
"InterruptedException",
",",
"KeeperException",
"{",
"if",
"(",
"countedDown",
")",
"return",
"true",
";",
"int",
"count",
"=",
"ByteBuffer",
".",
"wrap",
"(",
"m_zk",
".",
"getData",
"(",
"m_path",
"... | Returns if already counted down to zero | [
"Returns",
"if",
"already",
"counted",
"down",
"to",
"zero"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/ZKCountdownLatch.java#L68-L74 |
62,111 | VoltDB/voltdb | src/frontend/org/voltdb/planner/parseinfo/StmtCommonTableScan.java | StmtCommonTableScan.copyTableSchemaFromShared | private void copyTableSchemaFromShared() {
for (SchemaColumn scol : m_sharedScan.getOutputSchema()) {
SchemaColumn copy = new SchemaColumn(scol.getTableName(),
getTableAlias(),
scol.getColumnName(),
... | java | private void copyTableSchemaFromShared() {
for (SchemaColumn scol : m_sharedScan.getOutputSchema()) {
SchemaColumn copy = new SchemaColumn(scol.getTableName(),
getTableAlias(),
scol.getColumnName(),
... | [
"private",
"void",
"copyTableSchemaFromShared",
"(",
")",
"{",
"for",
"(",
"SchemaColumn",
"scol",
":",
"m_sharedScan",
".",
"getOutputSchema",
"(",
")",
")",
"{",
"SchemaColumn",
"copy",
"=",
"new",
"SchemaColumn",
"(",
"scol",
".",
"getTableName",
"(",
")",
... | Copy the table schema from the shared part to here.
We have to repair the table aliases. | [
"Copy",
"the",
"table",
"schema",
"from",
"the",
"shared",
"part",
"to",
"here",
".",
"We",
"have",
"to",
"repair",
"the",
"table",
"aliases",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/StmtCommonTableScan.java#L216-L226 |
62,112 | VoltDB/voltdb | src/frontend/org/voltdb/planner/parseinfo/StmtCommonTableScan.java | StmtCommonTableScan.harmonizeOutputSchema | public void harmonizeOutputSchema() {
boolean changedCurrent;
boolean changedBase;
boolean changedRecursive = false;
NodeSchema currentSchema = getOutputSchema();
NodeSchema baseSchema = getBestCostBasePlan().rootPlanGraph.getTrueOutputSchema(false);
NodeSchema recursiveS... | java | public void harmonizeOutputSchema() {
boolean changedCurrent;
boolean changedBase;
boolean changedRecursive = false;
NodeSchema currentSchema = getOutputSchema();
NodeSchema baseSchema = getBestCostBasePlan().rootPlanGraph.getTrueOutputSchema(false);
NodeSchema recursiveS... | [
"public",
"void",
"harmonizeOutputSchema",
"(",
")",
"{",
"boolean",
"changedCurrent",
";",
"boolean",
"changedBase",
";",
"boolean",
"changedRecursive",
"=",
"false",
";",
"NodeSchema",
"currentSchema",
"=",
"getOutputSchema",
"(",
")",
";",
"NodeSchema",
"baseSche... | We have just planned the base query and perhaps
the recursive query. We need to make sure that the
output schema of the scan and the output schemas
of the base and recursive plans are all compatible.
<ol>
<li>If they have different lengths, then it is an error,
probably an internal error.</li>
<li>If they have differ... | [
"We",
"have",
"just",
"planned",
"the",
"base",
"query",
"and",
"perhaps",
"the",
"recursive",
"query",
".",
"We",
"need",
"to",
"make",
"sure",
"that",
"the",
"output",
"schema",
"of",
"the",
"scan",
"and",
"the",
"output",
"schemas",
"of",
"the",
"base... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/StmtCommonTableScan.java#L244-L277 |
62,113 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/util/concurrent/AbstractFuture.java | AbstractFuture.complete | private static void complete(AbstractFuture<?> future) {
boolean maskExecutorExceptions = future.maskExecutorExceptions;
Listener next = null;
outer: while (true) {
future.releaseWaiters();
// We call this before the listeners in order to avoid needing to manage a separate stack data
// st... | java | private static void complete(AbstractFuture<?> future) {
boolean maskExecutorExceptions = future.maskExecutorExceptions;
Listener next = null;
outer: while (true) {
future.releaseWaiters();
// We call this before the listeners in order to avoid needing to manage a separate stack data
// st... | [
"private",
"static",
"void",
"complete",
"(",
"AbstractFuture",
"<",
"?",
">",
"future",
")",
"{",
"boolean",
"maskExecutorExceptions",
"=",
"future",
".",
"maskExecutorExceptions",
";",
"Listener",
"next",
"=",
"null",
";",
"outer",
":",
"while",
"(",
"true",... | Unblocks all threads and runs all listeners. | [
"Unblocks",
"all",
"threads",
"and",
"runs",
"all",
"listeners",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/util/concurrent/AbstractFuture.java#L795-L833 |
62,114 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/common/PathTrie.java | PathTrie.addPath | public void addPath(String path) {
if (path == null) {
return;
}
String[] pathComponents = path.split("/");
TrieNode parent = rootNode;
String part = null;
if (pathComponents.length <= 1) {
throw new IllegalArgumentException("Invalid path " + path)... | java | public void addPath(String path) {
if (path == null) {
return;
}
String[] pathComponents = path.split("/");
TrieNode parent = rootNode;
String part = null;
if (pathComponents.length <= 1) {
throw new IllegalArgumentException("Invalid path " + path)... | [
"public",
"void",
"addPath",
"(",
"String",
"path",
")",
"{",
"if",
"(",
"path",
"==",
"null",
")",
"{",
"return",
";",
"}",
"String",
"[",
"]",
"pathComponents",
"=",
"path",
".",
"split",
"(",
"\"/\"",
")",
";",
"TrieNode",
"parent",
"=",
"rootNode... | add a path to the path trie
@param path | [
"add",
"a",
"path",
"to",
"the",
"path",
"trie"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/common/PathTrie.java#L197-L215 |
62,115 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/common/PathTrie.java | PathTrie.deletePath | public void deletePath(String path) {
if (path == null) {
return;
}
String[] pathComponents = path.split("/");
TrieNode parent = rootNode;
String part = null;
if (pathComponents.length <= 1) {
throw new IllegalArgumentException("Invalid path " + pa... | java | public void deletePath(String path) {
if (path == null) {
return;
}
String[] pathComponents = path.split("/");
TrieNode parent = rootNode;
String part = null;
if (pathComponents.length <= 1) {
throw new IllegalArgumentException("Invalid path " + pa... | [
"public",
"void",
"deletePath",
"(",
"String",
"path",
")",
"{",
"if",
"(",
"path",
"==",
"null",
")",
"{",
"return",
";",
"}",
"String",
"[",
"]",
"pathComponents",
"=",
"path",
".",
"split",
"(",
"\"/\"",
")",
";",
"TrieNode",
"parent",
"=",
"rootN... | delete a path from the trie
@param path the path to be deleted | [
"delete",
"a",
"path",
"from",
"the",
"trie"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/common/PathTrie.java#L221-L242 |
62,116 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/common/PathTrie.java | PathTrie.findMaxPrefix | public String findMaxPrefix(String path) {
if (path == null) {
return null;
}
if ("/".equals(path)) {
return path;
}
String[] pathComponents = path.split("/");
TrieNode parent = rootNode;
List<String> components = new ArrayList<String>();
... | java | public String findMaxPrefix(String path) {
if (path == null) {
return null;
}
if ("/".equals(path)) {
return path;
}
String[] pathComponents = path.split("/");
TrieNode parent = rootNode;
List<String> components = new ArrayList<String>();
... | [
"public",
"String",
"findMaxPrefix",
"(",
"String",
"path",
")",
"{",
"if",
"(",
"path",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"\"/\"",
".",
"equals",
"(",
"path",
")",
")",
"{",
"return",
"path",
";",
"}",
"String",
"[",
... | return the largest prefix for the input path.
@param path the input path
@return the largest prefix for the input path. | [
"return",
"the",
"largest",
"prefix",
"for",
"the",
"input",
"path",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/common/PathTrie.java#L249-L284 |
62,117 | VoltDB/voltdb | src/frontend/org/voltdb/TableShorthand.java | TableShorthand.tableFromShorthand | public static VoltTable tableFromShorthand(String schema) {
String name = "T";
VoltTable.ColumnInfo[] columns = null;
// get a name
Matcher nameMatcher = m_namePattern.matcher(schema);
if (nameMatcher.find()) {
name = nameMatcher.group().trim();
}
/... | java | public static VoltTable tableFromShorthand(String schema) {
String name = "T";
VoltTable.ColumnInfo[] columns = null;
// get a name
Matcher nameMatcher = m_namePattern.matcher(schema);
if (nameMatcher.find()) {
name = nameMatcher.group().trim();
}
/... | [
"public",
"static",
"VoltTable",
"tableFromShorthand",
"(",
"String",
"schema",
")",
"{",
"String",
"name",
"=",
"\"T\"",
";",
"VoltTable",
".",
"ColumnInfo",
"[",
"]",
"columns",
"=",
"null",
";",
"// get a name",
"Matcher",
"nameMatcher",
"=",
"m_namePattern",... | Parse the shorthand according to the syntax as described
in the class comment. | [
"Parse",
"the",
"shorthand",
"according",
"to",
"the",
"syntax",
"as",
"described",
"in",
"the",
"class",
"comment",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/TableShorthand.java#L152-L226 |
62,118 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/Sort.java | Sort.swap | private static void swap(Object[] w, int a, int b) {
Object t = w[a];
w[a] = w[b];
w[b] = t;
} | java | private static void swap(Object[] w, int a, int b) {
Object t = w[a];
w[a] = w[b];
w[b] = t;
} | [
"private",
"static",
"void",
"swap",
"(",
"Object",
"[",
"]",
"w",
",",
"int",
"a",
",",
"int",
"b",
")",
"{",
"Object",
"t",
"=",
"w",
"[",
"a",
"]",
";",
"w",
"[",
"a",
"]",
"=",
"w",
"[",
"b",
"]",
";",
"w",
"[",
"b",
"]",
"=",
"t",
... | Swaps the a'th and b'th elements of the specified Row array. | [
"Swaps",
"the",
"a",
"th",
"and",
"b",
"th",
"elements",
"of",
"the",
"specified",
"Row",
"array",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/Sort.java#L149-L155 |
62,119 | VoltDB/voltdb | src/frontend/org/voltdb/client/VoltBulkLoader/PerPartitionTable.java | PerPartitionTable.insertRowInTable | synchronized void insertRowInTable(final VoltBulkLoaderRow nextRow) throws InterruptedException {
m_partitionRowQueue.put(nextRow);
if (m_partitionRowQueue.size() == m_minBatchTriggerSize) {
m_es.execute(new Runnable() {
@Override
public void run() {
... | java | synchronized void insertRowInTable(final VoltBulkLoaderRow nextRow) throws InterruptedException {
m_partitionRowQueue.put(nextRow);
if (m_partitionRowQueue.size() == m_minBatchTriggerSize) {
m_es.execute(new Runnable() {
@Override
public void run() {
... | [
"synchronized",
"void",
"insertRowInTable",
"(",
"final",
"VoltBulkLoaderRow",
"nextRow",
")",
"throws",
"InterruptedException",
"{",
"m_partitionRowQueue",
".",
"put",
"(",
"nextRow",
")",
";",
"if",
"(",
"m_partitionRowQueue",
".",
"size",
"(",
")",
"==",
"m_min... | Synchronized so that when the a single batch is filled up, we only queue one task to
drain the queue. The task will drain the queue until it doesn't contain a single batch. | [
"Synchronized",
"so",
"that",
"when",
"the",
"a",
"single",
"batch",
"is",
"filled",
"up",
"we",
"only",
"queue",
"one",
"task",
"to",
"drain",
"the",
"queue",
".",
"The",
"task",
"will",
"drain",
"the",
"queue",
"until",
"it",
"doesn",
"t",
"contain",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/VoltBulkLoader/PerPartitionTable.java#L170-L186 |
62,120 | VoltDB/voltdb | src/frontend/org/voltdb/CLIConfig.java | CLIConfig.getFields | public static List<Field> getFields(Class<?> startClass) {
List<Field> currentClassFields = new ArrayList<Field>();
currentClassFields.addAll(Arrays.asList(startClass.getDeclaredFields()));
Class<?> parentClass = startClass.getSuperclass();
if (parentClass != null) {
List<Fie... | java | public static List<Field> getFields(Class<?> startClass) {
List<Field> currentClassFields = new ArrayList<Field>();
currentClassFields.addAll(Arrays.asList(startClass.getDeclaredFields()));
Class<?> parentClass = startClass.getSuperclass();
if (parentClass != null) {
List<Fie... | [
"public",
"static",
"List",
"<",
"Field",
">",
"getFields",
"(",
"Class",
"<",
"?",
">",
"startClass",
")",
"{",
"List",
"<",
"Field",
">",
"currentClassFields",
"=",
"new",
"ArrayList",
"<",
"Field",
">",
"(",
")",
";",
"currentClassFields",
".",
"addAl... | get all the fields, including parents
@param startClass the current class
@return a list of fields | [
"get",
"all",
"the",
"fields",
"including",
"parents"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/CLIConfig.java#L259-L268 |
62,121 | VoltDB/voltdb | src/frontend/org/voltdb/importer/ImportManager.java | ImportManager.initialize | public static synchronized void initialize(int myHostId, CatalogContext catalogContext, HostMessenger messenger) throws BundleException, IOException {
ImporterStatsCollector statsCollector = new ImporterStatsCollector(myHostId);
ImportManager em = new ImportManager(myHostId, messenger, statsCollector);
... | java | public static synchronized void initialize(int myHostId, CatalogContext catalogContext, HostMessenger messenger) throws BundleException, IOException {
ImporterStatsCollector statsCollector = new ImporterStatsCollector(myHostId);
ImportManager em = new ImportManager(myHostId, messenger, statsCollector);
... | [
"public",
"static",
"synchronized",
"void",
"initialize",
"(",
"int",
"myHostId",
",",
"CatalogContext",
"catalogContext",
",",
"HostMessenger",
"messenger",
")",
"throws",
"BundleException",
",",
"IOException",
"{",
"ImporterStatsCollector",
"statsCollector",
"=",
"new... | Create the singleton ImportManager and initialize.
@param myHostId my host id in cluster
@param catalogContext current catalog context
@param messenger messenger to get to ZK
@throws org.osgi.framework.BundleException
@throws java.io.IOException | [
"Create",
"the",
"singleton",
"ImportManager",
"and",
"initialize",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/ImportManager.java#L112-L122 |
62,122 | VoltDB/voltdb | src/frontend/org/voltdb/importer/ImportManager.java | ImportManager.create | private synchronized void create(CatalogContext catalogContext) {
try {
Map<String, ImportConfiguration> newProcessorConfig = loadNewConfigAndBundles(catalogContext);
restartImporters(newProcessorConfig);
} catch (final Exception e) {
VoltDB.crashLocalVoltDB("Error cr... | java | private synchronized void create(CatalogContext catalogContext) {
try {
Map<String, ImportConfiguration> newProcessorConfig = loadNewConfigAndBundles(catalogContext);
restartImporters(newProcessorConfig);
} catch (final Exception e) {
VoltDB.crashLocalVoltDB("Error cr... | [
"private",
"synchronized",
"void",
"create",
"(",
"CatalogContext",
"catalogContext",
")",
"{",
"try",
"{",
"Map",
"<",
"String",
",",
"ImportConfiguration",
">",
"newProcessorConfig",
"=",
"loadNewConfigAndBundles",
"(",
"catalogContext",
")",
";",
"restartImporters"... | This creates a import connector from configuration provided.
@param catalogContext | [
"This",
"creates",
"a",
"import",
"connector",
"from",
"configuration",
"provided",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/ImportManager.java#L128-L135 |
62,123 | VoltDB/voltdb | src/frontend/org/voltdb/importer/ImportManager.java | ImportManager.loadNewConfigAndBundles | private Map<String, ImportConfiguration> loadNewConfigAndBundles(CatalogContext catalogContext) {
Map<String, ImportConfiguration> newProcessorConfig;
ImportType importElement = catalogContext.getDeployment().getImport();
if (importElement == null || importElement.getConfiguration().isEmpty()) ... | java | private Map<String, ImportConfiguration> loadNewConfigAndBundles(CatalogContext catalogContext) {
Map<String, ImportConfiguration> newProcessorConfig;
ImportType importElement = catalogContext.getDeployment().getImport();
if (importElement == null || importElement.getConfiguration().isEmpty()) ... | [
"private",
"Map",
"<",
"String",
",",
"ImportConfiguration",
">",
"loadNewConfigAndBundles",
"(",
"CatalogContext",
"catalogContext",
")",
"{",
"Map",
"<",
"String",
",",
"ImportConfiguration",
">",
"newProcessorConfig",
";",
"ImportType",
"importElement",
"=",
"catal... | Parses importer configs and loads the formatters and bundles needed into memory.
This is used to generate a new configuration either to load or to compare with existing.
@param catalogContext new catalog context
@return new importer configuration | [
"Parses",
"importer",
"configs",
"and",
"loads",
"the",
"formatters",
"and",
"bundles",
"needed",
"into",
"memory",
".",
"This",
"is",
"used",
"to",
"generate",
"a",
"new",
"configuration",
"either",
"to",
"load",
"or",
"to",
"compare",
"with",
"existing",
"... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/ImportManager.java#L161-L216 |
62,124 | VoltDB/voltdb | src/frontend/org/voltdb/importer/ImportManager.java | ImportManager.loadImporterBundle | private boolean loadImporterBundle(Properties moduleProperties){
String importModuleName = moduleProperties.getProperty(ImportDataProcessor.IMPORT_MODULE);
String attrs[] = importModuleName.split("\\|");
String bundleJar = attrs[1];
String moduleType = attrs[0];
try {
... | java | private boolean loadImporterBundle(Properties moduleProperties){
String importModuleName = moduleProperties.getProperty(ImportDataProcessor.IMPORT_MODULE);
String attrs[] = importModuleName.split("\\|");
String bundleJar = attrs[1];
String moduleType = attrs[0];
try {
... | [
"private",
"boolean",
"loadImporterBundle",
"(",
"Properties",
"moduleProperties",
")",
"{",
"String",
"importModuleName",
"=",
"moduleProperties",
".",
"getProperty",
"(",
"ImportDataProcessor",
".",
"IMPORT_MODULE",
")",
";",
"String",
"attrs",
"[",
"]",
"=",
"imp... | Checks if the module for importer has been loaded in the memory. If bundle doesn't exists, it loades one and
updates the mapping records of the bundles.
@param moduleProperties
@return true, if the bundle corresponding to the importer is in memory (uploaded or was already present) | [
"Checks",
"if",
"the",
"module",
"for",
"importer",
"has",
"been",
"loaded",
"in",
"the",
"memory",
".",
"If",
"bundle",
"doesn",
"t",
"exists",
"it",
"loades",
"one",
"and",
"updates",
"the",
"mapping",
"records",
"of",
"the",
"bundles",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/ImportManager.java#L225-L264 |
62,125 | VoltDB/voltdb | src/frontend/org/voltdb/NonVoltDBBackend.java | NonVoltDBBackend.printCaughtException | protected static void printCaughtException(String exceptionMessage) {
if (++countCaughtExceptions <= MAX_CAUGHT_EXCEPTION_MESSAGES) {
System.out.println(exceptionMessage);
}
if (countCaughtExceptions == MAX_CAUGHT_EXCEPTION_MESSAGES) {
System.out.println("In NonVoltDBBack... | java | protected static void printCaughtException(String exceptionMessage) {
if (++countCaughtExceptions <= MAX_CAUGHT_EXCEPTION_MESSAGES) {
System.out.println(exceptionMessage);
}
if (countCaughtExceptions == MAX_CAUGHT_EXCEPTION_MESSAGES) {
System.out.println("In NonVoltDBBack... | [
"protected",
"static",
"void",
"printCaughtException",
"(",
"String",
"exceptionMessage",
")",
"{",
"if",
"(",
"++",
"countCaughtExceptions",
"<=",
"MAX_CAUGHT_EXCEPTION_MESSAGES",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"exceptionMessage",
")",
";",
... | Print a message about an Exception that was caught; but limit the number
of such print messages, so that the console is not swamped by them. | [
"Print",
"a",
"message",
"about",
"an",
"Exception",
"that",
"was",
"caught",
";",
"but",
"limit",
"the",
"number",
"of",
"such",
"print",
"messages",
"so",
"that",
"the",
"console",
"is",
"not",
"swamped",
"by",
"them",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/NonVoltDBBackend.java#L418-L426 |
62,126 | VoltDB/voltdb | src/frontend/org/voltdb/NonVoltDBBackend.java | NonVoltDBBackend.getAllColumns | protected List<String> getAllColumns(String tableName) {
List<String> columns = new ArrayList<String>();
try {
// Lower-case table names are required for PostgreSQL; we might need to
// alter this if we use another comparison database (besides HSQL) someday
ResultSet ... | java | protected List<String> getAllColumns(String tableName) {
List<String> columns = new ArrayList<String>();
try {
// Lower-case table names are required for PostgreSQL; we might need to
// alter this if we use another comparison database (besides HSQL) someday
ResultSet ... | [
"protected",
"List",
"<",
"String",
">",
"getAllColumns",
"(",
"String",
"tableName",
")",
"{",
"List",
"<",
"String",
">",
"columns",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"try",
"{",
"// Lower-case table names are required for PostgreSQL;... | Returns all column names for the specified table, in the order defined
in the DDL. | [
"Returns",
"all",
"column",
"names",
"for",
"the",
"specified",
"table",
"in",
"the",
"order",
"defined",
"in",
"the",
"DDL",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/NonVoltDBBackend.java#L430-L443 |
62,127 | VoltDB/voltdb | src/frontend/org/voltdb/NonVoltDBBackend.java | NonVoltDBBackend.getPrimaryKeys | protected List<String> getPrimaryKeys(String tableName) {
List<String> pkCols = new ArrayList<String>();
try {
// Lower-case table names are required for PostgreSQL; we might need to
// alter this if we use another comparison database (besides HSQL) someday
ResultSet ... | java | protected List<String> getPrimaryKeys(String tableName) {
List<String> pkCols = new ArrayList<String>();
try {
// Lower-case table names are required for PostgreSQL; we might need to
// alter this if we use another comparison database (besides HSQL) someday
ResultSet ... | [
"protected",
"List",
"<",
"String",
">",
"getPrimaryKeys",
"(",
"String",
"tableName",
")",
"{",
"List",
"<",
"String",
">",
"pkCols",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"try",
"{",
"// Lower-case table names are required for PostgreSQL;... | Returns all primary key column names for the specified table, in the
order defined in the DDL. | [
"Returns",
"all",
"primary",
"key",
"column",
"names",
"for",
"the",
"specified",
"table",
"in",
"the",
"order",
"defined",
"in",
"the",
"DDL",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/NonVoltDBBackend.java#L447-L460 |
62,128 | VoltDB/voltdb | src/frontend/org/voltdb/NonVoltDBBackend.java | NonVoltDBBackend.getNonPrimaryKeyColumns | protected List<String> getNonPrimaryKeyColumns(String tableName) {
List<String> columns = getAllColumns(tableName);
columns.removeAll(getPrimaryKeys(tableName));
return columns;
} | java | protected List<String> getNonPrimaryKeyColumns(String tableName) {
List<String> columns = getAllColumns(tableName);
columns.removeAll(getPrimaryKeys(tableName));
return columns;
} | [
"protected",
"List",
"<",
"String",
">",
"getNonPrimaryKeyColumns",
"(",
"String",
"tableName",
")",
"{",
"List",
"<",
"String",
">",
"columns",
"=",
"getAllColumns",
"(",
"tableName",
")",
";",
"columns",
".",
"removeAll",
"(",
"getPrimaryKeys",
"(",
"tableNa... | Returns all non-primary-key column names for the specified table, in the
order defined in the DDL. | [
"Returns",
"all",
"non",
"-",
"primary",
"-",
"key",
"column",
"names",
"for",
"the",
"specified",
"table",
"in",
"the",
"order",
"defined",
"in",
"the",
"DDL",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/NonVoltDBBackend.java#L464-L468 |
62,129 | VoltDB/voltdb | src/frontend/org/voltdb/NonVoltDBBackend.java | NonVoltDBBackend.transformQuery | protected String transformQuery(String query, QueryTransformer ... qts) {
String result = query;
for (QueryTransformer qt : qts) {
result = transformQuery(result, qt);
}
return result;
} | java | protected String transformQuery(String query, QueryTransformer ... qts) {
String result = query;
for (QueryTransformer qt : qts) {
result = transformQuery(result, qt);
}
return result;
} | [
"protected",
"String",
"transformQuery",
"(",
"String",
"query",
",",
"QueryTransformer",
"...",
"qts",
")",
"{",
"String",
"result",
"=",
"query",
";",
"for",
"(",
"QueryTransformer",
"qt",
":",
"qts",
")",
"{",
"result",
"=",
"transformQuery",
"(",
"result... | Calls the transformQuery method above multiple times, for each
specified QueryTransformer. | [
"Calls",
"the",
"transformQuery",
"method",
"above",
"multiple",
"times",
"for",
"each",
"specified",
"QueryTransformer",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/NonVoltDBBackend.java#L899-L905 |
62,130 | VoltDB/voltdb | src/frontend/org/voltdb/NonVoltDBBackend.java | NonVoltDBBackend.printTransformedSql | static protected void printTransformedSql(String originalSql, String modifiedSql) {
if (transformedSqlFileWriter != null && !originalSql.equals(modifiedSql)) {
try {
transformedSqlFileWriter.write("original SQL: " + originalSql + "\n");
transformedSqlFileWriter.write(... | java | static protected void printTransformedSql(String originalSql, String modifiedSql) {
if (transformedSqlFileWriter != null && !originalSql.equals(modifiedSql)) {
try {
transformedSqlFileWriter.write("original SQL: " + originalSql + "\n");
transformedSqlFileWriter.write(... | [
"static",
"protected",
"void",
"printTransformedSql",
"(",
"String",
"originalSql",
",",
"String",
"modifiedSql",
")",
"{",
"if",
"(",
"transformedSqlFileWriter",
"!=",
"null",
"&&",
"!",
"originalSql",
".",
"equals",
"(",
"modifiedSql",
")",
")",
"{",
"try",
... | Prints the original and modified SQL statements, to the "Transformed
SQL" output file, assuming that that file is defined; and only if
the original and modified SQL are not the same, i.e., only if some
transformation has indeed taken place. | [
"Prints",
"the",
"original",
"and",
"modified",
"SQL",
"statements",
"to",
"the",
"Transformed",
"SQL",
"output",
"file",
"assuming",
"that",
"that",
"file",
"is",
"defined",
";",
"and",
"only",
"if",
"the",
"original",
"and",
"modified",
"SQL",
"are",
"not"... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/NonVoltDBBackend.java#L911-L922 |
62,131 | VoltDB/voltdb | src/frontend/org/voltdb/parser/SQLPatternFactory.java | SQLPatternFactory.makeGroup | private static SQLPatternPart makeGroup(boolean capture, String captureLabel, SQLPatternPart part)
{
// Need an outer part if capturing something that's already a group (capturing or not)
boolean alreadyGroup = (part.m_flags & (SQLPatternFactory.GROUP | SQLPatternFactory.CAPTURE)) != 0;
SQLP... | java | private static SQLPatternPart makeGroup(boolean capture, String captureLabel, SQLPatternPart part)
{
// Need an outer part if capturing something that's already a group (capturing or not)
boolean alreadyGroup = (part.m_flags & (SQLPatternFactory.GROUP | SQLPatternFactory.CAPTURE)) != 0;
SQLP... | [
"private",
"static",
"SQLPatternPart",
"makeGroup",
"(",
"boolean",
"capture",
",",
"String",
"captureLabel",
",",
"SQLPatternPart",
"part",
")",
"{",
"// Need an outer part if capturing something that's already a group (capturing or not)",
"boolean",
"alreadyGroup",
"=",
"(",
... | Make a capturing or non-capturing group | [
"Make",
"a",
"capturing",
"or",
"non",
"-",
"capturing",
"group"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLPatternFactory.java#L298-L311 |
62,132 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/HSQLInterface.java | HSQLInterface.loadHsqldb | public static HSQLInterface loadHsqldb(ParameterStateManager psMgr) {
// Specifically set the timezone to UTC to avoid the default usage local timezone in HSQL.
// This ensures that all VoltDB data paths use the same timezone for representing time.
TimeZone.setDefault(TimeZone.getTimeZone("GMT+0... | java | public static HSQLInterface loadHsqldb(ParameterStateManager psMgr) {
// Specifically set the timezone to UTC to avoid the default usage local timezone in HSQL.
// This ensures that all VoltDB data paths use the same timezone for representing time.
TimeZone.setDefault(TimeZone.getTimeZone("GMT+0... | [
"public",
"static",
"HSQLInterface",
"loadHsqldb",
"(",
"ParameterStateManager",
"psMgr",
")",
"{",
"// Specifically set the timezone to UTC to avoid the default usage local timezone in HSQL.",
"// This ensures that all VoltDB data paths use the same timezone for representing time.",
"TimeZone... | Load up an HSQLDB in-memory instance.
@return A newly initialized in-memory HSQLDB instance accessible
through the returned instance of HSQLInterface | [
"Load",
"up",
"an",
"HSQLDB",
"in",
"-",
"memory",
"instance",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/HSQLInterface.java#L146-L168 |
62,133 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/HSQLInterface.java | HSQLInterface.runDDLCommandAndDiff | public VoltXMLDiff runDDLCommandAndDiff(HSQLDDLInfo stmtInfo,
String ddl)
throws HSQLParseException
{
// name of the table we're going to have to diff (if any)
String expectedTableAffected = null;
// If ... | java | public VoltXMLDiff runDDLCommandAndDiff(HSQLDDLInfo stmtInfo,
String ddl)
throws HSQLParseException
{
// name of the table we're going to have to diff (if any)
String expectedTableAffected = null;
// If ... | [
"public",
"VoltXMLDiff",
"runDDLCommandAndDiff",
"(",
"HSQLDDLInfo",
"stmtInfo",
",",
"String",
"ddl",
")",
"throws",
"HSQLParseException",
"{",
"// name of the table we're going to have to diff (if any)",
"String",
"expectedTableAffected",
"=",
"null",
";",
"// If we fail to p... | Modify the current schema with a SQL DDL command and get the
diff which represents the changes.
Note that you have to be consistent WRT case for the expected names.
@param expectedTableAffected The name of the table affected by this DDL
or null if unknown
@param expectedIndexAffected The name of the index affected by... | [
"Modify",
"the",
"current",
"schema",
"with",
"a",
"SQL",
"DDL",
"command",
"and",
"get",
"the",
"diff",
"which",
"represents",
"the",
"changes",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/HSQLInterface.java#L185-L282 |
62,134 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/HSQLInterface.java | HSQLInterface.runDDLCommand | public void runDDLCommand(String ddl) throws HSQLParseException {
sessionProxy.clearLocalTables();
Result result = sessionProxy.executeDirectStatement(ddl);
if (result.hasError()) {
throw new HSQLParseException(result.getMainString());
}
} | java | public void runDDLCommand(String ddl) throws HSQLParseException {
sessionProxy.clearLocalTables();
Result result = sessionProxy.executeDirectStatement(ddl);
if (result.hasError()) {
throw new HSQLParseException(result.getMainString());
}
} | [
"public",
"void",
"runDDLCommand",
"(",
"String",
"ddl",
")",
"throws",
"HSQLParseException",
"{",
"sessionProxy",
".",
"clearLocalTables",
"(",
")",
";",
"Result",
"result",
"=",
"sessionProxy",
".",
"executeDirectStatement",
"(",
"ddl",
")",
";",
"if",
"(",
... | Modify the current schema with a SQL DDL command.
@param ddl The SQL DDL statement to be run.
@throws HSQLParseException Throws exception if SQL parse error is
encountered. | [
"Modify",
"the",
"current",
"schema",
"with",
"a",
"SQL",
"DDL",
"command",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/HSQLInterface.java#L291-L297 |
62,135 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/HSQLInterface.java | HSQLInterface.fixupInStatementExpressions | private void fixupInStatementExpressions(VoltXMLElement expr) throws HSQLParseException {
if (doesExpressionReallyMeanIn(expr)) {
inFixup(expr);
// can't return because in with subquery can be nested
}
// recursive hunt
for (VoltXMLElement child : expr.children) ... | java | private void fixupInStatementExpressions(VoltXMLElement expr) throws HSQLParseException {
if (doesExpressionReallyMeanIn(expr)) {
inFixup(expr);
// can't return because in with subquery can be nested
}
// recursive hunt
for (VoltXMLElement child : expr.children) ... | [
"private",
"void",
"fixupInStatementExpressions",
"(",
"VoltXMLElement",
"expr",
")",
"throws",
"HSQLParseException",
"{",
"if",
"(",
"doesExpressionReallyMeanIn",
"(",
"expr",
")",
")",
"{",
"inFixup",
"(",
"expr",
")",
";",
"// can't return because in with subquery ca... | Recursively find all in-lists, subquery, row comparisons found in the XML and munge them into the
simpler thing we want to pass to the AbstractParsedStmt.
@throws HSQLParseException | [
"Recursively",
"find",
"all",
"in",
"-",
"lists",
"subquery",
"row",
"comparisons",
"found",
"in",
"the",
"XML",
"and",
"munge",
"them",
"into",
"the",
"simpler",
"thing",
"we",
"want",
"to",
"pass",
"to",
"the",
"AbstractParsedStmt",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/HSQLInterface.java#L418-L428 |
62,136 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/HSQLInterface.java | HSQLInterface.inFixup | private void inFixup(VoltXMLElement inElement) {
// make this an in expression
inElement.name = "operation";
inElement.attributes.put("optype", "in");
VoltXMLElement rowElem = null;
VoltXMLElement tableElem = null;
VoltXMLElement subqueryElem = null;
VoltXMLEleme... | java | private void inFixup(VoltXMLElement inElement) {
// make this an in expression
inElement.name = "operation";
inElement.attributes.put("optype", "in");
VoltXMLElement rowElem = null;
VoltXMLElement tableElem = null;
VoltXMLElement subqueryElem = null;
VoltXMLEleme... | [
"private",
"void",
"inFixup",
"(",
"VoltXMLElement",
"inElement",
")",
"{",
"// make this an in expression",
"inElement",
".",
"name",
"=",
"\"operation\"",
";",
"inElement",
".",
"attributes",
".",
"put",
"(",
"\"optype\"",
",",
"\"in\"",
")",
";",
"VoltXMLElemen... | Take an equality-test expression that represents in-list
and munge it into the simpler thing we want to output
to the AbstractParsedStmt for its AbstractExpression classes. | [
"Take",
"an",
"equality",
"-",
"test",
"expression",
"that",
"represents",
"in",
"-",
"list",
"and",
"munge",
"it",
"into",
"the",
"simpler",
"thing",
"we",
"want",
"to",
"output",
"to",
"the",
"AbstractParsedStmt",
"for",
"its",
"AbstractExpression",
"classes... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/HSQLInterface.java#L478-L527 |
62,137 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/HSQLInterface.java | HSQLInterface.printTables | @SuppressWarnings("unused")
private void printTables() {
try {
String schemaName = sessionProxy.getSchemaName(null);
System.out.println("*** Tables For Schema: " + schemaName + " ***");
}
catch (HsqlException caught) {
caught.printStackTrace();
}
... | java | @SuppressWarnings("unused")
private void printTables() {
try {
String schemaName = sessionProxy.getSchemaName(null);
System.out.println("*** Tables For Schema: " + schemaName + " ***");
}
catch (HsqlException caught) {
caught.printStackTrace();
}
... | [
"@",
"SuppressWarnings",
"(",
"\"unused\"",
")",
"private",
"void",
"printTables",
"(",
")",
"{",
"try",
"{",
"String",
"schemaName",
"=",
"sessionProxy",
".",
"getSchemaName",
"(",
"null",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\"*** Tables F... | Debug-only method that prints out the names of all
tables in the current schema. | [
"Debug",
"-",
"only",
"method",
"that",
"prints",
"out",
"the",
"names",
"of",
"all",
"tables",
"in",
"the",
"current",
"schema",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/HSQLInterface.java#L533-L549 |
62,138 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/HSQLInterface.java | HSQLInterface.getXMLForTable | public VoltXMLElement getXMLForTable(String tableName) throws HSQLParseException {
VoltXMLElement xml = emptySchema.duplicate();
// search all the tables XXX probably could do this non-linearly,
// but i don't know about case-insensitivity yet
HashMappedList hsqlTables = getHSQLTables(... | java | public VoltXMLElement getXMLForTable(String tableName) throws HSQLParseException {
VoltXMLElement xml = emptySchema.duplicate();
// search all the tables XXX probably could do this non-linearly,
// but i don't know about case-insensitivity yet
HashMappedList hsqlTables = getHSQLTables(... | [
"public",
"VoltXMLElement",
"getXMLForTable",
"(",
"String",
"tableName",
")",
"throws",
"HSQLParseException",
"{",
"VoltXMLElement",
"xml",
"=",
"emptySchema",
".",
"duplicate",
"(",
")",
";",
"// search all the tables XXX probably could do this non-linearly,",
"// but i do... | Get a serialized XML representation of a particular table. | [
"Get",
"a",
"serialized",
"XML",
"representation",
"of",
"a",
"particular",
"table",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/HSQLInterface.java#L611-L630 |
62,139 | VoltDB/voltdb | src/frontend/org/voltdb/importclient/kafka10/KafkaConsumerRunner.java | KafkaConsumerRunner.calculateTrackers | private void calculateTrackers(Collection<TopicPartition> partitions) {
Map<TopicPartition, CommitTracker> trackers = new HashMap<>();
trackers.putAll(m_trackerMap.get());
Map<TopicPartition, AtomicLong> lastCommittedOffSets = new HashMap<>();
lastCommittedOffSets.putAll(m_lastCommitte... | java | private void calculateTrackers(Collection<TopicPartition> partitions) {
Map<TopicPartition, CommitTracker> trackers = new HashMap<>();
trackers.putAll(m_trackerMap.get());
Map<TopicPartition, AtomicLong> lastCommittedOffSets = new HashMap<>();
lastCommittedOffSets.putAll(m_lastCommitte... | [
"private",
"void",
"calculateTrackers",
"(",
"Collection",
"<",
"TopicPartition",
">",
"partitions",
")",
"{",
"Map",
"<",
"TopicPartition",
",",
"CommitTracker",
">",
"trackers",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"trackers",
".",
"putAll",
"(",
"m... | add trackers for new topic-partition in this importer | [
"add",
"trackers",
"for",
"new",
"topic",
"-",
"partition",
"in",
"this",
"importer"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importclient/kafka10/KafkaConsumerRunner.java#L134-L177 |
62,140 | VoltDB/voltdb | src/frontend/org/voltdb/importclient/kafka10/KafkaConsumerRunner.java | KafkaConsumerRunner.seek | private void seek(List<TopicPartition> seekList) {
for (TopicPartition tp : seekList) {
AtomicLong lastCommittedOffset = m_lastCommittedOffSets.get().get(tp);
if (lastCommittedOffset != null && lastCommittedOffset.get() > -1L) {
AtomicLong lastSeeked = m_lastSeekedOffSets... | java | private void seek(List<TopicPartition> seekList) {
for (TopicPartition tp : seekList) {
AtomicLong lastCommittedOffset = m_lastCommittedOffSets.get().get(tp);
if (lastCommittedOffset != null && lastCommittedOffset.get() > -1L) {
AtomicLong lastSeeked = m_lastSeekedOffSets... | [
"private",
"void",
"seek",
"(",
"List",
"<",
"TopicPartition",
">",
"seekList",
")",
"{",
"for",
"(",
"TopicPartition",
"tp",
":",
"seekList",
")",
"{",
"AtomicLong",
"lastCommittedOffset",
"=",
"m_lastCommittedOffSets",
".",
"get",
"(",
")",
".",
"get",
"("... | Move offsets to correct positions for next poll | [
"Move",
"offsets",
"to",
"correct",
"positions",
"for",
"next",
"poll"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importclient/kafka10/KafkaConsumerRunner.java#L355-L373 |
62,141 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringUtil.java | StringUtil.toZeroPaddedString | public static String toZeroPaddedString(long value, int precision,
int maxSize) {
StringBuffer sb = new StringBuffer();
if (value < 0) {
value = -value;
}
String s = Long.toString(value);
if (s.length() > precision) {
s = s.substring(precis... | java | public static String toZeroPaddedString(long value, int precision,
int maxSize) {
StringBuffer sb = new StringBuffer();
if (value < 0) {
value = -value;
}
String s = Long.toString(value);
if (s.length() > precision) {
s = s.substring(precis... | [
"public",
"static",
"String",
"toZeroPaddedString",
"(",
"long",
"value",
",",
"int",
"precision",
",",
"int",
"maxSize",
")",
"{",
"StringBuffer",
"sb",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"value",
"<",
"0",
")",
"{",
"value",
"=",
"... | If necessary, adds zeros to the beginning of a value so that the total
length matches the given precision, otherwise trims the right digits.
Then if maxSize is smaller than precision, trims the right digits to
maxSize. Negative values are treated as positive | [
"If",
"necessary",
"adds",
"zeros",
"to",
"the",
"beginning",
"of",
"a",
"value",
"so",
"that",
"the",
"total",
"length",
"matches",
"the",
"given",
"precision",
"otherwise",
"trims",
"the",
"right",
"digits",
".",
"Then",
"if",
"maxSize",
"is",
"smaller",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringUtil.java#L53-L79 |
62,142 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringUtil.java | StringUtil.toLowerSubset | public static String toLowerSubset(String source, char substitute) {
int len = source.length();
StringBuffer sb = new StringBuffer(len);
char ch;
for (int i = 0; i < len; i++) {
ch = source.charAt(i);
if (!Character.isLetterOrDigit(ch)) {
... | java | public static String toLowerSubset(String source, char substitute) {
int len = source.length();
StringBuffer sb = new StringBuffer(len);
char ch;
for (int i = 0; i < len; i++) {
ch = source.charAt(i);
if (!Character.isLetterOrDigit(ch)) {
... | [
"public",
"static",
"String",
"toLowerSubset",
"(",
"String",
"source",
",",
"char",
"substitute",
")",
"{",
"int",
"len",
"=",
"source",
".",
"length",
"(",
")",
";",
"StringBuffer",
"sb",
"=",
"new",
"StringBuffer",
"(",
"len",
")",
";",
"char",
"ch",
... | Returns a string with non alphanumeric chars converted to the
substitute character. A digit first character is also converted.
By sqlbob@users
@param source string to convert
@param substitute character to use
@return converted string | [
"Returns",
"a",
"string",
"with",
"non",
"alphanumeric",
"chars",
"converted",
"to",
"the",
"substitute",
"character",
".",
"A",
"digit",
"first",
"character",
"is",
"also",
"converted",
".",
"By",
"sqlbob"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringUtil.java#L115-L134 |
62,143 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringUtil.java | StringUtil.arrayToString | public static String arrayToString(Object array) {
int len = Array.getLength(array);
int last = len - 1;
StringBuffer sb = new StringBuffer(2 * (len + 1));
sb.append('{');
for (int i = 0; i < len; i++) {
sb.append(Array.get(array, i));
... | java | public static String arrayToString(Object array) {
int len = Array.getLength(array);
int last = len - 1;
StringBuffer sb = new StringBuffer(2 * (len + 1));
sb.append('{');
for (int i = 0; i < len; i++) {
sb.append(Array.get(array, i));
... | [
"public",
"static",
"String",
"arrayToString",
"(",
"Object",
"array",
")",
"{",
"int",
"len",
"=",
"Array",
".",
"getLength",
"(",
"array",
")",
";",
"int",
"last",
"=",
"len",
"-",
"1",
";",
"StringBuffer",
"sb",
"=",
"new",
"StringBuffer",
"(",
"2",... | Builds a bracketed CSV list from the array
@param array an array of Objects
@return string | [
"Builds",
"a",
"bracketed",
"CSV",
"list",
"from",
"the",
"array"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringUtil.java#L141-L160 |
62,144 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringUtil.java | StringUtil.appendPair | public static void appendPair(StringBuffer b, String s1, String s2,
String separator, String terminator) {
b.append(s1);
b.append(separator);
b.append(s2);
b.append(terminator);
} | java | public static void appendPair(StringBuffer b, String s1, String s2,
String separator, String terminator) {
b.append(s1);
b.append(separator);
b.append(s2);
b.append(terminator);
} | [
"public",
"static",
"void",
"appendPair",
"(",
"StringBuffer",
"b",
",",
"String",
"s1",
",",
"String",
"s2",
",",
"String",
"separator",
",",
"String",
"terminator",
")",
"{",
"b",
".",
"append",
"(",
"s1",
")",
";",
"b",
".",
"append",
"(",
"separato... | Appends a pair of string to the string buffer, using the separator between
and terminator at the end
@param b the buffer
@param s1 first string
@param s2 second string
@param separator separator string
@param terminator terminator string | [
"Appends",
"a",
"pair",
"of",
"string",
"to",
"the",
"string",
"buffer",
"using",
"the",
"separator",
"between",
"and",
"terminator",
"at",
"the",
"end"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringUtil.java#L279-L286 |
62,145 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringUtil.java | StringUtil.rightTrimSize | public static int rightTrimSize(String s) {
int i = s.length();
while (i > 0) {
i--;
if (s.charAt(i) != ' ') {
return i + 1;
}
}
return 0;
} | java | public static int rightTrimSize(String s) {
int i = s.length();
while (i > 0) {
i--;
if (s.charAt(i) != ' ') {
return i + 1;
}
}
return 0;
} | [
"public",
"static",
"int",
"rightTrimSize",
"(",
"String",
"s",
")",
"{",
"int",
"i",
"=",
"s",
".",
"length",
"(",
")",
";",
"while",
"(",
"i",
">",
"0",
")",
"{",
"i",
"--",
";",
"if",
"(",
"s",
".",
"charAt",
"(",
"i",
")",
"!=",
"'",
"'... | Returns the size of substring that does not contain any trailing spaces
@param s the string
@return trimmed size | [
"Returns",
"the",
"size",
"of",
"substring",
"that",
"does",
"not",
"contain",
"any",
"trailing",
"spaces"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringUtil.java#L312-L325 |
62,146 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringUtil.java | StringUtil.skipSpaces | public static int skipSpaces(String s, int start) {
int limit = s.length();
int i = start;
for (; i < limit; i++) {
if (s.charAt(i) != ' ') {
break;
}
}
return i;
} | java | public static int skipSpaces(String s, int start) {
int limit = s.length();
int i = start;
for (; i < limit; i++) {
if (s.charAt(i) != ' ') {
break;
}
}
return i;
} | [
"public",
"static",
"int",
"skipSpaces",
"(",
"String",
"s",
",",
"int",
"start",
")",
"{",
"int",
"limit",
"=",
"s",
".",
"length",
"(",
")",
";",
"int",
"i",
"=",
"start",
";",
"for",
"(",
";",
"i",
"<",
"limit",
";",
"i",
"++",
")",
"{",
"... | Skips any spaces at or after start and returns the index of first
non-space character;
@param s the string
@param start index to start
@return index of first non-space | [
"Skips",
"any",
"spaces",
"at",
"or",
"after",
"start",
"and",
"returns",
"the",
"index",
"of",
"first",
"non",
"-",
"space",
"character",
";"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringUtil.java#L334-L346 |
62,147 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringUtil.java | StringUtil.split | public static String[] split(String s, String separator) {
HsqlArrayList list = new HsqlArrayList();
int currindex = 0;
for (boolean more = true; more; ) {
int nextindex = s.indexOf(separator, currindex);
if (nextindex == -1) {
nextindex ... | java | public static String[] split(String s, String separator) {
HsqlArrayList list = new HsqlArrayList();
int currindex = 0;
for (boolean more = true; more; ) {
int nextindex = s.indexOf(separator, currindex);
if (nextindex == -1) {
nextindex ... | [
"public",
"static",
"String",
"[",
"]",
"split",
"(",
"String",
"s",
",",
"String",
"separator",
")",
"{",
"HsqlArrayList",
"list",
"=",
"new",
"HsqlArrayList",
"(",
")",
";",
"int",
"currindex",
"=",
"0",
";",
"for",
"(",
"boolean",
"more",
"=",
"true... | Splits the string into an array, using the separator. If separator is
not found in the string, the whole string is returned in the array.
@param s the string
@param separator the separator
@return array of strings | [
"Splits",
"the",
"string",
"into",
"an",
"array",
"using",
"the",
"separator",
".",
"If",
"separator",
"is",
"not",
"found",
"in",
"the",
"string",
"the",
"whole",
"string",
"is",
"returned",
"in",
"the",
"array",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringUtil.java#L356-L375 |
62,148 | VoltDB/voltdb | src/frontend/org/voltdb/ExportStatsBase.java | ExportStatsBase.populateColumnSchema | @Override
protected void populateColumnSchema(ArrayList<ColumnInfo> columns) {
super.populateColumnSchema(columns);
columns.add(new ColumnInfo(VoltSystemProcedure.CNAME_SITE_ID, VoltSystemProcedure.CTYPE_ID));
columns.add(new ColumnInfo(Columns.PARTITION_ID, VoltType.BIGINT));
column... | java | @Override
protected void populateColumnSchema(ArrayList<ColumnInfo> columns) {
super.populateColumnSchema(columns);
columns.add(new ColumnInfo(VoltSystemProcedure.CNAME_SITE_ID, VoltSystemProcedure.CTYPE_ID));
columns.add(new ColumnInfo(Columns.PARTITION_ID, VoltType.BIGINT));
column... | [
"@",
"Override",
"protected",
"void",
"populateColumnSchema",
"(",
"ArrayList",
"<",
"ColumnInfo",
">",
"columns",
")",
"{",
"super",
".",
"populateColumnSchema",
"(",
"columns",
")",
";",
"columns",
".",
"add",
"(",
"new",
"ColumnInfo",
"(",
"VoltSystemProcedur... | Check cluster.py and checkstats.py if order of the columns is changed, | [
"Check",
"cluster",
".",
"py",
"and",
"checkstats",
".",
"py",
"if",
"order",
"of",
"the",
"columns",
"is",
"changed"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ExportStatsBase.java#L90-L106 |
62,149 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/BufferedReadLog.java | BufferedReadLog.offerInternal | private void offerInternal(Mailbox mailbox, Item item, long handle) {
m_bufferedReads.add(item);
releaseBufferedReads(mailbox, handle);
} | java | private void offerInternal(Mailbox mailbox, Item item, long handle) {
m_bufferedReads.add(item);
releaseBufferedReads(mailbox, handle);
} | [
"private",
"void",
"offerInternal",
"(",
"Mailbox",
"mailbox",
",",
"Item",
"item",
",",
"long",
"handle",
")",
"{",
"m_bufferedReads",
".",
"add",
"(",
"item",
")",
";",
"releaseBufferedReads",
"(",
"mailbox",
",",
"handle",
")",
";",
"}"
] | SPI offers a new message. | [
"SPI",
"offers",
"a",
"new",
"message",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/BufferedReadLog.java#L98-L101 |
62,150 | VoltDB/voltdb | src/frontend/org/voltdb/export/StreamBlockQueue.java | StreamBlockQueue.sizeInBytes | public long sizeInBytes() throws IOException {
long memoryBlockUsage = 0;
for (StreamBlock b : m_memoryDeque) {
//Use only total size, but throw in the USO
//to make book keeping consistent when flushed to disk
//Also dont count persisted blocks.
memoryBlo... | java | public long sizeInBytes() throws IOException {
long memoryBlockUsage = 0;
for (StreamBlock b : m_memoryDeque) {
//Use only total size, but throw in the USO
//to make book keeping consistent when flushed to disk
//Also dont count persisted blocks.
memoryBlo... | [
"public",
"long",
"sizeInBytes",
"(",
")",
"throws",
"IOException",
"{",
"long",
"memoryBlockUsage",
"=",
"0",
";",
"for",
"(",
"StreamBlock",
"b",
":",
"m_memoryDeque",
")",
"{",
"//Use only total size, but throw in the USO",
"//to make book keeping consistent when flush... | Only used in tests, should be removed. | [
"Only",
"used",
"in",
"tests",
"should",
"be",
"removed",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/StreamBlockQueue.java#L308-L318 |
62,151 | VoltDB/voltdb | src/frontend/org/voltdb/export/StreamBlockQueue.java | StreamBlockQueue.truncateToSequenceNumber | public void truncateToSequenceNumber(final long truncationSeqNo) throws IOException {
assert(m_memoryDeque.isEmpty());
m_persistentDeque.parseAndTruncate(new BinaryDequeTruncator() {
@Override
public TruncatorResponse parse(BBContainer bbc) {
ByteBuffer b = bbc.b... | java | public void truncateToSequenceNumber(final long truncationSeqNo) throws IOException {
assert(m_memoryDeque.isEmpty());
m_persistentDeque.parseAndTruncate(new BinaryDequeTruncator() {
@Override
public TruncatorResponse parse(BBContainer bbc) {
ByteBuffer b = bbc.b... | [
"public",
"void",
"truncateToSequenceNumber",
"(",
"final",
"long",
"truncationSeqNo",
")",
"throws",
"IOException",
"{",
"assert",
"(",
"m_memoryDeque",
".",
"isEmpty",
"(",
")",
")",
";",
"m_persistentDeque",
".",
"parseAndTruncate",
"(",
"new",
"BinaryDequeTrunca... | See PDB segment layout at beginning of this file. | [
"See",
"PDB",
"segment",
"layout",
"at",
"beginning",
"of",
"this",
"file",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/StreamBlockQueue.java#L337-L400 |
62,152 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/store/BitMap.java | BitMap.set | public int set(int pos) {
while (pos >= capacity) {
doubleCapacity();
}
if (pos >= limitPos) {
limitPos = pos + 1;
}
int windex = pos >> 5;
int mask = 0x80000000 >>> (pos & 0x1F);
int word = map[windex];
int result = (word & ... | java | public int set(int pos) {
while (pos >= capacity) {
doubleCapacity();
}
if (pos >= limitPos) {
limitPos = pos + 1;
}
int windex = pos >> 5;
int mask = 0x80000000 >>> (pos & 0x1F);
int word = map[windex];
int result = (word & ... | [
"public",
"int",
"set",
"(",
"int",
"pos",
")",
"{",
"while",
"(",
"pos",
">=",
"capacity",
")",
"{",
"doubleCapacity",
"(",
")",
";",
"}",
"if",
"(",
"pos",
">=",
"limitPos",
")",
"{",
"limitPos",
"=",
"pos",
"+",
"1",
";",
"}",
"int",
"windex",... | Sets pos and returns old value | [
"Sets",
"pos",
"and",
"returns",
"old",
"value"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/store/BitMap.java#L83-L102 |
62,153 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/store/BitMap.java | BitMap.and | public static void and(byte[] map, int pos, byte source, int count) {
int shift = pos & 0x07;
int mask = (source & 0xff) >>> shift;
int innermask = 0xff >> shift;
int index = pos / 8;
if (count < 8) {
innermask = innermask >>> (8 - count);
i... | java | public static void and(byte[] map, int pos, byte source, int count) {
int shift = pos & 0x07;
int mask = (source & 0xff) >>> shift;
int innermask = 0xff >> shift;
int index = pos / 8;
if (count < 8) {
innermask = innermask >>> (8 - count);
i... | [
"public",
"static",
"void",
"and",
"(",
"byte",
"[",
"]",
"map",
",",
"int",
"pos",
",",
"byte",
"source",
",",
"int",
"count",
")",
"{",
"int",
"shift",
"=",
"pos",
"&",
"0x07",
";",
"int",
"mask",
"=",
"(",
"source",
"&",
"0xff",
")",
">>>",
... | AND count bits from source with map contents starting at pos | [
"AND",
"count",
"bits",
"from",
"source",
"with",
"map",
"contents",
"starting",
"at",
"pos"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/store/BitMap.java#L307-L347 |
62,154 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/store/BitMap.java | BitMap.or | public static void or(byte[] map, int pos, byte source, int count) {
int shift = pos & 0x07;
int mask = (source & 0xff) >>> shift;
int index = pos / 8;
if (index >= map.length) {
return;
}
byte b = (byte) (map[index] | mask);
map[index] = b;
... | java | public static void or(byte[] map, int pos, byte source, int count) {
int shift = pos & 0x07;
int mask = (source & 0xff) >>> shift;
int index = pos / 8;
if (index >= map.length) {
return;
}
byte b = (byte) (map[index] | mask);
map[index] = b;
... | [
"public",
"static",
"void",
"or",
"(",
"byte",
"[",
"]",
"map",
",",
"int",
"pos",
",",
"byte",
"source",
",",
"int",
"count",
")",
"{",
"int",
"shift",
"=",
"pos",
"&",
"0x07",
";",
"int",
"mask",
"=",
"(",
"source",
"&",
"0xff",
")",
">>>",
"... | OR count bits from source with map contents starting at pos | [
"OR",
"count",
"bits",
"from",
"source",
"with",
"map",
"contents",
"starting",
"at",
"pos"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/store/BitMap.java#L352-L377 |
62,155 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java | DoubleIntIndex.addUnsorted | public synchronized boolean addUnsorted(int key, int value) {
if (count == capacity) {
if (fixedSize) {
return false;
} else {
doubleCapacity();
}
}
if (sorted && count != 0) {
if (sortOnValues) {
i... | java | public synchronized boolean addUnsorted(int key, int value) {
if (count == capacity) {
if (fixedSize) {
return false;
} else {
doubleCapacity();
}
}
if (sorted && count != 0) {
if (sortOnValues) {
i... | [
"public",
"synchronized",
"boolean",
"addUnsorted",
"(",
"int",
"key",
",",
"int",
"value",
")",
"{",
"if",
"(",
"count",
"==",
"capacity",
")",
"{",
"if",
"(",
"fixedSize",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"doubleCapacity",
"(",
")"... | Adds a pair into the table.
@param key the key
@param value the value
@return true or false depending on success | [
"Adds",
"a",
"pair",
"into",
"the",
"table",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java#L145-L174 |
62,156 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java | DoubleIntIndex.addUnique | public synchronized boolean addUnique(int key, int value) {
if (count == capacity) {
if (fixedSize) {
return false;
} else {
doubleCapacity();
}
}
if (!sorted) {
fastQuickSort();
}
targetSearchValu... | java | public synchronized boolean addUnique(int key, int value) {
if (count == capacity) {
if (fixedSize) {
return false;
} else {
doubleCapacity();
}
}
if (!sorted) {
fastQuickSort();
}
targetSearchValu... | [
"public",
"synchronized",
"boolean",
"addUnique",
"(",
"int",
"key",
",",
"int",
"value",
")",
"{",
"if",
"(",
"count",
"==",
"capacity",
")",
"{",
"if",
"(",
"fixedSize",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"doubleCapacity",
"(",
")",
... | Adds a pair, ensuring no duplicate key xor value already exists in the
current search target column.
@param key the key
@param value the value
@return true or false depending on success | [
"Adds",
"a",
"pair",
"ensuring",
"no",
"duplicate",
"key",
"xor",
"value",
"already",
"exists",
"in",
"the",
"current",
"search",
"target",
"column",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java#L215-L250 |
62,157 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java | DoubleIntIndex.binaryFirstSearch | private int binaryFirstSearch() {
int low = 0;
int high = count;
int mid = 0;
int compare = 0;
int found = count;
while (low < high) {
mid = (low + high) / 2;
compare = compare(mid);
if (compare < 0) {
... | java | private int binaryFirstSearch() {
int low = 0;
int high = count;
int mid = 0;
int compare = 0;
int found = count;
while (low < high) {
mid = (low + high) / 2;
compare = compare(mid);
if (compare < 0) {
... | [
"private",
"int",
"binaryFirstSearch",
"(",
")",
"{",
"int",
"low",
"=",
"0",
";",
"int",
"high",
"=",
"count",
";",
"int",
"mid",
"=",
"0",
";",
"int",
"compare",
"=",
"0",
";",
"int",
"found",
"=",
"count",
";",
"while",
"(",
"low",
"<",
"high"... | Returns the index of the lowest element == the given search target,
or -1
@return index or -1 if not found | [
"Returns",
"the",
"index",
"of",
"the",
"lowest",
"element",
"==",
"the",
"given",
"search",
"target",
"or",
"-",
"1"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java#L398-L422 |
62,158 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java | DoubleIntIndex.binaryGreaterSearch | private int binaryGreaterSearch() {
int low = 0;
int high = count;
int mid = 0;
int compare = 0;
while (low < high) {
mid = (low + high) / 2;
compare = compare(mid);
if (compare < 0) {
high = mid;
}... | java | private int binaryGreaterSearch() {
int low = 0;
int high = count;
int mid = 0;
int compare = 0;
while (low < high) {
mid = (low + high) / 2;
compare = compare(mid);
if (compare < 0) {
high = mid;
}... | [
"private",
"int",
"binaryGreaterSearch",
"(",
")",
"{",
"int",
"low",
"=",
"0",
";",
"int",
"high",
"=",
"count",
";",
"int",
"mid",
"=",
"0",
";",
"int",
"compare",
"=",
"0",
";",
"while",
"(",
"low",
"<",
"high",
")",
"{",
"mid",
"=",
"(",
"l... | Returns the index of the lowest element > the given search target
@return the index | [
"Returns",
"the",
"index",
"of",
"the",
"lowest",
"element",
">",
"the",
"given",
"search",
"target"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java#L428-L448 |
62,159 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java | DoubleIntIndex.binarySlotSearch | private int binarySlotSearch() {
int low = 0;
int high = count;
int mid = 0;
int compare = 0;
while (low < high) {
mid = (low + high) / 2;
compare = compare(mid);
if (compare <= 0) {
high = mid;
} e... | java | private int binarySlotSearch() {
int low = 0;
int high = count;
int mid = 0;
int compare = 0;
while (low < high) {
mid = (low + high) / 2;
compare = compare(mid);
if (compare <= 0) {
high = mid;
} e... | [
"private",
"int",
"binarySlotSearch",
"(",
")",
"{",
"int",
"low",
"=",
"0",
";",
"int",
"high",
"=",
"count",
";",
"int",
"mid",
"=",
"0",
";",
"int",
"compare",
"=",
"0",
";",
"while",
"(",
"low",
"<",
"high",
")",
"{",
"mid",
"=",
"(",
"low"... | Returns the index of the lowest element >= the given search target,
or count
@return the index | [
"Returns",
"the",
"index",
"of",
"the",
"lowest",
"element",
">",
"=",
"the",
"given",
"search",
"target",
"or",
"count"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java#L455-L474 |
62,160 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java | DoubleIntIndex.binaryEmptySlotSearch | private int binaryEmptySlotSearch() {
int low = 0;
int high = count;
int mid = 0;
int compare = 0;
while (low < high) {
mid = (low + high) / 2;
compare = compare(mid);
if (compare < 0) {
high = mid;
... | java | private int binaryEmptySlotSearch() {
int low = 0;
int high = count;
int mid = 0;
int compare = 0;
while (low < high) {
mid = (low + high) / 2;
compare = compare(mid);
if (compare < 0) {
high = mid;
... | [
"private",
"int",
"binaryEmptySlotSearch",
"(",
")",
"{",
"int",
"low",
"=",
"0",
";",
"int",
"high",
"=",
"count",
";",
"int",
"mid",
"=",
"0",
";",
"int",
"compare",
"=",
"0",
";",
"while",
"(",
"low",
"<",
"high",
")",
"{",
"mid",
"=",
"(",
... | Returns the index of the lowest element > the given search target
or count or -1 if target is found
@return the index | [
"Returns",
"the",
"index",
"of",
"the",
"lowest",
"element",
">",
"the",
"given",
"search",
"target",
"or",
"count",
"or",
"-",
"1",
"if",
"target",
"is",
"found"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java#L481-L502 |
62,161 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java | DoubleIntIndex.compare | private int compare(int i) {
if (sortOnValues) {
if (targetSearchValue > values[i]) {
return 1;
} else if (targetSearchValue < values[i]) {
return -1;
}
} else {
if (targetSearchValue > keys[i]) {
return 1;
... | java | private int compare(int i) {
if (sortOnValues) {
if (targetSearchValue > values[i]) {
return 1;
} else if (targetSearchValue < values[i]) {
return -1;
}
} else {
if (targetSearchValue > keys[i]) {
return 1;
... | [
"private",
"int",
"compare",
"(",
"int",
"i",
")",
"{",
"if",
"(",
"sortOnValues",
")",
"{",
"if",
"(",
"targetSearchValue",
">",
"values",
"[",
"i",
"]",
")",
"{",
"return",
"1",
";",
"}",
"else",
"if",
"(",
"targetSearchValue",
"<",
"values",
"[",
... | Check if targeted column value in the row indexed i is less than the
search target object.
@param i the index
@return -1, 0 or +1 | [
"Check",
"if",
"targeted",
"column",
"value",
"in",
"the",
"row",
"indexed",
"i",
"is",
"less",
"than",
"the",
"search",
"target",
"object",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java#L634-L651 |
62,162 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java | DoubleIntIndex.lessThan | private boolean lessThan(int i, int j) {
if (sortOnValues) {
if (values[i] < values[j]) {
return true;
}
} else {
if (keys[i] < keys[j]) {
return true;
}
}
return false;
} | java | private boolean lessThan(int i, int j) {
if (sortOnValues) {
if (values[i] < values[j]) {
return true;
}
} else {
if (keys[i] < keys[j]) {
return true;
}
}
return false;
} | [
"private",
"boolean",
"lessThan",
"(",
"int",
"i",
",",
"int",
"j",
")",
"{",
"if",
"(",
"sortOnValues",
")",
"{",
"if",
"(",
"values",
"[",
"i",
"]",
"<",
"values",
"[",
"j",
"]",
")",
"{",
"return",
"true",
";",
"}",
"}",
"else",
"{",
"if",
... | Check if row indexed i is less than row indexed j
@param i the first index
@param j the second index
@return true or false | [
"Check",
"if",
"row",
"indexed",
"i",
"is",
"less",
"than",
"row",
"indexed",
"j"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java#L671-L684 |
62,163 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/FontDialogSwing.java | FontDialogSwing.setFontSize | public static void setFontSize(String inFontSize) {
// weconsultants@users 20050215 - Changed for Compatbilty fix for JDK 1.3
// Convert Strng to float for deriveFont() call
Float stageFloat = new Float(inFontSize);
float fontSize = stageFloat.floatValue();
Font fonttTree = ... | java | public static void setFontSize(String inFontSize) {
// weconsultants@users 20050215 - Changed for Compatbilty fix for JDK 1.3
// Convert Strng to float for deriveFont() call
Float stageFloat = new Float(inFontSize);
float fontSize = stageFloat.floatValue();
Font fonttTree = ... | [
"public",
"static",
"void",
"setFontSize",
"(",
"String",
"inFontSize",
")",
"{",
"// weconsultants@users 20050215 - Changed for Compatbilty fix for JDK 1.3",
"// Convert Strng to float for deriveFont() call",
"Float",
"stageFloat",
"=",
"new",
"Float",
"(",
"inFontSize",
")",
... | Displays a color chooser and Sets the selected color. | [
"Displays",
"a",
"color",
"chooser",
"and",
"Sets",
"the",
"selected",
"color",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/FontDialogSwing.java#L260-L278 |
62,164 | VoltDB/voltdb | third_party/java/src/org/spearce_voltpatches/jgit/transport/OpenSshConfig.java | OpenSshConfig.lookup | public Host lookup(final String hostName) {
final Map<String, Host> cache = this.refresh();
Host h = cache.get(hostName);
if(h == null) {
h = new Host();
}
if(h.patternsApplied) {
return h;
}
for(final Map.Entry<String, Host> e : cache.ent... | java | public Host lookup(final String hostName) {
final Map<String, Host> cache = this.refresh();
Host h = cache.get(hostName);
if(h == null) {
h = new Host();
}
if(h.patternsApplied) {
return h;
}
for(final Map.Entry<String, Host> e : cache.ent... | [
"public",
"Host",
"lookup",
"(",
"final",
"String",
"hostName",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"Host",
">",
"cache",
"=",
"this",
".",
"refresh",
"(",
")",
";",
"Host",
"h",
"=",
"cache",
".",
"get",
"(",
"hostName",
")",
";",
"if",
... | Locate the configuration for a specific host request.
@param hostName the name the user has supplied to the SSH tool. This may be a
real host name, or it may just be a "Host" block in the
configuration file.
@return r configuration for the requested name. Never null. | [
"Locate",
"the",
"configuration",
"for",
"a",
"specific",
"host",
"request",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/spearce_voltpatches/jgit/transport/OpenSshConfig.java#L103-L128 |
62,165 | VoltDB/voltdb | src/frontend/org/voltcore/utils/CoreUtils.java | CoreUtils.getCachedSingleThreadExecutor | public static ListeningExecutorService getCachedSingleThreadExecutor(String name, long keepAlive) {
return MoreExecutors.listeningDecorator(new ThreadPoolExecutor(
0,
1,
keepAlive,
TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<Runn... | java | public static ListeningExecutorService getCachedSingleThreadExecutor(String name, long keepAlive) {
return MoreExecutors.listeningDecorator(new ThreadPoolExecutor(
0,
1,
keepAlive,
TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<Runn... | [
"public",
"static",
"ListeningExecutorService",
"getCachedSingleThreadExecutor",
"(",
"String",
"name",
",",
"long",
"keepAlive",
")",
"{",
"return",
"MoreExecutors",
".",
"listeningDecorator",
"(",
"new",
"ThreadPoolExecutor",
"(",
"0",
",",
"1",
",",
"keepAlive",
... | Get a single thread executor that caches its thread meaning that the thread will terminate
after keepAlive milliseconds. A new thread will be created the next time a task arrives and that will be kept
around for keepAlive milliseconds. On creation no thread is allocated, the first task creates a thread.
Uses LinkedTra... | [
"Get",
"a",
"single",
"thread",
"executor",
"that",
"caches",
"its",
"thread",
"meaning",
"that",
"the",
"thread",
"will",
"terminate",
"after",
"keepAlive",
"milliseconds",
".",
"A",
"new",
"thread",
"will",
"be",
"created",
"the",
"next",
"time",
"a",
"tas... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/CoreUtils.java#L429-L437 |
62,166 | VoltDB/voltdb | src/frontend/org/voltcore/utils/CoreUtils.java | CoreUtils.getBoundedSingleThreadExecutor | public static ListeningExecutorService getBoundedSingleThreadExecutor(String name, int capacity) {
LinkedBlockingQueue<Runnable> lbq = new LinkedBlockingQueue<Runnable>(capacity);
ThreadPoolExecutor tpe =
new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, lbq, CoreUtils.getThreadFac... | java | public static ListeningExecutorService getBoundedSingleThreadExecutor(String name, int capacity) {
LinkedBlockingQueue<Runnable> lbq = new LinkedBlockingQueue<Runnable>(capacity);
ThreadPoolExecutor tpe =
new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, lbq, CoreUtils.getThreadFac... | [
"public",
"static",
"ListeningExecutorService",
"getBoundedSingleThreadExecutor",
"(",
"String",
"name",
",",
"int",
"capacity",
")",
"{",
"LinkedBlockingQueue",
"<",
"Runnable",
">",
"lbq",
"=",
"new",
"LinkedBlockingQueue",
"<",
"Runnable",
">",
"(",
"capacity",
"... | Create a bounded single threaded executor that rejects requests if more than capacity
requests are outstanding. | [
"Create",
"a",
"bounded",
"single",
"threaded",
"executor",
"that",
"rejects",
"requests",
"if",
"more",
"than",
"capacity",
"requests",
"are",
"outstanding",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/CoreUtils.java#L485-L490 |
62,167 | VoltDB/voltdb | src/frontend/org/voltcore/utils/CoreUtils.java | CoreUtils.getBoundedThreadPoolExecutor | public static ThreadPoolExecutor getBoundedThreadPoolExecutor(int maxPoolSize, long keepAliveTime, TimeUnit unit, ThreadFactory tFactory) {
return new ThreadPoolExecutor(0, maxPoolSize, keepAliveTime, unit,
new SynchronousQueue<Runnable>(), tFactory);
} | java | public static ThreadPoolExecutor getBoundedThreadPoolExecutor(int maxPoolSize, long keepAliveTime, TimeUnit unit, ThreadFactory tFactory) {
return new ThreadPoolExecutor(0, maxPoolSize, keepAliveTime, unit,
new SynchronousQueue<Runnable>(), tFactory);
} | [
"public",
"static",
"ThreadPoolExecutor",
"getBoundedThreadPoolExecutor",
"(",
"int",
"maxPoolSize",
",",
"long",
"keepAliveTime",
",",
"TimeUnit",
"unit",
",",
"ThreadFactory",
"tFactory",
")",
"{",
"return",
"new",
"ThreadPoolExecutor",
"(",
"0",
",",
"maxPoolSize",... | Create a bounded thread pool executor. The work queue is synchronous and can cause
RejectedExecutionException if there is no available thread to take a new task.
@param maxPoolSize: the maximum number of threads to allow in the pool.
@param keepAliveTime: when the number of threads is greater than the core, this is the... | [
"Create",
"a",
"bounded",
"thread",
"pool",
"executor",
".",
"The",
"work",
"queue",
"is",
"synchronous",
"and",
"can",
"cause",
"RejectedExecutionException",
"if",
"there",
"is",
"no",
"available",
"thread",
"to",
"take",
"a",
"new",
"task",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/CoreUtils.java#L588-L591 |
62,168 | VoltDB/voltdb | src/frontend/org/voltcore/utils/CoreUtils.java | CoreUtils.getQueueingExecutorService | public static ExecutorService getQueueingExecutorService(final Queue<Runnable> taskQueue) {
return new ExecutorService() {
@Override
public void execute(Runnable command) {
taskQueue.offer(command);
}
@Override
public void shutdown() {... | java | public static ExecutorService getQueueingExecutorService(final Queue<Runnable> taskQueue) {
return new ExecutorService() {
@Override
public void execute(Runnable command) {
taskQueue.offer(command);
}
@Override
public void shutdown() {... | [
"public",
"static",
"ExecutorService",
"getQueueingExecutorService",
"(",
"final",
"Queue",
"<",
"Runnable",
">",
"taskQueue",
")",
"{",
"return",
"new",
"ExecutorService",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"execute",
"(",
"Runnable",
"command",
... | Create an ExceutorService that places tasks in an existing task queue for execution. Used
to create a bridge for using ListenableFutures in classes already built around a queue.
@param taskQueue : place to enqueue Runnables submitted to the service | [
"Create",
"an",
"ExceutorService",
"that",
"places",
"tasks",
"in",
"an",
"existing",
"task",
"queue",
"for",
"execution",
".",
"Used",
"to",
"create",
"a",
"bridge",
"for",
"using",
"ListenableFutures",
"in",
"classes",
"already",
"built",
"around",
"a",
"que... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/CoreUtils.java#L598-L682 |
62,169 | VoltDB/voltdb | src/frontend/org/voltcore/utils/CoreUtils.java | CoreUtils.getThreadFactory | public static ThreadFactory getThreadFactory(
final String groupName,
final String name,
final int stackSize,
final boolean incrementThreadNames,
final Queue<String> coreList) {
ThreadGroup group = null;
if (groupName != null) {
gro... | java | public static ThreadFactory getThreadFactory(
final String groupName,
final String name,
final int stackSize,
final boolean incrementThreadNames,
final Queue<String> coreList) {
ThreadGroup group = null;
if (groupName != null) {
gro... | [
"public",
"static",
"ThreadFactory",
"getThreadFactory",
"(",
"final",
"String",
"groupName",
",",
"final",
"String",
"name",
",",
"final",
"int",
"stackSize",
",",
"final",
"boolean",
"incrementThreadNames",
",",
"final",
"Queue",
"<",
"String",
">",
"coreList",
... | Creates a thread factory that creates threads within a thread group if
the group name is given. The threads created will catch any unhandled
exceptions and log them to the HOST logger.
@param groupName
@param name
@param stackSize
@return | [
"Creates",
"a",
"thread",
"factory",
"that",
"creates",
"threads",
"within",
"a",
"thread",
"group",
"if",
"the",
"group",
"name",
"is",
"given",
".",
"The",
"threads",
"created",
"will",
"catch",
"any",
"unhandled",
"exceptions",
"and",
"log",
"them",
"to",... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/CoreUtils.java#L706-L753 |
62,170 | VoltDB/voltdb | src/frontend/org/voltcore/utils/CoreUtils.java | CoreUtils.getHostnameOrAddress | public static String getHostnameOrAddress() {
final InetAddress addr = m_localAddressSupplier.get();
if (addr == null) return "";
return ReverseDNSCache.hostnameOrAddress(addr);
} | java | public static String getHostnameOrAddress() {
final InetAddress addr = m_localAddressSupplier.get();
if (addr == null) return "";
return ReverseDNSCache.hostnameOrAddress(addr);
} | [
"public",
"static",
"String",
"getHostnameOrAddress",
"(",
")",
"{",
"final",
"InetAddress",
"addr",
"=",
"m_localAddressSupplier",
".",
"get",
"(",
")",
";",
"if",
"(",
"addr",
"==",
"null",
")",
"return",
"\"\"",
";",
"return",
"ReverseDNSCache",
".",
"hos... | Return the local hostname, if it's resolvable. If not,
return the IPv4 address on the first interface we find, if it exists.
If not, returns whatever address exists on the first interface.
@return the String representation of some valid host or IP address,
if we can find one; the empty string otherwise | [
"Return",
"the",
"local",
"hostname",
"if",
"it",
"s",
"resolvable",
".",
"If",
"not",
"return",
"the",
"IPv4",
"address",
"on",
"the",
"first",
"interface",
"we",
"find",
"if",
"it",
"exists",
".",
"If",
"not",
"returns",
"whatever",
"address",
"exists",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/CoreUtils.java#L762-L766 |
62,171 | VoltDB/voltdb | src/frontend/org/voltcore/utils/CoreUtils.java | CoreUtils.retryHelper | public static final<T> ListenableFuture<T> retryHelper(
final ScheduledExecutorService ses,
final ExecutorService es,
final Callable<T> callable,
final long maxAttempts,
final long startInterval,
final TimeUnit startUnit,
final long ma... | java | public static final<T> ListenableFuture<T> retryHelper(
final ScheduledExecutorService ses,
final ExecutorService es,
final Callable<T> callable,
final long maxAttempts,
final long startInterval,
final TimeUnit startUnit,
final long ma... | [
"public",
"static",
"final",
"<",
"T",
">",
"ListenableFuture",
"<",
"T",
">",
"retryHelper",
"(",
"final",
"ScheduledExecutorService",
"ses",
",",
"final",
"ExecutorService",
"es",
",",
"final",
"Callable",
"<",
"T",
">",
"callable",
",",
"final",
"long",
"... | A helper for retrying tasks asynchronously returns a settable future
that can be used to attempt to cancel the task.
The first executor service is used to schedule retry attempts
The second is where the task will be subsmitted for execution
If the two services are the same only the scheduled service is used
@param ma... | [
"A",
"helper",
"for",
"retrying",
"tasks",
"asynchronously",
"returns",
"a",
"settable",
"future",
"that",
"can",
"be",
"used",
"to",
"attempt",
"to",
"cancel",
"the",
"task",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/CoreUtils.java#L1014-L1027 |
62,172 | VoltDB/voltdb | src/frontend/org/voltcore/utils/CoreUtils.java | CoreUtils.sortKeyValuePairByValue | public static <K extends Comparable< ? super K>,V extends Comparable< ? super V>> List<Entry<K,V>>
sortKeyValuePairByValue(Map<K,V> map) {
List<Map.Entry<K,V>> entries = new ArrayList<Map.Entry<K,V>>(map.entrySet());
Collections.sort(entries, new Comparator<Map.Entry<K,V>>() {
@O... | java | public static <K extends Comparable< ? super K>,V extends Comparable< ? super V>> List<Entry<K,V>>
sortKeyValuePairByValue(Map<K,V> map) {
List<Map.Entry<K,V>> entries = new ArrayList<Map.Entry<K,V>>(map.entrySet());
Collections.sort(entries, new Comparator<Map.Entry<K,V>>() {
@O... | [
"public",
"static",
"<",
"K",
"extends",
"Comparable",
"<",
"?",
"super",
"K",
">",
",",
"V",
"extends",
"Comparable",
"<",
"?",
"super",
"V",
">",
">",
"List",
"<",
"Entry",
"<",
"K",
",",
"V",
">",
">",
"sortKeyValuePairByValue",
"(",
"Map",
"<",
... | Utility method to sort the keys and values of a map by their value. | [
"Utility",
"method",
"to",
"sort",
"the",
"keys",
"and",
"values",
"of",
"a",
"map",
"by",
"their",
"value",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/CoreUtils.java#L1163-L1176 |
62,173 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java | IndexAVL.set | private static NodeAVL set(PersistentStore store, NodeAVL x,
boolean isleft, NodeAVL n) {
if (isleft) {
x = x.setLeft(store, n);
} else {
x = x.setRight(store, n);
}
if (n != null) {
n.setParent(store, x);
}
... | java | private static NodeAVL set(PersistentStore store, NodeAVL x,
boolean isleft, NodeAVL n) {
if (isleft) {
x = x.setLeft(store, n);
} else {
x = x.setRight(store, n);
}
if (n != null) {
n.setParent(store, x);
}
... | [
"private",
"static",
"NodeAVL",
"set",
"(",
"PersistentStore",
"store",
",",
"NodeAVL",
"x",
",",
"boolean",
"isleft",
",",
"NodeAVL",
"n",
")",
"{",
"if",
"(",
"isleft",
")",
"{",
"x",
"=",
"x",
".",
"setLeft",
"(",
"store",
",",
"n",
")",
";",
"}... | Set a node as child of another
@param x parent node
@param isleft boolean
@param n child node | [
"Set",
"a",
"node",
"as",
"child",
"of",
"another"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L161-L175 |
62,174 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java | IndexAVL.child | private static NodeAVL child(PersistentStore store, NodeAVL x,
boolean isleft) {
return isleft ? x.getLeft(store)
: x.getRight(store);
} | java | private static NodeAVL child(PersistentStore store, NodeAVL x,
boolean isleft) {
return isleft ? x.getLeft(store)
: x.getRight(store);
} | [
"private",
"static",
"NodeAVL",
"child",
"(",
"PersistentStore",
"store",
",",
"NodeAVL",
"x",
",",
"boolean",
"isleft",
")",
"{",
"return",
"isleft",
"?",
"x",
".",
"getLeft",
"(",
"store",
")",
":",
"x",
".",
"getRight",
"(",
"store",
")",
";",
"}"
] | Returns either child node
@param x node
@param isleft boolean
@return child node | [
"Returns",
"either",
"child",
"node"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L186-L190 |
62,175 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java | IndexAVL.compareRows | public static int compareRows(Object[] a, Object[] b, int[] cols,
Type[] coltypes) {
int fieldcount = cols.length;
for (int j = 0; j < fieldcount; j++) {
int i = coltypes[cols[j]].compare(a[cols[j]], b[cols[j]]);
if (i != 0) {
... | java | public static int compareRows(Object[] a, Object[] b, int[] cols,
Type[] coltypes) {
int fieldcount = cols.length;
for (int j = 0; j < fieldcount; j++) {
int i = coltypes[cols[j]].compare(a[cols[j]], b[cols[j]]);
if (i != 0) {
... | [
"public",
"static",
"int",
"compareRows",
"(",
"Object",
"[",
"]",
"a",
",",
"Object",
"[",
"]",
"b",
",",
"int",
"[",
"]",
"cols",
",",
"Type",
"[",
"]",
"coltypes",
")",
"{",
"int",
"fieldcount",
"=",
"cols",
".",
"length",
";",
"for",
"(",
"in... | compares two full table rows based on a set of columns
@param a a full row
@param b a full row
@param cols array of column indexes to compare
@param coltypes array of column types for the full row
@return comparison result, -1,0,+1 | [
"compares",
"two",
"full",
"table",
"rows",
"based",
"on",
"a",
"set",
"of",
"columns"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L218-L232 |
62,176 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java | IndexAVL.size | @Override
public int size(PersistentStore store) {
int count = 0;
readLock.lock();
try {
RowIterator it = firstRow(null, store);
while (it.hasNext()) {
it.getNextRow();
count++;
}
return count;
} fi... | java | @Override
public int size(PersistentStore store) {
int count = 0;
readLock.lock();
try {
RowIterator it = firstRow(null, store);
while (it.hasNext()) {
it.getNextRow();
count++;
}
return count;
} fi... | [
"@",
"Override",
"public",
"int",
"size",
"(",
"PersistentStore",
"store",
")",
"{",
"int",
"count",
"=",
"0",
";",
"readLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"RowIterator",
"it",
"=",
"firstRow",
"(",
"null",
",",
"store",
")",
";",
"while"... | Returns the node count. | [
"Returns",
"the",
"node",
"count",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L464-L484 |
62,177 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java | IndexAVL.insert | @Override
public void insert(Session session, PersistentStore store, Row row) {
NodeAVL n;
NodeAVL x;
boolean isleft = true;
int compare = -1;
writeLock.lock();
try {
n = getAccessor(store);
x = n;
if (n == null) {
... | java | @Override
public void insert(Session session, PersistentStore store, Row row) {
NodeAVL n;
NodeAVL x;
boolean isleft = true;
int compare = -1;
writeLock.lock();
try {
n = getAccessor(store);
x = n;
if (n == null) {
... | [
"@",
"Override",
"public",
"void",
"insert",
"(",
"Session",
"session",
",",
"PersistentStore",
"store",
",",
"Row",
"row",
")",
"{",
"NodeAVL",
"n",
";",
"NodeAVL",
"x",
";",
"boolean",
"isleft",
"=",
"true",
";",
"int",
"compare",
"=",
"-",
"1",
";",... | Insert a node into the index | [
"Insert",
"a",
"node",
"into",
"the",
"index"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L557-L602 |
62,178 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java | IndexAVL.findFirstRow | @Override
public RowIterator findFirstRow(Session session, PersistentStore store,
Object[] rowdata, int match) {
NodeAVL node = findNode(session, store, rowdata, defaultColMap, match);
return getIterator(session, store, node);
} | java | @Override
public RowIterator findFirstRow(Session session, PersistentStore store,
Object[] rowdata, int match) {
NodeAVL node = findNode(session, store, rowdata, defaultColMap, match);
return getIterator(session, store, node);
} | [
"@",
"Override",
"public",
"RowIterator",
"findFirstRow",
"(",
"Session",
"session",
",",
"PersistentStore",
"store",
",",
"Object",
"[",
"]",
"rowdata",
",",
"int",
"match",
")",
"{",
"NodeAVL",
"node",
"=",
"findNode",
"(",
"session",
",",
"store",
",",
... | Return the first node equal to the indexdata object. The rowdata has
the same column mapping as this index.
@param session session object
@param store store object
@param rowdata array containing index column data
@param match count of columns to match
@return iterator | [
"Return",
"the",
"first",
"node",
"equal",
"to",
"the",
"indexdata",
"object",
".",
"The",
"rowdata",
"has",
"the",
"same",
"column",
"mapping",
"as",
"this",
"index",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L808-L815 |
62,179 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java | IndexAVL.findFirstRow | @Override
public RowIterator findFirstRow(Session session, PersistentStore store,
Object[] rowdata) {
NodeAVL node = findNode(session, store, rowdata, colIndex,
colIndex.length);
return getIterator(session, store, node);
} | java | @Override
public RowIterator findFirstRow(Session session, PersistentStore store,
Object[] rowdata) {
NodeAVL node = findNode(session, store, rowdata, colIndex,
colIndex.length);
return getIterator(session, store, node);
} | [
"@",
"Override",
"public",
"RowIterator",
"findFirstRow",
"(",
"Session",
"session",
",",
"PersistentStore",
"store",
",",
"Object",
"[",
"]",
"rowdata",
")",
"{",
"NodeAVL",
"node",
"=",
"findNode",
"(",
"session",
",",
"store",
",",
"rowdata",
",",
"colInd... | Return the first node equal to the rowdata object.
The rowdata has the same column mapping as this table.
@param session session object
@param store store object
@param rowdata array containing table row data
@return iterator | [
"Return",
"the",
"first",
"node",
"equal",
"to",
"the",
"rowdata",
"object",
".",
"The",
"rowdata",
"has",
"the",
"same",
"column",
"mapping",
"as",
"this",
"table",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L826-L834 |
62,180 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java | IndexAVL.findFirstRow | @Override
public RowIterator findFirstRow(Session session, PersistentStore store,
Object value, int compare) {
readLock.lock();
try {
if (compare == OpTypes.SMALLER
|| compare == OpTypes.SMALLER_EQUAL) {
return fin... | java | @Override
public RowIterator findFirstRow(Session session, PersistentStore store,
Object value, int compare) {
readLock.lock();
try {
if (compare == OpTypes.SMALLER
|| compare == OpTypes.SMALLER_EQUAL) {
return fin... | [
"@",
"Override",
"public",
"RowIterator",
"findFirstRow",
"(",
"Session",
"session",
",",
"PersistentStore",
"store",
",",
"Object",
"value",
",",
"int",
"compare",
")",
"{",
"readLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"if",
"(",
"compare",
"==",
... | Finds the first node that is larger or equal to the given one based
on the first column of the index only.
@param session session object
@param store store object
@param value value to match
@param compare comparison Expression type
@return iterator | [
"Finds",
"the",
"first",
"node",
"that",
"is",
"larger",
"or",
"equal",
"to",
"the",
"given",
"one",
"based",
"on",
"the",
"first",
"column",
"of",
"the",
"index",
"only",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L866-L978 |
62,181 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java | IndexAVL.findFirstRowNotNull | @Override
public RowIterator findFirstRowNotNull(Session session,
PersistentStore store) {
readLock.lock();
try {
NodeAVL x = getAccessor(store);
while (x != null) {
boolean t = colTypes[0].compare(
... | java | @Override
public RowIterator findFirstRowNotNull(Session session,
PersistentStore store) {
readLock.lock();
try {
NodeAVL x = getAccessor(store);
while (x != null) {
boolean t = colTypes[0].compare(
... | [
"@",
"Override",
"public",
"RowIterator",
"findFirstRowNotNull",
"(",
"Session",
"session",
",",
"PersistentStore",
"store",
")",
"{",
"readLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"NodeAVL",
"x",
"=",
"getAccessor",
"(",
"store",
")",
";",
"while",
... | Finds the first node where the data is not null.
@return iterator | [
"Finds",
"the",
"first",
"node",
"where",
"the",
"data",
"is",
"not",
"null",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L985-L1042 |
62,182 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java | IndexAVL.firstRow | @Override
public RowIterator firstRow(Session session, PersistentStore store) {
int tempDepth = 0;
readLock.lock();
try {
NodeAVL x = getAccessor(store);
NodeAVL l = x;
while (l != null) {
x = l;
l = x.getLeft(store);
... | java | @Override
public RowIterator firstRow(Session session, PersistentStore store) {
int tempDepth = 0;
readLock.lock();
try {
NodeAVL x = getAccessor(store);
NodeAVL l = x;
while (l != null) {
x = l;
l = x.getLeft(store);
... | [
"@",
"Override",
"public",
"RowIterator",
"firstRow",
"(",
"Session",
"session",
",",
"PersistentStore",
"store",
")",
"{",
"int",
"tempDepth",
"=",
"0",
";",
"readLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"NodeAVL",
"x",
"=",
"getAccessor",
"(",
"s... | Returns the row for the first node of the index
@return Iterator for first row | [
"Returns",
"the",
"row",
"for",
"the",
"first",
"node",
"of",
"the",
"index"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L1049-L1083 |
62,183 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java | IndexAVL.lastRow | @Override
public Row lastRow(Session session, PersistentStore store) {
readLock.lock();
try {
NodeAVL x = getAccessor(store);
NodeAVL l = x;
while (l != null) {
x = l;
l = x.getRight(store);
}
while (sess... | java | @Override
public Row lastRow(Session session, PersistentStore store) {
readLock.lock();
try {
NodeAVL x = getAccessor(store);
NodeAVL l = x;
while (l != null) {
x = l;
l = x.getRight(store);
}
while (sess... | [
"@",
"Override",
"public",
"Row",
"lastRow",
"(",
"Session",
"session",
",",
"PersistentStore",
"store",
")",
"{",
"readLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"NodeAVL",
"x",
"=",
"getAccessor",
"(",
"store",
")",
";",
"NodeAVL",
"l",
"=",
"x",... | Returns the row for the last node of the index
@return last row | [
"Returns",
"the",
"row",
"for",
"the",
"last",
"node",
"of",
"the",
"index"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L1116-L1145 |
62,184 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java | IndexAVL.next | private NodeAVL next(Session session, PersistentStore store, NodeAVL x) {
if (x == null) {
return null;
}
readLock.lock();
try {
while (true) {
x = next(store, x);
if (x == null) {
return x;
}... | java | private NodeAVL next(Session session, PersistentStore store, NodeAVL x) {
if (x == null) {
return null;
}
readLock.lock();
try {
while (true) {
x = next(store, x);
if (x == null) {
return x;
}... | [
"private",
"NodeAVL",
"next",
"(",
"Session",
"session",
",",
"PersistentStore",
"store",
",",
"NodeAVL",
"x",
")",
"{",
"if",
"(",
"x",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"readLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"while",
... | Returns the node after the given one
@param x node
@return next node | [
"Returns",
"the",
"node",
"after",
"the",
"given",
"one"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L1154-L1183 |
62,185 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java | IndexAVL.replace | private void replace(PersistentStore store, NodeAVL x, NodeAVL n) {
if (x.isRoot()) {
if (n != null) {
n = n.setParent(store, null);
}
store.setAccessor(this, n);
} else {
set(store, x.getParent(store), x.isFromLeft(store), n);
}
... | java | private void replace(PersistentStore store, NodeAVL x, NodeAVL n) {
if (x.isRoot()) {
if (n != null) {
n = n.setParent(store, null);
}
store.setAccessor(this, n);
} else {
set(store, x.getParent(store), x.isFromLeft(store), n);
}
... | [
"private",
"void",
"replace",
"(",
"PersistentStore",
"store",
",",
"NodeAVL",
"x",
",",
"NodeAVL",
"n",
")",
"{",
"if",
"(",
"x",
".",
"isRoot",
"(",
")",
")",
"{",
"if",
"(",
"n",
"!=",
"null",
")",
"{",
"n",
"=",
"n",
".",
"setParent",
"(",
... | Replace x with n
@param x node
@param n node | [
"Replace",
"x",
"with",
"n"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L1259-L1270 |
62,186 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java | IndexAVL.compareRowNonUnique | @Override
public int compareRowNonUnique(Object[] a, Object[] b, int fieldcount) {
for (int j = 0; j < fieldcount; j++) {
int i = colTypes[j].compare(a[j], b[colIndex[j]]);
if (i != 0) {
return i;
}
}
return 0;
} | java | @Override
public int compareRowNonUnique(Object[] a, Object[] b, int fieldcount) {
for (int j = 0; j < fieldcount; j++) {
int i = colTypes[j].compare(a[j], b[colIndex[j]]);
if (i != 0) {
return i;
}
}
return 0;
} | [
"@",
"Override",
"public",
"int",
"compareRowNonUnique",
"(",
"Object",
"[",
"]",
"a",
",",
"Object",
"[",
"]",
"b",
",",
"int",
"fieldcount",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"fieldcount",
";",
"j",
"++",
")",
"{",
"int... | As above but use the index column data | [
"As",
"above",
"but",
"use",
"the",
"index",
"column",
"data"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L1318-L1330 |
62,187 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java | IndexAVL.compareRowForInsertOrDelete | private int compareRowForInsertOrDelete(Session session, Row newRow,
Row existingRow) {
Object[] a = newRow.getData();
Object[] b = existingRow.getData();
int j = 0;
boolean hasNull = false;
for (; j < colIndex.length; j++) {
Obje... | java | private int compareRowForInsertOrDelete(Session session, Row newRow,
Row existingRow) {
Object[] a = newRow.getData();
Object[] b = existingRow.getData();
int j = 0;
boolean hasNull = false;
for (; j < colIndex.length; j++) {
Obje... | [
"private",
"int",
"compareRowForInsertOrDelete",
"(",
"Session",
"session",
",",
"Row",
"newRow",
",",
"Row",
"existingRow",
")",
"{",
"Object",
"[",
"]",
"a",
"=",
"newRow",
".",
"getData",
"(",
")",
";",
"Object",
"[",
"]",
"b",
"=",
"existingRow",
"."... | Compare two rows of the table for inserting rows into unique indexes
Supports descending columns.
@param newRow data
@param existingRow data
@return comparison result, -1,0,+1 | [
"Compare",
"two",
"rows",
"of",
"the",
"table",
"for",
"inserting",
"rows",
"into",
"unique",
"indexes",
"Supports",
"descending",
"columns",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L1340-L1421 |
62,188 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java | IndexAVL.findNode | private NodeAVL findNode(Session session, PersistentStore store,
Object[] rowdata, int[] rowColMap,
int fieldCount) {
readLock.lock();
try {
NodeAVL x = getAccessor(store);
NodeAVL n;
NodeAVL result = null;
... | java | private NodeAVL findNode(Session session, PersistentStore store,
Object[] rowdata, int[] rowColMap,
int fieldCount) {
readLock.lock();
try {
NodeAVL x = getAccessor(store);
NodeAVL n;
NodeAVL result = null;
... | [
"private",
"NodeAVL",
"findNode",
"(",
"Session",
"session",
",",
"PersistentStore",
"store",
",",
"Object",
"[",
"]",
"rowdata",
",",
"int",
"[",
"]",
"rowColMap",
",",
"int",
"fieldCount",
")",
"{",
"readLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
... | Finds a match with a row from a different table
@param rowdata array containing data for the index columns
@param rowColMap map of the data to columns
@param first true if the first matching node is required, false if any node
@return matching node or null | [
"Finds",
"a",
"match",
"with",
"a",
"row",
"from",
"a",
"different",
"table"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L1431-L1489 |
62,189 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java | IndexAVL.balance | private void balance(PersistentStore store, NodeAVL x, boolean isleft) {
while (true) {
int sign = isleft ? 1
: -1;
switch (x.getBalance() * sign) {
case 1 :
x = x.setBalance(store, 0);
return;
... | java | private void balance(PersistentStore store, NodeAVL x, boolean isleft) {
while (true) {
int sign = isleft ? 1
: -1;
switch (x.getBalance() * sign) {
case 1 :
x = x.setBalance(store, 0);
return;
... | [
"private",
"void",
"balance",
"(",
"PersistentStore",
"store",
",",
"NodeAVL",
"x",
",",
"boolean",
"isleft",
")",
"{",
"while",
"(",
"true",
")",
"{",
"int",
"sign",
"=",
"isleft",
"?",
"1",
":",
"-",
"1",
";",
"switch",
"(",
"x",
".",
"getBalance",... | Balances part of the tree after an alteration to the index. | [
"Balances",
"part",
"of",
"the",
"tree",
"after",
"an",
"alteration",
"to",
"the",
"index",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L1494-L1550 |
62,190 | VoltDB/voltdb | src/frontend/org/voltdb/planner/parseinfo/StmtTableScan.java | StmtTableScan.resolveTVE | public AbstractExpression resolveTVE(TupleValueExpression tve) {
AbstractExpression resolvedExpr = processTVE(tve, tve.getColumnName());
List<TupleValueExpression> tves = ExpressionUtil.getTupleValueExpressions(resolvedExpr);
for (TupleValueExpression subqTve : tves) {
resolveLeafTv... | java | public AbstractExpression resolveTVE(TupleValueExpression tve) {
AbstractExpression resolvedExpr = processTVE(tve, tve.getColumnName());
List<TupleValueExpression> tves = ExpressionUtil.getTupleValueExpressions(resolvedExpr);
for (TupleValueExpression subqTve : tves) {
resolveLeafTv... | [
"public",
"AbstractExpression",
"resolveTVE",
"(",
"TupleValueExpression",
"tve",
")",
"{",
"AbstractExpression",
"resolvedExpr",
"=",
"processTVE",
"(",
"tve",
",",
"tve",
".",
"getColumnName",
"(",
")",
")",
";",
"List",
"<",
"TupleValueExpression",
">",
"tves",... | The parameter tve is a column reference, obtained
by parsing a column ref VoltXML element. We need to
find out to which column in the current table scan the
name of the TVE refers, and transfer metadata from the
schema's column to the tve. The function processTVE
does the transfer.
In some cases the tve may actually... | [
"The",
"parameter",
"tve",
"is",
"a",
"column",
"reference",
"obtained",
"by",
"parsing",
"a",
"column",
"ref",
"VoltXML",
"element",
".",
"We",
"need",
"to",
"find",
"out",
"to",
"which",
"column",
"in",
"the",
"current",
"table",
"scan",
"the",
"name",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/StmtTableScan.java#L163-L171 |
62,191 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/ProjectionPlanNode.java | ProjectionPlanNode.resolveColumnIndexesUsingSchema | void resolveColumnIndexesUsingSchema(NodeSchema inputSchema) {
// get all the TVEs in the output columns
int difftor = 0;
for (SchemaColumn col : m_outputSchema) {
col.setDifferentiator(difftor);
++difftor;
Collection<TupleValueExpression> allTves =
... | java | void resolveColumnIndexesUsingSchema(NodeSchema inputSchema) {
// get all the TVEs in the output columns
int difftor = 0;
for (SchemaColumn col : m_outputSchema) {
col.setDifferentiator(difftor);
++difftor;
Collection<TupleValueExpression> allTves =
... | [
"void",
"resolveColumnIndexesUsingSchema",
"(",
"NodeSchema",
"inputSchema",
")",
"{",
"// get all the TVEs in the output columns",
"int",
"difftor",
"=",
"0",
";",
"for",
"(",
"SchemaColumn",
"col",
":",
"m_outputSchema",
")",
"{",
"col",
".",
"setDifferentiator",
"(... | Given an input schema, resolve all the TVEs in all the output column
expressions. This method is necessary to be able to do this for
inlined projection nodes that don't have a child from which they can get
an output schema. | [
"Given",
"an",
"input",
"schema",
"resolve",
"all",
"the",
"TVEs",
"in",
"all",
"the",
"output",
"column",
"expressions",
".",
"This",
"method",
"is",
"necessary",
"to",
"be",
"able",
"to",
"do",
"this",
"for",
"inlined",
"projection",
"nodes",
"that",
"do... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/ProjectionPlanNode.java#L135-L150 |
62,192 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/ProjectionPlanNode.java | ProjectionPlanNode.isIdentity | public boolean isIdentity(AbstractPlanNode childNode) throws PlanningErrorException {
assert(childNode != null);
// Find the output schema.
// If the child node has an inline projection node,
// then the output schema is the inline projection
// node's output schema. Otherwise i... | java | public boolean isIdentity(AbstractPlanNode childNode) throws PlanningErrorException {
assert(childNode != null);
// Find the output schema.
// If the child node has an inline projection node,
// then the output schema is the inline projection
// node's output schema. Otherwise i... | [
"public",
"boolean",
"isIdentity",
"(",
"AbstractPlanNode",
"childNode",
")",
"throws",
"PlanningErrorException",
"{",
"assert",
"(",
"childNode",
"!=",
"null",
")",
";",
"// Find the output schema.",
"// If the child node has an inline projection node,",
"// then the output sc... | Return true if this node unneeded if its
input schema is the given one.
@param child The Input Schema.
@return true iff the node is unnecessary. | [
"Return",
"true",
"if",
"this",
"node",
"unneeded",
"if",
"its",
"input",
"schema",
"is",
"the",
"given",
"one",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/ProjectionPlanNode.java#L182-L213 |
62,193 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/ProjectionPlanNode.java | ProjectionPlanNode.replaceChildOutputSchemaNames | public void replaceChildOutputSchemaNames(AbstractPlanNode child) {
NodeSchema childSchema = child.getTrueOutputSchema(false);
NodeSchema mySchema = getOutputSchema();
assert(childSchema.size() == mySchema.size());
for (int idx = 0; idx < childSchema.size(); idx += 1) {
Schem... | java | public void replaceChildOutputSchemaNames(AbstractPlanNode child) {
NodeSchema childSchema = child.getTrueOutputSchema(false);
NodeSchema mySchema = getOutputSchema();
assert(childSchema.size() == mySchema.size());
for (int idx = 0; idx < childSchema.size(); idx += 1) {
Schem... | [
"public",
"void",
"replaceChildOutputSchemaNames",
"(",
"AbstractPlanNode",
"child",
")",
"{",
"NodeSchema",
"childSchema",
"=",
"child",
".",
"getTrueOutputSchema",
"(",
"false",
")",
";",
"NodeSchema",
"mySchema",
"=",
"getOutputSchema",
"(",
")",
";",
"assert",
... | Replace the column names output schema of the child node with the
output schema column names of this node. We use this when we
delete an unnecessary projection node. We only need
to make sure the column names are changed, since we
will have checked carefully that everything else is the
same.
@param child | [
"Replace",
"the",
"column",
"names",
"output",
"schema",
"of",
"the",
"child",
"node",
"with",
"the",
"output",
"schema",
"column",
"names",
"of",
"this",
"node",
".",
"We",
"use",
"this",
"when",
"we",
"delete",
"an",
"unnecessary",
"projection",
"node",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/ProjectionPlanNode.java#L225-L240 |
62,194 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/MpInitiatorMailbox.java | MpInitiatorMailbox.deliverToRepairLog | void deliverToRepairLog(VoltMessage msg) {
assert(Thread.currentThread().getId() == m_taskThreadId);
m_repairLog.deliver(msg);
} | java | void deliverToRepairLog(VoltMessage msg) {
assert(Thread.currentThread().getId() == m_taskThreadId);
m_repairLog.deliver(msg);
} | [
"void",
"deliverToRepairLog",
"(",
"VoltMessage",
"msg",
")",
"{",
"assert",
"(",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getId",
"(",
")",
"==",
"m_taskThreadId",
")",
";",
"m_repairLog",
".",
"deliver",
"(",
"msg",
")",
";",
"}"
] | when the MpScheduler needs to log the completion of a transaction to its local repair log | [
"when",
"the",
"MpScheduler",
"needs",
"to",
"log",
"the",
"completion",
"of",
"a",
"transaction",
"to",
"its",
"local",
"repair",
"log"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpInitiatorMailbox.java#L323-L326 |
62,195 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/MpInitiatorMailbox.java | MpInitiatorMailbox.sendInternal | private void sendInternal(long destHSId, VoltMessage message)
{
message.m_sourceHSId = getHSId();
m_messenger.send(destHSId, message);
} | java | private void sendInternal(long destHSId, VoltMessage message)
{
message.m_sourceHSId = getHSId();
m_messenger.send(destHSId, message);
} | [
"private",
"void",
"sendInternal",
"(",
"long",
"destHSId",
",",
"VoltMessage",
"message",
")",
"{",
"message",
".",
"m_sourceHSId",
"=",
"getHSId",
"(",
")",
";",
"m_messenger",
".",
"send",
"(",
"destHSId",
",",
"message",
")",
";",
"}"
] | have a serialized order to all hosts. | [
"have",
"a",
"serialized",
"order",
"to",
"all",
"hosts",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpInitiatorMailbox.java#L331-L335 |
62,196 | VoltDB/voltdb | src/frontend/org/voltdb/client/ClientAffinityStats.java | ClientAffinityStats.diff | public static ClientAffinityStats diff(ClientAffinityStats newer, ClientAffinityStats older) {
if (newer.m_partitionId != older.m_partitionId) {
throw new IllegalArgumentException("Can't diff these ClientAffinityStats instances.");
}
ClientAffinityStats retval = new ClientAffinitySt... | java | public static ClientAffinityStats diff(ClientAffinityStats newer, ClientAffinityStats older) {
if (newer.m_partitionId != older.m_partitionId) {
throw new IllegalArgumentException("Can't diff these ClientAffinityStats instances.");
}
ClientAffinityStats retval = new ClientAffinitySt... | [
"public",
"static",
"ClientAffinityStats",
"diff",
"(",
"ClientAffinityStats",
"newer",
",",
"ClientAffinityStats",
"older",
")",
"{",
"if",
"(",
"newer",
".",
"m_partitionId",
"!=",
"older",
".",
"m_partitionId",
")",
"{",
"throw",
"new",
"IllegalArgumentException"... | Subtract one ClientAffinityStats instance from another to produce a third.
@param newer More recent ClientAffinityStats instance.
@param older Less recent ClientAffinityStats instance.
@return New instance representing the difference. | [
"Subtract",
"one",
"ClientAffinityStats",
"instance",
"from",
"another",
"to",
"produce",
"a",
"third",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/ClientAffinityStats.java#L53-L64 |
62,197 | VoltDB/voltdb | src/frontend/org/voltcore/network/TLSEncryptionAdapter.java | TLSEncryptionAdapter.addFramesForCompleteMessage | private int addFramesForCompleteMessage() {
boolean added = false;
EncryptFrame frame = null;
int delta = 0;
while (!added && (frame = m_encryptedFrames.poll()) != null) {
if (!frame.isLast()) {
//TODO: Review - I don't think this synchronized(m_partialMessag... | java | private int addFramesForCompleteMessage() {
boolean added = false;
EncryptFrame frame = null;
int delta = 0;
while (!added && (frame = m_encryptedFrames.poll()) != null) {
if (!frame.isLast()) {
//TODO: Review - I don't think this synchronized(m_partialMessag... | [
"private",
"int",
"addFramesForCompleteMessage",
"(",
")",
"{",
"boolean",
"added",
"=",
"false",
";",
"EncryptFrame",
"frame",
"=",
"null",
";",
"int",
"delta",
"=",
"0",
";",
"while",
"(",
"!",
"added",
"&&",
"(",
"frame",
"=",
"m_encryptedFrames",
".",
... | Gather all the frames that comprise a whole Volt Message
Returns the delta between the original message byte count and encrypted message byte count. | [
"Gather",
"all",
"the",
"frames",
"that",
"comprise",
"a",
"whole",
"Volt",
"Message",
"Returns",
"the",
"delta",
"between",
"the",
"original",
"message",
"byte",
"count",
"and",
"encrypted",
"message",
"byte",
"count",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/network/TLSEncryptionAdapter.java#L210-L252 |
62,198 | VoltDB/voltdb | src/frontend/org/voltcore/network/TLSEncryptionAdapter.java | TLSEncryptionAdapter.shutdown | void shutdown() {
m_isShutdown = true;
try {
int waitFor = 1 - Math.min(m_inFlight.availablePermits(), -4);
for (int i = 0; i < waitFor; ++i) {
try {
if (m_inFlight.tryAcquire(1, TimeUnit.SECONDS)) {
m_inFlight.release()... | java | void shutdown() {
m_isShutdown = true;
try {
int waitFor = 1 - Math.min(m_inFlight.availablePermits(), -4);
for (int i = 0; i < waitFor; ++i) {
try {
if (m_inFlight.tryAcquire(1, TimeUnit.SECONDS)) {
m_inFlight.release()... | [
"void",
"shutdown",
"(",
")",
"{",
"m_isShutdown",
"=",
"true",
";",
"try",
"{",
"int",
"waitFor",
"=",
"1",
"-",
"Math",
".",
"min",
"(",
"m_inFlight",
".",
"availablePermits",
"(",
")",
",",
"-",
"4",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",... | Called from synchronized block only | [
"Called",
"from",
"synchronized",
"block",
"only"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/network/TLSEncryptionAdapter.java#L294-L326 |
62,199 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/StreamSnapshotWritePlan.java | StreamSnapshotWritePlan.createCompletionTask | private Runnable createCompletionTask(final Mailbox mb)
{
return new Runnable() {
@Override
public void run() {
VoltDB.instance().getHostMessenger().removeMailbox(mb.getHSId());
}
};
} | java | private Runnable createCompletionTask(final Mailbox mb)
{
return new Runnable() {
@Override
public void run() {
VoltDB.instance().getHostMessenger().removeMailbox(mb.getHSId());
}
};
} | [
"private",
"Runnable",
"createCompletionTask",
"(",
"final",
"Mailbox",
"mb",
")",
"{",
"return",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"VoltDB",
".",
"instance",
"(",
")",
".",
"getHostMessenger",
"(",
... | Remove the mailbox from the host messenger after all data targets are done. | [
"Remove",
"the",
"mailbox",
"from",
"the",
"host",
"messenger",
"after",
"all",
"data",
"targets",
"are",
"done",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/StreamSnapshotWritePlan.java#L232-L240 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.