id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
61,000
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/PlanNodeTree.java
PlanNodeTree.loadPlanNodesFromJSONArrays
private void loadPlanNodesFromJSONArrays(int stmtId, JSONArray jArray, Database db) { List<AbstractPlanNode> planNodes = new ArrayList<>(); int size = jArray.length(); try { for (int i = 0; i < size; i++) { JSONObject jobj = jArray.getJSONObject(i); S...
java
private void loadPlanNodesFromJSONArrays(int stmtId, JSONArray jArray, Database db) { List<AbstractPlanNode> planNodes = new ArrayList<>(); int size = jArray.length(); try { for (int i = 0; i < size; i++) { JSONObject jobj = jArray.getJSONObject(i); S...
[ "private", "void", "loadPlanNodesFromJSONArrays", "(", "int", "stmtId", ",", "JSONArray", "jArray", ",", "Database", "db", ")", "{", "List", "<", "AbstractPlanNode", ">", "planNodes", "=", "new", "ArrayList", "<>", "(", ")", ";", "int", "size", "=", "jArray"...
Load plan nodes from the "PLAN_NODE" array. All the nodes are from a substatement with the id = stmtId @param stmtId @param jArray - PLAN_NODES @param db @throws JSONException
[ "Load", "plan", "nodes", "from", "the", "PLAN_NODE", "array", ".", "All", "the", "nodes", "are", "from", "a", "substatement", "with", "the", "id", "=", "stmtId" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/PlanNodeTree.java#L255-L287
61,001
VoltDB/voltdb
src/frontend/org/voltdb/importer/ImporterLifeCycleManager.java
ImporterLifeCycleManager.configure
public final void configure(Properties props, FormatterBuilder formatterBuilder) { Map<URI, ImporterConfig> configs = m_factory.createImporterConfigurations(props, formatterBuilder); m_configs = new ImmutableMap.Builder<URI, ImporterConfig>() .putAll(configs) .putAll(...
java
public final void configure(Properties props, FormatterBuilder formatterBuilder) { Map<URI, ImporterConfig> configs = m_factory.createImporterConfigurations(props, formatterBuilder); m_configs = new ImmutableMap.Builder<URI, ImporterConfig>() .putAll(configs) .putAll(...
[ "public", "final", "void", "configure", "(", "Properties", "props", ",", "FormatterBuilder", "formatterBuilder", ")", "{", "Map", "<", "URI", ",", "ImporterConfig", ">", "configs", "=", "m_factory", ".", "createImporterConfigurations", "(", "props", ",", "formatte...
This will be called for every importer configuration section for this importer type. @param props Properties defined in a configuration section for this importer
[ "This", "will", "be", "called", "for", "every", "importer", "configuration", "section", "for", "this", "importer", "type", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/ImporterLifeCycleManager.java#L85-L92
61,002
VoltDB/voltdb
src/frontend/org/voltdb/importer/ImporterLifeCycleManager.java
ImporterLifeCycleManager.stop
public final void stop() { m_stopping = true; ImmutableMap<URI, AbstractImporter> oldReference; boolean success = false; do { // onChange also could set m_importers. Use while loop to pick up latest ref oldReference = m_importers.get(); success = m_importers....
java
public final void stop() { m_stopping = true; ImmutableMap<URI, AbstractImporter> oldReference; boolean success = false; do { // onChange also could set m_importers. Use while loop to pick up latest ref oldReference = m_importers.get(); success = m_importers....
[ "public", "final", "void", "stop", "(", ")", "{", "m_stopping", "=", "true", ";", "ImmutableMap", "<", "URI", ",", "AbstractImporter", ">", "oldReference", ";", "boolean", "success", "=", "false", ";", "do", "{", "// onChange also could set m_importers. Use while ...
This is called by the importer framework to stop importers. All resources for this importer will be unregistered from the resource distributer.
[ "This", "is", "called", "by", "the", "importer", "framework", "to", "stop", "importers", ".", "All", "resources", "for", "this", "importer", "will", "be", "unregistered", "from", "the", "resource", "distributer", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/ImporterLifeCycleManager.java#L251-L283
61,003
VoltDB/voltdb
src/frontend/org/voltdb/iv2/DeterminismHash.java
DeterminismHash.get
public int[] get() { int includedHashes = Math.min(m_hashCount, MAX_HASHES_COUNT); int[] retval = new int[includedHashes + HEADER_OFFSET]; System.arraycopy(m_hashes, 0, retval, HEADER_OFFSET, includedHashes); m_inputCRC.update(m_hashCount); m_inputCRC.update(m_catalogVersion); ...
java
public int[] get() { int includedHashes = Math.min(m_hashCount, MAX_HASHES_COUNT); int[] retval = new int[includedHashes + HEADER_OFFSET]; System.arraycopy(m_hashes, 0, retval, HEADER_OFFSET, includedHashes); m_inputCRC.update(m_hashCount); m_inputCRC.update(m_catalogVersion); ...
[ "public", "int", "[", "]", "get", "(", ")", "{", "int", "includedHashes", "=", "Math", ".", "min", "(", "m_hashCount", ",", "MAX_HASHES_COUNT", ")", ";", "int", "[", "]", "retval", "=", "new", "int", "[", "includedHashes", "+", "HEADER_OFFSET", "]", ";...
Serialize the running hashes to an array and complete the overall hash for the first int value in the array.
[ "Serialize", "the", "running", "hashes", "to", "an", "array", "and", "complete", "the", "overall", "hash", "for", "the", "first", "int", "value", "in", "the", "array", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/DeterminismHash.java#L79-L90
61,004
VoltDB/voltdb
src/frontend/org/voltdb/iv2/DeterminismHash.java
DeterminismHash.offerStatement
public void offerStatement(int stmtHash, int offset, ByteBuffer psetBuffer) { m_inputCRC.update(stmtHash); m_inputCRC.updateFromPosition(offset, psetBuffer); if (m_hashCount < MAX_HASHES_COUNT) { m_hashes[m_hashCount] = stmtHash; m_hashes[m_hashCount + 1] = (int) m_input...
java
public void offerStatement(int stmtHash, int offset, ByteBuffer psetBuffer) { m_inputCRC.update(stmtHash); m_inputCRC.updateFromPosition(offset, psetBuffer); if (m_hashCount < MAX_HASHES_COUNT) { m_hashes[m_hashCount] = stmtHash; m_hashes[m_hashCount + 1] = (int) m_input...
[ "public", "void", "offerStatement", "(", "int", "stmtHash", ",", "int", "offset", ",", "ByteBuffer", "psetBuffer", ")", "{", "m_inputCRC", ".", "update", "(", "stmtHash", ")", ";", "m_inputCRC", ".", "updateFromPosition", "(", "offset", ",", "psetBuffer", ")",...
Update the overall hash. Add a pair of ints to the array if the size isn't too large.
[ "Update", "the", "overall", "hash", ".", "Add", "a", "pair", "of", "ints", "to", "the", "array", "if", "the", "size", "isn", "t", "too", "large", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/DeterminismHash.java#L96-L105
61,005
VoltDB/voltdb
src/frontend/org/voltdb/iv2/DeterminismHash.java
DeterminismHash.compareHashes
public static int compareHashes(int[] leftHashes, int[] rightHashes) { assert(leftHashes != null); assert(rightHashes != null); assert(leftHashes.length >= 3); assert(rightHashes.length >= 3); // Compare total checksum first if (leftHashes[0] == rightHashes[0]) { ...
java
public static int compareHashes(int[] leftHashes, int[] rightHashes) { assert(leftHashes != null); assert(rightHashes != null); assert(leftHashes.length >= 3); assert(rightHashes.length >= 3); // Compare total checksum first if (leftHashes[0] == rightHashes[0]) { ...
[ "public", "static", "int", "compareHashes", "(", "int", "[", "]", "leftHashes", ",", "int", "[", "]", "rightHashes", ")", "{", "assert", "(", "leftHashes", "!=", "null", ")", ";", "assert", "(", "rightHashes", "!=", "null", ")", ";", "assert", "(", "le...
Compare two hash arrays return true if the same. For now, just compares first integer value in array.
[ "Compare", "two", "hash", "arrays", "return", "true", "if", "the", "same", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/DeterminismHash.java#L112-L135
61,006
VoltDB/voltdb
src/frontend/org/voltdb/iv2/DeterminismHash.java
DeterminismHash.description
public static String description(int[] hashes, int m_hashMismatchPos) { assert(hashes != null); assert(hashes.length >= 3); StringBuilder sb = new StringBuilder(); sb.append("Full Hash ").append(hashes[0]); sb.append(", Catalog Version ").append(hashes[1]); sb.append(", ...
java
public static String description(int[] hashes, int m_hashMismatchPos) { assert(hashes != null); assert(hashes.length >= 3); StringBuilder sb = new StringBuilder(); sb.append("Full Hash ").append(hashes[0]); sb.append(", Catalog Version ").append(hashes[1]); sb.append(", ...
[ "public", "static", "String", "description", "(", "int", "[", "]", "hashes", ",", "int", "m_hashMismatchPos", ")", "{", "assert", "(", "hashes", "!=", "null", ")", ";", "assert", "(", "hashes", ".", "length", ">=", "3", ")", ";", "StringBuilder", "sb", ...
Log the contents of the hash array
[ "Log", "the", "contents", "of", "the", "hash", "array" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/DeterminismHash.java#L140-L168
61,007
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/FileUtil.java
FileUtil.renameOverwrite
private boolean renameOverwrite(String oldname, String newname) { boolean deleted = delete(newname); if (exists(oldname)) { File file = new File(oldname); return file.renameTo(new File(newname)); } return deleted; }
java
private boolean renameOverwrite(String oldname, String newname) { boolean deleted = delete(newname); if (exists(oldname)) { File file = new File(oldname); return file.renameTo(new File(newname)); } return deleted; }
[ "private", "boolean", "renameOverwrite", "(", "String", "oldname", ",", "String", "newname", ")", "{", "boolean", "deleted", "=", "delete", "(", "newname", ")", ";", "if", "(", "exists", "(", "oldname", ")", ")", "{", "File", "file", "=", "new", "File", ...
Rename the file with oldname to newname. If a file with newname already exists, it is deleted before the renaming operation proceeds. If a file with oldname does not exist, no file will exist after the operation.
[ "Rename", "the", "file", "with", "oldname", "to", "newname", ".", "If", "a", "file", "with", "newname", "already", "exists", "it", "is", "deleted", "before", "the", "renaming", "operation", "proceeds", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/FileUtil.java#L169-L180
61,008
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/FileUtil.java
FileUtil.canonicalOrAbsolutePath
public String canonicalOrAbsolutePath(String path) { try { return canonicalPath(path); } catch (Exception e) { return absolutePath(path); } }
java
public String canonicalOrAbsolutePath(String path) { try { return canonicalPath(path); } catch (Exception e) { return absolutePath(path); } }
[ "public", "String", "canonicalOrAbsolutePath", "(", "String", "path", ")", "{", "try", "{", "return", "canonicalPath", "(", "path", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "return", "absolutePath", "(", "path", ")", ";", "}", "}" ]
Retrieves the canonical path for the given path, or the absolute path if attemting to retrieve the canonical path fails. @param path the path for which to retrieve the canonical or absolute path @return the canonical or absolute path
[ "Retrieves", "the", "canonical", "path", "for", "the", "given", "path", "or", "the", "absolute", "path", "if", "attemting", "to", "retrieve", "the", "canonical", "path", "fails", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/FileUtil.java#L253-L260
61,009
VoltDB/voltdb
src/frontend/org/voltdb/StatementStats.java
StatementStats.isCoordinatorStatsUsable
private boolean isCoordinatorStatsUsable(boolean incremental) { if (m_coordinatorTask == null) { return false; } if (incremental) { return m_coordinatorTask.m_timedInvocations - m_coordinatorTask.m_lastTimedInvocations > 0; } return m_coordinatorTask.m_tim...
java
private boolean isCoordinatorStatsUsable(boolean incremental) { if (m_coordinatorTask == null) { return false; } if (incremental) { return m_coordinatorTask.m_timedInvocations - m_coordinatorTask.m_lastTimedInvocations > 0; } return m_coordinatorTask.m_tim...
[ "private", "boolean", "isCoordinatorStatsUsable", "(", "boolean", "incremental", ")", "{", "if", "(", "m_coordinatorTask", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "incremental", ")", "{", "return", "m_coordinatorTask", ".", "m_timedInvoca...
if any coordinator task is executed at all.
[ "if", "any", "coordinator", "task", "is", "executed", "at", "all", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/StatementStats.java#L47-L55
61,010
VoltDB/voltdb
src/frontend/org/voltdb/StatementStats.java
StatementStats.getIncrementalMinResultSizeAndReset
public int getIncrementalMinResultSizeAndReset() { int retval = m_workerTask.m_incrMinResultSize; m_workerTask.m_incrMinResultSize = Integer.MAX_VALUE; if (isCoordinatorStatsUsable(true)) { m_coordinatorTask.m_incrMinResultSize = Integer.MAX_VALUE; } return retval; ...
java
public int getIncrementalMinResultSizeAndReset() { int retval = m_workerTask.m_incrMinResultSize; m_workerTask.m_incrMinResultSize = Integer.MAX_VALUE; if (isCoordinatorStatsUsable(true)) { m_coordinatorTask.m_incrMinResultSize = Integer.MAX_VALUE; } return retval; ...
[ "public", "int", "getIncrementalMinResultSizeAndReset", "(", ")", "{", "int", "retval", "=", "m_workerTask", ".", "m_incrMinResultSize", ";", "m_workerTask", ".", "m_incrMinResultSize", "=", "Integer", ".", "MAX_VALUE", ";", "if", "(", "isCoordinatorStatsUsable", "(",...
The result size should be taken from the final output, coming from the coordinator task.
[ "The", "result", "size", "should", "be", "taken", "from", "the", "final", "output", "coming", "from", "the", "coordinator", "task", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/StatementStats.java#L178-L185
61,011
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java
ParserDDL.compileAlterTableDropTTL
private Statement compileAlterTableDropTTL(Table t) { if (t.getTTL() == null) { throw Error.error(ErrorCode.X_42501); } if (!StringUtil.isEmpty(t.getTTL().migrationTarget)) { throw unexpectedToken("May not drop migration target"); } Object[] args = new Obj...
java
private Statement compileAlterTableDropTTL(Table t) { if (t.getTTL() == null) { throw Error.error(ErrorCode.X_42501); } if (!StringUtil.isEmpty(t.getTTL().migrationTarget)) { throw unexpectedToken("May not drop migration target"); } Object[] args = new Obj...
[ "private", "Statement", "compileAlterTableDropTTL", "(", "Table", "t", ")", "{", "if", "(", "t", ".", "getTTL", "(", ")", "==", "null", ")", "{", "throw", "Error", ".", "error", "(", "ErrorCode", ".", "X_42501", ")", ";", "}", "if", "(", "!", "String...
VoltDB extension, drop TTL
[ "VoltDB", "extension", "drop", "TTL" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java#L996-L1010
61,012
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java
ParserDDL.compileTriggerSetStatement
StatementDMQL compileTriggerSetStatement(Table table, RangeVariable[] rangeVars) { read(); Expression[] updateExpressions; int[] columnMap; OrderedHashSet colNames = new OrderedHashSet(); HsqlArrayList exprList = new HsqlArrayList(); RangeVariabl...
java
StatementDMQL compileTriggerSetStatement(Table table, RangeVariable[] rangeVars) { read(); Expression[] updateExpressions; int[] columnMap; OrderedHashSet colNames = new OrderedHashSet(); HsqlArrayList exprList = new HsqlArrayList(); RangeVariabl...
[ "StatementDMQL", "compileTriggerSetStatement", "(", "Table", "table", ",", "RangeVariable", "[", "]", "rangeVars", ")", "{", "read", "(", ")", ";", "Expression", "[", "]", "updateExpressions", ";", "int", "[", "]", "columnMap", ";", "OrderedHashSet", "colNames",...
Creates SET Statement for a trigger row from this parse context.
[ "Creates", "SET", "Statement", "for", "a", "trigger", "row", "from", "this", "parse", "context", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java#L2875-L2901
61,013
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java
ParserDDL.readColumnDefinitionOrNull
ColumnSchema readColumnDefinitionOrNull(Table table, HsqlName hsqlName, HsqlArrayList constraintList) { boolean isIdentity = false; boolean isPKIdentity = false; boolean identityAlways = false; Expression generateExpr = null; boolean ...
java
ColumnSchema readColumnDefinitionOrNull(Table table, HsqlName hsqlName, HsqlArrayList constraintList) { boolean isIdentity = false; boolean isPKIdentity = false; boolean identityAlways = false; Expression generateExpr = null; boolean ...
[ "ColumnSchema", "readColumnDefinitionOrNull", "(", "Table", "table", ",", "HsqlName", "hsqlName", ",", "HsqlArrayList", "constraintList", ")", "{", "boolean", "isIdentity", "=", "false", ";", "boolean", "isPKIdentity", "=", "false", ";", "boolean", "identityAlways", ...
Responsible for handling the creation of table columns during the process of executing CREATE TABLE or ADD COLUMN etc. statements. @param table this table @param hsqlName column name @param constraintList list of constraints @return a Column object with indicated attributes
[ "Responsible", "for", "handling", "the", "creation", "of", "table", "columns", "during", "the", "process", "of", "executing", "CREATE", "TABLE", "or", "ADD", "COLUMN", "etc", ".", "statements", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java#L2912-L3013
61,014
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java
ParserDDL.readCheckConstraintCondition
void readCheckConstraintCondition(Constraint c) { readThis(Tokens.OPENBRACKET); startRecording(); isCheckOrTriggerCondition = true; Expression condition = XreadBooleanValueExpression(); isCheckOrTriggerCondition = false; Token[] tokens = getRecordedStatement(); ...
java
void readCheckConstraintCondition(Constraint c) { readThis(Tokens.OPENBRACKET); startRecording(); isCheckOrTriggerCondition = true; Expression condition = XreadBooleanValueExpression(); isCheckOrTriggerCondition = false; Token[] tokens = getRecordedStatement(); ...
[ "void", "readCheckConstraintCondition", "(", "Constraint", "c", ")", "{", "readThis", "(", "Tokens", ".", "OPENBRACKET", ")", ";", "startRecording", "(", ")", ";", "isCheckOrTriggerCondition", "=", "true", ";", "Expression", "condition", "=", "XreadBooleanValueExpre...
Responsible for handling check constraints section of CREATE TABLE ... @param c check constraint
[ "Responsible", "for", "handling", "check", "constraints", "section", "of", "CREATE", "TABLE", "..." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java#L3475-L3492
61,015
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java
ParserDDL.readColumnList
private int[] readColumnList(Table table, boolean ascOrDesc) { OrderedHashSet set = readColumnNames(ascOrDesc); return table.getColumnIndexes(set); }
java
private int[] readColumnList(Table table, boolean ascOrDesc) { OrderedHashSet set = readColumnNames(ascOrDesc); return table.getColumnIndexes(set); }
[ "private", "int", "[", "]", "readColumnList", "(", "Table", "table", ",", "boolean", "ascOrDesc", ")", "{", "OrderedHashSet", "set", "=", "readColumnNames", "(", "ascOrDesc", ")", ";", "return", "table", ".", "getColumnIndexes", "(", "set", ")", ";", "}" ]
Process a bracketed column list as used in the declaration of SQL CONSTRAINTS and return an array containing the indexes of the columns within the table. @param table table that contains the columns @param ascOrDesc boolean @return array of column indexes
[ "Process", "a", "bracketed", "column", "list", "as", "used", "in", "the", "declaration", "of", "SQL", "CONSTRAINTS", "and", "return", "an", "array", "containing", "the", "indexes", "of", "the", "columns", "within", "the", "table", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java#L3503-L3508
61,016
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java
ParserDDL.processAlterTableRename
void processAlterTableRename(Table table) { HsqlName name = readNewSchemaObjectName(SchemaObject.TABLE); name.setSchemaIfNull(table.getSchemaName()); if (table.getSchemaName() != name.schema) { throw Error.error(ErrorCode.X_42505); } database.schemaManager.renameS...
java
void processAlterTableRename(Table table) { HsqlName name = readNewSchemaObjectName(SchemaObject.TABLE); name.setSchemaIfNull(table.getSchemaName()); if (table.getSchemaName() != name.schema) { throw Error.error(ErrorCode.X_42505); } database.schemaManager.renameS...
[ "void", "processAlterTableRename", "(", "Table", "table", ")", "{", "HsqlName", "name", "=", "readNewSchemaObjectName", "(", "SchemaObject", ".", "TABLE", ")", ";", "name", ".", "setSchemaIfNull", "(", "table", ".", "getSchemaName", "(", ")", ")", ";", "if", ...
Responsible for handling tail of ALTER TABLE ... RENAME ... @param table table
[ "Responsible", "for", "handling", "tail", "of", "ALTER", "TABLE", "...", "RENAME", "..." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java#L3901-L3912
61,017
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java
ParserDDL.processAlterTableDropColumn
void processAlterTableDropColumn(Table table, String colName, boolean cascade) { int colindex = table.getColumnIndex(colName); if (table.getColumnCount() == 1) { throw Error.error(ErrorCode.X_42591); } session.commit(false); Ta...
java
void processAlterTableDropColumn(Table table, String colName, boolean cascade) { int colindex = table.getColumnIndex(colName); if (table.getColumnCount() == 1) { throw Error.error(ErrorCode.X_42591); } session.commit(false); Ta...
[ "void", "processAlterTableDropColumn", "(", "Table", "table", ",", "String", "colName", ",", "boolean", "cascade", ")", "{", "int", "colindex", "=", "table", ".", "getColumnIndex", "(", "colName", ")", ";", "if", "(", "table", ".", "getColumnCount", "(", ")"...
Responsible for handling tail of ALTER TABLE ... DROP COLUMN ...
[ "Responsible", "for", "handling", "tail", "of", "ALTER", "TABLE", "...", "DROP", "COLUMN", "..." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java#L4221-L4240
61,018
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java
ParserDDL.processAlterTableDropConstraint
void processAlterTableDropConstraint(Table table, String name, boolean cascade) { session.commit(false); TableWorks tableWorks = new TableWorks(session, table); tableWorks.dropConstraint(name, cascade); return; }
java
void processAlterTableDropConstraint(Table table, String name, boolean cascade) { session.commit(false); TableWorks tableWorks = new TableWorks(session, table); tableWorks.dropConstraint(name, cascade); return; }
[ "void", "processAlterTableDropConstraint", "(", "Table", "table", ",", "String", "name", ",", "boolean", "cascade", ")", "{", "session", ".", "commit", "(", "false", ")", ";", "TableWorks", "tableWorks", "=", "new", "TableWorks", "(", "session", ",", "table", ...
Responsible for handling tail of ALTER TABLE ... DROP CONSTRAINT ...
[ "Responsible", "for", "handling", "tail", "of", "ALTER", "TABLE", "...", "DROP", "CONSTRAINT", "..." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java#L4275-L4285
61,019
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java
ParserDDL.processAlterColumnType
private void processAlterColumnType(Table table, ColumnSchema oldCol, boolean fullDefinition) { ColumnSchema newCol; if (oldCol.isGenerated()) { throw Error.error(ErrorCode.X_42561); } if (fullDefinition) { HsqlArrayList ...
java
private void processAlterColumnType(Table table, ColumnSchema oldCol, boolean fullDefinition) { ColumnSchema newCol; if (oldCol.isGenerated()) { throw Error.error(ErrorCode.X_42561); } if (fullDefinition) { HsqlArrayList ...
[ "private", "void", "processAlterColumnType", "(", "Table", "table", ",", "ColumnSchema", "oldCol", ",", "boolean", "fullDefinition", ")", "{", "ColumnSchema", "newCol", ";", "if", "(", "oldCol", ".", "isGenerated", "(", ")", ")", "{", "throw", "Error", ".", ...
Allows changes to type of column or addition of an IDENTITY generator. IDENTITY is not removed if it does not appear in new column definition Constraint definitions are not allowed
[ "Allows", "changes", "to", "type", "of", "column", "or", "addition", "of", "an", "IDENTITY", "generator", ".", "IDENTITY", "is", "not", "removed", "if", "it", "does", "not", "appear", "in", "new", "column", "definition", "Constraint", "definitions", "are", "...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java#L4727-L4782
61,020
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java
ParserDDL.processAlterColumnRename
private void processAlterColumnRename(Table table, ColumnSchema column) { checkIsSimpleName(); if (table.findColumn(token.tokenString) > -1) { throw Error.error(ErrorCode.X_42504, token.tokenString); } database.schemaManager.checkColumnIsReferenced(table.getName(), ...
java
private void processAlterColumnRename(Table table, ColumnSchema column) { checkIsSimpleName(); if (table.findColumn(token.tokenString) > -1) { throw Error.error(ErrorCode.X_42504, token.tokenString); } database.schemaManager.checkColumnIsReferenced(table.getName(), ...
[ "private", "void", "processAlterColumnRename", "(", "Table", "table", ",", "ColumnSchema", "column", ")", "{", "checkIsSimpleName", "(", ")", ";", "if", "(", "table", ".", "findColumn", "(", "token", ".", "tokenString", ")", ">", "-", "1", ")", "{", "throw...
Responsible for handling tail of ALTER COLUMN ... RENAME ...
[ "Responsible", "for", "handling", "tail", "of", "ALTER", "COLUMN", "...", "RENAME", "..." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java#L4787-L4800
61,021
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java
ParserDDL.readLimitConstraintCondition
void readLimitConstraintCondition(Constraint c) { readThis(Tokens.PARTITION); readThis(Tokens.ROWS); int rowsLimit = readInteger(); c.rowsLimit = rowsLimit; // The optional EXECUTE (DELETE ...) clause if (readIfThis(Tokens.EXECUTE)) { // Capture the statemen...
java
void readLimitConstraintCondition(Constraint c) { readThis(Tokens.PARTITION); readThis(Tokens.ROWS); int rowsLimit = readInteger(); c.rowsLimit = rowsLimit; // The optional EXECUTE (DELETE ...) clause if (readIfThis(Tokens.EXECUTE)) { // Capture the statemen...
[ "void", "readLimitConstraintCondition", "(", "Constraint", "c", ")", "{", "readThis", "(", "Tokens", ".", "PARTITION", ")", ";", "readThis", "(", "Tokens", ".", "ROWS", ")", ";", "int", "rowsLimit", "=", "readInteger", "(", ")", ";", "c", ".", "rowsLimit",...
Responsible for handling Volt limit constraints section of CREATE TABLE ... @param c check constraint
[ "Responsible", "for", "handling", "Volt", "limit", "constraints", "section", "of", "CREATE", "TABLE", "..." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java#L5482-L5530
61,022
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java
ParserDDL.XreadExpressions
private java.util.List<Expression> XreadExpressions(java.util.List<Boolean> ascDesc) { return XreadExpressions(ascDesc, false); }
java
private java.util.List<Expression> XreadExpressions(java.util.List<Boolean> ascDesc) { return XreadExpressions(ascDesc, false); }
[ "private", "java", ".", "util", ".", "List", "<", "Expression", ">", "XreadExpressions", "(", "java", ".", "util", ".", "List", "<", "Boolean", ">", "ascDesc", ")", "{", "return", "XreadExpressions", "(", "ascDesc", ",", "false", ")", ";", "}" ]
Default disallow empty parenthesis
[ "Default", "disallow", "empty", "parenthesis" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java#L5533-L5535
61,023
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/Request.java
Request.isValid
static boolean isValid(int type) { // make sure this is always synchronized with Zoodefs!! switch (type) { case OpCode.notification: return false; case OpCode.create: case OpCode.delete: case OpCode.createSession: case OpCode.exists: case OpCod...
java
static boolean isValid(int type) { // make sure this is always synchronized with Zoodefs!! switch (type) { case OpCode.notification: return false; case OpCode.create: case OpCode.delete: case OpCode.createSession: case OpCode.exists: case OpCod...
[ "static", "boolean", "isValid", "(", "int", "type", ")", "{", "// make sure this is always synchronized with Zoodefs!!", "switch", "(", "type", ")", "{", "case", "OpCode", ".", "notification", ":", "return", "false", ";", "case", "OpCode", ".", "create", ":", "c...
is the packet type a valid packet in zookeeper @param type the type of the packet @return true if a valid packet, false if not
[ "is", "the", "packet", "type", "a", "valid", "packet", "in", "zookeeper" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/Request.java#L112-L135
61,024
VoltDB/voltdb
src/frontend/org/voltcore/agreement/AgreementSeeker.java
AgreementSeeker.startSeekingFor
public void startSeekingFor( final Set<Long> hsids, final Map<Long,Boolean> inTrouble) { // if the mesh hsids change we need to reset if (!m_hsids.equals(hsids)) { if (!m_hsids.isEmpty()) clear(); m_hsids = ImmutableSortedSet.copyOf(hsids); } // deter...
java
public void startSeekingFor( final Set<Long> hsids, final Map<Long,Boolean> inTrouble) { // if the mesh hsids change we need to reset if (!m_hsids.equals(hsids)) { if (!m_hsids.isEmpty()) clear(); m_hsids = ImmutableSortedSet.copyOf(hsids); } // deter...
[ "public", "void", "startSeekingFor", "(", "final", "Set", "<", "Long", ">", "hsids", ",", "final", "Map", "<", "Long", ",", "Boolean", ">", "inTrouble", ")", "{", "// if the mesh hsids change we need to reset", "if", "(", "!", "m_hsids", ".", "equals", "(", ...
Start accumulate site links graphing information @param hsids pre-failure mesh hsids @param inTrouble a map where each key is a failed site, and its value is a boolean that indicates whether or not the failure was witnessed directly or reported by some other site
[ "Start", "accumulate", "site", "links", "graphing", "information" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/AgreementSeeker.java#L87-L99
61,025
VoltDB/voltdb
src/frontend/org/voltcore/agreement/AgreementSeeker.java
AgreementSeeker.removeValues
static protected void removeValues(TreeMultimap<Long, Long> mm, Set<Long> values) { Iterator<Map.Entry<Long, Long>> itr = mm.entries().iterator(); while (itr.hasNext()) { Map.Entry<Long, Long> e = itr.next(); if (values.contains(e.getValue())) { itr.remove(); ...
java
static protected void removeValues(TreeMultimap<Long, Long> mm, Set<Long> values) { Iterator<Map.Entry<Long, Long>> itr = mm.entries().iterator(); while (itr.hasNext()) { Map.Entry<Long, Long> e = itr.next(); if (values.contains(e.getValue())) { itr.remove(); ...
[ "static", "protected", "void", "removeValues", "(", "TreeMultimap", "<", "Long", ",", "Long", ">", "mm", ",", "Set", "<", "Long", ">", "values", ")", "{", "Iterator", "<", "Map", ".", "Entry", "<", "Long", ",", "Long", ">", ">", "itr", "=", "mm", "...
Convenience method that remove all instances of the given values from the given map @param mm a multimap @param values a set of values that need to be removed
[ "Convenience", "method", "that", "remove", "all", "instances", "of", "the", "given", "values", "from", "the", "given", "map" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/AgreementSeeker.java#L116-L124
61,026
VoltDB/voltdb
src/frontend/org/voltcore/agreement/AgreementSeeker.java
AgreementSeeker.amongDeadHsids
public static Predicate<Map.Entry<Long, Boolean>> amongDeadHsids(final Set<Long> hsids) { return new Predicate<Map.Entry<Long,Boolean>>() { @Override public boolean apply(Entry<Long, Boolean> e) { return hsids.contains(e.getKey()) && e.getValue(); } };...
java
public static Predicate<Map.Entry<Long, Boolean>> amongDeadHsids(final Set<Long> hsids) { return new Predicate<Map.Entry<Long,Boolean>>() { @Override public boolean apply(Entry<Long, Boolean> e) { return hsids.contains(e.getKey()) && e.getValue(); } };...
[ "public", "static", "Predicate", "<", "Map", ".", "Entry", "<", "Long", ",", "Boolean", ">", ">", "amongDeadHsids", "(", "final", "Set", "<", "Long", ">", "hsids", ")", "{", "return", "new", "Predicate", "<", "Map", ".", "Entry", "<", "Long", ",", "B...
returns a map entry predicate that tests whether or not the given map entry describes a dead site @param hsids pre-failure mesh hsids @return
[ "returns", "a", "map", "entry", "predicate", "that", "tests", "whether", "or", "not", "the", "given", "map", "entry", "describes", "a", "dead", "site" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/AgreementSeeker.java#L153-L160
61,027
VoltDB/voltdb
src/frontend/org/voltcore/agreement/AgreementSeeker.java
AgreementSeeker.removeValue
private void removeValue(TreeMultimap<Long, Long> mm, long value) { Iterator<Map.Entry<Long, Long>> itr = mm.entries().iterator(); while (itr.hasNext()) { Map.Entry<Long,Long> e = itr.next(); if (e.getValue().equals(value)) { itr.remove(); } } ...
java
private void removeValue(TreeMultimap<Long, Long> mm, long value) { Iterator<Map.Entry<Long, Long>> itr = mm.entries().iterator(); while (itr.hasNext()) { Map.Entry<Long,Long> e = itr.next(); if (e.getValue().equals(value)) { itr.remove(); } } ...
[ "private", "void", "removeValue", "(", "TreeMultimap", "<", "Long", ",", "Long", ">", "mm", ",", "long", "value", ")", "{", "Iterator", "<", "Map", ".", "Entry", "<", "Long", ",", "Long", ">", ">", "itr", "=", "mm", ".", "entries", "(", ")", ".", ...
Convenience method that remove all instances of the given value from the given map @param mm a multimap @param value a value that needs to be removed
[ "Convenience", "method", "that", "remove", "all", "instances", "of", "the", "given", "value", "from", "the", "given", "map" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/AgreementSeeker.java#L187-L195
61,028
VoltDB/voltdb
src/frontend/org/voltcore/agreement/AgreementSeeker.java
AgreementSeeker.add
void add(long reportingHsid, final Map<Long,Boolean> failed) { // skip if the reporting site did not belong to the pre // failure mesh if (!m_hsids.contains(reportingHsid)) return; // ship if the reporting site is reporting itself dead Boolean harakiri = failed.get(reportingHsid...
java
void add(long reportingHsid, final Map<Long,Boolean> failed) { // skip if the reporting site did not belong to the pre // failure mesh if (!m_hsids.contains(reportingHsid)) return; // ship if the reporting site is reporting itself dead Boolean harakiri = failed.get(reportingHsid...
[ "void", "add", "(", "long", "reportingHsid", ",", "final", "Map", "<", "Long", ",", "Boolean", ">", "failed", ")", "{", "// skip if the reporting site did not belong to the pre", "// failure mesh", "if", "(", "!", "m_hsids", ".", "contains", "(", "reportingHsid", ...
Adds alive and dead graph information @param reportingHsid site reporting failures @param failures seen by the reporting site
[ "Adds", "alive", "and", "dead", "graph", "information" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/AgreementSeeker.java#L249-L281
61,029
VoltDB/voltdb
src/frontend/org/voltcore/agreement/AgreementSeeker.java
AgreementSeeker.add
public void add(long reportingHsid, SiteFailureMessage sfm) { // skip if the reporting site did not belong to the pre // failure mesh, or the reporting site is reporting itself // dead, or none of the sites in the safe transaction map // are among the known hsids if ( !m_hsids....
java
public void add(long reportingHsid, SiteFailureMessage sfm) { // skip if the reporting site did not belong to the pre // failure mesh, or the reporting site is reporting itself // dead, or none of the sites in the safe transaction map // are among the known hsids if ( !m_hsids....
[ "public", "void", "add", "(", "long", "reportingHsid", ",", "SiteFailureMessage", "sfm", ")", "{", "// skip if the reporting site did not belong to the pre", "// failure mesh, or the reporting site is reporting itself", "// dead, or none of the sites in the safe transaction map", "// are...
Adds alive and dead graph information from a reporting site survivor set @param reportingHsid the reporting site @param sfm a {@link SiteFailureMessage} containing that site's survivor set
[ "Adds", "alive", "and", "dead", "graph", "information", "from", "a", "reporting", "site", "survivor", "set" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/AgreementSeeker.java#L290-L328
61,030
VoltDB/voltdb
src/frontend/org/voltcore/agreement/AgreementSeeker.java
AgreementSeeker.seenByInterconnectedPeers
protected boolean seenByInterconnectedPeers( Set<Long> destinations, Set<Long> origins) { Set<Long> seers = Multimaps.filterValues(m_alive, in(origins)).keySet(); int before = origins.size(); origins.addAll(seers); if (origins.containsAll(destinations)) { return true; ...
java
protected boolean seenByInterconnectedPeers( Set<Long> destinations, Set<Long> origins) { Set<Long> seers = Multimaps.filterValues(m_alive, in(origins)).keySet(); int before = origins.size(); origins.addAll(seers); if (origins.containsAll(destinations)) { return true; ...
[ "protected", "boolean", "seenByInterconnectedPeers", "(", "Set", "<", "Long", ">", "destinations", ",", "Set", "<", "Long", ">", "origins", ")", "{", "Set", "<", "Long", ">", "seers", "=", "Multimaps", ".", "filterValues", "(", "m_alive", ",", "in", "(", ...
Walk the alive graph to see if there is a connected path between origins, and destinations @param destinations set of sites that we are looking a path to @param origins set of sites that we are looking a path from @return true origins have path to destinations
[ "Walk", "the", "alive", "graph", "to", "see", "if", "there", "is", "a", "connected", "path", "between", "origins", "and", "destinations" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/AgreementSeeker.java#L443-L454
61,031
VoltDB/voltdb
src/frontend/org/voltcore/agreement/AgreementSeeker.java
AgreementSeeker.forWhomSiteIsDead
public Set<Long> forWhomSiteIsDead(long hsid) { ImmutableSet.Builder<Long> isb = ImmutableSet.builder(); Set<Long> deadBy = m_dead.get(hsid); if ( !deadBy.isEmpty() && m_survivors.contains(hsid) && m_strategy == ArbitrationStrategy.MATCHING_CARDINALITY) { is...
java
public Set<Long> forWhomSiteIsDead(long hsid) { ImmutableSet.Builder<Long> isb = ImmutableSet.builder(); Set<Long> deadBy = m_dead.get(hsid); if ( !deadBy.isEmpty() && m_survivors.contains(hsid) && m_strategy == ArbitrationStrategy.MATCHING_CARDINALITY) { is...
[ "public", "Set", "<", "Long", ">", "forWhomSiteIsDead", "(", "long", "hsid", ")", "{", "ImmutableSet", ".", "Builder", "<", "Long", ">", "isb", "=", "ImmutableSet", ".", "builder", "(", ")", ";", "Set", "<", "Long", ">", "deadBy", "=", "m_dead", ".", ...
Is the given hsid considered dead by anyone in my survivor set? @param hsid a site hsid @return a subset of my survivor set that considers the given site dead
[ "Is", "the", "given", "hsid", "considered", "dead", "by", "anyone", "in", "my", "survivor", "set?" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/AgreementSeeker.java#L535-L544
61,032
VoltDB/voltdb
src/frontend/org/voltdb/sysprocs/UpdateApplicationBase.java
UpdateApplicationBase.addDDLToCatalog
protected static InMemoryJarfile addDDLToCatalog(Catalog oldCatalog, InMemoryJarfile jarfile, String[] adhocDDLStmts, boolean isXDCR) throws IOException, VoltCompilerException { StringBuilder sb = new StringBuilder(); compilerLog.info("Applying the following DDL to cluster:"); for (Strin...
java
protected static InMemoryJarfile addDDLToCatalog(Catalog oldCatalog, InMemoryJarfile jarfile, String[] adhocDDLStmts, boolean isXDCR) throws IOException, VoltCompilerException { StringBuilder sb = new StringBuilder(); compilerLog.info("Applying the following DDL to cluster:"); for (Strin...
[ "protected", "static", "InMemoryJarfile", "addDDLToCatalog", "(", "Catalog", "oldCatalog", ",", "InMemoryJarfile", "jarfile", ",", "String", "[", "]", "adhocDDLStmts", ",", "boolean", "isXDCR", ")", "throws", "IOException", ",", "VoltCompilerException", "{", "StringBu...
Append the supplied adhoc DDL to the current catalog's DDL and recompile the jarfile @throws VoltCompilerException
[ "Append", "the", "supplied", "adhoc", "DDL", "to", "the", "current", "catalog", "s", "DDL", "and", "recompile", "the", "jarfile" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/UpdateApplicationBase.java#L312-L328
61,033
VoltDB/voltdb
src/frontend/org/voltdb/sysprocs/UpdateApplicationBase.java
UpdateApplicationBase.makeQuickResponse
static protected CompletableFuture<ClientResponse> makeQuickResponse(byte statusCode, String msg) { ClientResponseImpl cri = new ClientResponseImpl(statusCode, new VoltTable[0], msg); CompletableFuture<ClientResponse> f = new CompletableFuture<>(); f.complete(cri); return f; }
java
static protected CompletableFuture<ClientResponse> makeQuickResponse(byte statusCode, String msg) { ClientResponseImpl cri = new ClientResponseImpl(statusCode, new VoltTable[0], msg); CompletableFuture<ClientResponse> f = new CompletableFuture<>(); f.complete(cri); return f; }
[ "static", "protected", "CompletableFuture", "<", "ClientResponse", ">", "makeQuickResponse", "(", "byte", "statusCode", ",", "String", "msg", ")", "{", "ClientResponseImpl", "cri", "=", "new", "ClientResponseImpl", "(", "statusCode", ",", "new", "VoltTable", "[", ...
Error generating shortcut method
[ "Error", "generating", "shortcut", "method" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/UpdateApplicationBase.java#L400-L405
61,034
VoltDB/voltdb
src/frontend/org/voltdb/sysprocs/UpdateApplicationBase.java
UpdateApplicationBase.verifyAndWriteCatalogJar
protected String verifyAndWriteCatalogJar(CatalogChangeResult ccr) { String procedureName = "@VerifyCatalogAndWriteJar"; CompletableFuture<Map<Integer,ClientResponse>> cf = callNTProcedureOnAllHosts(procedureName, ccr.catalogBytes, ccr.encodedDiffCommands, cc...
java
protected String verifyAndWriteCatalogJar(CatalogChangeResult ccr) { String procedureName = "@VerifyCatalogAndWriteJar"; CompletableFuture<Map<Integer,ClientResponse>> cf = callNTProcedureOnAllHosts(procedureName, ccr.catalogBytes, ccr.encodedDiffCommands, cc...
[ "protected", "String", "verifyAndWriteCatalogJar", "(", "CatalogChangeResult", "ccr", ")", "{", "String", "procedureName", "=", "\"@VerifyCatalogAndWriteJar\"", ";", "CompletableFuture", "<", "Map", "<", "Integer", ",", "ClientResponse", ">", ">", "cf", "=", "callNTPr...
Run the catalog jar NT procedure to check and write the catalog file. Check the results map from every host and return error message if needed. @return A String describing the error messages. If all hosts return success, NULL is returned.
[ "Run", "the", "catalog", "jar", "NT", "procedure", "to", "check", "and", "write", "the", "catalog", "file", ".", "Check", "the", "results", "map", "from", "every", "host", "and", "return", "error", "message", "if", "needed", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/UpdateApplicationBase.java#L412-L469
61,035
VoltDB/voltdb
src/frontend/org/voltdb/sysprocs/UpdateApplicationBase.java
UpdateApplicationBase.getNextGenerationId
public static long getNextGenerationId() { // ENG-14511- these calls may hit assertion failures in testing environments try { return UniqueIdGenerator.makeIdFromComponents(System.currentTimeMillis(), m_generationId.incrementAndGet(), MpInitiator.MP_INI...
java
public static long getNextGenerationId() { // ENG-14511- these calls may hit assertion failures in testing environments try { return UniqueIdGenerator.makeIdFromComponents(System.currentTimeMillis(), m_generationId.incrementAndGet(), MpInitiator.MP_INI...
[ "public", "static", "long", "getNextGenerationId", "(", ")", "{", "// ENG-14511- these calls may hit assertion failures in testing environments", "try", "{", "return", "UniqueIdGenerator", ".", "makeIdFromComponents", "(", "System", ".", "currentTimeMillis", "(", ")", ",", ...
Get a unique id for the next generation for export. @return next generation id (a unique long value)
[ "Get", "a", "unique", "id", "for", "the", "next", "generation", "for", "export", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/UpdateApplicationBase.java#L475-L489
61,036
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/rights/UserManager.java
UserManager.getUser
public User getUser(String name, String password) { if (name == null) { name = ""; } if (password == null) { password = ""; } User user = get(name); user.checkPassword(password); return user; }
java
public User getUser(String name, String password) { if (name == null) { name = ""; } if (password == null) { password = ""; } User user = get(name); user.checkPassword(password); return user; }
[ "public", "User", "getUser", "(", "String", "name", ",", "String", "password", ")", "{", "if", "(", "name", "==", "null", ")", "{", "name", "=", "\"\"", ";", "}", "if", "(", "password", "==", "null", ")", "{", "password", "=", "\"\"", ";", "}", "...
Returns the User object with the specified name and password from this object's set.
[ "Returns", "the", "User", "object", "with", "the", "specified", "name", "and", "password", "from", "this", "object", "s", "set", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/UserManager.java#L159-L174
61,037
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/rights/UserManager.java
UserManager.get
public User get(String name) { User user = (User) userList.get(name); if (user == null) { throw Error.error(ErrorCode.X_28501, name); } return user; }
java
public User get(String name) { User user = (User) userList.get(name); if (user == null) { throw Error.error(ErrorCode.X_28501, name); } return user; }
[ "public", "User", "get", "(", "String", "name", ")", "{", "User", "user", "=", "(", "User", ")", "userList", ".", "get", "(", "name", ")", ";", "if", "(", "user", "==", "null", ")", "{", "throw", "Error", ".", "error", "(", "ErrorCode", ".", "X_2...
Returns the User object identified by the name argument.
[ "Returns", "the", "User", "object", "identified", "by", "the", "name", "argument", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/UserManager.java#L193-L202
61,038
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/store/HashIndex.java
HashIndex.reset
void reset(int hashTableSize, int capacity) { // A VoltDB extension to diagnose ArrayOutOfBounds. if (linkTable != null) { voltDBresetCapacity = linkTable.length; } ++voltDBresetCount; voltDBlastResetEvent = voltDBhistoryDepth; voltDBhistoryCapacity = Math.min...
java
void reset(int hashTableSize, int capacity) { // A VoltDB extension to diagnose ArrayOutOfBounds. if (linkTable != null) { voltDBresetCapacity = linkTable.length; } ++voltDBresetCount; voltDBlastResetEvent = voltDBhistoryDepth; voltDBhistoryCapacity = Math.min...
[ "void", "reset", "(", "int", "hashTableSize", ",", "int", "capacity", ")", "{", "// A VoltDB extension to diagnose ArrayOutOfBounds.", "if", "(", "linkTable", "!=", "null", ")", "{", "voltDBresetCapacity", "=", "linkTable", ".", "length", ";", "}", "++", "voltDBre...
Reset the structure with a new size as empty. @param hashTableSize @param capacity
[ "Reset", "the", "structure", "with", "a", "new", "size", "as", "empty", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/store/HashIndex.java#L97-L117
61,039
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/store/HashIndex.java
HashIndex.clear
void clear() { // A VoltDB extension to diagnose ArrayOutOfBounds. if (linkTable != null) { voltDBclearCapacity = linkTable.length; } ++voltDBclearCount; voltDBlastClearEvent = voltDBhistoryDepth; // End of VoltDB extension int to = linkTable....
java
void clear() { // A VoltDB extension to diagnose ArrayOutOfBounds. if (linkTable != null) { voltDBclearCapacity = linkTable.length; } ++voltDBclearCount; voltDBlastClearEvent = voltDBhistoryDepth; // End of VoltDB extension int to = linkTable....
[ "void", "clear", "(", ")", "{", "// A VoltDB extension to diagnose ArrayOutOfBounds.", "if", "(", "linkTable", "!=", "null", ")", "{", "voltDBclearCapacity", "=", "linkTable", ".", "length", ";", "}", "++", "voltDBclearCount", ";", "voltDBlastClearEvent", "=", "volt...
Reset the index as empty.
[ "Reset", "the", "index", "as", "empty", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/store/HashIndex.java#L137-L154
61,040
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/store/HashIndex.java
HashIndex.unlinkNode
void unlinkNode(int index, int lastLookup, int lookup) { // A VoltDB extension to diagnose ArrayOutOfBounds. voltDBhistory[voltDBhistoryDepth++ % voltDBhistoryCapacity] = -index-1; // End of VoltDB extension // unlink the node if (lastLookup == -1) { hashTable[index]...
java
void unlinkNode(int index, int lastLookup, int lookup) { // A VoltDB extension to diagnose ArrayOutOfBounds. voltDBhistory[voltDBhistoryDepth++ % voltDBhistoryCapacity] = -index-1; // End of VoltDB extension // unlink the node if (lastLookup == -1) { hashTable[index]...
[ "void", "unlinkNode", "(", "int", "index", ",", "int", "lastLookup", ",", "int", "lookup", ")", "{", "// A VoltDB extension to diagnose ArrayOutOfBounds.", "voltDBhistory", "[", "voltDBhistoryDepth", "++", "%", "voltDBhistoryCapacity", "]", "=", "-", "index", "-", "...
Unlink a node from a linked list and link into the reclaimed list. @param index an index into hashTable @param lastLookup either -1 or the node to which the target node is linked @param lookup the node to remove
[ "Unlink", "a", "node", "from", "a", "linked", "list", "and", "link", "into", "the", "reclaimed", "list", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/store/HashIndex.java#L280-L297
61,041
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/store/HashIndex.java
HashIndex.removeEmptyNode
boolean removeEmptyNode(int lookup) { // A VoltDB extension to diagnose ArrayOutOfBounds. voltDBhistory[voltDBhistoryDepth++ % voltDBhistoryCapacity] = 1000000 + lookup; // End of VoltDB extension boolean found = false; int lastLookup = -1; for (int i = reclaim...
java
boolean removeEmptyNode(int lookup) { // A VoltDB extension to diagnose ArrayOutOfBounds. voltDBhistory[voltDBhistoryDepth++ % voltDBhistoryCapacity] = 1000000 + lookup; // End of VoltDB extension boolean found = false; int lastLookup = -1; for (int i = reclaim...
[ "boolean", "removeEmptyNode", "(", "int", "lookup", ")", "{", "// A VoltDB extension to diagnose ArrayOutOfBounds.", "voltDBhistory", "[", "voltDBhistoryDepth", "++", "%", "voltDBhistoryCapacity", "]", "=", "1000000", "+", "lookup", ";", "// End of VoltDB extension", "boole...
Remove a node that has already been unlinked. This is not required for index operations. It is used only when the row needs to be removed from the data structures that store the actual indexed data and the nodes need to be contiguous. @param lookup the node to remove @return true if node found in unlinked state
[ "Remove", "a", "node", "that", "has", "already", "been", "unlinked", ".", "This", "is", "not", "required", "for", "index", "operations", ".", "It", "is", "used", "only", "when", "the", "row", "needs", "to", "be", "removed", "from", "the", "data", "struct...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/store/HashIndex.java#L308-L355
61,042
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/TextCache.java
TextCache.translateSep
private static String translateSep(String sep, boolean isProperty) { if (sep == null) { return null; } int next = sep.indexOf(BACKSLASH_CHAR); if (next != -1) { int start = 0; char[] sepArray = sep.toCharArray(); char ...
java
private static String translateSep(String sep, boolean isProperty) { if (sep == null) { return null; } int next = sep.indexOf(BACKSLASH_CHAR); if (next != -1) { int start = 0; char[] sepArray = sep.toCharArray(); char ...
[ "private", "static", "String", "translateSep", "(", "String", "sep", ",", "boolean", "isProperty", ")", "{", "if", "(", "sep", "==", "null", ")", "{", "return", "null", ";", "}", "int", "next", "=", "sep", ".", "indexOf", "(", "BACKSLASH_CHAR", ")", ";...
Translates the escaped characters in a separator string and returns the non-escaped string.
[ "Translates", "the", "escaped", "characters", "in", "a", "separator", "string", "and", "returns", "the", "non", "-", "escaped", "string", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/TextCache.java#L223-L307
61,043
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/TextCache.java
TextCache.open
public void open(boolean readonly) { fileFreePosition = 0; try { dataFile = ScaledRAFile.newScaledRAFile(database, fileName, readonly, ScaledRAFile.DATA_FILE_RAF, null, null); fileFreePosition = dataFile.length(); if (fileFreePosition > Integer....
java
public void open(boolean readonly) { fileFreePosition = 0; try { dataFile = ScaledRAFile.newScaledRAFile(database, fileName, readonly, ScaledRAFile.DATA_FILE_RAF, null, null); fileFreePosition = dataFile.length(); if (fileFreePosition > Integer....
[ "public", "void", "open", "(", "boolean", "readonly", ")", "{", "fileFreePosition", "=", "0", ";", "try", "{", "dataFile", "=", "ScaledRAFile", ".", "newScaledRAFile", "(", "database", ",", "fileName", ",", "readonly", ",", "ScaledRAFile", ".", "DATA_FILE_RAF"...
Opens a data source file.
[ "Opens", "a", "data", "source", "file", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/TextCache.java#L312-L335
61,044
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/TextCache.java
TextCache.close
public synchronized void close(boolean write) { if (dataFile == null) { return; } try { cache.saveAll(); boolean empty = (dataFile.length() <= NL.length()); dataFile.close(); dataFile = null; if (empty && !cacheReadonl...
java
public synchronized void close(boolean write) { if (dataFile == null) { return; } try { cache.saveAll(); boolean empty = (dataFile.length() <= NL.length()); dataFile.close(); dataFile = null; if (empty && !cacheReadonl...
[ "public", "synchronized", "void", "close", "(", "boolean", "write", ")", "{", "if", "(", "dataFile", "==", "null", ")", "{", "return", ";", "}", "try", "{", "cache", ".", "saveAll", "(", ")", ";", "boolean", "empty", "=", "(", "dataFile", ".", "lengt...
Writes newly created rows to disk. In the current implentation, such rows have already been saved, so this method just removes a source file that has no rows.
[ "Writes", "newly", "created", "rows", "to", "disk", ".", "In", "the", "current", "implentation", "such", "rows", "have", "already", "been", "saved", "so", "this", "method", "just", "removes", "a", "source", "file", "that", "has", "no", "rows", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/TextCache.java#L346-L371
61,045
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/TextCache.java
TextCache.purge
void purge() { uncommittedCache.clear(); try { if (cacheReadonly) { close(false); } else { if (dataFile != null) { dataFile.close(); dataFile = null; } FileUtil.getDefaultI...
java
void purge() { uncommittedCache.clear(); try { if (cacheReadonly) { close(false); } else { if (dataFile != null) { dataFile.close(); dataFile = null; } FileUtil.getDefaultI...
[ "void", "purge", "(", ")", "{", "uncommittedCache", ".", "clear", "(", ")", ";", "try", "{", "if", "(", "cacheReadonly", ")", "{", "close", "(", "false", ")", ";", "}", "else", "{", "if", "(", "dataFile", "!=", "null", ")", "{", "dataFile", ".", ...
Closes the source file and deletes it if it is not read-only.
[ "Closes", "the", "source", "file", "and", "deletes", "it", "if", "it", "is", "not", "read", "-", "only", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/TextCache.java#L376-L399
61,046
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/TextCache.java
TextCache.findNextUsedLinePos
int findNextUsedLinePos(int pos) { try { int firstPos = pos; int currentPos = pos; boolean wasCR = false; dataFile.seek(pos); while (true) { int c = dataFile.read(); currentPos++; swit...
java
int findNextUsedLinePos(int pos) { try { int firstPos = pos; int currentPos = pos; boolean wasCR = false; dataFile.seek(pos); while (true) { int c = dataFile.read(); currentPos++; swit...
[ "int", "findNextUsedLinePos", "(", "int", "pos", ")", "{", "try", "{", "int", "firstPos", "=", "pos", ";", "int", "currentPos", "=", "pos", ";", "boolean", "wasCR", "=", "false", ";", "dataFile", ".", "seek", "(", "pos", ")", ";", "while", "(", "true...
Searches from file pointer, pos, and finds the beginning of the first line that contains any non-space character. Increments the row counter when a blank line is skipped. If none found return -1
[ "Searches", "from", "file", "pointer", "pos", "and", "finds", "the", "beginning", "of", "the", "first", "line", "that", "contains", "any", "non", "-", "space", "character", ".", "Increments", "the", "row", "counter", "when", "a", "blank", "line", "is", "sk...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/TextCache.java#L616-L662
61,047
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/TextCache.java
TextCache.saveRows
protected synchronized void saveRows(CachedObject[] rows, int offset, int count) { if (count == 0) { return; } for (int i = offset; i < offset + count; i++) { CachedObject r = rows[i]; uncommittedCache.put(r.getPos()...
java
protected synchronized void saveRows(CachedObject[] rows, int offset, int count) { if (count == 0) { return; } for (int i = offset; i < offset + count; i++) { CachedObject r = rows[i]; uncommittedCache.put(r.getPos()...
[ "protected", "synchronized", "void", "saveRows", "(", "CachedObject", "[", "]", "rows", ",", "int", "offset", ",", "int", "count", ")", "{", "if", "(", "count", "==", "0", ")", "{", "return", ";", "}", "for", "(", "int", "i", "=", "offset", ";", "i...
This is called internally when old rows need to be removed from the cache. Text table rows that have not been saved are those that have not been committed yet. So we don't save them but add them to the uncommitted cache until such time that they are committed or rolled back- fredt
[ "This", "is", "called", "internally", "when", "old", "rows", "need", "to", "be", "removed", "from", "the", "cache", ".", "Text", "table", "rows", "that", "have", "not", "been", "saved", "are", "those", "that", "have", "not", "been", "committed", "yet", "...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/TextCache.java#L697-L711
61,048
VoltDB/voltdb
third_party/java/src/org/HdrHistogram_voltpatches/DoubleHistogram.java
DoubleHistogram.copy
public DoubleHistogram copy() { final DoubleHistogram targetHistogram = new DoubleHistogram(configuredHighestToLowestValueRatio, getNumberOfSignificantValueDigits()); targetHistogram.setTrackableValueRange(currentLowestValueInAutoRange, currentHighestValueLimitInAutoRange); integ...
java
public DoubleHistogram copy() { final DoubleHistogram targetHistogram = new DoubleHistogram(configuredHighestToLowestValueRatio, getNumberOfSignificantValueDigits()); targetHistogram.setTrackableValueRange(currentLowestValueInAutoRange, currentHighestValueLimitInAutoRange); integ...
[ "public", "DoubleHistogram", "copy", "(", ")", "{", "final", "DoubleHistogram", "targetHistogram", "=", "new", "DoubleHistogram", "(", "configuredHighestToLowestValueRatio", ",", "getNumberOfSignificantValueDigits", "(", ")", ")", ";", "targetHistogram", ".", "setTrackabl...
Create a copy of this histogram, complete with data and everything. @return A distinct copy of this histogram.
[ "Create", "a", "copy", "of", "this", "histogram", "complete", "with", "data", "and", "everything", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/HdrHistogram_voltpatches/DoubleHistogram.java#L583-L589
61,049
VoltDB/voltdb
third_party/java/src/org/HdrHistogram_voltpatches/DoubleHistogram.java
DoubleHistogram.add
public void add(final DoubleHistogram fromHistogram) throws ArrayIndexOutOfBoundsException { int arrayLength = fromHistogram.integerValuesHistogram.countsArrayLength; AbstractHistogram fromIntegerHistogram = fromHistogram.integerValuesHistogram; for (int i = 0; i < arrayLength; i++) { ...
java
public void add(final DoubleHistogram fromHistogram) throws ArrayIndexOutOfBoundsException { int arrayLength = fromHistogram.integerValuesHistogram.countsArrayLength; AbstractHistogram fromIntegerHistogram = fromHistogram.integerValuesHistogram; for (int i = 0; i < arrayLength; i++) { ...
[ "public", "void", "add", "(", "final", "DoubleHistogram", "fromHistogram", ")", "throws", "ArrayIndexOutOfBoundsException", "{", "int", "arrayLength", "=", "fromHistogram", ".", "integerValuesHistogram", ".", "countsArrayLength", ";", "AbstractHistogram", "fromIntegerHistog...
Add the contents of another histogram to this one. @param fromHistogram The other histogram. @throws ArrayIndexOutOfBoundsException (may throw) if values in fromHistogram's cannot be covered by this histogram's range
[ "Add", "the", "contents", "of", "another", "histogram", "to", "this", "one", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/HdrHistogram_voltpatches/DoubleHistogram.java#L665-L677
61,050
VoltDB/voltdb
third_party/java/src/org/HdrHistogram_voltpatches/DoubleHistogram.java
DoubleHistogram.subtract
public void subtract(final DoubleHistogram otherHistogram) { int arrayLength = otherHistogram.integerValuesHistogram.countsArrayLength; AbstractHistogram otherIntegerHistogram = otherHistogram.integerValuesHistogram; for (int i = 0; i < arrayLength; i++) { long otherCount = otherInte...
java
public void subtract(final DoubleHistogram otherHistogram) { int arrayLength = otherHistogram.integerValuesHistogram.countsArrayLength; AbstractHistogram otherIntegerHistogram = otherHistogram.integerValuesHistogram; for (int i = 0; i < arrayLength; i++) { long otherCount = otherInte...
[ "public", "void", "subtract", "(", "final", "DoubleHistogram", "otherHistogram", ")", "{", "int", "arrayLength", "=", "otherHistogram", ".", "integerValuesHistogram", ".", "countsArrayLength", ";", "AbstractHistogram", "otherIntegerHistogram", "=", "otherHistogram", ".", ...
Subtract the contents of another histogram from this one. @param otherHistogram The other histogram. @throws ArrayIndexOutOfBoundsException (may throw) if values in fromHistogram's cannot be covered by this histogram's range
[ "Subtract", "the", "contents", "of", "another", "histogram", "from", "this", "one", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/HdrHistogram_voltpatches/DoubleHistogram.java#L720-L735
61,051
VoltDB/voltdb
third_party/java/src/org/HdrHistogram_voltpatches/DoubleHistogram.java
DoubleHistogram.highestEquivalentValue
public double highestEquivalentValue(final double value) { double nextNonEquivalentValue = nextNonEquivalentValue(value); // Theoretically, nextNonEquivalentValue - ulp(nextNonEquivalentValue) == nextNonEquivalentValue // is possible (if the ulp size switches right at nextNonEquivalentValue), so...
java
public double highestEquivalentValue(final double value) { double nextNonEquivalentValue = nextNonEquivalentValue(value); // Theoretically, nextNonEquivalentValue - ulp(nextNonEquivalentValue) == nextNonEquivalentValue // is possible (if the ulp size switches right at nextNonEquivalentValue), so...
[ "public", "double", "highestEquivalentValue", "(", "final", "double", "value", ")", "{", "double", "nextNonEquivalentValue", "=", "nextNonEquivalentValue", "(", "value", ")", ";", "// Theoretically, nextNonEquivalentValue - ulp(nextNonEquivalentValue) == nextNonEquivalentValue", ...
Get the highest value that is equivalent to the given value within the histogram's resolution. Where "equivalent" means that value samples recorded for any two equivalent values are counted in a common total count. @param value The given value @return The highest value that is equivalent to the given value within the ...
[ "Get", "the", "highest", "value", "that", "is", "equivalent", "to", "the", "given", "value", "within", "the", "histogram", "s", "resolution", ".", "Where", "equivalent", "means", "that", "value", "samples", "recorded", "for", "any", "two", "equivalent", "value...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/HdrHistogram_voltpatches/DoubleHistogram.java#L869-L880
61,052
VoltDB/voltdb
third_party/java/src/org/HdrHistogram_voltpatches/DoubleHistogram.java
DoubleHistogram.decodeFromCompressedByteBuffer
public static DoubleHistogram decodeFromCompressedByteBuffer( final ByteBuffer buffer, final long minBarForHighestToLowestValueRatio) throws DataFormatException { return decodeFromCompressedByteBuffer(buffer, Histogram.class, minBarForHighestToLowestValueRatio); }
java
public static DoubleHistogram decodeFromCompressedByteBuffer( final ByteBuffer buffer, final long minBarForHighestToLowestValueRatio) throws DataFormatException { return decodeFromCompressedByteBuffer(buffer, Histogram.class, minBarForHighestToLowestValueRatio); }
[ "public", "static", "DoubleHistogram", "decodeFromCompressedByteBuffer", "(", "final", "ByteBuffer", "buffer", ",", "final", "long", "minBarForHighestToLowestValueRatio", ")", "throws", "DataFormatException", "{", "return", "decodeFromCompressedByteBuffer", "(", "buffer", ","...
Construct a new DoubleHistogram by decoding it from a compressed form in a ByteBuffer. @param buffer The buffer to decode from @param minBarForHighestToLowestValueRatio Force highestTrackableValue to be set at least this high @return The newly constructed DoubleHistogram @throws DataFormatException on error parsing/dec...
[ "Construct", "a", "new", "DoubleHistogram", "by", "decoding", "it", "from", "a", "compressed", "form", "in", "a", "ByteBuffer", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/HdrHistogram_voltpatches/DoubleHistogram.java#L1529-L1533
61,053
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/util/GridSwing.java
GridSwing.getValueAt
public Object getValueAt(int row, int col) { if (row >= rows.size()) { return null; } Object[] colArray = (Object[]) rows.elementAt(row); if (col >= colArray.length) { return null; } return colArray[col]; }
java
public Object getValueAt(int row, int col) { if (row >= rows.size()) { return null; } Object[] colArray = (Object[]) rows.elementAt(row); if (col >= colArray.length) { return null; } return colArray[col]; }
[ "public", "Object", "getValueAt", "(", "int", "row", ",", "int", "col", ")", "{", "if", "(", "row", ">=", "rows", ".", "size", "(", ")", ")", "{", "return", "null", ";", "}", "Object", "[", "]", "colArray", "=", "(", "Object", "[", "]", ")", "r...
Get the object at the specified cell location.
[ "Get", "the", "object", "at", "the", "specified", "cell", "location", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/GridSwing.java#L172-L185
61,054
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/util/GridSwing.java
GridSwing.setHead
public void setHead(Object[] h) { headers = new Object[h.length]; // System.arraycopy(h, 0, headers, 0, h.length); for (int i = 0; i < h.length; i++) { headers[i] = h[i]; } }
java
public void setHead(Object[] h) { headers = new Object[h.length]; // System.arraycopy(h, 0, headers, 0, h.length); for (int i = 0; i < h.length; i++) { headers[i] = h[i]; } }
[ "public", "void", "setHead", "(", "Object", "[", "]", "h", ")", "{", "headers", "=", "new", "Object", "[", "h", ".", "length", "]", ";", "// System.arraycopy(h, 0, headers, 0, h.length);", "for", "(", "int", "i", "=", "0", ";", "i", "<", "h", ".", "len...
Set the name of the column headings.
[ "Set", "the", "name", "of", "the", "column", "headings", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/GridSwing.java#L190-L198
61,055
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/util/GridSwing.java
GridSwing.addRow
public void addRow(Object[] r) { Object[] row = new Object[r.length]; // System.arraycopy(r, 0, row, 0, r.length); for (int i = 0; i < r.length; i++) { row[i] = r[i]; if (row[i] == null) { // row[i] = "(null)"; } } rows.addE...
java
public void addRow(Object[] r) { Object[] row = new Object[r.length]; // System.arraycopy(r, 0, row, 0, r.length); for (int i = 0; i < r.length; i++) { row[i] = r[i]; if (row[i] == null) { // row[i] = "(null)"; } } rows.addE...
[ "public", "void", "addRow", "(", "Object", "[", "]", "r", ")", "{", "Object", "[", "]", "row", "=", "new", "Object", "[", "r", ".", "length", "]", ";", "// System.arraycopy(r, 0, row, 0, r.length);", "for", "(", "int", "i", "=", "0", ";", "i", "<", "...
Append a tuple to the end of the table.
[ "Append", "a", "tuple", "to", "the", "end", "of", "the", "table", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/GridSwing.java#L203-L218
61,056
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/navigator/RowSetNavigatorClient.java
RowSetNavigatorClient.getCurrent
public Object[] getCurrent() { if (currentPos < 0 || currentPos >= size) { return null; } if (currentPos == currentOffset + table.length) { getBlock(currentOffset + table.length); } return table[currentPos - currentOffset]; }
java
public Object[] getCurrent() { if (currentPos < 0 || currentPos >= size) { return null; } if (currentPos == currentOffset + table.length) { getBlock(currentOffset + table.length); } return table[currentPos - currentOffset]; }
[ "public", "Object", "[", "]", "getCurrent", "(", ")", "{", "if", "(", "currentPos", "<", "0", "||", "currentPos", ">=", "size", ")", "{", "return", "null", ";", "}", "if", "(", "currentPos", "==", "currentOffset", "+", "table", ".", "length", ")", "{...
Returns the current row object. Type of object is implementation defined.
[ "Returns", "the", "current", "row", "object", ".", "Type", "of", "object", "is", "implementation", "defined", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/navigator/RowSetNavigatorClient.java#L111-L122
61,057
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/navigator/RowSetNavigatorClient.java
RowSetNavigatorClient.getBlock
void getBlock(int offset) { try { RowSetNavigatorClient source = session.getRows(id, offset, baseBlockSize); table = source.table; currentOffset = source.currentOffset; } catch (HsqlException e) {} }
java
void getBlock(int offset) { try { RowSetNavigatorClient source = session.getRows(id, offset, baseBlockSize); table = source.table; currentOffset = source.currentOffset; } catch (HsqlException e) {} }
[ "void", "getBlock", "(", "int", "offset", ")", "{", "try", "{", "RowSetNavigatorClient", "source", "=", "session", ".", "getRows", "(", "id", ",", "offset", ",", "baseBlockSize", ")", ";", "table", "=", "source", ".", "table", ";", "currentOffset", "=", ...
baseBlockSize remains unchanged.
[ "baseBlockSize", "remains", "unchanged", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/navigator/RowSetNavigatorClient.java#L254-L263
61,058
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.getBestRowIdentifier
@Override public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException { checkClosed(); throw SQLError.noSupport(); }
java
@Override public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException { checkClosed(); throw SQLError.noSupport(); }
[ "@", "Override", "public", "ResultSet", "getBestRowIdentifier", "(", "String", "catalog", ",", "String", "schema", ",", "String", "table", ",", "int", "scope", ",", "boolean", "nullable", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "throw...
Retrieves a description of a table's optimal set of columns that uniquely identifies a row.
[ "Retrieves", "a", "description", "of", "a", "table", "s", "optimal", "set", "of", "columns", "that", "uniquely", "identifies", "a", "row", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L147-L152
61,059
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.getCatalogs
@Override public ResultSet getCatalogs() throws SQLException { checkClosed(); VoltTable result = new VoltTable(new VoltTable.ColumnInfo("TABLE_CAT",VoltType.STRING)); result.addRow(new Object[] { catalogString }); return new JDBC4ResultSet(null, result); }
java
@Override public ResultSet getCatalogs() throws SQLException { checkClosed(); VoltTable result = new VoltTable(new VoltTable.ColumnInfo("TABLE_CAT",VoltType.STRING)); result.addRow(new Object[] { catalogString }); return new JDBC4ResultSet(null, result); }
[ "@", "Override", "public", "ResultSet", "getCatalogs", "(", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "VoltTable", "result", "=", "new", "VoltTable", "(", "new", "VoltTable", ".", "ColumnInfo", "(", "\"TABLE_CAT\"", ",", "VoltType", "."...
Retrieves the catalog names available in this database.
[ "Retrieves", "the", "catalog", "names", "available", "in", "this", "database", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L155-L162
61,060
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.getDatabaseMajorVersion
@Override public int getDatabaseMajorVersion() throws SQLException { checkClosed(); System.out.println("\n\n\nVERSION: " + versionString); return Integer.valueOf(versionString.split("\\.")[0]); }
java
@Override public int getDatabaseMajorVersion() throws SQLException { checkClosed(); System.out.println("\n\n\nVERSION: " + versionString); return Integer.valueOf(versionString.split("\\.")[0]); }
[ "@", "Override", "public", "int", "getDatabaseMajorVersion", "(", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "System", ".", "out", ".", "println", "(", "\"\\n\\n\\nVERSION: \"", "+", "versionString", ")", ";", "return", "Integer", ".", "...
Retrieves the major version number of the underlying database.
[ "Retrieves", "the", "major", "version", "number", "of", "the", "underlying", "database", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L250-L256
61,061
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.getFunctions
@Override public ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern) throws SQLException { checkClosed(); throw SQLError.noSupport(); }
java
@Override public ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern) throws SQLException { checkClosed(); throw SQLError.noSupport(); }
[ "@", "Override", "public", "ResultSet", "getFunctions", "(", "String", "catalog", ",", "String", "schemaPattern", ",", "String", "functionNamePattern", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "throw", "SQLError", ".", "noSupport", "(", ...
Retrieves a description of the system and user functions available in the given catalog.
[ "Retrieves", "a", "description", "of", "the", "system", "and", "user", "functions", "available", "in", "the", "given", "catalog", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L370-L375
61,062
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.getPrimaryKeys
@Override public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException { assert(table != null && !table.isEmpty()); checkClosed(); this.sysCatalog.setString(1, "PRIMARYKEYS"); JDBC4ResultSet res = (JDBC4ResultSet) this.sysCatalog.executeQuery()...
java
@Override public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException { assert(table != null && !table.isEmpty()); checkClosed(); this.sysCatalog.setString(1, "PRIMARYKEYS"); JDBC4ResultSet res = (JDBC4ResultSet) this.sysCatalog.executeQuery()...
[ "@", "Override", "public", "ResultSet", "getPrimaryKeys", "(", "String", "catalog", ",", "String", "schema", ",", "String", "table", ")", "throws", "SQLException", "{", "assert", "(", "table", "!=", "null", "&&", "!", "table", ".", "isEmpty", "(", ")", ")"...
Retrieves a description of the given table's primary key columns.
[ "Retrieves", "a", "description", "of", "the", "given", "table", "s", "primary", "key", "columns", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L621-L637
61,063
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.getSchemas
@Override public ResultSet getSchemas() throws SQLException { checkClosed(); VoltTable vtable = new VoltTable( new ColumnInfo("TABLE_SCHEM", VoltType.STRING), new ColumnInfo("TABLE_CATALOG", VoltType.STRING)); JDBC4ResultSet res = new JDBC4ResultSet(this.s...
java
@Override public ResultSet getSchemas() throws SQLException { checkClosed(); VoltTable vtable = new VoltTable( new ColumnInfo("TABLE_SCHEM", VoltType.STRING), new ColumnInfo("TABLE_CATALOG", VoltType.STRING)); JDBC4ResultSet res = new JDBC4ResultSet(this.s...
[ "@", "Override", "public", "ResultSet", "getSchemas", "(", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "VoltTable", "vtable", "=", "new", "VoltTable", "(", "new", "ColumnInfo", "(", "\"TABLE_SCHEM\"", ",", "VoltType", ".", "STRING", ")", ...
Retrieves the schema names available in this database.
[ "Retrieves", "the", "schema", "names", "available", "in", "this", "database", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L702-L711
61,064
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.getTablePrivileges
@Override public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException { checkClosed(); VoltTable vtable = new VoltTable( new ColumnInfo("TABLE_CAT", VoltType.STRING), new ColumnInfo("TABLE_SCHEM", VoltType...
java
@Override public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException { checkClosed(); VoltTable vtable = new VoltTable( new ColumnInfo("TABLE_CAT", VoltType.STRING), new ColumnInfo("TABLE_SCHEM", VoltType...
[ "@", "Override", "public", "ResultSet", "getTablePrivileges", "(", "String", "catalog", ",", "String", "schemaPattern", ",", "String", "tableNamePattern", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "VoltTable", "vtable", "=", "new", "VoltTab...
Retrieves a description of the access rights for each table available in a catalog.
[ "Retrieves", "a", "description", "of", "the", "access", "rights", "for", "each", "table", "available", "in", "a", "catalog", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L788-L805
61,065
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.computeJavaPattern
public static Pattern computeJavaPattern(String sqlPattern) { StringBuffer pattern_buff = new StringBuffer(); // Replace "_" with "." (match exactly 1 character) // Replace "%" with ".*" (match 0 or more characters) for (int i=0; i<sqlPattern.length(); i++) { char...
java
public static Pattern computeJavaPattern(String sqlPattern) { StringBuffer pattern_buff = new StringBuffer(); // Replace "_" with "." (match exactly 1 character) // Replace "%" with ".*" (match 0 or more characters) for (int i=0; i<sqlPattern.length(); i++) { char...
[ "public", "static", "Pattern", "computeJavaPattern", "(", "String", "sqlPattern", ")", "{", "StringBuffer", "pattern_buff", "=", "new", "StringBuffer", "(", ")", ";", "// Replace \"_\" with \".\" (match exactly 1 character)", "// Replace \"%\" with \".*\" (match 0 or more charact...
Convert the users VoltDB SQL pattern into a regex pattern
[ "Convert", "the", "users", "VoltDB", "SQL", "pattern", "into", "a", "regex", "pattern" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L808-L829
61,066
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.getTables
@Override public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException { checkClosed(); this.sysCatalog.setString(1, "TABLES"); JDBC4ResultSet res = (JDBC4ResultSet) this.sysCatalog.executeQuery(); VoltTable vtable ...
java
@Override public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException { checkClosed(); this.sysCatalog.setString(1, "TABLES"); JDBC4ResultSet res = (JDBC4ResultSet) this.sysCatalog.executeQuery(); VoltTable vtable ...
[ "@", "Override", "public", "ResultSet", "getTables", "(", "String", "catalog", ",", "String", "schemaPattern", ",", "String", "tableNamePattern", ",", "String", "[", "]", "types", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "this", ".", ...
Retrieves a description of the tables available in the given catalog.
[ "Retrieves", "a", "description", "of", "the", "tables", "available", "in", "the", "given", "catalog", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L832-L865
61,067
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.getTableTypes
@Override public ResultSet getTableTypes() throws SQLException { checkClosed(); VoltTable vtable = new VoltTable(new ColumnInfo("TABLE_TYPE", VoltType.STRING)); for (String type : tableTypes) { vtable.addRow(type); } JDBC4ResultSet res = new JDBC4ResultSet(thi...
java
@Override public ResultSet getTableTypes() throws SQLException { checkClosed(); VoltTable vtable = new VoltTable(new ColumnInfo("TABLE_TYPE", VoltType.STRING)); for (String type : tableTypes) { vtable.addRow(type); } JDBC4ResultSet res = new JDBC4ResultSet(thi...
[ "@", "Override", "public", "ResultSet", "getTableTypes", "(", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "VoltTable", "vtable", "=", "new", "VoltTable", "(", "new", "ColumnInfo", "(", "\"TABLE_TYPE\"", ",", "VoltType", ".", "STRING", ")"...
Retrieves the table types available in this database.
[ "Retrieves", "the", "table", "types", "available", "in", "this", "database", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L868-L878
61,068
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.getTypeInfo
@Override public ResultSet getTypeInfo() throws SQLException { checkClosed(); this.sysCatalog.setString(1, "TYPEINFO"); ResultSet res = this.sysCatalog.executeQuery(); return res; }
java
@Override public ResultSet getTypeInfo() throws SQLException { checkClosed(); this.sysCatalog.setString(1, "TYPEINFO"); ResultSet res = this.sysCatalog.executeQuery(); return res; }
[ "@", "Override", "public", "ResultSet", "getTypeInfo", "(", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "this", ".", "sysCatalog", ".", "setString", "(", "1", ",", "\"TYPEINFO\"", ")", ";", "ResultSet", "res", "=", "this", ".", "sysCa...
Retrieves a description of all the data types supported by this database.
[ "Retrieves", "a", "description", "of", "all", "the", "data", "types", "supported", "by", "this", "database", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L892-L899
61,069
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.getVersionColumns
@Override public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException { checkClosed(); throw SQLError.noSupport(); }
java
@Override public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException { checkClosed(); throw SQLError.noSupport(); }
[ "@", "Override", "public", "ResultSet", "getVersionColumns", "(", "String", "catalog", ",", "String", "schema", ",", "String", "table", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "throw", "SQLError", ".", "noSupport", "(", ")", ";", "}...
Retrieves a description of a table's columns that are automatically updated when any value in a row is updated.
[ "Retrieves", "a", "description", "of", "a", "table", "s", "columns", "that", "are", "automatically", "updated", "when", "any", "value", "in", "a", "row", "is", "updated", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L926-L931
61,070
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.supportsConvert
@Override public boolean supportsConvert(int fromType, int toType) throws SQLException { checkClosed(); switch (fromType) { /* * ALL types can be converted to VARCHAR /VoltType.String */ case java.sql.Types.VARCHAR: case java.sql.Types.VARBINARY: cas...
java
@Override public boolean supportsConvert(int fromType, int toType) throws SQLException { checkClosed(); switch (fromType) { /* * ALL types can be converted to VARCHAR /VoltType.String */ case java.sql.Types.VARCHAR: case java.sql.Types.VARBINARY: cas...
[ "@", "Override", "public", "boolean", "supportsConvert", "(", "int", "fromType", ",", "int", "toType", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "switch", "(", "fromType", ")", "{", "/*\n * ALL types can be converted to VARCHAR /VoltTyp...
Retrieves whether this database supports the JDBC scalar function CONVERT for conversions between the JDBC types fromType and toType.
[ "Retrieves", "whether", "this", "database", "supports", "the", "JDBC", "scalar", "function", "CONVERT", "for", "conversions", "between", "the", "JDBC", "types", "fromType", "and", "toType", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L1206-L1246
61,071
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.supportsResultSetType
@Override public boolean supportsResultSetType(int type) throws SQLException { checkClosed(); if (type == ResultSet.TYPE_SCROLL_INSENSITIVE) return true; return false; }
java
@Override public boolean supportsResultSetType(int type) throws SQLException { checkClosed(); if (type == ResultSet.TYPE_SCROLL_INSENSITIVE) return true; return false; }
[ "@", "Override", "public", "boolean", "supportsResultSetType", "(", "int", "type", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "if", "(", "type", "==", "ResultSet", ".", "TYPE_SCROLL_INSENSITIVE", ")", "return", "true", ";", "return", "fa...
Retrieves whether this database supports the given result set type.
[ "Retrieves", "whether", "this", "database", "supports", "the", "given", "result", "set", "type", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L1515-L1522
61,072
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseURL.java
DatabaseURL.isInProcessDatabaseType
public static boolean isInProcessDatabaseType(String url) { if (url == S_FILE || url == S_RES || url == S_MEM) { return true; } return false; }
java
public static boolean isInProcessDatabaseType(String url) { if (url == S_FILE || url == S_RES || url == S_MEM) { return true; } return false; }
[ "public", "static", "boolean", "isInProcessDatabaseType", "(", "String", "url", ")", "{", "if", "(", "url", "==", "S_FILE", "||", "url", "==", "S_RES", "||", "url", "==", "S_MEM", ")", "{", "return", "true", ";", "}", "return", "false", ";", "}" ]
Returns true if type represents an in-process connection to database.
[ "Returns", "true", "if", "type", "represents", "an", "in", "-", "process", "connection", "to", "database", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseURL.java#L83-L90
61,073
VoltDB/voltdb
examples/callcenter/client/callcenter/DelayedQueue.java
DelayedQueue.nextReady
public T nextReady(long systemCurrentTimeMillis) { if (delayed.size() == 0) { return null; } // no ready objects if (delayed.firstKey() > systemCurrentTimeMillis) { return null; } Entry<Long, Object[]> entry = delayed.pollFirstEntry(); Ob...
java
public T nextReady(long systemCurrentTimeMillis) { if (delayed.size() == 0) { return null; } // no ready objects if (delayed.firstKey() > systemCurrentTimeMillis) { return null; } Entry<Long, Object[]> entry = delayed.pollFirstEntry(); Ob...
[ "public", "T", "nextReady", "(", "long", "systemCurrentTimeMillis", ")", "{", "if", "(", "delayed", ".", "size", "(", ")", "==", "0", ")", "{", "return", "null", ";", "}", "// no ready objects", "if", "(", "delayed", ".", "firstKey", "(", ")", ">", "sy...
Return the next object that is safe for delivery or null if there are no safe objects to deliver. Null response could mean empty, or could mean all objects are scheduled for the future. @param systemCurrentTimeMillis The current time. @return Object of type T.
[ "Return", "the", "next", "object", "that", "is", "safe", "for", "delivery", "or", "null", "if", "there", "are", "no", "safe", "objects", "to", "deliver", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/callcenter/client/callcenter/DelayedQueue.java#L82-L109
61,074
VoltDB/voltdb
src/frontend/org/voltdb/Inits.java
Inits.readCatalog
private static byte[] readCatalog(String catalogUrl) throws IOException { assert (catalogUrl != null); final int MAX_CATALOG_SIZE = 40 * 1024 * 1024; // 40mb InputStream fin = null; try { URL url = new URL(catalogUrl); fin = url.openStream(); } catch...
java
private static byte[] readCatalog(String catalogUrl) throws IOException { assert (catalogUrl != null); final int MAX_CATALOG_SIZE = 40 * 1024 * 1024; // 40mb InputStream fin = null; try { URL url = new URL(catalogUrl); fin = url.openStream(); } catch...
[ "private", "static", "byte", "[", "]", "readCatalog", "(", "String", "catalogUrl", ")", "throws", "IOException", "{", "assert", "(", "catalogUrl", "!=", "null", ")", ";", "final", "int", "MAX_CATALOG_SIZE", "=", "40", "*", "1024", "*", "1024", ";", "// 40m...
Read catalog bytes from URL @param catalogUrl @return catalog bytes @throws IOException
[ "Read", "catalog", "bytes", "from", "URL" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/Inits.java#L256-L283
61,075
VoltDB/voltdb
third_party/java/src/org/apache/log4j/net/SyslogAppender.java
SyslogAppender.close
synchronized public void close() { closed = true; if (sqw != null) { try { if (layoutHeaderChecked && layout != null && layout.getFooter() != null) { sendLayoutMessage(layout.getFooter()); } sqw.close(); sqw = null; } catch(java...
java
synchronized public void close() { closed = true; if (sqw != null) { try { if (layoutHeaderChecked && layout != null && layout.getFooter() != null) { sendLayoutMessage(layout.getFooter()); } sqw.close(); sqw = null; } catch(java...
[ "synchronized", "public", "void", "close", "(", ")", "{", "closed", "=", "true", ";", "if", "(", "sqw", "!=", "null", ")", "{", "try", "{", "if", "(", "layoutHeaderChecked", "&&", "layout", "!=", "null", "&&", "layout", ".", "getFooter", "(", ")", "!...
Release any resources held by this SyslogAppender. @since 0.8.4
[ "Release", "any", "resources", "held", "by", "this", "SyslogAppender", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/log4j/net/SyslogAppender.java#L155-L170
61,076
VoltDB/voltdb
third_party/java/src/org/apache/log4j/net/SyslogAppender.java
SyslogAppender.getFacility
public static int getFacility(String facilityName) { if(facilityName != null) { facilityName = facilityName.trim(); } if("KERN".equalsIgnoreCase(facilityName)) { return LOG_KERN; } else if("USER".equalsIgnoreCase(facilityName)) { return LOG_USER; } else if("MAIL".equalsIgnoreCa...
java
public static int getFacility(String facilityName) { if(facilityName != null) { facilityName = facilityName.trim(); } if("KERN".equalsIgnoreCase(facilityName)) { return LOG_KERN; } else if("USER".equalsIgnoreCase(facilityName)) { return LOG_USER; } else if("MAIL".equalsIgnoreCa...
[ "public", "static", "int", "getFacility", "(", "String", "facilityName", ")", "{", "if", "(", "facilityName", "!=", "null", ")", "{", "facilityName", "=", "facilityName", ".", "trim", "(", ")", ";", "}", "if", "(", "\"KERN\"", ".", "equalsIgnoreCase", "(",...
Returns the integer value corresponding to the named syslog facility, or -1 if it couldn't be recognized. @param facilityName one of the strings KERN, USER, MAIL, DAEMON, AUTH, SYSLOG, LPR, NEWS, UUCP, CRON, AUTHPRIV, FTP, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. The matching is case-insensitive...
[ "Returns", "the", "integer", "value", "corresponding", "to", "the", "named", "syslog", "facility", "or", "-", "1", "if", "it", "couldn", "t", "be", "recognized", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/log4j/net/SyslogAppender.java#L229-L278
61,077
VoltDB/voltdb
third_party/java/src/org/apache/log4j/net/SyslogAppender.java
SyslogAppender.activateOptions
public void activateOptions() { if (header) { getLocalHostname(); } if (layout != null && layout.getHeader() != null) { sendLayoutMessage(layout.getHeader()); } layoutHeaderChecked = true; }
java
public void activateOptions() { if (header) { getLocalHostname(); } if (layout != null && layout.getHeader() != null) { sendLayoutMessage(layout.getHeader()); } layoutHeaderChecked = true; }
[ "public", "void", "activateOptions", "(", ")", "{", "if", "(", "header", ")", "{", "getLocalHostname", "(", ")", ";", "}", "if", "(", "layout", "!=", "null", "&&", "layout", ".", "getHeader", "(", ")", "!=", "null", ")", "{", "sendLayoutMessage", "(", ...
This method returns immediately as options are activated when they are set.
[ "This", "method", "returns", "immediately", "as", "options", "are", "activated", "when", "they", "are", "set", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/log4j/net/SyslogAppender.java#L356-L365
61,078
VoltDB/voltdb
third_party/java/src/org/apache/log4j/net/SyslogAppender.java
SyslogAppender.getPacketHeader
private String getPacketHeader(final long timeStamp) { if (header) { StringBuffer buf = new StringBuffer(dateFormat.format(new Date(timeStamp))); // RFC 3164 says leading space, not leading zero on days 1-9 if (buf.charAt(4) == '0') { buf.setCharAt(4, ' '); } buf...
java
private String getPacketHeader(final long timeStamp) { if (header) { StringBuffer buf = new StringBuffer(dateFormat.format(new Date(timeStamp))); // RFC 3164 says leading space, not leading zero on days 1-9 if (buf.charAt(4) == '0') { buf.setCharAt(4, ' '); } buf...
[ "private", "String", "getPacketHeader", "(", "final", "long", "timeStamp", ")", "{", "if", "(", "header", ")", "{", "StringBuffer", "buf", "=", "new", "StringBuffer", "(", "dateFormat", ".", "format", "(", "new", "Date", "(", "timeStamp", ")", ")", ")", ...
Gets HEADER portion of packet. @param timeStamp number of milliseconds after the standard base time. @return HEADER portion of packet, will be zero-length string if header is false. @since 1.2.15
[ "Gets", "HEADER", "portion", "of", "packet", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/log4j/net/SyslogAppender.java#L504-L516
61,079
VoltDB/voltdb
third_party/java/src/org/apache/log4j/net/SyslogAppender.java
SyslogAppender.sendLayoutMessage
private void sendLayoutMessage(final String msg) { if (sqw != null) { String packet = msg; String hdr = getPacketHeader(new Date().getTime()); if(facilityPrinting || hdr.length() > 0) { StringBuffer buf = new StringBuffer(hdr); if(facilityPrinting) { ...
java
private void sendLayoutMessage(final String msg) { if (sqw != null) { String packet = msg; String hdr = getPacketHeader(new Date().getTime()); if(facilityPrinting || hdr.length() > 0) { StringBuffer buf = new StringBuffer(hdr); if(facilityPrinting) { ...
[ "private", "void", "sendLayoutMessage", "(", "final", "String", "msg", ")", "{", "if", "(", "sqw", "!=", "null", ")", "{", "String", "packet", "=", "msg", ";", "String", "hdr", "=", "getPacketHeader", "(", "new", "Date", "(", ")", ".", "getTime", "(", ...
Set header or footer of layout. @param msg message body, may not be null.
[ "Set", "header", "or", "footer", "of", "layout", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/log4j/net/SyslogAppender.java#L522-L537
61,080
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCSQLXML.java
JDBCSQLXML.getGZipData
protected byte[] getGZipData() throws SQLException { byte[] bytes = gZipData(); if (bytes != null) { return bytes; } if ((this.outputStream == null) || !this.outputStream.isClosed() || this.outputStream.isFreed()) { throw Exceptions.notReadable(...
java
protected byte[] getGZipData() throws SQLException { byte[] bytes = gZipData(); if (bytes != null) { return bytes; } if ((this.outputStream == null) || !this.outputStream.isClosed() || this.outputStream.isFreed()) { throw Exceptions.notReadable(...
[ "protected", "byte", "[", "]", "getGZipData", "(", ")", "throws", "SQLException", "{", "byte", "[", "]", "bytes", "=", "gZipData", "(", ")", ";", "if", "(", "bytes", "!=", "null", ")", "{", "return", "bytes", ";", "}", "if", "(", "(", "this", ".", ...
Retrieves this object's SQLXML value as a gzipped array of bytes, possibly by terminating any in-progress write operations and converting accumulated intermediate data. @throws java.sql.SQLException if an underlying I/O or transform error occurs @return this object's SQLXML value
[ "Retrieves", "this", "object", "s", "SQLXML", "value", "as", "a", "gzipped", "array", "of", "bytes", "possibly", "by", "terminating", "any", "in", "-", "progress", "write", "operations", "and", "converting", "accumulated", "intermediate", "data", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCSQLXML.java#L1177-L1199
61,081
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCSQLXML.java
JDBCSQLXML.close
protected synchronized void close() { this.closed = true; setReadable(false); setWritable(false); freeOutputStream(); freeInputStream(); this.gzdata = null; }
java
protected synchronized void close() { this.closed = true; setReadable(false); setWritable(false); freeOutputStream(); freeInputStream(); this.gzdata = null; }
[ "protected", "synchronized", "void", "close", "(", ")", "{", "this", ".", "closed", "=", "true", ";", "setReadable", "(", "false", ")", ";", "setWritable", "(", "false", ")", ";", "freeOutputStream", "(", ")", ";", "freeInputStream", "(", ")", ";", "this...
closes this object and releases the resources that it holds.
[ "closes", "this", "object", "and", "releases", "the", "resources", "that", "it", "holds", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCSQLXML.java#L1204-L1214
61,082
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCSQLXML.java
JDBCSQLXML.createResult
protected <T extends Result>T createResult( Class<T> resultClass) throws SQLException { checkWritable(); setWritable(false); setReadable(true); if (JAXBResult.class.isAssignableFrom(resultClass)) { // Must go first presently, since JAXBResult extends SAXResult ...
java
protected <T extends Result>T createResult( Class<T> resultClass) throws SQLException { checkWritable(); setWritable(false); setReadable(true); if (JAXBResult.class.isAssignableFrom(resultClass)) { // Must go first presently, since JAXBResult extends SAXResult ...
[ "protected", "<", "T", "extends", "Result", ">", "T", "createResult", "(", "Class", "<", "T", ">", "resultClass", ")", "throws", "SQLException", "{", "checkWritable", "(", ")", ";", "setWritable", "(", "false", ")", ";", "setReadable", "(", "true", ")", ...
Retrieves a new Result for setting the XML value designated by this SQLXML instance. @param resultClass The class of the result, or null. @throws java.sql.SQLException if there is an error processing the XML value or the state is not writable @return for setting the XML value designated by this SQLXML instance.
[ "Retrieves", "a", "new", "Result", "for", "setting", "the", "XML", "value", "designated", "by", "this", "SQLXML", "instance", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCSQLXML.java#L1645-L1672
61,083
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCSQLXML.java
JDBCSQLXML.createSAXResult
@SuppressWarnings("unchecked") protected <T extends Result>T createSAXResult( Class<T> resultClass) throws SQLException { SAXResult result = null; try { result = (resultClass == null) ? new SAXResult() : (SAXResult) resultClass.newInstance(); } c...
java
@SuppressWarnings("unchecked") protected <T extends Result>T createSAXResult( Class<T> resultClass) throws SQLException { SAXResult result = null; try { result = (resultClass == null) ? new SAXResult() : (SAXResult) resultClass.newInstance(); } c...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "<", "T", "extends", "Result", ">", "T", "createSAXResult", "(", "Class", "<", "T", ">", "resultClass", ")", "throws", "SQLException", "{", "SAXResult", "result", "=", "null", ";", "try", "{", ...
Retrieves a new SAXResult for setting the XML value designated by this SQLXML instance. @param resultClass The class of the result, or null. @throws java.sql.SQLException if there is an error processing the XML value @return for setting the XML value designated by this SQLXML instance.
[ "Retrieves", "a", "new", "SAXResult", "for", "setting", "the", "XML", "value", "designated", "by", "this", "SQLXML", "instance", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCSQLXML.java#L1746-L1772
61,084
VoltDB/voltdb
src/frontend/org/voltdb/expressions/AbstractValueExpression.java
AbstractValueExpression.bindingToIndexedExpression
@Override public List<AbstractExpression> bindingToIndexedExpression(AbstractExpression expr) { if (equals(expr)) { return s_reusableImmutableEmptyBinding; } return null; }
java
@Override public List<AbstractExpression> bindingToIndexedExpression(AbstractExpression expr) { if (equals(expr)) { return s_reusableImmutableEmptyBinding; } return null; }
[ "@", "Override", "public", "List", "<", "AbstractExpression", ">", "bindingToIndexedExpression", "(", "AbstractExpression", "expr", ")", "{", "if", "(", "equals", "(", "expr", ")", ")", "{", "return", "s_reusableImmutableEmptyBinding", ";", "}", "return", "null", ...
Otherwise, there is no binding possible, indicated by a null return.
[ "Otherwise", "there", "is", "no", "binding", "possible", "indicated", "by", "a", "null", "return", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractValueExpression.java#L54-L60
61,085
VoltDB/voltdb
src/frontend/org/voltdb/utils/CSVLoader.java
CSVLoader.getClient
public static Client getClient(ClientConfig config, String[] servers, int port) throws Exception { config.setTopologyChangeAware(true); // Set client to be topology-aware final Client client = ClientFactory.createClient(config); for (String server : servers) { // Try conn...
java
public static Client getClient(ClientConfig config, String[] servers, int port) throws Exception { config.setTopologyChangeAware(true); // Set client to be topology-aware final Client client = ClientFactory.createClient(config); for (String server : servers) { // Try conn...
[ "public", "static", "Client", "getClient", "(", "ClientConfig", "config", ",", "String", "[", "]", "servers", ",", "int", "port", ")", "throws", "Exception", "{", "config", ".", "setTopologyChangeAware", "(", "true", ")", ";", "// Set client to be topology-aware",...
Get connection to servers in cluster. @param config @param servers @param port @return @throws Exception
[ "Get", "connection", "to", "servers", "in", "cluster", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CSVLoader.java#L612-L630
61,086
VoltDB/voltdb
src/frontend/org/voltdb/InternalConnectionHandler.java
InternalConnectionHandler.addAdapter
public synchronized void addAdapter(int pid, InternalClientResponseAdapter adapter) { final ImmutableMap.Builder<Integer, InternalClientResponseAdapter> builder = ImmutableMap.builder(); builder.putAll(m_adapters); builder.put(pid, adapter); m_adapters = builder.build(); }
java
public synchronized void addAdapter(int pid, InternalClientResponseAdapter adapter) { final ImmutableMap.Builder<Integer, InternalClientResponseAdapter> builder = ImmutableMap.builder(); builder.putAll(m_adapters); builder.put(pid, adapter); m_adapters = builder.build(); }
[ "public", "synchronized", "void", "addAdapter", "(", "int", "pid", ",", "InternalClientResponseAdapter", "adapter", ")", "{", "final", "ImmutableMap", ".", "Builder", "<", "Integer", ",", "InternalClientResponseAdapter", ">", "builder", "=", "ImmutableMap", ".", "bu...
Synchronized in case multiple partitions are added concurrently.
[ "Synchronized", "in", "case", "multiple", "partitions", "are", "added", "concurrently", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/InternalConnectionHandler.java#L53-L59
61,087
VoltDB/voltdb
src/frontend/org/voltdb/InternalConnectionHandler.java
InternalConnectionHandler.hasTable
public boolean hasTable(String name) { Table table = getCatalogContext().tables.get(name); return (table!=null); }
java
public boolean hasTable(String name) { Table table = getCatalogContext().tables.get(name); return (table!=null); }
[ "public", "boolean", "hasTable", "(", "String", "name", ")", "{", "Table", "table", "=", "getCatalogContext", "(", ")", ".", "tables", ".", "get", "(", "name", ")", ";", "return", "(", "table", "!=", "null", ")", ";", "}" ]
Returns true if a table with the given name exists in the server catalog.
[ "Returns", "true", "if", "a", "table", "with", "the", "given", "name", "exists", "in", "the", "server", "catalog", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/InternalConnectionHandler.java#L69-L72
61,088
VoltDB/voltdb
src/frontend/org/voltdb/InternalConnectionHandler.java
InternalConnectionHandler.callProcedure
public boolean callProcedure(InternalConnectionContext caller, Function<Integer, Boolean> backPressurePredicate, InternalConnectionStatsCollector statsCollector, ProcedureCallback procCallback, String proc, Object... fiel...
java
public boolean callProcedure(InternalConnectionContext caller, Function<Integer, Boolean> backPressurePredicate, InternalConnectionStatsCollector statsCollector, ProcedureCallback procCallback, String proc, Object... fiel...
[ "public", "boolean", "callProcedure", "(", "InternalConnectionContext", "caller", ",", "Function", "<", "Integer", ",", "Boolean", ">", "backPressurePredicate", ",", "InternalConnectionStatsCollector", "statsCollector", ",", "ProcedureCallback", "procCallback", ",", "String...
Use null backPressurePredicate for no back pressure
[ "Use", "null", "backPressurePredicate", "for", "no", "back", "pressure" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/InternalConnectionHandler.java#L169-L215
61,089
VoltDB/voltdb
src/frontend/org/voltdb/GlobalServiceElector.java
GlobalServiceElector.registerService
synchronized void registerService(Promotable service) { m_services.add(service); if (m_isLeader) { try { service.acceptPromotion(); } catch (Exception e) { VoltDB.crashLocalVoltDB("Unable to promote global service.", true, e); ...
java
synchronized void registerService(Promotable service) { m_services.add(service); if (m_isLeader) { try { service.acceptPromotion(); } catch (Exception e) { VoltDB.crashLocalVoltDB("Unable to promote global service.", true, e); ...
[ "synchronized", "void", "registerService", "(", "Promotable", "service", ")", "{", "m_services", ".", "add", "(", "service", ")", ";", "if", "(", "m_isLeader", ")", "{", "try", "{", "service", ".", "acceptPromotion", "(", ")", ";", "}", "catch", "(", "Ex...
Add a service to be notified if this node becomes the global leader
[ "Add", "a", "service", "to", "be", "notified", "if", "this", "node", "becomes", "the", "global", "leader" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/GlobalServiceElector.java#L50-L61
61,090
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionOp.java
ExpressionOp.resolveTypesForCaseWhen
void resolveTypesForCaseWhen(Session session) { if (dataType != null) { return; } Expression expr = this; while (expr.opType == OpTypes.CASEWHEN) { expr.nodes[LEFT].resolveTypes(session, expr); if (expr.nodes[LEFT].isParam) { expr.n...
java
void resolveTypesForCaseWhen(Session session) { if (dataType != null) { return; } Expression expr = this; while (expr.opType == OpTypes.CASEWHEN) { expr.nodes[LEFT].resolveTypes(session, expr); if (expr.nodes[LEFT].isParam) { expr.n...
[ "void", "resolveTypesForCaseWhen", "(", "Session", "session", ")", "{", "if", "(", "dataType", "!=", "null", ")", "{", "return", ";", "}", "Expression", "expr", "=", "this", ";", "while", "(", "expr", ".", "opType", "==", "OpTypes", ".", "CASEWHEN", ")",...
For CASE WHEN and its special cases section 9.3 of the SQL standard on type aggregation is implemented.
[ "For", "CASE", "WHEN", "and", "its", "special", "cases", "section", "9", ".", "3", "of", "the", "SQL", "standard", "on", "type", "aggregation", "is", "implemented", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionOp.java#L380-L434
61,091
VoltDB/voltdb
src/frontend/org/voltdb/types/GeographyPointValue.java
GeographyPointValue.fromWKT
public static GeographyPointValue fromWKT(String param) { if (param == null) { throw new IllegalArgumentException("Null well known text argument to GeographyPointValue constructor."); } Matcher m = wktPattern.matcher(param); if (m.find()) { // Add 0.0 to avoid -0....
java
public static GeographyPointValue fromWKT(String param) { if (param == null) { throw new IllegalArgumentException("Null well known text argument to GeographyPointValue constructor."); } Matcher m = wktPattern.matcher(param); if (m.find()) { // Add 0.0 to avoid -0....
[ "public", "static", "GeographyPointValue", "fromWKT", "(", "String", "param", ")", "{", "if", "(", "param", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Null well known text argument to GeographyPointValue constructor.\"", ")", ";", "}", ...
Create a GeographyPointValue from a well-known text string. @param param A well-known text string. @return A new instance of GeographyPointValue.
[ "Create", "a", "GeographyPointValue", "from", "a", "well", "-", "known", "text", "string", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/GeographyPointValue.java#L91-L110
61,092
VoltDB/voltdb
src/frontend/org/voltdb/types/GeographyPointValue.java
GeographyPointValue.formatLngLat
String formatLngLat() { DecimalFormat df = new DecimalFormat("##0.0###########"); // Explicitly test for differences less than 1.0e-12 and // force them to be zero. Otherwise you may find a case // where two points differ in the less significant bits, but // they format as the ...
java
String formatLngLat() { DecimalFormat df = new DecimalFormat("##0.0###########"); // Explicitly test for differences less than 1.0e-12 and // force them to be zero. Otherwise you may find a case // where two points differ in the less significant bits, but // they format as the ...
[ "String", "formatLngLat", "(", ")", "{", "DecimalFormat", "df", "=", "new", "DecimalFormat", "(", "\"##0.0###########\"", ")", ";", "// Explicitly test for differences less than 1.0e-12 and", "// force them to be zero. Otherwise you may find a case", "// where two points differ in t...
Format the coordinates for this point. Use 12 digits of precision after the decimal point. @return A string containing the longitude and latitude for this point separated by one space.
[ "Format", "the", "coordinates", "for", "this", "point", ".", "Use", "12", "digits", "of", "precision", "after", "the", "decimal", "point", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/GeographyPointValue.java#L135-L145
61,093
VoltDB/voltdb
src/frontend/org/voltdb/types/GeographyPointValue.java
GeographyPointValue.unflattenFromBuffer
public static GeographyPointValue unflattenFromBuffer(ByteBuffer inBuffer, int offset) { double lng = inBuffer.getDouble(offset); double lat = inBuffer.getDouble(offset + BYTES_IN_A_COORD); if (lat == 360.0 && lng == 360.0) { // This is a null point. return null; ...
java
public static GeographyPointValue unflattenFromBuffer(ByteBuffer inBuffer, int offset) { double lng = inBuffer.getDouble(offset); double lat = inBuffer.getDouble(offset + BYTES_IN_A_COORD); if (lat == 360.0 && lng == 360.0) { // This is a null point. return null; ...
[ "public", "static", "GeographyPointValue", "unflattenFromBuffer", "(", "ByteBuffer", "inBuffer", ",", "int", "offset", ")", "{", "double", "lng", "=", "inBuffer", ".", "getDouble", "(", "offset", ")", ";", "double", "lat", "=", "inBuffer", ".", "getDouble", "(...
Deserializes a point from a ByteBuffer, at an absolute offset. @param inBuffer The ByteBuffer from which to read the bytes for a point. @param offset Absolute offset of point data in buffer. @return A new instance of GeographyPointValue.
[ "Deserializes", "a", "point", "from", "a", "ByteBuffer", "at", "an", "absolute", "offset", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/GeographyPointValue.java#L230-L239
61,094
VoltDB/voltdb
src/frontend/org/voltdb/types/GeographyPointValue.java
GeographyPointValue.normalize
private static double normalize(double v, double range) { double a = v-Math.floor((v + (range/2))/range)*range; // Make sure that a and v have the same sign // when abs(v) = 180. if (Math.abs(a) == 180.0 && (a * v) < 0) { a *= -1; } // The addition of 0.0 is t...
java
private static double normalize(double v, double range) { double a = v-Math.floor((v + (range/2))/range)*range; // Make sure that a and v have the same sign // when abs(v) = 180. if (Math.abs(a) == 180.0 && (a * v) < 0) { a *= -1; } // The addition of 0.0 is t...
[ "private", "static", "double", "normalize", "(", "double", "v", ",", "double", "range", ")", "{", "double", "a", "=", "v", "-", "Math", ".", "floor", "(", "(", "v", "+", "(", "range", "/", "2", ")", ")", "/", "range", ")", "*", "range", ";", "/...
by subtracting multiples of 360.
[ "by", "subtracting", "multiples", "of", "360", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/GeographyPointValue.java#L347-L357
61,095
VoltDB/voltdb
src/frontend/org/voltdb/types/GeographyPointValue.java
GeographyPointValue.mul
@Deprecated public GeographyPointValue mul(double alpha) { return GeographyPointValue.normalizeLngLat(getLongitude() * alpha + 0.0, getLatitude() * alpha + 0.0); }
java
@Deprecated public GeographyPointValue mul(double alpha) { return GeographyPointValue.normalizeLngLat(getLongitude() * alpha + 0.0, getLatitude() * alpha + 0.0); }
[ "@", "Deprecated", "public", "GeographyPointValue", "mul", "(", "double", "alpha", ")", "{", "return", "GeographyPointValue", ".", "normalizeLngLat", "(", "getLongitude", "(", ")", "*", "alpha", "+", "0.0", ",", "getLatitude", "(", ")", "*", "alpha", "+", "0...
Return a point scaled by the given alpha value. @param alpha The amount by which to scale this. @return The scaled point.
[ "Return", "a", "point", "scaled", "by", "the", "given", "alpha", "value", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/GeographyPointValue.java#L422-L426
61,096
VoltDB/voltdb
src/frontend/org/voltdb/types/GeographyPointValue.java
GeographyPointValue.rotate
@Deprecated public GeographyPointValue rotate(double phi, GeographyPointValue center) { double sinphi = Math.sin(2*Math.PI*phi/360.0); double cosphi = Math.cos(2*Math.PI*phi/360.0); // Translate to the center. double longitude = getLongitude() - center.getLongitude(); double...
java
@Deprecated public GeographyPointValue rotate(double phi, GeographyPointValue center) { double sinphi = Math.sin(2*Math.PI*phi/360.0); double cosphi = Math.cos(2*Math.PI*phi/360.0); // Translate to the center. double longitude = getLongitude() - center.getLongitude(); double...
[ "@", "Deprecated", "public", "GeographyPointValue", "rotate", "(", "double", "phi", ",", "GeographyPointValue", "center", ")", "{", "double", "sinphi", "=", "Math", ".", "sin", "(", "2", "*", "Math", ".", "PI", "*", "phi", "/", "360.0", ")", ";", "double...
Return a new point which is this point rotated by the angle phi around a given center point. @param phi The angle to rotate in degrees. @param center The center of rotation. @return A new, rotated point.
[ "Return", "a", "new", "point", "which", "is", "this", "point", "rotated", "by", "the", "angle", "phi", "around", "a", "given", "center", "point", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/GeographyPointValue.java#L435-L446
61,097
VoltDB/voltdb
src/frontend/org/voltdb/VoltZK.java
VoltZK.createPersistentZKNodes
public static void createPersistentZKNodes(ZooKeeper zk) { LinkedList<ZKUtil.StringCallback> callbacks = new LinkedList<ZKUtil.StringCallback>(); for (int i=0; i < VoltZK.ZK_HIERARCHY.length; i++) { ZKUtil.StringCallback cb = new ZKUtil.StringCallback(); callbacks.add(cb); ...
java
public static void createPersistentZKNodes(ZooKeeper zk) { LinkedList<ZKUtil.StringCallback> callbacks = new LinkedList<ZKUtil.StringCallback>(); for (int i=0; i < VoltZK.ZK_HIERARCHY.length; i++) { ZKUtil.StringCallback cb = new ZKUtil.StringCallback(); callbacks.add(cb); ...
[ "public", "static", "void", "createPersistentZKNodes", "(", "ZooKeeper", "zk", ")", "{", "LinkedList", "<", "ZKUtil", ".", "StringCallback", ">", "callbacks", "=", "new", "LinkedList", "<", "ZKUtil", ".", "StringCallback", ">", "(", ")", ";", "for", "(", "in...
Race to create the persistent nodes.
[ "Race", "to", "create", "the", "persistent", "nodes", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltZK.java#L241-L257
61,098
VoltDB/voltdb
src/frontend/org/voltdb/VoltZK.java
VoltZK.parseMailboxContents
public static List<MailboxNodeContent> parseMailboxContents(List<String> jsons) throws JSONException { ArrayList<MailboxNodeContent> objects = new ArrayList<MailboxNodeContent>(jsons.size()); for (String json : jsons) { MailboxNodeContent content = null; JSONObject jsObj = new JS...
java
public static List<MailboxNodeContent> parseMailboxContents(List<String> jsons) throws JSONException { ArrayList<MailboxNodeContent> objects = new ArrayList<MailboxNodeContent>(jsons.size()); for (String json : jsons) { MailboxNodeContent content = null; JSONObject jsObj = new JS...
[ "public", "static", "List", "<", "MailboxNodeContent", ">", "parseMailboxContents", "(", "List", "<", "String", ">", "jsons", ")", "throws", "JSONException", "{", "ArrayList", "<", "MailboxNodeContent", ">", "objects", "=", "new", "ArrayList", "<", "MailboxNodeCon...
Helper method for parsing mailbox node contents into Java objects. @throws JSONException
[ "Helper", "method", "for", "parsing", "mailbox", "node", "contents", "into", "Java", "objects", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltZK.java#L263-L277
61,099
VoltDB/voltdb
src/frontend/org/voltdb/VoltZK.java
VoltZK.createMigratePartitionLeaderInfo
public static boolean createMigratePartitionLeaderInfo(ZooKeeper zk, MigratePartitionLeaderInfo info) { try { zk.create(migrate_partition_leader_info, info.toBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); } catch (KeeperException e) { if (e.code() == KeeperException.Code.N...
java
public static boolean createMigratePartitionLeaderInfo(ZooKeeper zk, MigratePartitionLeaderInfo info) { try { zk.create(migrate_partition_leader_info, info.toBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); } catch (KeeperException e) { if (e.code() == KeeperException.Code.N...
[ "public", "static", "boolean", "createMigratePartitionLeaderInfo", "(", "ZooKeeper", "zk", ",", "MigratePartitionLeaderInfo", "info", ")", "{", "try", "{", "zk", ".", "create", "(", "migrate_partition_leader_info", ",", "info", ".", "toBytes", "(", ")", ",", "Ids"...
Save MigratePartitionLeader information for error handling
[ "Save", "MigratePartitionLeader", "information", "for", "error", "handling" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltZK.java#L570-L588