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
60,700
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java
FileTxnLog.truncate
public boolean truncate(long zxid) throws IOException { FileTxnIterator itr = new FileTxnIterator(this.logDir, zxid); PositionInputStream input = itr.inputStream; long pos = input.getPosition(); // now, truncate at the current position RandomAccessFile raf=new RandomAccessFile(it...
java
public boolean truncate(long zxid) throws IOException { FileTxnIterator itr = new FileTxnIterator(this.logDir, zxid); PositionInputStream input = itr.inputStream; long pos = input.getPosition(); // now, truncate at the current position RandomAccessFile raf=new RandomAccessFile(it...
[ "public", "boolean", "truncate", "(", "long", "zxid", ")", "throws", "IOException", "{", "FileTxnIterator", "itr", "=", "new", "FileTxnIterator", "(", "this", ".", "logDir", ",", "zxid", ")", ";", "PositionInputStream", "input", "=", "itr", ".", "inputStream",...
truncate the current transaction logs @param zxid the zxid to truncate the logs to @return true if successful false if not
[ "truncate", "the", "current", "transaction", "logs" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java#L337-L351
60,701
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java
FileTxnLog.readHeader
private static FileHeader readHeader(File file) throws IOException { InputStream is =null; try { is = new BufferedInputStream(new FileInputStream(file)); InputArchive ia=BinaryInputArchive.getArchive(is); FileHeader hdr = new FileHeader(); hdr.deserialize(...
java
private static FileHeader readHeader(File file) throws IOException { InputStream is =null; try { is = new BufferedInputStream(new FileInputStream(file)); InputArchive ia=BinaryInputArchive.getArchive(is); FileHeader hdr = new FileHeader(); hdr.deserialize(...
[ "private", "static", "FileHeader", "readHeader", "(", "File", "file", ")", "throws", "IOException", "{", "InputStream", "is", "=", "null", ";", "try", "{", "is", "=", "new", "BufferedInputStream", "(", "new", "FileInputStream", "(", "file", ")", ")", ";", ...
read the header of the transaction file @param file the transaction file to read @return header that was read fomr the file @throws IOException
[ "read", "the", "header", "of", "the", "transaction", "file" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java#L359-L374
60,702
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java
FileTxnLog.getDbId
public long getDbId() throws IOException { FileTxnIterator itr = new FileTxnIterator(logDir, 0); FileHeader fh=readHeader(itr.logFile); itr.close(); if(fh==null) throw new IOException("Unsupported Format."); return fh.getDbid(); }
java
public long getDbId() throws IOException { FileTxnIterator itr = new FileTxnIterator(logDir, 0); FileHeader fh=readHeader(itr.logFile); itr.close(); if(fh==null) throw new IOException("Unsupported Format."); return fh.getDbid(); }
[ "public", "long", "getDbId", "(", ")", "throws", "IOException", "{", "FileTxnIterator", "itr", "=", "new", "FileTxnIterator", "(", "logDir", ",", "0", ")", ";", "FileHeader", "fh", "=", "readHeader", "(", "itr", ".", "logFile", ")", ";", "itr", ".", "clo...
the dbid of this transaction database @return the dbid of this database
[ "the", "dbid", "of", "this", "transaction", "database" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java#L380-L387
60,703
VoltDB/voltdb
src/frontend/org/voltdb/exportclient/decode/EndpointExpander.java
EndpointExpander.verifyForHdfsUse
public static void verifyForHdfsUse(String sb) throws IllegalArgumentException { Preconditions.checkArgument( sb != null && !sb.trim().isEmpty(), "null or empty hdfs endpoint" ); int mask = conversionMaskFor(sb); boolean hasDateConversion = (mask ...
java
public static void verifyForHdfsUse(String sb) throws IllegalArgumentException { Preconditions.checkArgument( sb != null && !sb.trim().isEmpty(), "null or empty hdfs endpoint" ); int mask = conversionMaskFor(sb); boolean hasDateConversion = (mask ...
[ "public", "static", "void", "verifyForHdfsUse", "(", "String", "sb", ")", "throws", "IllegalArgumentException", "{", "Preconditions", ".", "checkArgument", "(", "sb", "!=", "null", "&&", "!", "sb", ".", "trim", "(", ")", ".", "isEmpty", "(", ")", ",", "\"n...
Verifies that given endpoint format string specifies all the required hdfs conversions in the path portion of the endpoint. @param sb format string @throws IllegalArgumentException when verification fails
[ "Verifies", "that", "given", "endpoint", "format", "string", "specifies", "all", "the", "required", "hdfs", "conversions", "in", "the", "path", "portion", "of", "the", "endpoint", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/decode/EndpointExpander.java#L259-L296
60,704
VoltDB/voltdb
src/frontend/org/voltdb/exportclient/decode/EndpointExpander.java
EndpointExpander.verifyForBatchUse
public static void verifyForBatchUse(String sb) throws IllegalArgumentException { Preconditions.checkArgument( sb != null && !sb.trim().isEmpty(), "null or empty hdfs endpoint" ); int mask = conversionMaskFor(sb); Preconditions.checkArgument( ...
java
public static void verifyForBatchUse(String sb) throws IllegalArgumentException { Preconditions.checkArgument( sb != null && !sb.trim().isEmpty(), "null or empty hdfs endpoint" ); int mask = conversionMaskFor(sb); Preconditions.checkArgument( ...
[ "public", "static", "void", "verifyForBatchUse", "(", "String", "sb", ")", "throws", "IllegalArgumentException", "{", "Preconditions", ".", "checkArgument", "(", "sb", "!=", "null", "&&", "!", "sb", ".", "trim", "(", ")", ".", "isEmpty", "(", ")", ",", "\"...
Verifies that given endpoint format string specifies all the required batch mode conversions. @param sb format string @throws IllegalArgumentException when verification fails
[ "Verifies", "that", "given", "endpoint", "format", "string", "specifies", "all", "the", "required", "batch", "mode", "conversions", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/decode/EndpointExpander.java#L305-L317
60,705
VoltDB/voltdb
src/frontend/org/voltdb/SystemCatalogAgent.java
SystemCatalogAgent.handleJSONMessage
@Override protected void handleJSONMessage(JSONObject obj) throws Exception { hostLog.warn("SystemCatalogAgent received a JSON message, which should be impossible."); VoltTable[] results = null; sendOpsResponse(results, obj); }
java
@Override protected void handleJSONMessage(JSONObject obj) throws Exception { hostLog.warn("SystemCatalogAgent received a JSON message, which should be impossible."); VoltTable[] results = null; sendOpsResponse(results, obj); }
[ "@", "Override", "protected", "void", "handleJSONMessage", "(", "JSONObject", "obj", ")", "throws", "Exception", "{", "hostLog", ".", "warn", "(", "\"SystemCatalogAgent received a JSON message, which should be impossible.\"", ")", ";", "VoltTable", "[", "]", "results", ...
SystemCatalog shouldn't currently get here, make it so we don't die or do anything
[ "SystemCatalog", "shouldn", "t", "currently", "get", "here", "make", "it", "so", "we", "don", "t", "die", "or", "do", "anything" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SystemCatalogAgent.java#L87-L92
60,706
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/MapConstraints.java
MapConstraints.constrainedMap
public static <K, V> Map<K, V> constrainedMap( Map<K, V> map, MapConstraint<? super K, ? super V> constraint) { return new ConstrainedMap<K, V>(map, constraint); }
java
public static <K, V> Map<K, V> constrainedMap( Map<K, V> map, MapConstraint<? super K, ? super V> constraint) { return new ConstrainedMap<K, V>(map, constraint); }
[ "public", "static", "<", "K", ",", "V", ">", "Map", "<", "K", ",", "V", ">", "constrainedMap", "(", "Map", "<", "K", ",", "V", ">", "map", ",", "MapConstraint", "<", "?", "super", "K", ",", "?", "super", "V", ">", "constraint", ")", "{", "retur...
Returns a constrained view of the specified map, using the specified constraint. Any operations that add new mappings will call the provided constraint. However, this method does not verify that existing mappings satisfy the constraint. <p>The returned map is not serializable. @param map the map to constrain @param c...
[ "Returns", "a", "constrained", "view", "of", "the", "specified", "map", "using", "the", "specified", "constraint", ".", "Any", "operations", "that", "add", "new", "mappings", "will", "call", "the", "provided", "constraint", ".", "However", "this", "method", "d...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/MapConstraints.java#L65-L68
60,707
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/MapConstraints.java
MapConstraints.constrainedListMultimap
public static <K, V> ListMultimap<K, V> constrainedListMultimap( ListMultimap<K, V> multimap, MapConstraint<? super K, ? super V> constraint) { return new ConstrainedListMultimap<K, V>(multimap, constraint); }
java
public static <K, V> ListMultimap<K, V> constrainedListMultimap( ListMultimap<K, V> multimap, MapConstraint<? super K, ? super V> constraint) { return new ConstrainedListMultimap<K, V>(multimap, constraint); }
[ "public", "static", "<", "K", ",", "V", ">", "ListMultimap", "<", "K", ",", "V", ">", "constrainedListMultimap", "(", "ListMultimap", "<", "K", ",", "V", ">", "multimap", ",", "MapConstraint", "<", "?", "super", "K", ",", "?", "super", "V", ">", "con...
Returns a constrained view of the specified list multimap, using the specified constraint. Any operations that add new mappings will call the provided constraint. However, this method does not verify that existing mappings satisfy the constraint. <p>Note that the generated multimap's {@link Multimap#removeAll} and {@l...
[ "Returns", "a", "constrained", "view", "of", "the", "specified", "list", "multimap", "using", "the", "specified", "constraint", ".", "Any", "operations", "that", "add", "new", "mappings", "will", "call", "the", "provided", "constraint", ".", "However", "this", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/MapConstraints.java#L86-L89
60,708
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionWindowed.java
ExpressionWindowed.validateWindowedSyntax
private void validateWindowedSyntax() { // Check that the aggregate is one of the supported ones, and // that the number of aggregate parameters is right. switch (opType) { case OpTypes.WINDOWED_RANK: case OpTypes.WINDOWED_DENSE_RANK: case OpTypes.WINDOWED_ROW_NUMBER: ...
java
private void validateWindowedSyntax() { // Check that the aggregate is one of the supported ones, and // that the number of aggregate parameters is right. switch (opType) { case OpTypes.WINDOWED_RANK: case OpTypes.WINDOWED_DENSE_RANK: case OpTypes.WINDOWED_ROW_NUMBER: ...
[ "private", "void", "validateWindowedSyntax", "(", ")", "{", "// Check that the aggregate is one of the supported ones, and", "// that the number of aggregate parameters is right.", "switch", "(", "opType", ")", "{", "case", "OpTypes", ".", "WINDOWED_RANK", ":", "case", "OpTypes...
Validate that this is a collection of values.
[ "Validate", "that", "this", "is", "a", "collection", "of", "values", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionWindowed.java#L68-L87
60,709
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementInsert.java
StatementInsert.getResult
Result getResult(Session session) { Table table = baseTable; Result resultOut = null; RowSetNavigator generatedNavigator = null; PersistentStore store = session.sessionData.getRowStore(baseTable); if (generatedIndexes != null) { ...
java
Result getResult(Session session) { Table table = baseTable; Result resultOut = null; RowSetNavigator generatedNavigator = null; PersistentStore store = session.sessionData.getRowStore(baseTable); if (generatedIndexes != null) { ...
[ "Result", "getResult", "(", "Session", "session", ")", "{", "Table", "table", "=", "baseTable", ";", "Result", "resultOut", "=", "null", ";", "RowSetNavigator", "generatedNavigator", "=", "null", ";", "PersistentStore", "store", "=", "session", ".", "sessionData...
Executes an INSERT_SELECT statement. It is assumed that the argument is of the correct type. @return the result of executing the statement
[ "Executes", "an", "INSERT_SELECT", "statement", ".", "It", "is", "assumed", "that", "the", "argument", "is", "of", "the", "correct", "type", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementInsert.java#L99-L164
60,710
VoltDB/voltdb
src/frontend/org/voltdb/expressions/TupleValueExpression.java
TupleValueExpression.resolveForTable
@Override public void resolveForTable(Table table) { assert(table != null); // It MAY be that for the case in which this function is called (expression indexes), the column's // table name is not specified (and not missed?). // It is possible to "correct" that here by cribbing it fro...
java
@Override public void resolveForTable(Table table) { assert(table != null); // It MAY be that for the case in which this function is called (expression indexes), the column's // table name is not specified (and not missed?). // It is possible to "correct" that here by cribbing it fro...
[ "@", "Override", "public", "void", "resolveForTable", "(", "Table", "table", ")", "{", "assert", "(", "table", "!=", "null", ")", ";", "// It MAY be that for the case in which this function is called (expression indexes), the column's", "// table name is not specified (and not mi...
Resolve a TVE in the context of the given table. Since this is a TVE, it is a leaf node in the expression tree. We just look up the metadata from the table and copy it here, to this object.
[ "Resolve", "a", "TVE", "in", "the", "context", "of", "the", "given", "table", ".", "Since", "this", "is", "a", "TVE", "it", "is", "a", "leaf", "node", "in", "the", "expression", "tree", ".", "We", "just", "look", "up", "the", "metadata", "from", "the...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/TupleValueExpression.java#L400-L412
60,711
VoltDB/voltdb
src/frontend/org/voltdb/expressions/TupleValueExpression.java
TupleValueExpression.setColumnIndexUsingSchema
public int setColumnIndexUsingSchema(NodeSchema inputSchema) { int index = inputSchema.getIndexOfTve(this); if (index < 0) { //* enable to debug*/ System.out.println("DEBUG: setColumnIndex miss: " + this); //* enable to debug*/ System.out.println("DEBUG: setColumnIndex candidates...
java
public int setColumnIndexUsingSchema(NodeSchema inputSchema) { int index = inputSchema.getIndexOfTve(this); if (index < 0) { //* enable to debug*/ System.out.println("DEBUG: setColumnIndex miss: " + this); //* enable to debug*/ System.out.println("DEBUG: setColumnIndex candidates...
[ "public", "int", "setColumnIndexUsingSchema", "(", "NodeSchema", "inputSchema", ")", "{", "int", "index", "=", "inputSchema", ".", "getIndexOfTve", "(", "this", ")", ";", "if", "(", "index", "<", "0", ")", "{", "//* enable to debug*/ System.out.println(\"DEBUG: setC...
Given an input schema, resolve this TVE expression.
[ "Given", "an", "input", "schema", "resolve", "this", "TVE", "expression", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/TupleValueExpression.java#L417-L433
60,712
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSetMetaData.java
JDBC4ResultSetMetaData.getColumnClassName
public String getColumnClassName(int column) throws SQLException { sourceResultSet.checkColumnBounds(column); VoltType type = sourceResultSet.table.getColumnType(column - 1); String result = type.getJdbcClass(); if (result == null) { throw SQLError.get(SQLError.TRANSLATIO...
java
public String getColumnClassName(int column) throws SQLException { sourceResultSet.checkColumnBounds(column); VoltType type = sourceResultSet.table.getColumnType(column - 1); String result = type.getJdbcClass(); if (result == null) { throw SQLError.get(SQLError.TRANSLATIO...
[ "public", "String", "getColumnClassName", "(", "int", "column", ")", "throws", "SQLException", "{", "sourceResultSet", ".", "checkColumnBounds", "(", "column", ")", ";", "VoltType", "type", "=", "sourceResultSet", ".", "table", ".", "getColumnType", "(", "column",...
Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column.
[ "Returns", "the", "fully", "-", "qualified", "name", "of", "the", "Java", "class", "whose", "instances", "are", "manufactured", "if", "the", "method", "ResultSet", ".", "getObject", "is", "called", "to", "retrieve", "a", "value", "from", "the", "column", "."...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSetMetaData.java#L42-L51
60,713
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSetMetaData.java
JDBC4ResultSetMetaData.getPrecision
public int getPrecision(int column) throws SQLException { sourceResultSet.checkColumnBounds(column); VoltType type = sourceResultSet.table.getColumnType(column - 1); Integer result = type.getTypePrecisionAndRadix()[0]; if (result == null) { result = 0; } ...
java
public int getPrecision(int column) throws SQLException { sourceResultSet.checkColumnBounds(column); VoltType type = sourceResultSet.table.getColumnType(column - 1); Integer result = type.getTypePrecisionAndRadix()[0]; if (result == null) { result = 0; } ...
[ "public", "int", "getPrecision", "(", "int", "column", ")", "throws", "SQLException", "{", "sourceResultSet", ".", "checkColumnBounds", "(", "column", ")", ";", "VoltType", "type", "=", "sourceResultSet", ".", "table", ".", "getColumnType", "(", "column", "-", ...
Get the designated column's specified column size.
[ "Get", "the", "designated", "column", "s", "specified", "column", "size", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSetMetaData.java#L133-L142
60,714
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSetMetaData.java
JDBC4ResultSetMetaData.getScale
public int getScale(int column) throws SQLException { sourceResultSet.checkColumnBounds(column); VoltType type = sourceResultSet.table.getColumnType(column - 1); Integer result = type.getMaximumScale(); if (result == null) { result = 0; } return result; ...
java
public int getScale(int column) throws SQLException { sourceResultSet.checkColumnBounds(column); VoltType type = sourceResultSet.table.getColumnType(column - 1); Integer result = type.getMaximumScale(); if (result == null) { result = 0; } return result; ...
[ "public", "int", "getScale", "(", "int", "column", ")", "throws", "SQLException", "{", "sourceResultSet", ".", "checkColumnBounds", "(", "column", ")", ";", "VoltType", "type", "=", "sourceResultSet", ".", "table", ".", "getColumnType", "(", "column", "-", "1"...
Gets the designated column's number of digits to right of the decimal point.
[ "Gets", "the", "designated", "column", "s", "number", "of", "digits", "to", "right", "of", "the", "decimal", "point", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSetMetaData.java#L145-L154
60,715
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSetMetaData.java
JDBC4ResultSetMetaData.isCaseSensitive
public boolean isCaseSensitive(int column) throws SQLException { sourceResultSet.checkColumnBounds(column); VoltType type = sourceResultSet.table.getColumnType(column - 1); return type.isCaseSensitive(); }
java
public boolean isCaseSensitive(int column) throws SQLException { sourceResultSet.checkColumnBounds(column); VoltType type = sourceResultSet.table.getColumnType(column - 1); return type.isCaseSensitive(); }
[ "public", "boolean", "isCaseSensitive", "(", "int", "column", ")", "throws", "SQLException", "{", "sourceResultSet", ".", "checkColumnBounds", "(", "column", ")", ";", "VoltType", "type", "=", "sourceResultSet", ".", "table", ".", "getColumnType", "(", "column", ...
Indicates whether a column's case matters.
[ "Indicates", "whether", "a", "column", "s", "case", "matters", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSetMetaData.java#L180-L185
60,716
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ResultSetMetaData.java
JDBC4ResultSetMetaData.isSigned
public boolean isSigned(int column) throws SQLException { sourceResultSet.checkColumnBounds(column); VoltType type = sourceResultSet.table.getColumnType(column - 1); Boolean result = type.isUnsigned(); if (result == null) { // Null return value means 'not signed' as far a...
java
public boolean isSigned(int column) throws SQLException { sourceResultSet.checkColumnBounds(column); VoltType type = sourceResultSet.table.getColumnType(column - 1); Boolean result = type.isUnsigned(); if (result == null) { // Null return value means 'not signed' as far a...
[ "public", "boolean", "isSigned", "(", "int", "column", ")", "throws", "SQLException", "{", "sourceResultSet", ".", "checkColumnBounds", "(", "column", ")", ";", "VoltType", "type", "=", "sourceResultSet", ".", "table", ".", "getColumnType", "(", "column", "-", ...
Indicates whether values in the designated column are signed numbers.
[ "Indicates", "whether", "values", "in", "the", "designated", "column", "are", "signed", "numbers", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSetMetaData.java#L222-L232
60,717
VoltDB/voltdb
src/frontend/org/voltdb/planner/microoptimizations/InlineOrderByIntoMergeReceive.java
InlineOrderByIntoMergeReceive.applyOptimization
private AbstractPlanNode applyOptimization(WindowFunctionPlanNode plan) { assert(plan.getChildCount() == 1); assert(plan.getChild(0) != null); AbstractPlanNode child = plan.getChild(0); assert(child != null); // SP Plans which have an index which can provide // the window...
java
private AbstractPlanNode applyOptimization(WindowFunctionPlanNode plan) { assert(plan.getChildCount() == 1); assert(plan.getChild(0) != null); AbstractPlanNode child = plan.getChild(0); assert(child != null); // SP Plans which have an index which can provide // the window...
[ "private", "AbstractPlanNode", "applyOptimization", "(", "WindowFunctionPlanNode", "plan", ")", "{", "assert", "(", "plan", ".", "getChildCount", "(", ")", "==", "1", ")", ";", "assert", "(", "plan", ".", "getChild", "(", "0", ")", "!=", "null", ")", ";", ...
Convert ReceivePlanNodes into MergeReceivePlanNodes when the RECEIVE node's nearest parent is a window function. We won't have any inline limits or aggregates here, so this is somewhat simpler than the order by case. @param plan @return
[ "Convert", "ReceivePlanNodes", "into", "MergeReceivePlanNodes", "when", "the", "RECEIVE", "node", "s", "nearest", "parent", "is", "a", "window", "function", ".", "We", "won", "t", "have", "any", "inline", "limits", "or", "aggregates", "here", "so", "this", "is...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/microoptimizations/InlineOrderByIntoMergeReceive.java#L113-L169
60,718
VoltDB/voltdb
src/frontend/org/voltdb/planner/microoptimizations/InlineOrderByIntoMergeReceive.java
InlineOrderByIntoMergeReceive.convertToSerialAggregation
AbstractPlanNode convertToSerialAggregation(AbstractPlanNode aggregateNode, OrderByPlanNode orderbyNode) { assert(aggregateNode instanceof HashAggregatePlanNode); HashAggregatePlanNode hashAggr = (HashAggregatePlanNode) aggregateNode; List<AbstractExpression> groupbys = new ArrayList<>(hashAggr....
java
AbstractPlanNode convertToSerialAggregation(AbstractPlanNode aggregateNode, OrderByPlanNode orderbyNode) { assert(aggregateNode instanceof HashAggregatePlanNode); HashAggregatePlanNode hashAggr = (HashAggregatePlanNode) aggregateNode; List<AbstractExpression> groupbys = new ArrayList<>(hashAggr....
[ "AbstractPlanNode", "convertToSerialAggregation", "(", "AbstractPlanNode", "aggregateNode", ",", "OrderByPlanNode", "orderbyNode", ")", "{", "assert", "(", "aggregateNode", "instanceof", "HashAggregatePlanNode", ")", ";", "HashAggregatePlanNode", "hashAggr", "=", "(", "Hash...
The Hash aggregate can be converted to a Serial or Partial aggregate if - all GROUP BY and ORDER BY expressions bind to each other - Serial Aggregate - a subset of the GROUP BY expressions covers all of the ORDER BY - Partial - anything else - remains a Hash Aggregate @param aggregateNode @param orderbyNode @return ne...
[ "The", "Hash", "aggregate", "can", "be", "converted", "to", "a", "Serial", "or", "Partial", "aggregate", "if", "-", "all", "GROUP", "BY", "and", "ORDER", "BY", "expressions", "bind", "to", "each", "other", "-", "Serial", "Aggregate", "-", "a", "subset", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/microoptimizations/InlineOrderByIntoMergeReceive.java#L311-L344
60,719
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/LockFile.java
LockFile.startHeartbeat
private final void startHeartbeat() { if (timerTask == null || HsqlTimer.isCancelled(timerTask)) { Runnable runner = new HeartbeatRunner(); timerTask = timer.schedulePeriodicallyAfter(0, HEARTBEAT_INTERVAL, runner, true); } }
java
private final void startHeartbeat() { if (timerTask == null || HsqlTimer.isCancelled(timerTask)) { Runnable runner = new HeartbeatRunner(); timerTask = timer.schedulePeriodicallyAfter(0, HEARTBEAT_INTERVAL, runner, true); } }
[ "private", "final", "void", "startHeartbeat", "(", ")", "{", "if", "(", "timerTask", "==", "null", "||", "HsqlTimer", ".", "isCancelled", "(", "timerTask", ")", ")", "{", "Runnable", "runner", "=", "new", "HeartbeatRunner", "(", ")", ";", "timerTask", "=",...
Schedules the lock heartbeat task.
[ "Schedules", "the", "lock", "heartbeat", "task", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/LockFile.java#L1177-L1185
60,720
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/LockFile.java
LockFile.stopHeartbeat
private final void stopHeartbeat() { if (timerTask != null && !HsqlTimer.isCancelled(timerTask)) { HsqlTimer.cancel(timerTask); timerTask = null; } }
java
private final void stopHeartbeat() { if (timerTask != null && !HsqlTimer.isCancelled(timerTask)) { HsqlTimer.cancel(timerTask); timerTask = null; } }
[ "private", "final", "void", "stopHeartbeat", "(", ")", "{", "if", "(", "timerTask", "!=", "null", "&&", "!", "HsqlTimer", ".", "isCancelled", "(", "timerTask", ")", ")", "{", "HsqlTimer", ".", "cancel", "(", "timerTask", ")", ";", "timerTask", "=", "null...
Cancels the lock heartbeat task.
[ "Cancels", "the", "lock", "heartbeat", "task", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/LockFile.java#L1190-L1197
60,721
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/LockFile.java
LockFile.isLocked
public final static boolean isLocked(final String path) { boolean locked = true; try { LockFile lockFile = LockFile.newLockFile(path); lockFile.checkHeartbeat(false); locked = false; } catch (Exception e) {} return locked; }
java
public final static boolean isLocked(final String path) { boolean locked = true; try { LockFile lockFile = LockFile.newLockFile(path); lockFile.checkHeartbeat(false); locked = false; } catch (Exception e) {} return locked; }
[ "public", "final", "static", "boolean", "isLocked", "(", "final", "String", "path", ")", "{", "boolean", "locked", "=", "true", ";", "try", "{", "LockFile", "lockFile", "=", "LockFile", ".", "newLockFile", "(", "path", ")", ";", "lockFile", ".", "checkHear...
Retrieves whether there is potentially already a cooperative lock, operating system lock or some other situation preventing a cooperative lock condition from being aquired using the specified path. @param path the path to test @return <tt>true</tt> if there is currently something preventing the acquisition of a cooper...
[ "Retrieves", "whether", "there", "is", "potentially", "already", "a", "cooperative", "lock", "operating", "system", "lock", "or", "some", "other", "situation", "preventing", "a", "cooperative", "lock", "condition", "from", "being", "aquired", "using", "the", "spec...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/LockFile.java#L1384-L1397
60,722
VoltDB/voltdb
src/frontend/org/voltdb/probe/MeshProber.java
MeshProber.hosts
public static ImmutableSortedSet<String> hosts(String option) { checkArgument(option != null, "option is null"); if (option.trim().isEmpty()) { return ImmutableSortedSet.of( HostAndPort.fromParts("", Constants.DEFAULT_INTERNAL_PORT).toString()); } Splitter...
java
public static ImmutableSortedSet<String> hosts(String option) { checkArgument(option != null, "option is null"); if (option.trim().isEmpty()) { return ImmutableSortedSet.of( HostAndPort.fromParts("", Constants.DEFAULT_INTERNAL_PORT).toString()); } Splitter...
[ "public", "static", "ImmutableSortedSet", "<", "String", ">", "hosts", "(", "String", "option", ")", "{", "checkArgument", "(", "option", "!=", "null", ",", "\"option is null\"", ")", ";", "if", "(", "option", ".", "trim", "(", ")", ".", "isEmpty", "(", ...
Helper method that takes a comma delimited list of host specs, validates it, and converts it to a set of valid coordinators @param option a string that contains comma delimited list of host specs @return a set of valid coordinators
[ "Helper", "method", "that", "takes", "a", "comma", "delimited", "list", "of", "host", "specs", "validates", "it", "and", "converts", "it", "to", "a", "set", "of", "valid", "coordinators" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/probe/MeshProber.java#L104-L117
60,723
VoltDB/voltdb
src/frontend/org/voltdb/probe/MeshProber.java
MeshProber.hosts
public static ImmutableSortedSet<String> hosts(int...ports) { if (ports.length == 0) { return ImmutableSortedSet.of( HostAndPort.fromParts("", Constants.DEFAULT_INTERNAL_PORT).toString()); } ImmutableSortedSet.Builder<String> sbld = ImmutableSortedSet.naturalOrder...
java
public static ImmutableSortedSet<String> hosts(int...ports) { if (ports.length == 0) { return ImmutableSortedSet.of( HostAndPort.fromParts("", Constants.DEFAULT_INTERNAL_PORT).toString()); } ImmutableSortedSet.Builder<String> sbld = ImmutableSortedSet.naturalOrder...
[ "public", "static", "ImmutableSortedSet", "<", "String", ">", "hosts", "(", "int", "...", "ports", ")", "{", "if", "(", "ports", ".", "length", "==", "0", ")", "{", "return", "ImmutableSortedSet", ".", "of", "(", "HostAndPort", ".", "fromParts", "(", "\"...
Convenience method mainly used in local cluster testing @param ports a list of ports @return a set of coordinator specs
[ "Convenience", "method", "mainly", "used", "in", "local", "cluster", "testing" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/probe/MeshProber.java#L125-L135
60,724
VoltDB/voltdb
src/frontend/org/voltdb/ProcedureRunner.java
ProcedureRunner.call
public ClientResponseImpl call(Object... paramListIn) { m_perCallStats = m_statsCollector.beginProcedure(); // if we're keeping track, calculate parameter size if (m_perCallStats != null) { StoredProcedureInvocation invoc = (m_txnState != null ? m_txnState.getInvocation() : null); ...
java
public ClientResponseImpl call(Object... paramListIn) { m_perCallStats = m_statsCollector.beginProcedure(); // if we're keeping track, calculate parameter size if (m_perCallStats != null) { StoredProcedureInvocation invoc = (m_txnState != null ? m_txnState.getInvocation() : null); ...
[ "public", "ClientResponseImpl", "call", "(", "Object", "...", "paramListIn", ")", "{", "m_perCallStats", "=", "m_statsCollector", ".", "beginProcedure", "(", ")", ";", "// if we're keeping track, calculate parameter size", "if", "(", "m_perCallStats", "!=", "null", ")",...
Wraps coreCall with statistics code.
[ "Wraps", "coreCall", "with", "statistics", "code", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ProcedureRunner.java#L279-L304
60,725
VoltDB/voltdb
src/frontend/org/voltdb/ProcedureRunner.java
ProcedureRunner.checkPartition
public boolean checkPartition(TransactionState txnState, TheHashinator hashinator) { if (m_isSinglePartition) { // can happen when a proc changes from multi-to-single after it's routed if (hashinator == null) { return false; // this will kick it back to CI for re-routing ...
java
public boolean checkPartition(TransactionState txnState, TheHashinator hashinator) { if (m_isSinglePartition) { // can happen when a proc changes from multi-to-single after it's routed if (hashinator == null) { return false; // this will kick it back to CI for re-routing ...
[ "public", "boolean", "checkPartition", "(", "TransactionState", "txnState", ",", "TheHashinator", "hashinator", ")", "{", "if", "(", "m_isSinglePartition", ")", "{", "// can happen when a proc changes from multi-to-single after it's routed", "if", "(", "hashinator", "==", "...
Check if the txn hashes to this partition. If not, it should be restarted. @param txnState @return true if the txn hashes to the current partition, false otherwise
[ "Check", "if", "the", "txn", "hashes", "to", "this", "partition", ".", "If", "not", "it", "should", "be", "restarted", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ProcedureRunner.java#L517-L598
60,726
VoltDB/voltdb
src/frontend/org/voltdb/ProcedureRunner.java
ProcedureRunner.isProcedureStackTraceElement
public static boolean isProcedureStackTraceElement(String procedureName, StackTraceElement stel) { int lastPeriodPos = stel.getClassName().lastIndexOf('.'); if (lastPeriodPos == -1) { lastPeriodPos = 0; } else { ++lastPeriodPos; } // Account for inner cl...
java
public static boolean isProcedureStackTraceElement(String procedureName, StackTraceElement stel) { int lastPeriodPos = stel.getClassName().lastIndexOf('.'); if (lastPeriodPos == -1) { lastPeriodPos = 0; } else { ++lastPeriodPos; } // Account for inner cl...
[ "public", "static", "boolean", "isProcedureStackTraceElement", "(", "String", "procedureName", ",", "StackTraceElement", "stel", ")", "{", "int", "lastPeriodPos", "=", "stel", ".", "getClassName", "(", ")", ".", "lastIndexOf", "(", "'", "'", ")", ";", "if", "(...
Test whether or not the given stack frame is within a procedure invocation @param The name of the procedure @param stel a stack trace element @return true if it is, false it is not
[ "Test", "whether", "or", "not", "the", "given", "stack", "frame", "is", "within", "a", "procedure", "invocation" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ProcedureRunner.java#L1174-L1188
60,727
VoltDB/voltdb
src/frontend/org/voltdb/utils/DeploymentRequestServlet.java
DeploymentRequestServlet.handleUpdateDeployment
public void handleUpdateDeployment(String jsonp, HttpServletRequest request, HttpServletResponse response, AuthenticationResult ar) throws IOException, ServletException { String deployment = request.getParameter("deployment"); if (deployment == null || deployment.leng...
java
public void handleUpdateDeployment(String jsonp, HttpServletRequest request, HttpServletResponse response, AuthenticationResult ar) throws IOException, ServletException { String deployment = request.getParameter("deployment"); if (deployment == null || deployment.leng...
[ "public", "void", "handleUpdateDeployment", "(", "String", "jsonp", ",", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ",", "AuthenticationResult", "ar", ")", "throws", "IOException", ",", "ServletException", "{", "String", "deployment", "=", ...
Update the deployment
[ "Update", "the", "deployment" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/DeploymentRequestServlet.java#L296-L343
60,728
VoltDB/voltdb
src/frontend/org/voltdb/utils/DeploymentRequestServlet.java
DeploymentRequestServlet.handleRemoveUser
public void handleRemoveUser(String jsonp, String target, HttpServletRequest request, HttpServletResponse response, AuthenticationResult ar) throws IOException, ServletException { try { DeploymentType newDeployment = CatalogUtil.getDeployment(new ByteArrayInputStr...
java
public void handleRemoveUser(String jsonp, String target, HttpServletRequest request, HttpServletResponse response, AuthenticationResult ar) throws IOException, ServletException { try { DeploymentType newDeployment = CatalogUtil.getDeployment(new ByteArrayInputStr...
[ "public", "void", "handleRemoveUser", "(", "String", "jsonp", ",", "String", "target", ",", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ",", "AuthenticationResult", "ar", ")", "throws", "IOException", ",", "ServletException", "{", "try", ...
Handle DELETE for users
[ "Handle", "DELETE", "for", "users" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/DeploymentRequestServlet.java#L475-L520
60,729
VoltDB/voltdb
src/frontend/org/voltdb/utils/DeploymentRequestServlet.java
DeploymentRequestServlet.handleGetUsers
public void handleGetUsers(String jsonp, String target, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ObjectMapper mapper = new ObjectMapper(); User user = null; String[] splitTarget = target.split("/"); ...
java
public void handleGetUsers(String jsonp, String target, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ObjectMapper mapper = new ObjectMapper(); User user = null; String[] splitTarget = target.split("/"); ...
[ "public", "void", "handleGetUsers", "(", "String", "jsonp", ",", "String", "target", ",", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "IOException", ",", "ServletException", "{", "ObjectMapper", "mapper", "=", "new", "Obje...
Handle GET for users
[ "Handle", "GET", "for", "users" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/DeploymentRequestServlet.java#L523-L562
60,730
VoltDB/voltdb
src/frontend/org/voltdb/utils/DeploymentRequestServlet.java
DeploymentRequestServlet.handleGetExportTypes
public void handleGetExportTypes(String jsonp, HttpServletResponse response) throws IOException, ServletException { if (jsonp != null) { response.getWriter().write(jsonp + "("); } JSONObject exportTypes = new JSONObject(); HashSet<String> exportList = new HashSet<...
java
public void handleGetExportTypes(String jsonp, HttpServletResponse response) throws IOException, ServletException { if (jsonp != null) { response.getWriter().write(jsonp + "("); } JSONObject exportTypes = new JSONObject(); HashSet<String> exportList = new HashSet<...
[ "public", "void", "handleGetExportTypes", "(", "String", "jsonp", ",", "HttpServletResponse", "response", ")", "throws", "IOException", ",", "ServletException", "{", "if", "(", "jsonp", "!=", "null", ")", "{", "response", ".", "getWriter", "(", ")", ".", "writ...
Handle GET for export types
[ "Handle", "GET", "for", "export", "types" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/DeploymentRequestServlet.java#L565-L587
60,731
VoltDB/voltdb
src/frontend/org/voltdb/RestoreAgent.java
RestoreAgent.createZKDirectory
void createZKDirectory(String path) { try { try { m_zk.create(path, new byte[0], Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); } catch (KeeperException e) { if (e.code() != Code.NODEEXISTS) { throw e; ...
java
void createZKDirectory(String path) { try { try { m_zk.create(path, new byte[0], Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); } catch (KeeperException e) { if (e.code() != Code.NODEEXISTS) { throw e; ...
[ "void", "createZKDirectory", "(", "String", "path", ")", "{", "try", "{", "try", "{", "m_zk", ".", "create", "(", "path", ",", "new", "byte", "[", "0", "]", ",", "Ids", ".", "OPEN_ACL_UNSAFE", ",", "CreateMode", ".", "PERSISTENT", ")", ";", "}", "cat...
Creates a ZooKeeper directory if it doesn't exist. Crashes VoltDB if the creation fails for any reason other then the path already existing. @param path
[ "Creates", "a", "ZooKeeper", "directory", "if", "it", "doesn", "t", "exist", ".", "Crashes", "VoltDB", "if", "the", "creation", "fails", "for", "any", "reason", "other", "then", "the", "path", "already", "existing", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RestoreAgent.java#L420-L434
60,732
VoltDB/voltdb
src/frontend/org/voltdb/RestoreAgent.java
RestoreAgent.findRestoreCatalog
public Pair<Integer, String> findRestoreCatalog() { enterRestore(); try { m_snapshotToRestore = generatePlans(); } catch (Exception e) { VoltDB.crashGlobalVoltDB(e.getMessage(), true, e); } if (m_snapshotToRestore != null) { int hostId = m_sn...
java
public Pair<Integer, String> findRestoreCatalog() { enterRestore(); try { m_snapshotToRestore = generatePlans(); } catch (Exception e) { VoltDB.crashGlobalVoltDB(e.getMessage(), true, e); } if (m_snapshotToRestore != null) { int hostId = m_sn...
[ "public", "Pair", "<", "Integer", ",", "String", ">", "findRestoreCatalog", "(", ")", "{", "enterRestore", "(", ")", ";", "try", "{", "m_snapshotToRestore", "=", "generatePlans", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "VoltDB", "."...
Generate restore and replay plans and return the catalog associated with the snapshot to restore if there is anything to restore. @return The (host ID, catalog path) pair, or null if there is no snapshot to restore.
[ "Generate", "restore", "and", "replay", "plans", "and", "return", "the", "catalog", "associated", "with", "the", "snapshot", "to", "restore", "if", "there", "is", "anything", "to", "restore", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RestoreAgent.java#L529-L547
60,733
VoltDB/voltdb
src/frontend/org/voltdb/RestoreAgent.java
RestoreAgent.enterRestore
void enterRestore() { createZKDirectory(VoltZK.restore); createZKDirectory(VoltZK.restore_barrier); createZKDirectory(VoltZK.restore_barrier2); try { m_generatedRestoreBarrier2 = m_zk.create(VoltZK.restore_barrier2 + "/counter", null, Ids.OPEN_ACL_UNS...
java
void enterRestore() { createZKDirectory(VoltZK.restore); createZKDirectory(VoltZK.restore_barrier); createZKDirectory(VoltZK.restore_barrier2); try { m_generatedRestoreBarrier2 = m_zk.create(VoltZK.restore_barrier2 + "/counter", null, Ids.OPEN_ACL_UNS...
[ "void", "enterRestore", "(", ")", "{", "createZKDirectory", "(", "VoltZK", ".", "restore", ")", ";", "createZKDirectory", "(", "VoltZK", ".", "restore_barrier", ")", ";", "createZKDirectory", "(", "VoltZK", ".", "restore_barrier2", ")", ";", "try", "{", "m_gen...
Enters the restore process. Creates ZooKeeper barrier node for this host.
[ "Enters", "the", "restore", "process", ".", "Creates", "ZooKeeper", "barrier", "node", "for", "this", "host", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RestoreAgent.java#L552-L564
60,734
VoltDB/voltdb
src/frontend/org/voltdb/RestoreAgent.java
RestoreAgent.exitRestore
void exitRestore() { try { m_zk.delete(m_generatedRestoreBarrier2, -1); } catch (Exception e) { VoltDB.crashLocalVoltDB("Unable to delete zk node " + m_generatedRestoreBarrier2, false, e); } if (m_callback != null) { m_callback.onSnapshotRestoreComple...
java
void exitRestore() { try { m_zk.delete(m_generatedRestoreBarrier2, -1); } catch (Exception e) { VoltDB.crashLocalVoltDB("Unable to delete zk node " + m_generatedRestoreBarrier2, false, e); } if (m_callback != null) { m_callback.onSnapshotRestoreComple...
[ "void", "exitRestore", "(", ")", "{", "try", "{", "m_zk", ".", "delete", "(", "m_generatedRestoreBarrier2", ",", "-", "1", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "VoltDB", ".", "crashLocalVoltDB", "(", "\"Unable to delete zk node \"", "+", ...
Exists the restore process. Waits for all other hosts to complete first. This method blocks.
[ "Exists", "the", "restore", "process", ".", "Waits", "for", "all", "other", "hosts", "to", "complete", "first", ".", "This", "method", "blocks", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RestoreAgent.java#L570-L607
60,735
VoltDB/voltdb
src/frontend/org/voltdb/RestoreAgent.java
RestoreAgent.consolidateSnapshotInfos
static SnapshotInfo consolidateSnapshotInfos(Collection<SnapshotInfo> lastSnapshot) { SnapshotInfo chosen = null; if (lastSnapshot != null) { Iterator<SnapshotInfo> i = lastSnapshot.iterator(); while (i.hasNext()) { SnapshotInfo next = i.next(); ...
java
static SnapshotInfo consolidateSnapshotInfos(Collection<SnapshotInfo> lastSnapshot) { SnapshotInfo chosen = null; if (lastSnapshot != null) { Iterator<SnapshotInfo> i = lastSnapshot.iterator(); while (i.hasNext()) { SnapshotInfo next = i.next(); ...
[ "static", "SnapshotInfo", "consolidateSnapshotInfos", "(", "Collection", "<", "SnapshotInfo", ">", "lastSnapshot", ")", "{", "SnapshotInfo", "chosen", "=", "null", ";", "if", "(", "lastSnapshot", "!=", "null", ")", "{", "Iterator", "<", "SnapshotInfo", ">", "i",...
Picks a snapshot info for restore. A single snapshot might have different files scattered across multiple machines. All nodes must pick the same SnapshotInfo or different nodes will pick different catalogs to restore. Pick one SnapshotInfo and consolidate the per-node state into it.
[ "Picks", "a", "snapshot", "info", "for", "restore", ".", "A", "single", "snapshot", "might", "have", "different", "files", "scattered", "across", "multiple", "machines", ".", "All", "nodes", "must", "pick", "the", "same", "SnapshotInfo", "or", "different", "no...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RestoreAgent.java#L906-L926
60,736
VoltDB/voltdb
src/frontend/org/voltdb/RestoreAgent.java
RestoreAgent.sendSnapshotTxnId
private void sendSnapshotTxnId(SnapshotInfo toRestore) { long txnId = toRestore != null ? toRestore.txnId : 0; String jsonData = toRestore != null ? toRestore.toJSONObject().toString() : "{}"; LOG.debug("Sending snapshot ID " + txnId + " for restore to other nodes"); try { m_...
java
private void sendSnapshotTxnId(SnapshotInfo toRestore) { long txnId = toRestore != null ? toRestore.txnId : 0; String jsonData = toRestore != null ? toRestore.toJSONObject().toString() : "{}"; LOG.debug("Sending snapshot ID " + txnId + " for restore to other nodes"); try { m_...
[ "private", "void", "sendSnapshotTxnId", "(", "SnapshotInfo", "toRestore", ")", "{", "long", "txnId", "=", "toRestore", "!=", "null", "?", "toRestore", ".", "txnId", ":", "0", ";", "String", "jsonData", "=", "toRestore", "!=", "null", "?", "toRestore", ".", ...
Send the txnId of the snapshot that was picked to restore from to the other hosts. If there was no snapshot to restore from, send 0. @param txnId
[ "Send", "the", "txnId", "of", "the", "snapshot", "that", "was", "picked", "to", "restore", "from", "to", "the", "other", "hosts", ".", "If", "there", "was", "no", "snapshot", "to", "restore", "from", "send", "0", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RestoreAgent.java#L934-L945
60,737
VoltDB/voltdb
src/frontend/org/voltdb/RestoreAgent.java
RestoreAgent.sendLocalRestoreInformation
private void sendLocalRestoreInformation(Long max, Set<SnapshotInfo> snapshots) { String jsonData = serializeRestoreInformation(max, snapshots); String zkNode = VoltZK.restore + "/" + m_hostId; try { m_zk.create(zkNode, jsonData.getBytes(StandardCharsets.UTF_8), ...
java
private void sendLocalRestoreInformation(Long max, Set<SnapshotInfo> snapshots) { String jsonData = serializeRestoreInformation(max, snapshots); String zkNode = VoltZK.restore + "/" + m_hostId; try { m_zk.create(zkNode, jsonData.getBytes(StandardCharsets.UTF_8), ...
[ "private", "void", "sendLocalRestoreInformation", "(", "Long", "max", ",", "Set", "<", "SnapshotInfo", ">", "snapshots", ")", "{", "String", "jsonData", "=", "serializeRestoreInformation", "(", "max", ",", "snapshots", ")", ";", "String", "zkNode", "=", "VoltZK"...
Send the information about the local snapshot files to the other hosts to generate restore plan. @param max The maximum txnId of the last txn across all initiators in the local command log. @param snapshots The information of the local snapshot files.
[ "Send", "the", "information", "about", "the", "local", "snapshot", "files", "to", "the", "other", "hosts", "to", "generate", "restore", "plan", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RestoreAgent.java#L987-L997
60,738
VoltDB/voltdb
src/frontend/org/voltdb/RestoreAgent.java
RestoreAgent.deserializeRestoreInformation
private Long deserializeRestoreInformation(List<String> children, Map<String, Set<SnapshotInfo>> snapshotFragments) throws Exception { try { int recover = m_action.ordinal(); Long clStartTxnId = null; for (String node : children) { //This might...
java
private Long deserializeRestoreInformation(List<String> children, Map<String, Set<SnapshotInfo>> snapshotFragments) throws Exception { try { int recover = m_action.ordinal(); Long clStartTxnId = null; for (String node : children) { //This might...
[ "private", "Long", "deserializeRestoreInformation", "(", "List", "<", "String", ">", "children", ",", "Map", "<", "String", ",", "Set", "<", "SnapshotInfo", ">", ">", "snapshotFragments", ")", "throws", "Exception", "{", "try", "{", "int", "recover", "=", "m...
This function, like all good functions, does three things. It produces the command log start transaction Id. It produces a map of SnapshotInfo objects. And, it errors if the remote start action does not match the local action.
[ "This", "function", "like", "all", "good", "functions", "does", "three", "things", ".", "It", "produces", "the", "command", "log", "start", "transaction", "Id", ".", "It", "produces", "a", "map", "of", "SnapshotInfo", "objects", ".", "And", "it", "errors", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RestoreAgent.java#L1180-L1228
60,739
VoltDB/voltdb
src/frontend/org/voltdb/RestoreAgent.java
RestoreAgent.changeState
private void changeState() { if (m_state == State.RESTORE) { fetchSnapshotTxnId(); exitRestore(); m_state = State.REPLAY; /* * Add the interest here so that we can use the barriers in replay * agent to synchronize. */ ...
java
private void changeState() { if (m_state == State.RESTORE) { fetchSnapshotTxnId(); exitRestore(); m_state = State.REPLAY; /* * Add the interest here so that we can use the barriers in replay * agent to synchronize. */ ...
[ "private", "void", "changeState", "(", ")", "{", "if", "(", "m_state", "==", "State", ".", "RESTORE", ")", "{", "fetchSnapshotTxnId", "(", ")", ";", "exitRestore", "(", ")", ";", "m_state", "=", "State", ".", "REPLAY", ";", "/*\n * Add the intere...
Change the state of the restore agent based on the current state.
[ "Change", "the", "state", "of", "the", "restore", "agent", "based", "on", "the", "current", "state", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RestoreAgent.java#L1285-L1311
60,740
VoltDB/voltdb
src/frontend/org/voltdb/RestoreAgent.java
RestoreAgent.getSnapshots
private Map<String, Snapshot> getSnapshots() { /* * Use the individual snapshot directories instead of voltroot, because * they can be set individually */ Map<String, SnapshotPathType> paths = new HashMap<String, SnapshotPathType>(); if (VoltDB.instance().getConfig().m...
java
private Map<String, Snapshot> getSnapshots() { /* * Use the individual snapshot directories instead of voltroot, because * they can be set individually */ Map<String, SnapshotPathType> paths = new HashMap<String, SnapshotPathType>(); if (VoltDB.instance().getConfig().m...
[ "private", "Map", "<", "String", ",", "Snapshot", ">", "getSnapshots", "(", ")", "{", "/*\n * Use the individual snapshot directories instead of voltroot, because\n * they can be set individually\n */", "Map", "<", "String", ",", "SnapshotPathType", ">", "...
Finds all the snapshots in all the places we know of which could possibly store snapshots, like command log snapshots, auto snapshots, etc. @return All snapshots
[ "Finds", "all", "the", "snapshots", "in", "all", "the", "places", "we", "know", "of", "which", "could", "possibly", "store", "snapshots", "like", "command", "log", "snapshots", "auto", "snapshots", "etc", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RestoreAgent.java#L1383-L1405
60,741
VoltDB/voltdb
src/frontend/org/voltdb/RestoreAgent.java
RestoreAgent.snapshotCompleted
@Override public CountDownLatch snapshotCompleted(SnapshotCompletionEvent event) { if (!event.truncationSnapshot || !event.didSucceed) { VoltDB.crashGlobalVoltDB("Failed to truncate command logs by snapshot", false, null); } else { m_trunc...
java
@Override public CountDownLatch snapshotCompleted(SnapshotCompletionEvent event) { if (!event.truncationSnapshot || !event.didSucceed) { VoltDB.crashGlobalVoltDB("Failed to truncate command logs by snapshot", false, null); } else { m_trunc...
[ "@", "Override", "public", "CountDownLatch", "snapshotCompleted", "(", "SnapshotCompletionEvent", "event", ")", "{", "if", "(", "!", "event", ".", "truncationSnapshot", "||", "!", "event", ".", "didSucceed", ")", "{", "VoltDB", ".", "crashGlobalVoltDB", "(", "\"...
All nodes will be notified about the completion of the truncation snapshot.
[ "All", "nodes", "will", "be", "notified", "about", "the", "completion", "of", "the", "truncation", "snapshot", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RestoreAgent.java#L1411-L1423
60,742
VoltDB/voltdb
src/frontend/org/voltcore/network/VoltNetwork.java
VoltNetwork.shutdown
void shutdown() throws InterruptedException { m_shouldStop = true; if (m_thread != null) { m_selector.wakeup(); m_thread.join(); } }
java
void shutdown() throws InterruptedException { m_shouldStop = true; if (m_thread != null) { m_selector.wakeup(); m_thread.join(); } }
[ "void", "shutdown", "(", ")", "throws", "InterruptedException", "{", "m_shouldStop", "=", "true", ";", "if", "(", "m_thread", "!=", "null", ")", "{", "m_selector", ".", "wakeup", "(", ")", ";", "m_thread", ".", "join", "(", ")", ";", "}", "}" ]
Instruct the network to stop after the current loop
[ "Instruct", "the", "network", "to", "stop", "after", "the", "current", "loop" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/network/VoltNetwork.java#L148-L154
60,743
VoltDB/voltdb
src/frontend/org/voltcore/network/VoltNetwork.java
VoltNetwork.registerChannel
Connection registerChannel( final SocketChannel channel, final InputHandler handler, final int interestOps, final ReverseDNSPolicy dns, final CipherExecutor cipherService, final SSLEngine sslEngine) throws IOException { synchronized(channe...
java
Connection registerChannel( final SocketChannel channel, final InputHandler handler, final int interestOps, final ReverseDNSPolicy dns, final CipherExecutor cipherService, final SSLEngine sslEngine) throws IOException { synchronized(channe...
[ "Connection", "registerChannel", "(", "final", "SocketChannel", "channel", ",", "final", "InputHandler", "handler", ",", "final", "int", "interestOps", ",", "final", "ReverseDNSPolicy", "dns", ",", "final", "CipherExecutor", "cipherService", ",", "final", "SSLEngine",...
Register a channel with the selector and create a Connection that will pass incoming events to the provided handler. @param channel @param handler @throws IOException
[ "Register", "a", "channel", "with", "the", "selector", "and", "create", "a", "Connection", "that", "will", "pass", "incoming", "events", "to", "the", "provided", "handler", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/network/VoltNetwork.java#L170-L235
60,744
VoltDB/voltdb
src/frontend/org/voltcore/network/VoltNetwork.java
VoltNetwork.unregisterChannel
Future<?> unregisterChannel (Connection c) { FutureTask<Object> ft = new FutureTask<Object>(getUnregisterRunnable(c), null); m_tasks.offer(ft); m_selector.wakeup(); return ft; }
java
Future<?> unregisterChannel (Connection c) { FutureTask<Object> ft = new FutureTask<Object>(getUnregisterRunnable(c), null); m_tasks.offer(ft); m_selector.wakeup(); return ft; }
[ "Future", "<", "?", ">", "unregisterChannel", "(", "Connection", "c", ")", "{", "FutureTask", "<", "Object", ">", "ft", "=", "new", "FutureTask", "<", "Object", ">", "(", "getUnregisterRunnable", "(", "c", ")", ",", "null", ")", ";", "m_tasks", ".", "o...
Unregister a channel. The connections streams are not drained before finishing. @param c
[ "Unregister", "a", "channel", ".", "The", "connections", "streams", "are", "not", "drained", "before", "finishing", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/network/VoltNetwork.java#L271-L276
60,745
VoltDB/voltdb
src/frontend/org/voltcore/network/VoltNetwork.java
VoltNetwork.addToChangeList
void addToChangeList(final VoltPort port, final boolean runFirst) { if (runFirst) { m_tasks.offer(new Runnable() { @Override public void run() { callPort(port); } }); } else { m_tasks.offer(new Runnab...
java
void addToChangeList(final VoltPort port, final boolean runFirst) { if (runFirst) { m_tasks.offer(new Runnable() { @Override public void run() { callPort(port); } }); } else { m_tasks.offer(new Runnab...
[ "void", "addToChangeList", "(", "final", "VoltPort", "port", ",", "final", "boolean", "runFirst", ")", "{", "if", "(", "runFirst", ")", "{", "m_tasks", ".", "offer", "(", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "void", "run", "(", ...
Set interest registrations for a port
[ "Set", "interest", "registrations", "for", "a", "port" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/network/VoltNetwork.java#L283-L300
60,746
VoltDB/voltdb
src/frontend/org/voltcore/network/VoltNetwork.java
VoltNetwork.invokeCallbacks
protected void invokeCallbacks(ThreadLocalRandom r) { final Set<SelectionKey> selectedKeys = m_selector.selectedKeys(); final int keyCount = selectedKeys.size(); int startInx = r.nextInt(keyCount); int itInx = 0; Iterator<SelectionKey> it = selectedKeys.iterator(); while(...
java
protected void invokeCallbacks(ThreadLocalRandom r) { final Set<SelectionKey> selectedKeys = m_selector.selectedKeys(); final int keyCount = selectedKeys.size(); int startInx = r.nextInt(keyCount); int itInx = 0; Iterator<SelectionKey> it = selectedKeys.iterator(); while(...
[ "protected", "void", "invokeCallbacks", "(", "ThreadLocalRandom", "r", ")", "{", "final", "Set", "<", "SelectionKey", ">", "selectedKeys", "=", "m_selector", ".", "selectedKeys", "(", ")", ";", "final", "int", "keyCount", "=", "selectedKeys", ".", "size", "(",...
Set the selected interest set on the port and run it.
[ "Set", "the", "selected", "interest", "set", "on", "the", "port", "and", "run", "it", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/network/VoltNetwork.java#L444-L475
60,747
VoltDB/voltdb
src/frontend/org/voltcore/zk/ZKUtil.java
ZKUtil.path
public static String path(String... components) { String path = components[0]; for (int i=1; i < components.length; i++) { path = ZKUtil.joinZKPath(path, components[i]); } return path; }
java
public static String path(String... components) { String path = components[0]; for (int i=1; i < components.length; i++) { path = ZKUtil.joinZKPath(path, components[i]); } return path; }
[ "public", "static", "String", "path", "(", "String", "...", "components", ")", "{", "String", "path", "=", "components", "[", "0", "]", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "components", ".", "length", ";", "i", "++", ")", "{", "...
Helper to produce a valid path from variadic strings.
[ "Helper", "to", "produce", "a", "valid", "path", "from", "variadic", "strings", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/ZKUtil.java#L78-L85
60,748
VoltDB/voltdb
src/frontend/org/voltdb/utils/PersistentBinaryDeque.java
PersistentBinaryDeque.getSegmentFileName
private String getSegmentFileName(long currentId, long previousId) { return PbdSegmentName.createName(m_nonce, currentId, previousId, false); }
java
private String getSegmentFileName(long currentId, long previousId) { return PbdSegmentName.createName(m_nonce, currentId, previousId, false); }
[ "private", "String", "getSegmentFileName", "(", "long", "currentId", ",", "long", "previousId", ")", "{", "return", "PbdSegmentName", ".", "createName", "(", "m_nonce", ",", "currentId", ",", "previousId", ",", "false", ")", ";", "}" ]
Return a segment file name from m_nonce and current + previous segment ids. @see parseFiles for file name structure @param currentId current segment id @param previousId previous segment id @return segment file name
[ "Return", "a", "segment", "file", "name", "from", "m_nonce", "and", "current", "+", "previous", "segment", "ids", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/PersistentBinaryDeque.java#L463-L465
60,749
VoltDB/voltdb
src/frontend/org/voltdb/utils/PersistentBinaryDeque.java
PersistentBinaryDeque.getPreviousSegmentId
private long getPreviousSegmentId(File file) { PbdSegmentName segmentName = PbdSegmentName.parseFile(m_usageSpecificLog, file); if (segmentName.m_result != PbdSegmentName.Result.OK) { throw new IllegalStateException("Invalid file name: " + file.getName()); } return segmentNam...
java
private long getPreviousSegmentId(File file) { PbdSegmentName segmentName = PbdSegmentName.parseFile(m_usageSpecificLog, file); if (segmentName.m_result != PbdSegmentName.Result.OK) { throw new IllegalStateException("Invalid file name: " + file.getName()); } return segmentNam...
[ "private", "long", "getPreviousSegmentId", "(", "File", "file", ")", "{", "PbdSegmentName", "segmentName", "=", "PbdSegmentName", ".", "parseFile", "(", "m_usageSpecificLog", ",", "file", ")", ";", "if", "(", "segmentName", ".", "m_result", "!=", "PbdSegmentName",...
Extract the previous segment id from a file name. Note that the filename is assumed valid at this point. @see parseFiles for file name structure @param file @return
[ "Extract", "the", "previous", "segment", "id", "from", "a", "file", "name", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/PersistentBinaryDeque.java#L476-L482
60,750
VoltDB/voltdb
src/frontend/org/voltdb/utils/PersistentBinaryDeque.java
PersistentBinaryDeque.deleteStalePbdFile
private void deleteStalePbdFile(File file) throws IOException { try { PBDSegment.setFinal(file, false); if (m_usageSpecificLog.isDebugEnabled()) { m_usageSpecificLog.debug("Segment " + file.getName() + " (final: " + PBDSegment.isFinal(file) + "), will be c...
java
private void deleteStalePbdFile(File file) throws IOException { try { PBDSegment.setFinal(file, false); if (m_usageSpecificLog.isDebugEnabled()) { m_usageSpecificLog.debug("Segment " + file.getName() + " (final: " + PBDSegment.isFinal(file) + "), will be c...
[ "private", "void", "deleteStalePbdFile", "(", "File", "file", ")", "throws", "IOException", "{", "try", "{", "PBDSegment", ".", "setFinal", "(", "file", ",", "false", ")", ";", "if", "(", "m_usageSpecificLog", ".", "isDebugEnabled", "(", ")", ")", "{", "m_...
Delete a PBD segment that was identified as 'stale' i.e. produced by earlier VoltDB releases Note that this file may be concurrently deleted from multiple instances so we ignore NoSuchFileException. @param file @throws IOException
[ "Delete", "a", "PBD", "segment", "that", "was", "identified", "as", "stale", "i", ".", "e", ".", "produced", "by", "earlier", "VoltDB", "releases" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/PersistentBinaryDeque.java#L595-L610
60,751
VoltDB/voltdb
src/frontend/org/voltdb/utils/PersistentBinaryDeque.java
PersistentBinaryDeque.recoverSegment
private void recoverSegment(long segmentIndex, long segmentId, PbdSegmentName segmentName) throws IOException { PBDSegment segment; if (segmentName.m_quarantined) { segment = new PbdQuarantinedSegment(segmentName.m_file, segmentIndex, segmentId); } else { segment = newSeg...
java
private void recoverSegment(long segmentIndex, long segmentId, PbdSegmentName segmentName) throws IOException { PBDSegment segment; if (segmentName.m_quarantined) { segment = new PbdQuarantinedSegment(segmentName.m_file, segmentIndex, segmentId); } else { segment = newSeg...
[ "private", "void", "recoverSegment", "(", "long", "segmentIndex", ",", "long", "segmentId", ",", "PbdSegmentName", "segmentName", ")", "throws", "IOException", "{", "PBDSegment", "segment", ";", "if", "(", "segmentName", ".", "m_quarantined", ")", "{", "segment", ...
Recover a PBD segment and add it to m_segments @param segment @param deleteEmpty @throws IOException
[ "Recover", "a", "PBD", "segment", "and", "add", "it", "to", "m_segments" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/PersistentBinaryDeque.java#L663-L702
60,752
VoltDB/voltdb
src/frontend/org/voltdb/utils/PersistentBinaryDeque.java
PersistentBinaryDeque.numOpenSegments
int numOpenSegments() { int numOpen = 0; for (PBDSegment segment : m_segments.values()) { if (!segment.isClosed()) { numOpen++; } } return numOpen; }
java
int numOpenSegments() { int numOpen = 0; for (PBDSegment segment : m_segments.values()) { if (!segment.isClosed()) { numOpen++; } } return numOpen; }
[ "int", "numOpenSegments", "(", ")", "{", "int", "numOpen", "=", "0", ";", "for", "(", "PBDSegment", "segment", ":", "m_segments", ".", "values", "(", ")", ")", "{", "if", "(", "!", "segment", ".", "isClosed", "(", ")", ")", "{", "numOpen", "++", ";...
Used by test only
[ "Used", "by", "test", "only" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/PersistentBinaryDeque.java#L1252-L1261
60,753
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/cache/CacheBuilder.java
CacheBuilder.expireAfterWrite
public CacheBuilder<K, V> expireAfterWrite(long duration, TimeUnit unit) { checkState( expireAfterWriteNanos == UNSET_INT, "expireAfterWrite was already set to %s ns", expireAfterWriteNanos); checkArgument(duration >= 0, "duration cannot be negative: %s %s", duration, unit); this.exp...
java
public CacheBuilder<K, V> expireAfterWrite(long duration, TimeUnit unit) { checkState( expireAfterWriteNanos == UNSET_INT, "expireAfterWrite was already set to %s ns", expireAfterWriteNanos); checkArgument(duration >= 0, "duration cannot be negative: %s %s", duration, unit); this.exp...
[ "public", "CacheBuilder", "<", "K", ",", "V", ">", "expireAfterWrite", "(", "long", "duration", ",", "TimeUnit", "unit", ")", "{", "checkState", "(", "expireAfterWriteNanos", "==", "UNSET_INT", ",", "\"expireAfterWrite was already set to %s ns\"", ",", "expireAfterWri...
Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value. <p>When {@code duration} is zero, this method hands off to {@link #maximumSize(long) maximumSize}{@code (0)}, ignoring any otherwise-specif...
[ "Specifies", "that", "each", "entry", "should", "be", "automatically", "removed", "from", "the", "cache", "once", "a", "fixed", "duration", "has", "elapsed", "after", "the", "entry", "s", "creation", "or", "the", "most", "recent", "replacement", "of", "its", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/cache/CacheBuilder.java#L621-L629
60,754
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/rights/Grantee.java
Grantee.revoke
public void revoke(Grantee role) { if (!hasRoleDirect(role)) { throw Error.error(ErrorCode.X_0P503, role.getNameString()); } roles.remove(role); }
java
public void revoke(Grantee role) { if (!hasRoleDirect(role)) { throw Error.error(ErrorCode.X_0P503, role.getNameString()); } roles.remove(role); }
[ "public", "void", "revoke", "(", "Grantee", "role", ")", "{", "if", "(", "!", "hasRoleDirect", "(", "role", ")", ")", "{", "throw", "Error", ".", "error", "(", "ErrorCode", ".", "X_0P503", ",", "role", ".", "getNameString", "(", ")", ")", ";", "}", ...
Revoke a direct role only
[ "Revoke", "a", "direct", "role", "only" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/Grantee.java#L224-L231
60,755
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/rights/Grantee.java
Grantee.addGranteeAndRoles
private OrderedHashSet addGranteeAndRoles(OrderedHashSet set) { Grantee candidateRole; set.add(this); for (int i = 0; i < roles.size(); i++) { candidateRole = (Grantee) roles.get(i); if (!set.contains(candidateRole)) { candidateRole.addGranteeAndRoles(...
java
private OrderedHashSet addGranteeAndRoles(OrderedHashSet set) { Grantee candidateRole; set.add(this); for (int i = 0; i < roles.size(); i++) { candidateRole = (Grantee) roles.get(i); if (!set.contains(candidateRole)) { candidateRole.addGranteeAndRoles(...
[ "private", "OrderedHashSet", "addGranteeAndRoles", "(", "OrderedHashSet", "set", ")", "{", "Grantee", "candidateRole", ";", "set", ".", "add", "(", "this", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "roles", ".", "size", "(", ")", ";", ...
Adds to given Set this.sName plus all roles and nested roles. @return Given role with new elements added.
[ "Adds", "to", "given", "Set", "this", ".", "sName", "plus", "all", "roles", "and", "nested", "roles", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/Grantee.java#L302-L317
60,756
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/rights/Grantee.java
Grantee.addAllRoles
public void addAllRoles(HashMap map) { for (int i = 0; i < roles.size(); i++) { Grantee role = (Grantee) roles.get(i); map.put(role.granteeName.name, role.roles); } }
java
public void addAllRoles(HashMap map) { for (int i = 0; i < roles.size(); i++) { Grantee role = (Grantee) roles.get(i); map.put(role.granteeName.name, role.roles); } }
[ "public", "void", "addAllRoles", "(", "HashMap", "map", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "roles", ".", "size", "(", ")", ";", "i", "++", ")", "{", "Grantee", "role", "=", "(", "Grantee", ")", "roles", ".", "get", "(", ...
returns a map with grantee name keys and sets of granted roles as value
[ "returns", "a", "map", "with", "grantee", "name", "keys", "and", "sets", "of", "granted", "roles", "as", "value" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/Grantee.java#L322-L329
60,757
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/rights/Grantee.java
Grantee.clearPrivileges
void clearPrivileges() { roles.clear(); directRightsMap.clear(); grantedRightsMap.clear(); fullRightsMap.clear(); isAdmin = false; }
java
void clearPrivileges() { roles.clear(); directRightsMap.clear(); grantedRightsMap.clear(); fullRightsMap.clear(); isAdmin = false; }
[ "void", "clearPrivileges", "(", ")", "{", "roles", ".", "clear", "(", ")", ";", "directRightsMap", ".", "clear", "(", ")", ";", "grantedRightsMap", ".", "clear", "(", ")", ";", "fullRightsMap", ".", "clear", "(", ")", ";", "isAdmin", "=", "false", ";",...
Revokes all rights from this Grantee object. The map is cleared and the database administrator role attribute is set false.
[ "Revokes", "all", "rights", "from", "this", "Grantee", "object", ".", "The", "map", "is", "cleared", "and", "the", "database", "administrator", "role", "attribute", "is", "set", "false", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/Grantee.java#L473-L481
60,758
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/rights/Grantee.java
Grantee.updateNestedRoles
boolean updateNestedRoles(Grantee role) { boolean hasNested = false; if (role != this) { for (int i = 0; i < roles.size(); i++) { Grantee currentRole = (Grantee) roles.get(i); hasNested |= currentRole.updateNestedRoles(role); } } ...
java
boolean updateNestedRoles(Grantee role) { boolean hasNested = false; if (role != this) { for (int i = 0; i < roles.size(); i++) { Grantee currentRole = (Grantee) roles.get(i); hasNested |= currentRole.updateNestedRoles(role); } } ...
[ "boolean", "updateNestedRoles", "(", "Grantee", "role", ")", "{", "boolean", "hasNested", "=", "false", ";", "if", "(", "role", "!=", "this", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "roles", ".", "size", "(", ")", ";", "i", "++...
Recursive method used with ROLE Grantee objects to set the fullRightsMap and admin flag for all the roles. If a new ROLE is granted to a ROLE Grantee object, the ROLE should first be added to the Set of ROLE Grantee objects (roles) for the grantee. The grantee will be the parameter. If the direct permissions granted ...
[ "Recursive", "method", "used", "with", "ROLE", "Grantee", "objects", "to", "set", "the", "fullRightsMap", "and", "admin", "flag", "for", "all", "the", "roles", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/Grantee.java#L805-L822
60,759
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/rights/Grantee.java
Grantee.addToFullRights
void addToFullRights(HashMap map) { Iterator it = map.keySet().iterator(); while (it.hasNext()) { Object key = it.next(); Right add = (Right) map.get(key); Right existing = (Right) fullRightsMap.get(key); if (existing == null) { ...
java
void addToFullRights(HashMap map) { Iterator it = map.keySet().iterator(); while (it.hasNext()) { Object key = it.next(); Right add = (Right) map.get(key); Right existing = (Right) fullRightsMap.get(key); if (existing == null) { ...
[ "void", "addToFullRights", "(", "HashMap", "map", ")", "{", "Iterator", "it", "=", "map", ".", "keySet", "(", ")", ".", "iterator", "(", ")", ";", "while", "(", "it", ".", "hasNext", "(", ")", ")", "{", "Object", "key", "=", "it", ".", "next", "(...
Full or partial rights are added to existing
[ "Full", "or", "partial", "rights", "are", "added", "to", "existing" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/Grantee.java#L858-L885
60,760
VoltDB/voltdb
src/frontend/org/voltdb/planner/parseinfo/BranchNode.java
BranchNode.toLeftJoin
public void toLeftJoin() { assert((m_leftNode != null && m_rightNode != null) || (m_leftNode == null && m_rightNode == null)); if (m_leftNode == null && m_rightNode == null) { // End of recursion return; } // recursive calls if (m_leftNode instanceof Branc...
java
public void toLeftJoin() { assert((m_leftNode != null && m_rightNode != null) || (m_leftNode == null && m_rightNode == null)); if (m_leftNode == null && m_rightNode == null) { // End of recursion return; } // recursive calls if (m_leftNode instanceof Branc...
[ "public", "void", "toLeftJoin", "(", ")", "{", "assert", "(", "(", "m_leftNode", "!=", "null", "&&", "m_rightNode", "!=", "null", ")", "||", "(", "m_leftNode", "==", "null", "&&", "m_rightNode", "==", "null", ")", ")", ";", "if", "(", "m_leftNode", "==...
Transform all RIGHT joins from the tree into the LEFT ones by swapping the nodes and their join types
[ "Transform", "all", "RIGHT", "joins", "from", "the", "tree", "into", "the", "LEFT", "ones", "by", "swapping", "the", "nodes", "and", "their", "join", "types" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/BranchNode.java#L321-L342
60,761
VoltDB/voltdb
src/frontend/org/voltdb/planner/parseinfo/BranchNode.java
BranchNode.extractSubTree
@Override protected void extractSubTree(List<JoinNode> leafNodes) { JoinNode[] children = {m_leftNode, m_rightNode}; for (JoinNode child : children) { // Leaf nodes don't have a significant join type, // test for them first and never attempt to start a new tree at a leaf. ...
java
@Override protected void extractSubTree(List<JoinNode> leafNodes) { JoinNode[] children = {m_leftNode, m_rightNode}; for (JoinNode child : children) { // Leaf nodes don't have a significant join type, // test for them first and never attempt to start a new tree at a leaf. ...
[ "@", "Override", "protected", "void", "extractSubTree", "(", "List", "<", "JoinNode", ">", "leafNodes", ")", "{", "JoinNode", "[", "]", "children", "=", "{", "m_leftNode", ",", "m_rightNode", "}", ";", "for", "(", "JoinNode", "child", ":", "children", ")",...
Starting from the root recurse to its children stopping at the first join node of the different type and discontinue the tree at this point by replacing the join node with the temporary node which id matches the join node id. This join node is the root of the next sub-tree. @param root - The root of the join tree @para...
[ "Starting", "from", "the", "root", "recurse", "to", "its", "children", "stopping", "at", "the", "first", "join", "node", "of", "the", "different", "type", "and", "discontinue", "the", "tree", "at", "this", "point", "by", "replacing", "the", "join", "node", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/BranchNode.java#L352-L381
60,762
VoltDB/voltdb
src/frontend/org/voltdb/planner/parseinfo/BranchNode.java
BranchNode.hasOuterJoin
@Override public boolean hasOuterJoin() { assert(m_leftNode != null && m_rightNode != null); return m_joinType != JoinType.INNER || m_leftNode.hasOuterJoin() || m_rightNode.hasOuterJoin(); }
java
@Override public boolean hasOuterJoin() { assert(m_leftNode != null && m_rightNode != null); return m_joinType != JoinType.INNER || m_leftNode.hasOuterJoin() || m_rightNode.hasOuterJoin(); }
[ "@", "Override", "public", "boolean", "hasOuterJoin", "(", ")", "{", "assert", "(", "m_leftNode", "!=", "null", "&&", "m_rightNode", "!=", "null", ")", ";", "return", "m_joinType", "!=", "JoinType", ".", "INNER", "||", "m_leftNode", ".", "hasOuterJoin", "(",...
Returns true if one of the tree nodes has outer join
[ "Returns", "true", "if", "one", "of", "the", "tree", "nodes", "has", "outer", "join" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/BranchNode.java#L386-L391
60,763
VoltDB/voltdb
src/frontend/org/voltdb/planner/parseinfo/BranchNode.java
BranchNode.extractEphemeralTableQueries
@Override public void extractEphemeralTableQueries(List<StmtEphemeralTableScan> scans) { if (m_leftNode != null) { m_leftNode.extractEphemeralTableQueries(scans); } if (m_rightNode != null) { m_rightNode.extractEphemeralTableQueries(scans); } }
java
@Override public void extractEphemeralTableQueries(List<StmtEphemeralTableScan> scans) { if (m_leftNode != null) { m_leftNode.extractEphemeralTableQueries(scans); } if (m_rightNode != null) { m_rightNode.extractEphemeralTableQueries(scans); } }
[ "@", "Override", "public", "void", "extractEphemeralTableQueries", "(", "List", "<", "StmtEphemeralTableScan", ">", "scans", ")", "{", "if", "(", "m_leftNode", "!=", "null", ")", "{", "m_leftNode", ".", "extractEphemeralTableQueries", "(", "scans", ")", ";", "}"...
Returns a list of immediate sub-queries which are part of this query. @return List<AbstractParsedStmt> - list of sub-queries from this query
[ "Returns", "a", "list", "of", "immediate", "sub", "-", "queries", "which", "are", "part", "of", "this", "query", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/BranchNode.java#L397-L405
60,764
VoltDB/voltdb
src/frontend/org/voltdb/planner/parseinfo/BranchNode.java
BranchNode.allInnerJoins
@Override public boolean allInnerJoins() { return m_joinType == JoinType.INNER && (m_leftNode == null || m_leftNode.allInnerJoins()) && (m_rightNode == null || m_rightNode.allInnerJoins()); }
java
@Override public boolean allInnerJoins() { return m_joinType == JoinType.INNER && (m_leftNode == null || m_leftNode.allInnerJoins()) && (m_rightNode == null || m_rightNode.allInnerJoins()); }
[ "@", "Override", "public", "boolean", "allInnerJoins", "(", ")", "{", "return", "m_joinType", "==", "JoinType", ".", "INNER", "&&", "(", "m_leftNode", "==", "null", "||", "m_leftNode", ".", "allInnerJoins", "(", ")", ")", "&&", "(", "m_rightNode", "==", "n...
Returns if all the join operations within this join tree are inner joins. @return true or false.
[ "Returns", "if", "all", "the", "join", "operations", "within", "this", "join", "tree", "are", "inner", "joins", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/BranchNode.java#L455-L460
60,765
VoltDB/voltdb
src/frontend/org/voltdb/planner/ScanDeterminizer.java
ScanDeterminizer.apply
public static void apply(CompiledPlan plan, DeterminismMode detMode) { if (detMode == DeterminismMode.FASTER) { return; } if (plan.hasDeterministicStatement()) { return; } AbstractPlanNode planGraph = plan.rootPlanGraph; if (planGraph.isOrderDe...
java
public static void apply(CompiledPlan plan, DeterminismMode detMode) { if (detMode == DeterminismMode.FASTER) { return; } if (plan.hasDeterministicStatement()) { return; } AbstractPlanNode planGraph = plan.rootPlanGraph; if (planGraph.isOrderDe...
[ "public", "static", "void", "apply", "(", "CompiledPlan", "plan", ",", "DeterminismMode", "detMode", ")", "{", "if", "(", "detMode", "==", "DeterminismMode", ".", "FASTER", ")", "{", "return", ";", "}", "if", "(", "plan", ".", "hasDeterministicStatement", "(...
Only applies when stronger determinism is needed.
[ "Only", "applies", "when", "stronger", "determinism", "is", "needed", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ScanDeterminizer.java#L45-L61
60,766
VoltDB/voltdb
src/frontend/org/voltdb/iv2/Scheduler.java
Scheduler.updateLastSeenUniqueIds
public void updateLastSeenUniqueIds(VoltMessage message) { long sequenceWithUniqueId = Long.MIN_VALUE; boolean commandLog = (message instanceof TransactionInfoBaseMessage && (((TransactionInfoBaseMessage)message).isForReplay())); boolean sentinel = message instanceof MultiP...
java
public void updateLastSeenUniqueIds(VoltMessage message) { long sequenceWithUniqueId = Long.MIN_VALUE; boolean commandLog = (message instanceof TransactionInfoBaseMessage && (((TransactionInfoBaseMessage)message).isForReplay())); boolean sentinel = message instanceof MultiP...
[ "public", "void", "updateLastSeenUniqueIds", "(", "VoltMessage", "message", ")", "{", "long", "sequenceWithUniqueId", "=", "Long", ".", "MIN_VALUE", ";", "boolean", "commandLog", "=", "(", "message", "instanceof", "TransactionInfoBaseMessage", "&&", "(", "(", "(", ...
Update last seen uniqueIds in the replay sequencer. This is used on MPI repair. @param message
[ "Update", "last", "seen", "uniqueIds", "in", "the", "replay", "sequencer", ".", "This", "is", "used", "on", "MPI", "repair", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/Scheduler.java#L185-L203
60,767
VoltDB/voltdb
src/frontend/org/voltdb/sysprocs/SnapshotRestoreResultSet.java
SnapshotRestoreResultSet.parseRestoreResultRow
public void parseRestoreResultRow(VoltTable vt) { RestoreResultKey key = new RestoreResultKey( (int)vt.getLong("HOST_ID"), (int)vt.getLong("PARTITION_ID"), vt.getString("TABLE")); if (containsKey(key)) { get(key).mergeData(vt.getString("RES...
java
public void parseRestoreResultRow(VoltTable vt) { RestoreResultKey key = new RestoreResultKey( (int)vt.getLong("HOST_ID"), (int)vt.getLong("PARTITION_ID"), vt.getString("TABLE")); if (containsKey(key)) { get(key).mergeData(vt.getString("RES...
[ "public", "void", "parseRestoreResultRow", "(", "VoltTable", "vt", ")", "{", "RestoreResultKey", "key", "=", "new", "RestoreResultKey", "(", "(", "int", ")", "vt", ".", "getLong", "(", "\"HOST_ID\"", ")", ",", "(", "int", ")", "vt", ".", "getLong", "(", ...
Parse a restore result table row and add to the set. @param vt restore result table
[ "Parse", "a", "restore", "result", "table", "row", "and", "add", "to", "the", "set", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/SnapshotRestoreResultSet.java#L157-L173
60,768
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/SortedLists.java
SortedLists.binarySearch
public static <E extends Comparable> int binarySearch( List<? extends E> list, E e, KeyPresentBehavior presentBehavior, KeyAbsentBehavior absentBehavior) { checkNotNull(e); return binarySearch(list, e, Ordering.natural(), presentBehavior, absentBehavior); }
java
public static <E extends Comparable> int binarySearch( List<? extends E> list, E e, KeyPresentBehavior presentBehavior, KeyAbsentBehavior absentBehavior) { checkNotNull(e); return binarySearch(list, e, Ordering.natural(), presentBehavior, absentBehavior); }
[ "public", "static", "<", "E", "extends", "Comparable", ">", "int", "binarySearch", "(", "List", "<", "?", "extends", "E", ">", "list", ",", "E", "e", ",", "KeyPresentBehavior", "presentBehavior", ",", "KeyAbsentBehavior", "absentBehavior", ")", "{", "checkNotN...
Searches the specified naturally ordered list for the specified object using the binary search algorithm. <p>Equivalent to {@link #binarySearch(List, Function, Object, Comparator, KeyPresentBehavior, KeyAbsentBehavior)} using {@link Ordering#natural}.
[ "Searches", "the", "specified", "naturally", "ordered", "list", "for", "the", "specified", "object", "using", "the", "binary", "search", "algorithm", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/SortedLists.java#L188-L195
60,769
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/util/concurrent/WrappingExecutorService.java
WrappingExecutorService.wrapTasks
private final <T> ImmutableList<Callable<T>> wrapTasks(Collection<? extends Callable<T>> tasks) { ImmutableList.Builder<Callable<T>> builder = ImmutableList.builder(); for (Callable<T> task : tasks) { builder.add(wrapTask(task)); } return builder.build(); }
java
private final <T> ImmutableList<Callable<T>> wrapTasks(Collection<? extends Callable<T>> tasks) { ImmutableList.Builder<Callable<T>> builder = ImmutableList.builder(); for (Callable<T> task : tasks) { builder.add(wrapTask(task)); } return builder.build(); }
[ "private", "final", "<", "T", ">", "ImmutableList", "<", "Callable", "<", "T", ">", ">", "wrapTasks", "(", "Collection", "<", "?", "extends", "Callable", "<", "T", ">", ">", "tasks", ")", "{", "ImmutableList", ".", "Builder", "<", "Callable", "<", "T",...
Wraps a collection of tasks. @throws NullPointerException if any element of {@code tasks} is null
[ "Wraps", "a", "collection", "of", "tasks", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/util/concurrent/WrappingExecutorService.java#L82-L88
60,770
VoltDB/voltdb
src/frontend/org/voltdb/LoadedProcedureSet.java
LoadedProcedureSet.loadProcedures
public void loadProcedures(CatalogContext catalogContext, boolean isInitOrReplay) { m_defaultProcManager = catalogContext.m_defaultProcs; // default proc caches clear on catalog update m_defaultProcCache.clear(); m_plannerTool = catalogContext.m_ptool; // reload all system p...
java
public void loadProcedures(CatalogContext catalogContext, boolean isInitOrReplay) { m_defaultProcManager = catalogContext.m_defaultProcs; // default proc caches clear on catalog update m_defaultProcCache.clear(); m_plannerTool = catalogContext.m_ptool; // reload all system p...
[ "public", "void", "loadProcedures", "(", "CatalogContext", "catalogContext", ",", "boolean", "isInitOrReplay", ")", "{", "m_defaultProcManager", "=", "catalogContext", ".", "m_defaultProcs", ";", "// default proc caches clear on catalog update", "m_defaultProcCache", ".", "cl...
Load procedures.
[ "Load", "procedures", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/LoadedProcedureSet.java#L94-L118
60,771
VoltDB/voltdb
src/frontend/org/voltdb/parser/SQLParser.java
SQLParser.makeInnerProcedureModifierClausePattern
private static SQLPatternPart makeInnerProcedureModifierClausePattern(boolean captureTokens) { return SPF.oneOf( SPF.clause( SPF.token("allow"), SPF.group(captureTokens, SPF.commaList(SPF.userName())) ), SPF....
java
private static SQLPatternPart makeInnerProcedureModifierClausePattern(boolean captureTokens) { return SPF.oneOf( SPF.clause( SPF.token("allow"), SPF.group(captureTokens, SPF.commaList(SPF.userName())) ), SPF....
[ "private", "static", "SQLPatternPart", "makeInnerProcedureModifierClausePattern", "(", "boolean", "captureTokens", ")", "{", "return", "SPF", ".", "oneOf", "(", "SPF", ".", "clause", "(", "SPF", ".", "token", "(", "\"allow\"", ")", ",", "SPF", ".", "group", "(...
Build a pattern segment to accept a single optional ALLOW or PARTITION clause to modify CREATE PROCEDURE statements. @param captureTokens Capture individual tokens if true @return Inner pattern to be wrapped by the caller as appropriate Capture groups (when captureTokens is true): (1) ALLOW clause: ent...
[ "Build", "a", "pattern", "segment", "to", "accept", "a", "single", "optional", "ALLOW", "or", "PARTITION", "clause", "to", "modify", "CREATE", "PROCEDURE", "statements", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLParser.java#L908-L944
60,772
VoltDB/voltdb
src/frontend/org/voltdb/parser/SQLParser.java
SQLParser.unparsedProcedureModifierClauses
static SQLPatternPart unparsedProcedureModifierClauses() { // Force the leading space to go inside the repeat block. return SPF.capture(SPF.repeat(makeInnerProcedureModifierClausePattern(false))).withFlags(SQLPatternFactory.ADD_LEADING_SPACE_TO_CHILD); }
java
static SQLPatternPart unparsedProcedureModifierClauses() { // Force the leading space to go inside the repeat block. return SPF.capture(SPF.repeat(makeInnerProcedureModifierClausePattern(false))).withFlags(SQLPatternFactory.ADD_LEADING_SPACE_TO_CHILD); }
[ "static", "SQLPatternPart", "unparsedProcedureModifierClauses", "(", ")", "{", "// Force the leading space to go inside the repeat block.", "return", "SPF", ".", "capture", "(", "SPF", ".", "repeat", "(", "makeInnerProcedureModifierClausePattern", "(", "false", ")", ")", ")...
Build a pattern segment to recognize all the ALLOW or PARTITION modifier clauses of a CREATE PROCEDURE statement. @return Pattern to be used by the caller inside a CREATE PROCEDURE pattern. Capture groups: (1) All ALLOW/PARTITION modifier clauses as one string
[ "Build", "a", "pattern", "segment", "to", "recognize", "all", "the", "ALLOW", "or", "PARTITION", "modifier", "clauses", "of", "a", "CREATE", "PROCEDURE", "statement", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLParser.java#L973-L977
60,773
VoltDB/voltdb
src/frontend/org/voltdb/parser/SQLParser.java
SQLParser.makeInnerStreamModifierClausePattern
private static SQLPatternPart makeInnerStreamModifierClausePattern(boolean captureTokens) { return SPF.oneOf( SPF.clause( SPF.token("export"),SPF.token("to"),SPF.token("target"), SPF.group(captureTokens, SPF.databaseObjectName()) ...
java
private static SQLPatternPart makeInnerStreamModifierClausePattern(boolean captureTokens) { return SPF.oneOf( SPF.clause( SPF.token("export"),SPF.token("to"),SPF.token("target"), SPF.group(captureTokens, SPF.databaseObjectName()) ...
[ "private", "static", "SQLPatternPart", "makeInnerStreamModifierClausePattern", "(", "boolean", "captureTokens", ")", "{", "return", "SPF", ".", "oneOf", "(", "SPF", ".", "clause", "(", "SPF", ".", "token", "(", "\"export\"", ")", ",", "SPF", ".", "token", "(",...
Build a pattern segment to accept a single optional EXPORT or PARTITION clause to modify CREATE STREAM statements. @param captureTokens Capture individual tokens if true @return Inner pattern to be wrapped by the caller as appropriate Capture groups (when captureTokens is true): (1) EXPORT clause: targ...
[ "Build", "a", "pattern", "segment", "to", "accept", "a", "single", "optional", "EXPORT", "or", "PARTITION", "clause", "to", "modify", "CREATE", "STREAM", "statements", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLParser.java#L990-L1003
60,774
VoltDB/voltdb
src/frontend/org/voltdb/parser/SQLParser.java
SQLParser.unparsedStreamModifierClauses
private static SQLPatternPart unparsedStreamModifierClauses() { // Force the leading space to go inside the repeat block. return SPF.capture(SPF.repeat(makeInnerStreamModifierClausePattern(false))).withFlags(SQLPatternFactory.ADD_LEADING_SPACE_TO_CHILD); }
java
private static SQLPatternPart unparsedStreamModifierClauses() { // Force the leading space to go inside the repeat block. return SPF.capture(SPF.repeat(makeInnerStreamModifierClausePattern(false))).withFlags(SQLPatternFactory.ADD_LEADING_SPACE_TO_CHILD); }
[ "private", "static", "SQLPatternPart", "unparsedStreamModifierClauses", "(", ")", "{", "// Force the leading space to go inside the repeat block.", "return", "SPF", ".", "capture", "(", "SPF", ".", "repeat", "(", "makeInnerStreamModifierClausePattern", "(", "false", ")", ")...
Build a pattern segment to recognize all the EXPORT or PARTITION modifier clauses of a CREATE STREAM statement. @return Pattern to be used by the caller inside a CREATE STREAM pattern. Capture groups: (1) All EXPORT/PARTITION modifier clauses as one string
[ "Build", "a", "pattern", "segment", "to", "recognize", "all", "the", "EXPORT", "or", "PARTITION", "modifier", "clauses", "of", "a", "CREATE", "STREAM", "statement", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLParser.java#L1028-L1031
60,775
VoltDB/voltdb
src/frontend/org/voltdb/parser/SQLParser.java
SQLParser.parseExecParameters
private static List<String> parseExecParameters(String paramText) { final String SafeParamStringValuePattern = "#(SQL_PARSER_SAFE_PARAMSTRING)"; // Find all quoted strings. // Mask out strings that contain whitespace or commas // that must not be confused with parameter separators. ...
java
private static List<String> parseExecParameters(String paramText) { final String SafeParamStringValuePattern = "#(SQL_PARSER_SAFE_PARAMSTRING)"; // Find all quoted strings. // Mask out strings that contain whitespace or commas // that must not be confused with parameter separators. ...
[ "private", "static", "List", "<", "String", ">", "parseExecParameters", "(", "String", "paramText", ")", "{", "final", "String", "SafeParamStringValuePattern", "=", "\"#(SQL_PARSER_SAFE_PARAMSTRING)\"", ";", "// Find all quoted strings.", "// Mask out strings that contain white...
to the extent that comments are supported they have already been stripped out.
[ "to", "the", "extent", "that", "comments", "are", "supported", "they", "have", "already", "been", "stripped", "out", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLParser.java#L1132-L1188
60,776
VoltDB/voltdb
src/frontend/org/voltdb/parser/SQLParser.java
SQLParser.parseRecallStatement
public static ParseRecallResults parseRecallStatement(String statement, int lineMax) { Matcher matcher = RecallToken.matcher(statement); if (matcher.matches()) { String commandWordTerminator = matcher.group(1); String lineNumberText = matcher.group(2); String erro...
java
public static ParseRecallResults parseRecallStatement(String statement, int lineMax) { Matcher matcher = RecallToken.matcher(statement); if (matcher.matches()) { String commandWordTerminator = matcher.group(1); String lineNumberText = matcher.group(2); String erro...
[ "public", "static", "ParseRecallResults", "parseRecallStatement", "(", "String", "statement", ",", "int", "lineMax", ")", "{", "Matcher", "matcher", "=", "RecallToken", ".", "matcher", "(", "statement", ")", ";", "if", "(", "matcher", ".", "matches", "(", ")",...
Parse RECALL statement for sqlcmd. @param statement statement to parse @param lineMax maximum line # + 1 @return results object or NULL if statement wasn't recognized
[ "Parse", "RECALL", "statement", "for", "sqlcmd", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLParser.java#L1244-L1282
60,777
VoltDB/voltdb
src/frontend/org/voltdb/parser/SQLParser.java
SQLParser.parseFileStatement
public static List<FileInfo> parseFileStatement(FileInfo parentContext, String statement) { Matcher fileMatcher = FileToken.matcher(statement); if (! fileMatcher.lookingAt()) { // This input does not start with FILE, // so it's not a file command, it's something else. ...
java
public static List<FileInfo> parseFileStatement(FileInfo parentContext, String statement) { Matcher fileMatcher = FileToken.matcher(statement); if (! fileMatcher.lookingAt()) { // This input does not start with FILE, // so it's not a file command, it's something else. ...
[ "public", "static", "List", "<", "FileInfo", ">", "parseFileStatement", "(", "FileInfo", "parentContext", ",", "String", "statement", ")", "{", "Matcher", "fileMatcher", "=", "FileToken", ".", "matcher", "(", "statement", ")", ";", "if", "(", "!", "fileMatcher...
Parse FILE statement for sqlcmd. @param fileInfo optional parent file context for better diagnostics. @param statement statement to parse @return File object or NULL if statement wasn't recognized
[ "Parse", "FILE", "statement", "for", "sqlcmd", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLParser.java#L1411-L1489
60,778
VoltDB/voltdb
src/frontend/org/voltdb/parser/SQLParser.java
SQLParser.parseShowStatementSubcommand
public static String parseShowStatementSubcommand(String statement) { Matcher matcher = ShowToken.matcher(statement); if (matcher.matches()) { String commandWordTerminator = matcher.group(1); if (OneWhitespace.matcher(commandWordTerminator).matches()) { String...
java
public static String parseShowStatementSubcommand(String statement) { Matcher matcher = ShowToken.matcher(statement); if (matcher.matches()) { String commandWordTerminator = matcher.group(1); if (OneWhitespace.matcher(commandWordTerminator).matches()) { String...
[ "public", "static", "String", "parseShowStatementSubcommand", "(", "String", "statement", ")", "{", "Matcher", "matcher", "=", "ShowToken", ".", "matcher", "(", "statement", ")", ";", "if", "(", "matcher", ".", "matches", "(", ")", ")", "{", "String", "comma...
Parse a SHOW or LIST statement for sqlcmd. @param statement statement to parse @return String containing captured argument(s) possibly invalid, or null if a show/list statement wasn't recognized
[ "Parse", "a", "SHOW", "or", "LIST", "statement", "for", "sqlcmd", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLParser.java#L1507-L1528
60,779
VoltDB/voltdb
src/frontend/org/voltdb/parser/SQLParser.java
SQLParser.parseHelpStatement
public static String parseHelpStatement(String statement) { Matcher matcher = HelpToken.matcher(statement); if (matcher.matches()) { String commandWordTerminator = matcher.group(1); if (OneWhitespace.matcher(commandWordTerminator).matches()) { String trailings...
java
public static String parseHelpStatement(String statement) { Matcher matcher = HelpToken.matcher(statement); if (matcher.matches()) { String commandWordTerminator = matcher.group(1); if (OneWhitespace.matcher(commandWordTerminator).matches()) { String trailings...
[ "public", "static", "String", "parseHelpStatement", "(", "String", "statement", ")", "{", "Matcher", "matcher", "=", "HelpToken", ".", "matcher", "(", "statement", ")", ";", "if", "(", "matcher", ".", "matches", "(", ")", ")", "{", "String", "commandWordTerm...
Parse HELP statement for sqlcmd. The sub-command will be "" if the user just typed HELP. @param statement statement to parse @return Sub-command or NULL if statement wasn't recognized
[ "Parse", "HELP", "statement", "for", "sqlcmd", ".", "The", "sub", "-", "command", "will", "be", "if", "the", "user", "just", "typed", "HELP", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLParser.java#L1536-L1558
60,780
VoltDB/voltdb
src/frontend/org/voltdb/parser/SQLParser.java
SQLParser.getDigitsFromHexLiteral
public static String getDigitsFromHexLiteral(String paramString) { Matcher matcher = SingleQuotedHexLiteral.matcher(paramString); if (matcher.matches()) { return matcher.group(1); } return null; }
java
public static String getDigitsFromHexLiteral(String paramString) { Matcher matcher = SingleQuotedHexLiteral.matcher(paramString); if (matcher.matches()) { return matcher.group(1); } return null; }
[ "public", "static", "String", "getDigitsFromHexLiteral", "(", "String", "paramString", ")", "{", "Matcher", "matcher", "=", "SingleQuotedHexLiteral", ".", "matcher", "(", "paramString", ")", ";", "if", "(", "matcher", ".", "matches", "(", ")", ")", "{", "retur...
Given a parameter string, if it's of the form x'0123456789ABCDEF', return a string containing just the digits. Otherwise, return null.
[ "Given", "a", "parameter", "string", "if", "it", "s", "of", "the", "form", "x", "0123456789ABCDEF", "return", "a", "string", "containing", "just", "the", "digits", ".", "Otherwise", "return", "null", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLParser.java#L1612-L1618
60,781
VoltDB/voltdb
src/frontend/org/voltdb/parser/SQLParser.java
SQLParser.hexDigitsToLong
public static long hexDigitsToLong(String hexDigits) throws SQLParser.Exception { // BigInteger.longValue() will truncate to the lowest 64 bits, // so we need to explicitly check if there's too many digits. if (hexDigits.length() > 16) { throw new SQLParser.Exception("Too many hexad...
java
public static long hexDigitsToLong(String hexDigits) throws SQLParser.Exception { // BigInteger.longValue() will truncate to the lowest 64 bits, // so we need to explicitly check if there's too many digits. if (hexDigits.length() > 16) { throw new SQLParser.Exception("Too many hexad...
[ "public", "static", "long", "hexDigitsToLong", "(", "String", "hexDigits", ")", "throws", "SQLParser", ".", "Exception", "{", "// BigInteger.longValue() will truncate to the lowest 64 bits,", "// so we need to explicitly check if there's too many digits.", "if", "(", "hexDigits", ...
Given a string of hex digits, produce a long value, assuming a 2's complement representation.
[ "Given", "a", "string", "of", "hex", "digits", "produce", "a", "long", "value", "assuming", "a", "2", "s", "complement", "representation", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLParser.java#L1624-L1647
60,782
VoltDB/voltdb
src/frontend/org/voltdb/parser/SQLParser.java
SQLParser.parseExecuteCall
public static ExecuteCallResults parseExecuteCall( String statement, Map<String,Map<Integer, List<String>>> procedures) throws SQLParser.Exception { assert(procedures != null); return parseExecuteCallInternal(statement, procedures); }
java
public static ExecuteCallResults parseExecuteCall( String statement, Map<String,Map<Integer, List<String>>> procedures) throws SQLParser.Exception { assert(procedures != null); return parseExecuteCallInternal(statement, procedures); }
[ "public", "static", "ExecuteCallResults", "parseExecuteCall", "(", "String", "statement", ",", "Map", "<", "String", ",", "Map", "<", "Integer", ",", "List", "<", "String", ">", ">", ">", "procedures", ")", "throws", "SQLParser", ".", "Exception", "{", "asse...
Parse EXECUTE procedure call. @param statement statement to parse @param procedures maps procedures to parameter signature maps @return results object or NULL if statement wasn't recognized @throws SQLParser.Exception
[ "Parse", "EXECUTE", "procedure", "call", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLParser.java#L1792-L1798
60,783
VoltDB/voltdb
src/frontend/org/voltdb/parser/SQLParser.java
SQLParser.parseExecuteCallInternal
private static ExecuteCallResults parseExecuteCallInternal( String statement, Map<String,Map<Integer, List<String>>> procedures ) throws SQLParser.Exception { Matcher matcher = ExecuteCallPreamble.matcher(statement); if ( ! matcher.lookingAt()) { return null; ...
java
private static ExecuteCallResults parseExecuteCallInternal( String statement, Map<String,Map<Integer, List<String>>> procedures ) throws SQLParser.Exception { Matcher matcher = ExecuteCallPreamble.matcher(statement); if ( ! matcher.lookingAt()) { return null; ...
[ "private", "static", "ExecuteCallResults", "parseExecuteCallInternal", "(", "String", "statement", ",", "Map", "<", "String", ",", "Map", "<", "Integer", ",", "List", "<", "String", ">", ">", ">", "procedures", ")", "throws", "SQLParser", ".", "Exception", "{"...
Private implementation of parse EXECUTE procedure call. Also supports short-circuiting procedure lookup for testing. @param statement statement to parse @param procedures maps procedures to parameter signature maps @return results object or NULL if statement wasn't recognized @throws SQLParser.Exception
[ "Private", "implementation", "of", "parse", "EXECUTE", "procedure", "call", ".", "Also", "supports", "short", "-", "circuiting", "procedure", "lookup", "for", "testing", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLParser.java#L1822-L1869
60,784
VoltDB/voltdb
src/frontend/org/voltdb/parser/SQLParser.java
SQLParser.appearsToBeValidDDLBatch
public static boolean appearsToBeValidDDLBatch(String batch) { BufferedReader reader = new BufferedReader(new StringReader(batch)); String line; try { while ((line = reader.readLine()) != null) { if (isWholeLineComment(line)) { continue; ...
java
public static boolean appearsToBeValidDDLBatch(String batch) { BufferedReader reader = new BufferedReader(new StringReader(batch)); String line; try { while ((line = reader.readLine()) != null) { if (isWholeLineComment(line)) { continue; ...
[ "public", "static", "boolean", "appearsToBeValidDDLBatch", "(", "String", "batch", ")", "{", "BufferedReader", "reader", "=", "new", "BufferedReader", "(", "new", "StringReader", "(", "batch", ")", ")", ";", "String", "line", ";", "try", "{", "while", "(", "...
Make sure that the batch starts with an appropriate DDL verb. We do not look further than the first token of the first non-comment and non-whitespace line. Empty batches are considered to be trivially valid. @param batch A SQL string containing multiple statements separated by semicolons @return true if the first k...
[ "Make", "sure", "that", "the", "batch", "starts", "with", "an", "appropriate", "DDL", "verb", ".", "We", "do", "not", "look", "further", "than", "the", "first", "token", "of", "the", "first", "non", "-", "comment", "and", "non", "-", "whitespace", "line"...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLParser.java#L2012-L2036
60,785
VoltDB/voltdb
src/frontend/org/voltdb/parser/SQLParser.java
SQLParser.parseEchoStatement
public static String parseEchoStatement(String statement) { Matcher matcher = EchoToken.matcher(statement); if (matcher.matches()) { String commandWordTerminator = matcher.group(1); if (OneWhitespace.matcher(commandWordTerminator).matches()) { return matcher.g...
java
public static String parseEchoStatement(String statement) { Matcher matcher = EchoToken.matcher(statement); if (matcher.matches()) { String commandWordTerminator = matcher.group(1); if (OneWhitespace.matcher(commandWordTerminator).matches()) { return matcher.g...
[ "public", "static", "String", "parseEchoStatement", "(", "String", "statement", ")", "{", "Matcher", "matcher", "=", "EchoToken", ".", "matcher", "(", "statement", ")", ";", "if", "(", "matcher", ".", "matches", "(", ")", ")", "{", "String", "commandWordTerm...
Parse ECHO statement for sqlcmd. The result will be "" if the user just typed ECHO. @param statement statement to parse @return Argument text or NULL if statement wasn't recognized
[ "Parse", "ECHO", "statement", "for", "sqlcmd", ".", "The", "result", "will", "be", "if", "the", "user", "just", "typed", "ECHO", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLParser.java#L2044-L2055
60,786
VoltDB/voltdb
src/frontend/org/voltdb/parser/SQLParser.java
SQLParser.parseEchoErrorStatement
public static String parseEchoErrorStatement(String statement) { Matcher matcher = EchoErrorToken.matcher(statement); if (matcher.matches()) { String commandWordTerminator = matcher.group(1); if (OneWhitespace.matcher(commandWordTerminator).matches()) { return mat...
java
public static String parseEchoErrorStatement(String statement) { Matcher matcher = EchoErrorToken.matcher(statement); if (matcher.matches()) { String commandWordTerminator = matcher.group(1); if (OneWhitespace.matcher(commandWordTerminator).matches()) { return mat...
[ "public", "static", "String", "parseEchoErrorStatement", "(", "String", "statement", ")", "{", "Matcher", "matcher", "=", "EchoErrorToken", ".", "matcher", "(", "statement", ")", ";", "if", "(", "matcher", ".", "matches", "(", ")", ")", "{", "String", "comma...
Parse ECHOERROR statement for sqlcmd. The result will be "" if the user just typed ECHOERROR. @param statement statement to parse @return Argument text or NULL if statement wasn't recognized
[ "Parse", "ECHOERROR", "statement", "for", "sqlcmd", ".", "The", "result", "will", "be", "if", "the", "user", "just", "typed", "ECHOERROR", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLParser.java#L2063-L2073
60,787
VoltDB/voltdb
src/frontend/org/voltdb/parser/SQLParser.java
SQLParser.parseDescribeStatement
public static String parseDescribeStatement(String statement) { Matcher matcher = DescribeToken.matcher(statement); if (matcher.matches()) { String commandWordTerminator = matcher.group(1); if (OneWhitespace.matcher(commandWordTerminator).matches()) { String trail...
java
public static String parseDescribeStatement(String statement) { Matcher matcher = DescribeToken.matcher(statement); if (matcher.matches()) { String commandWordTerminator = matcher.group(1); if (OneWhitespace.matcher(commandWordTerminator).matches()) { String trail...
[ "public", "static", "String", "parseDescribeStatement", "(", "String", "statement", ")", "{", "Matcher", "matcher", "=", "DescribeToken", ".", "matcher", "(", "statement", ")", ";", "if", "(", "matcher", ".", "matches", "(", ")", ")", "{", "String", "command...
Parse DESCRIBE statement for sqlcmd. The result will be "" if the user just typed DESCRIBE or DESC. @param statement statement to parse @return String containing possible table name
[ "Parse", "DESCRIBE", "statement", "for", "sqlcmd", ".", "The", "result", "will", "be", "if", "the", "user", "just", "typed", "DESCRIBE", "or", "DESC", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLParser.java#L2081-L2101
60,788
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/QueryExpression.java
QueryExpression.resolveColumnRefernecesInUnionOrderBy
void resolveColumnRefernecesInUnionOrderBy() { int orderCount = sortAndSlice.getOrderLength(); if (orderCount == 0) { return; } String[] unionColumnNames = getColumnNames(); for (int i = 0; i < orderCount; i++) { Expression sort = (Expression) sortAndS...
java
void resolveColumnRefernecesInUnionOrderBy() { int orderCount = sortAndSlice.getOrderLength(); if (orderCount == 0) { return; } String[] unionColumnNames = getColumnNames(); for (int i = 0; i < orderCount; i++) { Expression sort = (Expression) sortAndS...
[ "void", "resolveColumnRefernecesInUnionOrderBy", "(", ")", "{", "int", "orderCount", "=", "sortAndSlice", ".", "getOrderLength", "(", ")", ";", "if", "(", "orderCount", "==", "0", ")", "{", "return", ";", "}", "String", "[", "]", "unionColumnNames", "=", "ge...
Only simple column reference or column position allowed
[ "Only", "simple", "column", "reference", "or", "column", "position", "allowed" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/QueryExpression.java#L331-L370
60,789
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/QueryExpression.java
QueryExpression.setTableColumnNames
public void setTableColumnNames(HashMappedList list) { if (resultTable != null) { ((TableDerived) resultTable).columnList = list; return; } leftQueryExpression.setTableColumnNames(list); }
java
public void setTableColumnNames(HashMappedList list) { if (resultTable != null) { ((TableDerived) resultTable).columnList = list; return; } leftQueryExpression.setTableColumnNames(list); }
[ "public", "void", "setTableColumnNames", "(", "HashMappedList", "list", ")", "{", "if", "(", "resultTable", "!=", "null", ")", "{", "(", "(", "TableDerived", ")", "resultTable", ")", ".", "columnList", "=", "list", ";", "return", ";", "}", "leftQueryExpressi...
Used in views after full type resolution
[ "Used", "in", "views", "after", "full", "type", "resolution" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/QueryExpression.java#L670-L679
60,790
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/QueryExpression.java
QueryExpression.setAsTopLevel
public void setAsTopLevel() { if (compileContext.getSequences().length > 0) { throw Error.error(ErrorCode.X_42598); } isTopLevel = true; setReturningResultSet(); }
java
public void setAsTopLevel() { if (compileContext.getSequences().length > 0) { throw Error.error(ErrorCode.X_42598); } isTopLevel = true; setReturningResultSet(); }
[ "public", "void", "setAsTopLevel", "(", ")", "{", "if", "(", "compileContext", ".", "getSequences", "(", ")", ".", "length", ">", "0", ")", "{", "throw", "Error", ".", "error", "(", "ErrorCode", ".", "X_42598", ")", ";", "}", "isTopLevel", "=", "true",...
Not for views. Only used on root node.
[ "Not", "for", "views", ".", "Only", "used", "on", "root", "node", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/QueryExpression.java#L733-L742
60,791
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/QueryExpression.java
QueryExpression.setReturningResultSet
void setReturningResultSet() { if (unionCorresponding) { persistenceScope = TableBase.SCOPE_SESSION; columnMode = TableBase.COLUMNS_UNREFERENCED; return; } leftQueryExpression.setReturningResultSet(); }
java
void setReturningResultSet() { if (unionCorresponding) { persistenceScope = TableBase.SCOPE_SESSION; columnMode = TableBase.COLUMNS_UNREFERENCED; return; } leftQueryExpression.setReturningResultSet(); }
[ "void", "setReturningResultSet", "(", ")", "{", "if", "(", "unionCorresponding", ")", "{", "persistenceScope", "=", "TableBase", ".", "SCOPE_SESSION", ";", "columnMode", "=", "TableBase", ".", "COLUMNS_UNREFERENCED", ";", "return", ";", "}", "leftQueryExpression", ...
Sets the scope to SESSION for the QueryExpression object that creates the table
[ "Sets", "the", "scope", "to", "SESSION", "for", "the", "QueryExpression", "object", "that", "creates", "the", "table" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/QueryExpression.java#L748-L758
60,792
VoltDB/voltdb
examples/geospatial/client/geospatial/AdBrokerBenchmark.java
AdBrokerBenchmark.schedulePeriodicStats
public void schedulePeriodicStats() { Runnable statsPrinter = new Runnable() { @Override public void run() { printStatistics(); } }; m_scheduler.scheduleWithFixedDelay(statsPrinter, m_config.displayinterval, m_config.displayinterval, ...
java
public void schedulePeriodicStats() { Runnable statsPrinter = new Runnable() { @Override public void run() { printStatistics(); } }; m_scheduler.scheduleWithFixedDelay(statsPrinter, m_config.displayinterval, m_config.displayinterval, ...
[ "public", "void", "schedulePeriodicStats", "(", ")", "{", "Runnable", "statsPrinter", "=", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "void", "run", "(", ")", "{", "printStatistics", "(", ")", ";", "}", "}", ";", "m_scheduler", ".", "sc...
Add a task to the scheduler to print statistics to the console at regular intervals.
[ "Add", "a", "task", "to", "the", "scheduler", "to", "print", "statistics", "to", "the", "console", "at", "regular", "intervals", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/geospatial/client/geospatial/AdBrokerBenchmark.java#L248-L257
60,793
VoltDB/voltdb
examples/geospatial/client/geospatial/AdBrokerBenchmark.java
AdBrokerBenchmark.printResults
public synchronized void printResults() throws Exception { ClientStats stats = m_fullStatsContext.fetch().getStats(); System.out.print(HORIZONTAL_RULE); System.out.println(" Client Workload Statistics"); System.out.println(HORIZONTAL_RULE); System.out.printf("Average throughput...
java
public synchronized void printResults() throws Exception { ClientStats stats = m_fullStatsContext.fetch().getStats(); System.out.print(HORIZONTAL_RULE); System.out.println(" Client Workload Statistics"); System.out.println(HORIZONTAL_RULE); System.out.printf("Average throughput...
[ "public", "synchronized", "void", "printResults", "(", ")", "throws", "Exception", "{", "ClientStats", "stats", "=", "m_fullStatsContext", ".", "fetch", "(", ")", ".", "getStats", "(", ")", ";", "System", ".", "out", ".", "print", "(", "HORIZONTAL_RULE", ")"...
Prints some summary statistics about performance. @throws Exception if anything unexpected happens.
[ "Prints", "some", "summary", "statistics", "about", "performance", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/geospatial/client/geospatial/AdBrokerBenchmark.java#L315-L348
60,794
VoltDB/voltdb
examples/geospatial/client/geospatial/AdBrokerBenchmark.java
AdBrokerBenchmark.shutdown
private void shutdown() { // Stop the stats printer, the bid generator and the nibble deleter. m_scheduler.shutdown(); try { m_scheduler.awaitTermination(60, TimeUnit.SECONDS); } catch (InterruptedException e) { e.printStackTrace(); } try { ...
java
private void shutdown() { // Stop the stats printer, the bid generator and the nibble deleter. m_scheduler.shutdown(); try { m_scheduler.awaitTermination(60, TimeUnit.SECONDS); } catch (InterruptedException e) { e.printStackTrace(); } try { ...
[ "private", "void", "shutdown", "(", ")", "{", "// Stop the stats printer, the bid generator and the nibble deleter.", "m_scheduler", ".", "shutdown", "(", ")", ";", "try", "{", "m_scheduler", ".", "awaitTermination", "(", "60", ",", "TimeUnit", ".", "SECONDS", ")", ...
Perform various tasks to end the demo cleanly.
[ "Perform", "various", "tasks", "to", "end", "the", "demo", "cleanly", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/geospatial/client/geospatial/AdBrokerBenchmark.java#L353-L373
60,795
VoltDB/voltdb
examples/geospatial/client/geospatial/AdBrokerBenchmark.java
AdBrokerBenchmark.requestAd
private void requestAd() { long deviceId = Math.abs(m_rand.nextLong()) % AdBrokerBenchmark.NUM_DEVICES; GeographyPointValue point = getRandomPoint(); try { m_client.callProcedure(new NullCallback(), "GetHighestBidForLocation", deviceId, point); } catch (IOException e) { ...
java
private void requestAd() { long deviceId = Math.abs(m_rand.nextLong()) % AdBrokerBenchmark.NUM_DEVICES; GeographyPointValue point = getRandomPoint(); try { m_client.callProcedure(new NullCallback(), "GetHighestBidForLocation", deviceId, point); } catch (IOException e) { ...
[ "private", "void", "requestAd", "(", ")", "{", "long", "deviceId", "=", "Math", ".", "abs", "(", "m_rand", ".", "nextLong", "(", ")", ")", "%", "AdBrokerBenchmark", ".", "NUM_DEVICES", ";", "GeographyPointValue", "point", "=", "getRandomPoint", "(", ")", "...
Invoke the stored procedure GetHighestBidForLocation, which, given a random point, returns the id of the bid that has the highest dollar amount.
[ "Invoke", "the", "stored", "procedure", "GetHighestBidForLocation", "which", "given", "a", "random", "point", "returns", "the", "id", "of", "the", "bid", "that", "has", "the", "highest", "dollar", "amount", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/geospatial/client/geospatial/AdBrokerBenchmark.java#L395-L404
60,796
VoltDB/voltdb
src/frontend/org/voltdb/planner/parseinfo/StmtSubqueryScan.java
StmtSubqueryScan.promoteSinglePartitionInfo
public void promoteSinglePartitionInfo( HashMap<AbstractExpression, Set<AbstractExpression>> valueEquivalence, Set< Set<AbstractExpression> > eqSets) { assert(getScanPartitioning() != null); if (getScanPartitioning().getCountOfPartitionedTables() == 0 || getScanPa...
java
public void promoteSinglePartitionInfo( HashMap<AbstractExpression, Set<AbstractExpression>> valueEquivalence, Set< Set<AbstractExpression> > eqSets) { assert(getScanPartitioning() != null); if (getScanPartitioning().getCountOfPartitionedTables() == 0 || getScanPa...
[ "public", "void", "promoteSinglePartitionInfo", "(", "HashMap", "<", "AbstractExpression", ",", "Set", "<", "AbstractExpression", ">", ">", "valueEquivalence", ",", "Set", "<", "Set", "<", "AbstractExpression", ">", ">", "eqSets", ")", "{", "assert", "(", "getSc...
upgrade single partitioning expression to parent level add the info to equality sets and input value equivalence @param valueEquivalence @param eqSets
[ "upgrade", "single", "partitioning", "expression", "to", "parent", "level", "add", "the", "info", "to", "equality", "sets", "and", "input", "value", "equivalence" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/StmtSubqueryScan.java#L95-L132
60,797
VoltDB/voltdb
src/frontend/org/voltdb/planner/parseinfo/StmtSubqueryScan.java
StmtSubqueryScan.updateEqualSets
private void updateEqualSets(Set<AbstractExpression> values, HashMap<AbstractExpression, Set<AbstractExpression>> valueEquivalence, Set< Set<AbstractExpression> > eqSets, AbstractExpression tveKey, AbstractExpression spExpr) { boolean hasLegacyValues = false; if (eqSe...
java
private void updateEqualSets(Set<AbstractExpression> values, HashMap<AbstractExpression, Set<AbstractExpression>> valueEquivalence, Set< Set<AbstractExpression> > eqSets, AbstractExpression tveKey, AbstractExpression spExpr) { boolean hasLegacyValues = false; if (eqSe...
[ "private", "void", "updateEqualSets", "(", "Set", "<", "AbstractExpression", ">", "values", ",", "HashMap", "<", "AbstractExpression", ",", "Set", "<", "AbstractExpression", ">", ">", "valueEquivalence", ",", "Set", "<", "Set", "<", "AbstractExpression", ">", ">...
Because HashSet stored a legacy hashcode for the non-final object.
[ "Because", "HashSet", "stored", "a", "legacy", "hashcode", "for", "the", "non", "-", "final", "object", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/StmtSubqueryScan.java#L137-L153
60,798
VoltDB/voltdb
src/frontend/org/voltdb/planner/parseinfo/StmtSubqueryScan.java
StmtSubqueryScan.getIsReplicated
@Override public boolean getIsReplicated() { for (StmtTableScan tableScan : m_subqueryStmt.allScans()) { if ( ! tableScan.getIsReplicated()) { return false; } } return true; }
java
@Override public boolean getIsReplicated() { for (StmtTableScan tableScan : m_subqueryStmt.allScans()) { if ( ! tableScan.getIsReplicated()) { return false; } } return true; }
[ "@", "Override", "public", "boolean", "getIsReplicated", "(", ")", "{", "for", "(", "StmtTableScan", "tableScan", ":", "m_subqueryStmt", ".", "allScans", "(", ")", ")", "{", "if", "(", "!", "tableScan", ".", "getIsReplicated", "(", ")", ")", "{", "return",...
The subquery is replicated if all tables from the FROM clause defining this subquery are replicated @return True if the subquery is replicated
[ "The", "subquery", "is", "replicated", "if", "all", "tables", "from", "the", "FROM", "clause", "defining", "this", "subquery", "are", "replicated" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/StmtSubqueryScan.java#L218-L226
60,799
VoltDB/voltdb
src/frontend/org/voltdb/planner/parseinfo/StmtSubqueryScan.java
StmtSubqueryScan.getOutputExpression
public TupleValueExpression getOutputExpression(int index) { SchemaColumn schemaCol = getSchemaColumn(index); TupleValueExpression tve = new TupleValueExpression(getTableAlias(), getTableAlias(), schemaCol.getColumnAlias(), schemaCol.getColumnAlias(), index); return tve; }
java
public TupleValueExpression getOutputExpression(int index) { SchemaColumn schemaCol = getSchemaColumn(index); TupleValueExpression tve = new TupleValueExpression(getTableAlias(), getTableAlias(), schemaCol.getColumnAlias(), schemaCol.getColumnAlias(), index); return tve; }
[ "public", "TupleValueExpression", "getOutputExpression", "(", "int", "index", ")", "{", "SchemaColumn", "schemaCol", "=", "getSchemaColumn", "(", "index", ")", ";", "TupleValueExpression", "tve", "=", "new", "TupleValueExpression", "(", "getTableAlias", "(", ")", ",...
Produce a tuple value expression for a column produced by this subquery
[ "Produce", "a", "tuple", "value", "expression", "for", "a", "column", "produced", "by", "this", "subquery" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/StmtSubqueryScan.java#L363-L368