repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java
StatementDMQL.describe
@Override public String describe(Session session) { try { return describeImpl(session); } catch (Exception e) { e.printStackTrace(); return e.toString(); } }
java
@Override public String describe(Session session) { try { return describeImpl(session); } catch (Exception e) { e.printStackTrace(); return e.toString(); } }
[ "@", "Override", "public", "String", "describe", "(", "Session", "session", ")", "{", "try", "{", "return", "describeImpl", "(", "session", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "return", "...
Retrieves a String representation of this object.
[ "Retrieves", "a", "String", "representation", "of", "this", "object", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java#L615-L626
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java
StatementDMQL.isGroupByColumn
static boolean isGroupByColumn(QuerySpecification select, int index) { if (!select.isGrouped) { return false; } for (int ii = 0; ii < select.groupIndex.getColumnCount(); ii++) { if (index == select.groupIndex.getColumns()[ii]) { return true; } ...
java
static boolean isGroupByColumn(QuerySpecification select, int index) { if (!select.isGrouped) { return false; } for (int ii = 0; ii < select.groupIndex.getColumnCount(); ii++) { if (index == select.groupIndex.getColumns()[ii]) { return true; } ...
[ "static", "boolean", "isGroupByColumn", "(", "QuerySpecification", "select", ",", "int", "index", ")", "{", "if", "(", "!", "select", ".", "isGrouped", ")", "{", "return", "false", ";", "}", "for", "(", "int", "ii", "=", "0", ";", "ii", "<", "select", ...
Returns true if the specified exprColumn index is in the list of column indices specified by groupIndex @return true/false
[ "Returns", "true", "if", "the", "specified", "exprColumn", "index", "is", "in", "the", "list", "of", "column", "indices", "specified", "by", "groupIndex" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java#L854-L864
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java
StatementDMQL.getDisplayColumnsForSetOp
private static List<Expression> getDisplayColumnsForSetOp(QueryExpression queryExpr) { assert(queryExpr != null); if (queryExpr.getLeftQueryExpression() == null) { // end of recursion. This is a QuerySpecification assert(queryExpr instanceof QuerySpecification); Query...
java
private static List<Expression> getDisplayColumnsForSetOp(QueryExpression queryExpr) { assert(queryExpr != null); if (queryExpr.getLeftQueryExpression() == null) { // end of recursion. This is a QuerySpecification assert(queryExpr instanceof QuerySpecification); Query...
[ "private", "static", "List", "<", "Expression", ">", "getDisplayColumnsForSetOp", "(", "QueryExpression", "queryExpr", ")", "{", "assert", "(", "queryExpr", "!=", "null", ")", ";", "if", "(", "queryExpr", ".", "getLeftQueryExpression", "(", ")", "==", "null", ...
Return a list of the display columns for the left most statement from a set op @returnn
[ "Return", "a", "list", "of", "the", "display", "columns", "for", "the", "left", "most", "statement", "from", "a", "set", "op" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java#L1027-L1038
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java
StatementDMQL.voltGetLimitOffsetXMLFromSortAndSlice
protected static List<VoltXMLElement> voltGetLimitOffsetXMLFromSortAndSlice(Session session, SortAndSlice sortAndSlice) throws HSQLParseException { List<VoltXMLElement> result = new ArrayList<>(); if (sortAndSlice == null || sortAndSlice == SortAndSlice.noSort) { return result; ...
java
protected static List<VoltXMLElement> voltGetLimitOffsetXMLFromSortAndSlice(Session session, SortAndSlice sortAndSlice) throws HSQLParseException { List<VoltXMLElement> result = new ArrayList<>(); if (sortAndSlice == null || sortAndSlice == SortAndSlice.noSort) { return result; ...
[ "protected", "static", "List", "<", "VoltXMLElement", ">", "voltGetLimitOffsetXMLFromSortAndSlice", "(", "Session", "session", ",", "SortAndSlice", "sortAndSlice", ")", "throws", "HSQLParseException", "{", "List", "<", "VoltXMLElement", ">", "result", "=", "new", "Arr...
return a list of VoltXMLElements that need to be added to the statement XML for LIMIT and OFFSET
[ "return", "a", "list", "of", "VoltXMLElements", "that", "need", "to", "be", "added", "to", "the", "statement", "XML", "for", "LIMIT", "and", "OFFSET" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementDMQL.java#L1041-L1096
train
VoltDB/voltdb
src/frontend/org/voltdb/utils/VoltTypeUtil.java
VoltTypeUtil.getObjectFromString
public static Object getObjectFromString(VoltType type, String value) throws ParseException { Object ret = null; switch (type) { // NOTE: All runtime integer parameters are actually Longs,so we will have problems // if we actually try to convert the object to one of the s...
java
public static Object getObjectFromString(VoltType type, String value) throws ParseException { Object ret = null; switch (type) { // NOTE: All runtime integer parameters are actually Longs,so we will have problems // if we actually try to convert the object to one of the s...
[ "public", "static", "Object", "getObjectFromString", "(", "VoltType", "type", ",", "String", "value", ")", "throws", "ParseException", "{", "Object", "ret", "=", "null", ";", "switch", "(", "type", ")", "{", "// NOTE: All runtime integer parameters are actually Longs,...
Returns a casted object of the input value string based on the given type @throws ParseException
[ "Returns", "a", "casted", "object", "of", "the", "input", "value", "string", "based", "on", "the", "given", "type" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/VoltTypeUtil.java#L220-L286
train
VoltDB/voltdb
src/frontend/org/voltdb/utils/VoltTypeUtil.java
VoltTypeUtil.getNumericLiteralType
public static VoltType getNumericLiteralType(VoltType vt, String value) { try { Long.parseLong(value); } catch (NumberFormatException e) { // Our DECIMAL may not be bigger/smaller enough to store the constant value return VoltType.DECIMAL; } return vt;...
java
public static VoltType getNumericLiteralType(VoltType vt, String value) { try { Long.parseLong(value); } catch (NumberFormatException e) { // Our DECIMAL may not be bigger/smaller enough to store the constant value return VoltType.DECIMAL; } return vt;...
[ "public", "static", "VoltType", "getNumericLiteralType", "(", "VoltType", "vt", ",", "String", "value", ")", "{", "try", "{", "Long", ".", "parseLong", "(", "value", ")", ";", "}", "catch", "(", "NumberFormatException", "e", ")", "{", "// Our DECIMAL may not b...
If the type is NUMERIC from hsqldb, VoltDB has to decide its real type. It's either INTEGER or DECIMAL according to the SQL Standard. Thanks for Hsqldb 1.9, FLOAT literal values have been handled well with E sign. @param vt @param value @return
[ "If", "the", "type", "is", "NUMERIC", "from", "hsqldb", "VoltDB", "has", "to", "decide", "its", "real", "type", ".", "It", "s", "either", "INTEGER", "or", "DECIMAL", "according", "to", "the", "SQL", "Standard", ".", "Thanks", "for", "Hsqldb", "1", ".", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/VoltTypeUtil.java#L352-L360
train
VoltDB/voltdb
src/frontend/org/voltdb/client/ProcedureInvocationExtensions.java
ProcedureInvocationExtensions.writeLength
private static void writeLength(ByteBuffer buf, int length) { assert(length >= 0); assert(length == (length & (~length + 1))); // check if power of two // shockingly fast log_2 uses intrinsics in JDK >= 1.7 byte log2size = (byte) (32 - Integer.numberOfLeadingZeros(length)); buf...
java
private static void writeLength(ByteBuffer buf, int length) { assert(length >= 0); assert(length == (length & (~length + 1))); // check if power of two // shockingly fast log_2 uses intrinsics in JDK >= 1.7 byte log2size = (byte) (32 - Integer.numberOfLeadingZeros(length)); buf...
[ "private", "static", "void", "writeLength", "(", "ByteBuffer", "buf", ",", "int", "length", ")", "{", "assert", "(", "length", ">=", "0", ")", ";", "assert", "(", "length", "==", "(", "length", "&", "(", "~", "length", "+", "1", ")", ")", ")", ";",...
Over-clever way to store lots of lengths in a single byte Length must be a power of two >= 0.
[ "Over", "-", "clever", "way", "to", "store", "lots", "of", "lengths", "in", "a", "single", "byte", "Length", "must", "be", "a", "power", "of", "two", ">", "=", "0", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/ProcedureInvocationExtensions.java#L99-L107
train
VoltDB/voltdb
src/frontend/org/voltdb/OpsRegistrar.java
OpsRegistrar.getAgent
public OpsAgent getAgent(OpsSelector selector) { OpsAgent agent = m_agents.get(selector); assert (agent != null); return agent; }
java
public OpsAgent getAgent(OpsSelector selector) { OpsAgent agent = m_agents.get(selector); assert (agent != null); return agent; }
[ "public", "OpsAgent", "getAgent", "(", "OpsSelector", "selector", ")", "{", "OpsAgent", "agent", "=", "m_agents", ".", "get", "(", "selector", ")", ";", "assert", "(", "agent", "!=", "null", ")", ";", "return", "agent", ";", "}" ]
Return the OpsAgent for the specified selector.
[ "Return", "the", "OpsAgent", "for", "the", "specified", "selector", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/OpsRegistrar.java#L79-L83
train
VoltDB/voltdb
src/frontend/org/voltdb/OpsRegistrar.java
OpsRegistrar.shutdown
public void shutdown() { for (Entry<OpsSelector, OpsAgent> entry : m_agents.entrySet()) { try { entry.getValue().shutdown(); } catch (InterruptedException e) {} } m_agents.clear(); }
java
public void shutdown() { for (Entry<OpsSelector, OpsAgent> entry : m_agents.entrySet()) { try { entry.getValue().shutdown(); } catch (InterruptedException e) {} } m_agents.clear(); }
[ "public", "void", "shutdown", "(", ")", "{", "for", "(", "Entry", "<", "OpsSelector", ",", "OpsAgent", ">", "entry", ":", "m_agents", ".", "entrySet", "(", ")", ")", "{", "try", "{", "entry", ".", "getValue", "(", ")", ".", "shutdown", "(", ")", ";...
Shutdown all the OpsAgent's executor services. Should be possible to eventually consolidate all of them into a single executor service.
[ "Shutdown", "all", "the", "OpsAgent", "s", "executor", "services", ".", "Should", "be", "possible", "to", "eventually", "consolidate", "all", "of", "them", "into", "a", "single", "executor", "service", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/OpsRegistrar.java#L89-L97
train
VoltDB/voltdb
src/frontend/org/voltdb/compiler/VoltDDLElementTracker.java
VoltDDLElementTracker.add
public String add(ProcedureDescriptor descriptor) throws VoltCompilerException { assert descriptor != null; String className = descriptor.m_className; assert className != null && ! className.trim().isEmpty(); String shortName = deriveShortProcedureName(className); if( m_pr...
java
public String add(ProcedureDescriptor descriptor) throws VoltCompilerException { assert descriptor != null; String className = descriptor.m_className; assert className != null && ! className.trim().isEmpty(); String shortName = deriveShortProcedureName(className); if( m_pr...
[ "public", "String", "add", "(", "ProcedureDescriptor", "descriptor", ")", "throws", "VoltCompilerException", "{", "assert", "descriptor", "!=", "null", ";", "String", "className", "=", "descriptor", ".", "m_className", ";", "assert", "className", "!=", "null", "&&...
Tracks the given procedure descriptor if it is not already tracked @param descriptor a {@link VoltCompiler.ProcedureDescriptor} @return name added to procedure map @throws VoltCompilerException if it is already tracked
[ "Tracks", "the", "given", "procedure", "descriptor", "if", "it", "is", "not", "already", "tracked" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltDDLElementTracker.java#L105-L122
train
VoltDB/voltdb
src/frontend/org/voltdb/compiler/VoltDDLElementTracker.java
VoltDDLElementTracker.removeProcedure
public void removeProcedure(String procName, boolean ifExists) throws VoltCompilerException { assert procName != null && ! procName.trim().isEmpty(); String shortName = deriveShortProcedureName(procName); if( m_procedureMap.containsKey(shortName)) { m_procedureMap.remove(shortN...
java
public void removeProcedure(String procName, boolean ifExists) throws VoltCompilerException { assert procName != null && ! procName.trim().isEmpty(); String shortName = deriveShortProcedureName(procName); if( m_procedureMap.containsKey(shortName)) { m_procedureMap.remove(shortN...
[ "public", "void", "removeProcedure", "(", "String", "procName", ",", "boolean", "ifExists", ")", "throws", "VoltCompilerException", "{", "assert", "procName", "!=", "null", "&&", "!", "procName", ".", "trim", "(", ")", ".", "isEmpty", "(", ")", ";", "String"...
Searches for and removes the Procedure provided in prior DDL statements @param Name of procedure being removed @throws VoltCompilerException if the procedure does not exist
[ "Searches", "for", "and", "removes", "the", "Procedure", "provided", "in", "prior", "DDL", "statements" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltDDLElementTracker.java#L129-L142
train
VoltDB/voltdb
src/frontend/org/voltdb/compiler/VoltDDLElementTracker.java
VoltDDLElementTracker.addProcedurePartitionInfoTo
public void addProcedurePartitionInfoTo(String procedureName, ProcedurePartitionData data) throws VoltCompilerException { ProcedureDescriptor descriptor = m_procedureMap.get(procedureName); if( descriptor == null) { throw m_compiler.new VoltCompilerException(String.format( ...
java
public void addProcedurePartitionInfoTo(String procedureName, ProcedurePartitionData data) throws VoltCompilerException { ProcedureDescriptor descriptor = m_procedureMap.get(procedureName); if( descriptor == null) { throw m_compiler.new VoltCompilerException(String.format( ...
[ "public", "void", "addProcedurePartitionInfoTo", "(", "String", "procedureName", ",", "ProcedurePartitionData", "data", ")", "throws", "VoltCompilerException", "{", "ProcedureDescriptor", "descriptor", "=", "m_procedureMap", ".", "get", "(", "procedureName", ")", ";", "...
Associates the given partition info to the given tracked procedure @param procedureName the short name of the procedure name @param partitionInfo the partition info to associate with the procedure @throws VoltCompilerException when there is no corresponding tracked procedure
[ "Associates", "the", "given", "partition", "info", "to", "the", "given", "tracked", "procedure" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltDDLElementTracker.java#L151-L179
train
VoltDB/voltdb
src/frontend/org/voltdb/compiler/VoltDDLElementTracker.java
VoltDDLElementTracker.addExportedTable
void addExportedTable(String tableName, String targetName, boolean isStream) { assert tableName != null && ! tableName.trim().isEmpty(); assert targetName != null && ! targetName.trim().isEmpty(); // store uppercase in the catalog as typename targetName = targetName.toUpperCase(); ...
java
void addExportedTable(String tableName, String targetName, boolean isStream) { assert tableName != null && ! tableName.trim().isEmpty(); assert targetName != null && ! targetName.trim().isEmpty(); // store uppercase in the catalog as typename targetName = targetName.toUpperCase(); ...
[ "void", "addExportedTable", "(", "String", "tableName", ",", "String", "targetName", ",", "boolean", "isStream", ")", "{", "assert", "tableName", "!=", "null", "&&", "!", "tableName", ".", "trim", "(", ")", ".", "isEmpty", "(", ")", ";", "assert", "targetN...
Track an exported table @param tableName a table name @param targetName @throws VoltCompilerException when the given table is already exported
[ "Track", "an", "exported", "table" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltDDLElementTracker.java#L195-L214
train
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/ImmutableList.java
ImmutableList.asImmutableList
static <E> ImmutableList<E> asImmutableList(Object[] elements, int length) { switch (length) { case 0: return of(); case 1: @SuppressWarnings("unchecked") // collection had only Es in it ImmutableList<E> list = new SingletonImmutableList<E>((E) elements[0]); return list; ...
java
static <E> ImmutableList<E> asImmutableList(Object[] elements, int length) { switch (length) { case 0: return of(); case 1: @SuppressWarnings("unchecked") // collection had only Es in it ImmutableList<E> list = new SingletonImmutableList<E>((E) elements[0]); return list; ...
[ "static", "<", "E", ">", "ImmutableList", "<", "E", ">", "asImmutableList", "(", "Object", "[", "]", "elements", ",", "int", "length", ")", "{", "switch", "(", "length", ")", "{", "case", "0", ":", "return", "of", "(", ")", ";", "case", "1", ":", ...
Views the array as an immutable list. Copies if the specified range does not cover the complete array. Does not check for nulls.
[ "Views", "the", "array", "as", "an", "immutable", "list", ".", "Copies", "if", "the", "specified", "range", "does", "not", "cover", "the", "complete", "array", ".", "Does", "not", "check", "for", "nulls", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/ImmutableList.java#L297-L311
train
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/Ordering.java
Ordering.min
@CanIgnoreReturnValue // TODO(kak): Consider removing this public <E extends T> E min(Iterable<E> iterable) { return min(iterable.iterator()); }
java
@CanIgnoreReturnValue // TODO(kak): Consider removing this public <E extends T> E min(Iterable<E> iterable) { return min(iterable.iterator()); }
[ "@", "CanIgnoreReturnValue", "// TODO(kak): Consider removing this", "public", "<", "E", "extends", "T", ">", "E", "min", "(", "Iterable", "<", "E", ">", "iterable", ")", "{", "return", "min", "(", "iterable", ".", "iterator", "(", ")", ")", ";", "}" ]
Returns the least of the specified values according to this ordering. If there are multiple least values, the first of those is returned. <p><b>Java 8 users:</b> If {@code iterable} is a {@link Collection}, use {@code Collections.min(collection, thisComparator)} instead. Otherwise, continue to use this method for now....
[ "Returns", "the", "least", "of", "the", "specified", "values", "according", "to", "this", "ordering", ".", "If", "there", "are", "multiple", "least", "values", "the", "first", "of", "those", "is", "returned", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/Ordering.java#L576-L579
train
VoltDB/voltdb
src/frontend/org/voltdb/StatsProcInputTable.java
StatsProcInputTable.calculateAverage
static long calculateAverage(long currAvg, long currInvoc, long rowAvg, long rowInvoc) { long currTtl = currAvg * currInvoc; long rowTtl = rowAvg * rowInvoc; // If both are 0, then currTtl, rowTtl are also 0. if ((currInvoc + rowInvoc) == 0L) { return 0L; } else ...
java
static long calculateAverage(long currAvg, long currInvoc, long rowAvg, long rowInvoc) { long currTtl = currAvg * currInvoc; long rowTtl = rowAvg * rowInvoc; // If both are 0, then currTtl, rowTtl are also 0. if ((currInvoc + rowInvoc) == 0L) { return 0L; } else ...
[ "static", "long", "calculateAverage", "(", "long", "currAvg", ",", "long", "currInvoc", ",", "long", "rowAvg", ",", "long", "rowInvoc", ")", "{", "long", "currTtl", "=", "currAvg", "*", "currInvoc", ";", "long", "rowTtl", "=", "rowAvg", "*", "rowInvoc", ";...
Given a running average and the running invocation total as well as a new row's average and invocation total, return a new running average
[ "Given", "a", "running", "average", "and", "the", "running", "invocation", "total", "as", "well", "as", "a", "new", "row", "s", "average", "and", "invocation", "total", "return", "a", "new", "running", "average" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/StatsProcInputTable.java#L97-L108
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/util/ConnectionDialogCommon.java
ConnectionDialogCommon.addToRecentConnectionSettings
static void addToRecentConnectionSettings(Hashtable settings, ConnectionSetting newSetting) throws IOException { settings.put(newSetting.getName(), newSetting); ConnectionDialogCommon.storeRecentConnectionSettings(settings); }
java
static void addToRecentConnectionSettings(Hashtable settings, ConnectionSetting newSetting) throws IOException { settings.put(newSetting.getName(), newSetting); ConnectionDialogCommon.storeRecentConnectionSettings(settings); }
[ "static", "void", "addToRecentConnectionSettings", "(", "Hashtable", "settings", ",", "ConnectionSetting", "newSetting", ")", "throws", "IOException", "{", "settings", ".", "put", "(", "newSetting", ".", "getName", "(", ")", ",", "newSetting", ")", ";", "Connectio...
Adds the new settings name if it does not nexist, or overwrites the old one.
[ "Adds", "the", "new", "settings", "name", "if", "it", "does", "not", "nexist", "or", "overwrites", "the", "old", "one", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ConnectionDialogCommon.java#L236-L240
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/util/ConnectionDialogCommon.java
ConnectionDialogCommon.storeRecentConnectionSettings
private static void storeRecentConnectionSettings(Hashtable settings) { try { if (recentSettings == null) { setHomeDir(); if (homedir == null) { return; } recentSettings = new File(homedir, fileName); ...
java
private static void storeRecentConnectionSettings(Hashtable settings) { try { if (recentSettings == null) { setHomeDir(); if (homedir == null) { return; } recentSettings = new File(homedir, fileName); ...
[ "private", "static", "void", "storeRecentConnectionSettings", "(", "Hashtable", "settings", ")", "{", "try", "{", "if", "(", "recentSettings", "==", "null", ")", "{", "setHomeDir", "(", ")", ";", "if", "(", "homedir", "==", "null", ")", "{", "return", ";",...
Here's a non-secure method of storing recent connection settings. @param settings ConnectionSetting[] @throw IOException if something goes wrong while writing
[ "Here", "s", "a", "non", "-", "secure", "method", "of", "storing", "recent", "connection", "settings", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ConnectionDialogCommon.java#L248-L283
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/util/ConnectionDialogCommon.java
ConnectionDialogCommon.deleteRecentConnectionSettings
static void deleteRecentConnectionSettings() { try { if (recentSettings == null) { setHomeDir(); if (homedir == null) { return; } recentSettings = new File(homedir, fileName); } if (!recen...
java
static void deleteRecentConnectionSettings() { try { if (recentSettings == null) { setHomeDir(); if (homedir == null) { return; } recentSettings = new File(homedir, fileName); } if (!recen...
[ "static", "void", "deleteRecentConnectionSettings", "(", ")", "{", "try", "{", "if", "(", "recentSettings", "==", "null", ")", "{", "setHomeDir", "(", ")", ";", "if", "(", "homedir", "==", "null", ")", "{", "return", ";", "}", "recentSettings", "=", "new...
Removes the recent connection settings file store.
[ "Removes", "the", "recent", "connection", "settings", "file", "store", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ConnectionDialogCommon.java#L288-L311
train
VoltDB/voltdb
src/frontend/org/voltdb/client/ClientStatsContext.java
ClientStatsContext.getAffinityStats
public Map<Integer, ClientAffinityStats> getAffinityStats() { Map<Integer, ClientAffinityStats> retval = new TreeMap<Integer, ClientAffinityStats>(); for (Entry<Integer, ClientAffinityStats> e : m_currentAffinity.entrySet()) { if (m_baselineAffinity.containsKey(e.getKey())) { ...
java
public Map<Integer, ClientAffinityStats> getAffinityStats() { Map<Integer, ClientAffinityStats> retval = new TreeMap<Integer, ClientAffinityStats>(); for (Entry<Integer, ClientAffinityStats> e : m_currentAffinity.entrySet()) { if (m_baselineAffinity.containsKey(e.getKey())) { ...
[ "public", "Map", "<", "Integer", ",", "ClientAffinityStats", ">", "getAffinityStats", "(", ")", "{", "Map", "<", "Integer", ",", "ClientAffinityStats", ">", "retval", "=", "new", "TreeMap", "<", "Integer", ",", "ClientAffinityStats", ">", "(", ")", ";", "for...
Get the client affinity stats. Will only be populated if client affinity is enabled. @return A map from an internal partition id to a {@link ClientAffinityStats} instance.
[ "Get", "the", "client", "affinity", "stats", ".", "Will", "only", "be", "populated", "if", "client", "affinity", "is", "enabled", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/ClientStatsContext.java#L212-L224
train
VoltDB/voltdb
src/frontend/org/voltdb/client/ClientStatsContext.java
ClientStatsContext.getAggregateAffinityStats
public ClientAffinityStats getAggregateAffinityStats() { long afWrites = 0; long afReads = 0; long rrWrites = 0; long rrReads = 0; Map<Integer, ClientAffinityStats> affinityStats = getAffinityStats(); for (Entry<Integer, ClientAffinityStats> e : affinityStats.entrySet...
java
public ClientAffinityStats getAggregateAffinityStats() { long afWrites = 0; long afReads = 0; long rrWrites = 0; long rrReads = 0; Map<Integer, ClientAffinityStats> affinityStats = getAffinityStats(); for (Entry<Integer, ClientAffinityStats> e : affinityStats.entrySet...
[ "public", "ClientAffinityStats", "getAggregateAffinityStats", "(", ")", "{", "long", "afWrites", "=", "0", ";", "long", "afReads", "=", "0", ";", "long", "rrWrites", "=", "0", ";", "long", "rrReads", "=", "0", ";", "Map", "<", "Integer", ",", "ClientAffini...
Roll up the per-partition affinity stats and return the totals for each of the four categories. Will only be populated if client affinity is enabled. @return A {@link ClientAffinityStats} instance covering all partitions.
[ "Roll", "up", "the", "per", "-", "partition", "affinity", "stats", "and", "return", "the", "totals", "for", "each", "of", "the", "four", "categories", ".", "Will", "only", "be", "populated", "if", "client", "affinity", "is", "enabled", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/ClientStatsContext.java#L232-L248
train
VoltDB/voltdb
src/frontend/org/voltdb/parser/HSQLLexer.java
HSQLLexer.preprocessHSQLDDL
public static HSQLDDLInfo preprocessHSQLDDL(String ddl) { ddl = SQLLexer.stripComments(ddl); Matcher matcher = HSQL_DDL_PREPROCESSOR.matcher(ddl); if (matcher.find()) { String verbString = matcher.group("verb"); HSQLDDLInfo.Verb verb = HSQLDDLInfo.Verb.get(verbString); ...
java
public static HSQLDDLInfo preprocessHSQLDDL(String ddl) { ddl = SQLLexer.stripComments(ddl); Matcher matcher = HSQL_DDL_PREPROCESSOR.matcher(ddl); if (matcher.find()) { String verbString = matcher.group("verb"); HSQLDDLInfo.Verb verb = HSQLDDLInfo.Verb.get(verbString); ...
[ "public", "static", "HSQLDDLInfo", "preprocessHSQLDDL", "(", "String", "ddl", ")", "{", "ddl", "=", "SQLLexer", ".", "stripComments", "(", "ddl", ")", ";", "Matcher", "matcher", "=", "HSQL_DDL_PREPROCESSOR", ".", "matcher", "(", "ddl", ")", ";", "if", "(", ...
Glean some basic info about DDL statements sent to HSQLDB
[ "Glean", "some", "basic", "info", "about", "DDL", "statements", "sent", "to", "HSQLDB" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/HSQLLexer.java#L61-L108
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpProcedureTask.java
MpProcedureTask.doRestart
public void doRestart(List<Long> masters, Map<Integer, Long> partitionMasters) { List<Long> copy = new ArrayList<Long>(masters); m_restartMasters.set(copy); m_restartMastersMap.set(Maps.newHashMap(partitionMasters)); }
java
public void doRestart(List<Long> masters, Map<Integer, Long> partitionMasters) { List<Long> copy = new ArrayList<Long>(masters); m_restartMasters.set(copy); m_restartMastersMap.set(Maps.newHashMap(partitionMasters)); }
[ "public", "void", "doRestart", "(", "List", "<", "Long", ">", "masters", ",", "Map", "<", "Integer", ",", "Long", ">", "partitionMasters", ")", "{", "List", "<", "Long", ">", "copy", "=", "new", "ArrayList", "<", "Long", ">", "(", "masters", ")", ";"...
Update the list of partition masters to be used when this transaction is restarted. Currently thread-safe because we call this before poisoning the MP Transaction to restart it, and only do this sequentially from the repairing thread.
[ "Update", "the", "list", "of", "partition", "masters", "to", "be", "used", "when", "this", "transaction", "is", "restarted", ".", "Currently", "thread", "-", "safe", "because", "we", "call", "this", "before", "poisoning", "the", "MP", "Transaction", "to", "r...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpProcedureTask.java#L98-L104
train
VoltDB/voltdb
src/frontend/org/voltdb/TableStreamer.java
TableStreamer.activate
public boolean activate(SystemProcedureExecutionContext context, boolean undo, byte[] predicates) { if (!context.activateTableStream(m_tableId, m_type, undo, predicates)) { String tableName = CatalogUtil.getTableNameFromId(context.getDatabase(), m_tableId); log.debug("Attempted to ac...
java
public boolean activate(SystemProcedureExecutionContext context, boolean undo, byte[] predicates) { if (!context.activateTableStream(m_tableId, m_type, undo, predicates)) { String tableName = CatalogUtil.getTableNameFromId(context.getDatabase(), m_tableId); log.debug("Attempted to ac...
[ "public", "boolean", "activate", "(", "SystemProcedureExecutionContext", "context", ",", "boolean", "undo", ",", "byte", "[", "]", "predicates", ")", "{", "if", "(", "!", "context", ".", "activateTableStream", "(", "m_tableId", ",", "m_type", ",", "undo", ",",...
Activate the stream with the given predicates on the given table. @param context Context @param undoToken The undo token @param predicates Predicates associated with the stream @return true if activation succeeded.
[ "Activate", "the", "stream", "with", "the", "given", "predicates", "on", "the", "given", "table", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/TableStreamer.java#L80-L89
train
VoltDB/voltdb
src/frontend/org/voltdb/TableStreamer.java
TableStreamer.streamMore
public Pair<ListenableFuture<?>, Boolean> streamMore(SystemProcedureExecutionContext context, List<DBBPool.BBContainer> outputBuffers, int[] rowCountAccumulator) { ListenableFuture<?> writeFuture = nu...
java
public Pair<ListenableFuture<?>, Boolean> streamMore(SystemProcedureExecutionContext context, List<DBBPool.BBContainer> outputBuffers, int[] rowCountAccumulator) { ListenableFuture<?> writeFuture = nu...
[ "public", "Pair", "<", "ListenableFuture", "<", "?", ">", ",", "Boolean", ">", "streamMore", "(", "SystemProcedureExecutionContext", "context", ",", "List", "<", "DBBPool", ".", "BBContainer", ">", "outputBuffers", ",", "int", "[", "]", "rowCountAccumulator", ")...
Streams more tuples from the table. @param context Context @param outputBuffers Allocated buffers to hold output tuples @param rowCountAccumulator an array of a single int use to accumulate streamed rows count @return A future for all writes to data targets, and a boolean indicating if there's more left in ...
[ "Streams", "more", "tuples", "from", "the", "table", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/TableStreamer.java#L101-L135
train
VoltDB/voltdb
src/frontend/org/voltdb/TableStreamer.java
TableStreamer.prepareBuffers
private void prepareBuffers(List<DBBPool.BBContainer> buffers) { Preconditions.checkArgument(buffers.size() == m_tableTasks.size()); UnmodifiableIterator<SnapshotTableTask> iterator = m_tableTasks.iterator(); for (DBBPool.BBContainer container : buffers) { int headerSize = itera...
java
private void prepareBuffers(List<DBBPool.BBContainer> buffers) { Preconditions.checkArgument(buffers.size() == m_tableTasks.size()); UnmodifiableIterator<SnapshotTableTask> iterator = m_tableTasks.iterator(); for (DBBPool.BBContainer container : buffers) { int headerSize = itera...
[ "private", "void", "prepareBuffers", "(", "List", "<", "DBBPool", ".", "BBContainer", ">", "buffers", ")", "{", "Preconditions", ".", "checkArgument", "(", "buffers", ".", "size", "(", ")", "==", "m_tableTasks", ".", "size", "(", ")", ")", ";", "Unmodifiab...
Set the positions of the buffers to the start of the content, leaving some room for the headers.
[ "Set", "the", "positions", "of", "the", "buffers", "to", "the", "start", "of", "the", "content", "leaving", "some", "room", "for", "the", "headers", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/TableStreamer.java#L158-L169
train
VoltDB/voltdb
src/frontend/org/voltdb/TableStreamer.java
TableStreamer.writeBlocksToTargets
private ListenableFuture<?> writeBlocksToTargets(Collection<DBBPool.BBContainer> outputBuffers, int[] serialized) { Preconditions.checkArgument(m_tableTasks.size() == serialized.length); Preconditions.checkArgument(outputBuffers.size() == serializ...
java
private ListenableFuture<?> writeBlocksToTargets(Collection<DBBPool.BBContainer> outputBuffers, int[] serialized) { Preconditions.checkArgument(m_tableTasks.size() == serialized.length); Preconditions.checkArgument(outputBuffers.size() == serializ...
[ "private", "ListenableFuture", "<", "?", ">", "writeBlocksToTargets", "(", "Collection", "<", "DBBPool", ".", "BBContainer", ">", "outputBuffers", ",", "int", "[", "]", "serialized", ")", "{", "Preconditions", ".", "checkArgument", "(", "m_tableTasks", ".", "siz...
Finalize the output buffers and write them to the corresponding data targets @return A future that can used to wait for all targets to finish writing the buffers
[ "Finalize", "the", "output", "buffers", "and", "write", "them", "to", "the", "corresponding", "data", "targets" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/TableStreamer.java#L176-L214
train
VoltDB/voltdb
third_party/java/src/org/HdrHistogram_voltpatches/Recorder.java
Recorder.recordValue
public void recordValue(final long value) throws ArrayIndexOutOfBoundsException { long criticalValueAtEnter = recordingPhaser.writerCriticalSectionEnter(); try { activeHistogram.recordValue(value); } finally { recordingPhaser.writerCriticalSectionExit(criticalValueAtEnter...
java
public void recordValue(final long value) throws ArrayIndexOutOfBoundsException { long criticalValueAtEnter = recordingPhaser.writerCriticalSectionEnter(); try { activeHistogram.recordValue(value); } finally { recordingPhaser.writerCriticalSectionExit(criticalValueAtEnter...
[ "public", "void", "recordValue", "(", "final", "long", "value", ")", "throws", "ArrayIndexOutOfBoundsException", "{", "long", "criticalValueAtEnter", "=", "recordingPhaser", ".", "writerCriticalSectionEnter", "(", ")", ";", "try", "{", "activeHistogram", ".", "recordV...
Record a value @param value the value to record @throws ArrayIndexOutOfBoundsException (may throw) if value is exceeds highestTrackableValue
[ "Record", "a", "value" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/HdrHistogram_voltpatches/Recorder.java#L97-L104
train
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/HashBiMap.java
HashBiMap.create
public static <K, V> HashBiMap<K, V> create(int expectedSize) { return new HashBiMap<K, V>(expectedSize); }
java
public static <K, V> HashBiMap<K, V> create(int expectedSize) { return new HashBiMap<K, V>(expectedSize); }
[ "public", "static", "<", "K", ",", "V", ">", "HashBiMap", "<", "K", ",", "V", ">", "create", "(", "int", "expectedSize", ")", "{", "return", "new", "HashBiMap", "<", "K", ",", "V", ">", "(", "expectedSize", ")", ";", "}" ]
Constructs a new, empty bimap with the specified expected size. @param expectedSize the expected number of entries @throws IllegalArgumentException if the specified expected size is negative
[ "Constructs", "a", "new", "empty", "bimap", "with", "the", "specified", "expected", "size", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/HashBiMap.java#L72-L74
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/SpPromoteAlgo.java
SpPromoteAlgo.repairSurvivors
public void repairSurvivors() { // cancel() and repair() must be synchronized by the caller (the deliver lock, // currently). If cancelled and the last repair message arrives, don't send // out corrections! if (this.m_promotionResult.isCancelled()) { repairLogger.debug(m_...
java
public void repairSurvivors() { // cancel() and repair() must be synchronized by the caller (the deliver lock, // currently). If cancelled and the last repair message arrives, don't send // out corrections! if (this.m_promotionResult.isCancelled()) { repairLogger.debug(m_...
[ "public", "void", "repairSurvivors", "(", ")", "{", "// cancel() and repair() must be synchronized by the caller (the deliver lock,", "// currently). If cancelled and the last repair message arrives, don't send", "// out corrections!", "if", "(", "this", ".", "m_promotionResult", ".", ...
Send missed-messages to survivors.
[ "Send", "missed", "-", "messages", "to", "survivors", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpPromoteAlgo.java#L222-L265
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSetMetaData.java
JDBCResultSetMetaData.init
void init(ResultMetaData meta, HsqlProperties props) throws SQLException { resultMetaData = meta; columnCount = resultMetaData.getColumnCount(); // fredt - props is null for internal connections, so always use the // default behaviour in this case // JDBCDriver.get...
java
void init(ResultMetaData meta, HsqlProperties props) throws SQLException { resultMetaData = meta; columnCount = resultMetaData.getColumnCount(); // fredt - props is null for internal connections, so always use the // default behaviour in this case // JDBCDriver.get...
[ "void", "init", "(", "ResultMetaData", "meta", ",", "HsqlProperties", "props", ")", "throws", "SQLException", "{", "resultMetaData", "=", "meta", ";", "columnCount", "=", "resultMetaData", ".", "getColumnCount", "(", ")", ";", "// fredt - props is null for internal c...
Initializes this JDBCResultSetMetaData object from the specified Result and HsqlProperties objects. @param meta the ResultMetaData object from which to initialize this JDBCResultSetMetaData object @param props the HsqlProperties object from which to initialize this JDBCResultSetMetaData object @throws SQLException if ...
[ "Initializes", "this", "JDBCResultSetMetaData", "object", "from", "the", "specified", "Result", "and", "HsqlProperties", "objects", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSetMetaData.java#L918-L930
train
VoltDB/voltdb
src/frontend/org/voltcore/agreement/MeshArbiter.java
MeshArbiter.reconfigureOnFault
Map<Long, Long> reconfigureOnFault(Set<Long> hsIds, FaultMessage fm) { return reconfigureOnFault(hsIds, fm, new HashSet<Long>()); }
java
Map<Long, Long> reconfigureOnFault(Set<Long> hsIds, FaultMessage fm) { return reconfigureOnFault(hsIds, fm, new HashSet<Long>()); }
[ "Map", "<", "Long", ",", "Long", ">", "reconfigureOnFault", "(", "Set", "<", "Long", ">", "hsIds", ",", "FaultMessage", "fm", ")", "{", "return", "reconfigureOnFault", "(", "hsIds", ",", "fm", ",", "new", "HashSet", "<", "Long", ">", "(", ")", ")", "...
Convenience wrapper for tests that don't care about unknown sites
[ "Convenience", "wrapper", "for", "tests", "that", "don", "t", "care", "about", "unknown", "sites" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/MeshArbiter.java#L259-L261
train
VoltDB/voltdb
src/frontend/org/voltcore/agreement/MeshArbiter.java
MeshArbiter.reconfigureOnFault
public Map<Long, Long> reconfigureOnFault(Set<Long> hsIds, FaultMessage fm, Set<Long> unknownFaultedSites) { boolean proceed = false; do { Discard ignoreIt = mayIgnore(hsIds, fm); if (Discard.DoNot == ignoreIt) { m_inTrouble.put(fm.failedSite, fm.witnessed || fm.d...
java
public Map<Long, Long> reconfigureOnFault(Set<Long> hsIds, FaultMessage fm, Set<Long> unknownFaultedSites) { boolean proceed = false; do { Discard ignoreIt = mayIgnore(hsIds, fm); if (Discard.DoNot == ignoreIt) { m_inTrouble.put(fm.failedSite, fm.witnessed || fm.d...
[ "public", "Map", "<", "Long", ",", "Long", ">", "reconfigureOnFault", "(", "Set", "<", "Long", ">", "hsIds", ",", "FaultMessage", "fm", ",", "Set", "<", "Long", ">", "unknownFaultedSites", ")", "{", "boolean", "proceed", "=", "false", ";", "do", "{", "...
Process the fault message, and if necessary start arbitration. @param hsIds pre-failure mesh ids @param fm a {@link FaultMessage} @param unknownFaultedSites Sites that we don't know about, but are informed have failed; tracked here so that we can remove the associated hosts @return a map where the keys are the sites we...
[ "Process", "the", "fault", "message", "and", "if", "necessary", "start", "arbitration", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/MeshArbiter.java#L276-L345
train
VoltDB/voltdb
src/frontend/org/voltdb/sysprocs/saverestore/IndexSnapshotWritePlan.java
IndexSnapshotWritePlan.createIndexExpressionForTable
public static AbstractExpression createIndexExpressionForTable(Table table, Map<Integer, Integer> ranges) { HashRangeExpression predicate = new HashRangeExpression(); predicate.setRanges(ranges); predicate.setHashColumnIndex(table.getPartitioncolumn().getIndex()); return predicate; ...
java
public static AbstractExpression createIndexExpressionForTable(Table table, Map<Integer, Integer> ranges) { HashRangeExpression predicate = new HashRangeExpression(); predicate.setRanges(ranges); predicate.setHashColumnIndex(table.getPartitioncolumn().getIndex()); return predicate; ...
[ "public", "static", "AbstractExpression", "createIndexExpressionForTable", "(", "Table", "table", ",", "Map", "<", "Integer", ",", "Integer", ">", "ranges", ")", "{", "HashRangeExpression", "predicate", "=", "new", "HashRangeExpression", "(", ")", ";", "predicate", ...
Create the expression used to build elastic index for a given table. @param table The table to build the elastic index on @param ranges The hash ranges that the index should include
[ "Create", "the", "expression", "used", "to", "build", "elastic", "index", "for", "a", "given", "table", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/IndexSnapshotWritePlan.java#L116-L123
train
VoltDB/voltdb
examples/bank-offers/client/bankoffers/OfferBenchmark.java
OfferBenchmark.initialize
public void initialize() throws Exception { List<Long> acctList = new ArrayList<Long>(config.custcount*2); List<String> stList = new ArrayList<String>(config.custcount*2); // generate customers System.out.println("generating " + config.custcount + " customers..."); for (int c=0...
java
public void initialize() throws Exception { List<Long> acctList = new ArrayList<Long>(config.custcount*2); List<String> stList = new ArrayList<String>(config.custcount*2); // generate customers System.out.println("generating " + config.custcount + " customers..."); for (int c=0...
[ "public", "void", "initialize", "(", ")", "throws", "Exception", "{", "List", "<", "Long", ">", "acctList", "=", "new", "ArrayList", "<", "Long", ">", "(", "config", ".", "custcount", "*", "2", ")", ";", "List", "<", "String", ">", "stList", "=", "ne...
this gets run once before the benchmark begins
[ "this", "gets", "run", "once", "before", "the", "benchmark", "begins" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/bank-offers/client/bankoffers/OfferBenchmark.java#L331-L398
train
VoltDB/voltdb
src/frontend/org/voltcore/zk/CoreZK.java
CoreZK.createHierarchy
public static void createHierarchy(ZooKeeper zk) { LinkedList<ZKUtil.StringCallback> callbacks = new LinkedList<ZKUtil.StringCallback>(); for (String node : CoreZK.ZK_HIERARCHY) { ZKUtil.StringCallback cb = new ZKUtil.StringCallback(); callbacks.add(cb); z...
java
public static void createHierarchy(ZooKeeper zk) { LinkedList<ZKUtil.StringCallback> callbacks = new LinkedList<ZKUtil.StringCallback>(); for (String node : CoreZK.ZK_HIERARCHY) { ZKUtil.StringCallback cb = new ZKUtil.StringCallback(); callbacks.add(cb); z...
[ "public", "static", "void", "createHierarchy", "(", "ZooKeeper", "zk", ")", "{", "LinkedList", "<", "ZKUtil", ".", "StringCallback", ">", "callbacks", "=", "new", "LinkedList", "<", "ZKUtil", ".", "StringCallback", ">", "(", ")", ";", "for", "(", "String", ...
Creates the ZK directory nodes. Only the leader should do this.
[ "Creates", "the", "ZK", "directory", "nodes", ".", "Only", "the", "leader", "should", "do", "this", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/CoreZK.java#L69-L84
train
VoltDB/voltdb
src/frontend/org/voltcore/zk/CoreZK.java
CoreZK.createRejoinNodeIndicator
public static int createRejoinNodeIndicator(ZooKeeper zk, int hostId) { try { zk.create(rejoin_node_blocker, ByteBuffer.allocate(4).putInt(hostId).array(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); } catch (KeeperExcept...
java
public static int createRejoinNodeIndicator(ZooKeeper zk, int hostId) { try { zk.create(rejoin_node_blocker, ByteBuffer.allocate(4).putInt(hostId).array(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); } catch (KeeperExcept...
[ "public", "static", "int", "createRejoinNodeIndicator", "(", "ZooKeeper", "zk", ",", "int", "hostId", ")", "{", "try", "{", "zk", ".", "create", "(", "rejoin_node_blocker", ",", "ByteBuffer", ".", "allocate", "(", "4", ")", ".", "putInt", "(", "hostId", ")...
Creates a rejoin blocker for the given rejoining host. This prevents other hosts from rejoining at the same time. @param zk ZooKeeper client @param hostId The rejoining host ID @return -1 if the blocker is created successfully, or the host ID if there is already another host rejoining.
[ "Creates", "a", "rejoin", "blocker", "for", "the", "given", "rejoining", "host", ".", "This", "prevents", "other", "hosts", "from", "rejoining", "at", "the", "same", "time", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/CoreZK.java#L113-L137
train
VoltDB/voltdb
src/frontend/org/voltcore/zk/CoreZK.java
CoreZK.removeRejoinNodeIndicatorForHost
public static boolean removeRejoinNodeIndicatorForHost(ZooKeeper zk, int hostId) { try { Stat stat = new Stat(); final int rejoiningHost = ByteBuffer.wrap(zk.getData(rejoin_node_blocker, false, stat)).getInt(); if (hostId == rejoiningHost) { zk.delete(rejo...
java
public static boolean removeRejoinNodeIndicatorForHost(ZooKeeper zk, int hostId) { try { Stat stat = new Stat(); final int rejoiningHost = ByteBuffer.wrap(zk.getData(rejoin_node_blocker, false, stat)).getInt(); if (hostId == rejoiningHost) { zk.delete(rejo...
[ "public", "static", "boolean", "removeRejoinNodeIndicatorForHost", "(", "ZooKeeper", "zk", ",", "int", "hostId", ")", "{", "try", "{", "Stat", "stat", "=", "new", "Stat", "(", ")", ";", "final", "int", "rejoiningHost", "=", "ByteBuffer", ".", "wrap", "(", ...
Removes the rejoin blocker if the current rejoin blocker contains the given host ID. @return true if the blocker is removed successfully, false otherwise.
[ "Removes", "the", "rejoin", "blocker", "if", "the", "current", "rejoin", "blocker", "contains", "the", "given", "host", "ID", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/CoreZK.java#L143-L162
train
VoltDB/voltdb
src/frontend/org/voltcore/zk/CoreZK.java
CoreZK.removeJoinNodeIndicatorForHost
public static boolean removeJoinNodeIndicatorForHost(ZooKeeper zk, int hostId) { try { Stat stat = new Stat(); String path = ZKUtil.joinZKPath(readyjoininghosts, Integer.toString(hostId)); zk.getData(path, false, stat); zk.delete(path, stat.getVersion()); ...
java
public static boolean removeJoinNodeIndicatorForHost(ZooKeeper zk, int hostId) { try { Stat stat = new Stat(); String path = ZKUtil.joinZKPath(readyjoininghosts, Integer.toString(hostId)); zk.getData(path, false, stat); zk.delete(path, stat.getVersion()); ...
[ "public", "static", "boolean", "removeJoinNodeIndicatorForHost", "(", "ZooKeeper", "zk", ",", "int", "hostId", ")", "{", "try", "{", "Stat", "stat", "=", "new", "Stat", "(", ")", ";", "String", "path", "=", "ZKUtil", ".", "joinZKPath", "(", "readyjoininghost...
Removes the join indicator for the given host ID. @return true if the indicator is removed successfully, false otherwise.
[ "Removes", "the", "join", "indicator", "for", "the", "given", "host", "ID", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/CoreZK.java#L168-L186
train
VoltDB/voltdb
src/frontend/org/voltcore/zk/CoreZK.java
CoreZK.isPartitionCleanupInProgress
public static boolean isPartitionCleanupInProgress(ZooKeeper zk) throws KeeperException, InterruptedException { List<String> children = zk.getChildren(VoltZK.leaders_initiators, null); List<ZKUtil.ChildrenCallback> childrenCallbacks = Lists.newArrayList(); for (String child : children) { ...
java
public static boolean isPartitionCleanupInProgress(ZooKeeper zk) throws KeeperException, InterruptedException { List<String> children = zk.getChildren(VoltZK.leaders_initiators, null); List<ZKUtil.ChildrenCallback> childrenCallbacks = Lists.newArrayList(); for (String child : children) { ...
[ "public", "static", "boolean", "isPartitionCleanupInProgress", "(", "ZooKeeper", "zk", ")", "throws", "KeeperException", ",", "InterruptedException", "{", "List", "<", "String", ">", "children", "=", "zk", ".", "getChildren", "(", "VoltZK", ".", "leaders_initiators"...
Checks if the cluster suffered an aborted join or node shutdown and is still in the process of cleaning up. @param zk ZooKeeper client @return true if the cluster is still cleaning up. @throws KeeperException @throws InterruptedException
[ "Checks", "if", "the", "cluster", "suffered", "an", "aborted", "join", "or", "node", "shutdown", "and", "is", "still", "in", "the", "process", "of", "cleaning", "up", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/CoreZK.java#L195-L212
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java
ColumnSchema.isNullable
public boolean isNullable() { boolean isNullable = super.isNullable(); if (isNullable) { if (dataType.isDomainType()) { return dataType.userTypeModifier.isNullable(); } } return isNullable; }
java
public boolean isNullable() { boolean isNullable = super.isNullable(); if (isNullable) { if (dataType.isDomainType()) { return dataType.userTypeModifier.isNullable(); } } return isNullable; }
[ "public", "boolean", "isNullable", "(", ")", "{", "boolean", "isNullable", "=", "super", ".", "isNullable", "(", ")", ";", "if", "(", "isNullable", ")", "{", "if", "(", "dataType", ".", "isDomainType", "(", ")", ")", "{", "return", "dataType", ".", "us...
Is column nullable. @return boolean
[ "Is", "column", "nullable", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java#L182-L193
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java
ColumnSchema.getDefaultValue
Object getDefaultValue(Session session) { return defaultExpression == null ? null : defaultExpression.getValue(session, dataType); }
java
Object getDefaultValue(Session session) { return defaultExpression == null ? null : defaultExpression.getValue(session, dataType); }
[ "Object", "getDefaultValue", "(", "Session", "session", ")", "{", "return", "defaultExpression", "==", "null", "?", "null", ":", "defaultExpression", ".", "getValue", "(", "session", ",", "dataType", ")", ";", "}" ]
Returns default value in the session context.
[ "Returns", "default", "value", "in", "the", "session", "context", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java#L245-L250
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java
ColumnSchema.getGeneratedValue
Object getGeneratedValue(Session session) { return generatingExpression == null ? null : generatingExpression.getValue( session, dataType); }
java
Object getGeneratedValue(Session session) { return generatingExpression == null ? null : generatingExpression.getValue( session, dataType); }
[ "Object", "getGeneratedValue", "(", "Session", "session", ")", "{", "return", "generatingExpression", "==", "null", "?", "null", ":", "generatingExpression", ".", "getValue", "(", "session", ",", "dataType", ")", ";", "}" ]
Returns generated value in the session context.
[ "Returns", "generated", "value", "in", "the", "session", "context", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java#L255-L260
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java
ColumnSchema.getDefaultSQL
public String getDefaultSQL() { String ddl = null; ddl = defaultExpression == null ? null : defaultExpression.getSQL(); return ddl; }
java
public String getDefaultSQL() { String ddl = null; ddl = defaultExpression == null ? null : defaultExpression.getSQL(); return ddl; }
[ "public", "String", "getDefaultSQL", "(", ")", "{", "String", "ddl", "=", "null", ";", "ddl", "=", "defaultExpression", "==", "null", "?", "null", ":", "defaultExpression", ".", "getSQL", "(", ")", ";", "return", "ddl", ";", "}" ]
Returns SQL for default value.
[ "Returns", "SQL", "for", "default", "value", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java#L265-L273
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java
ColumnSchema.getDefaultExpression
Expression getDefaultExpression() { if (defaultExpression == null) { if (dataType.isDomainType()) { return dataType.userTypeModifier.getDefaultClause(); } return null; } else { return defaultExpression; } }
java
Expression getDefaultExpression() { if (defaultExpression == null) { if (dataType.isDomainType()) { return dataType.userTypeModifier.getDefaultClause(); } return null; } else { return defaultExpression; } }
[ "Expression", "getDefaultExpression", "(", ")", "{", "if", "(", "defaultExpression", "==", "null", ")", "{", "if", "(", "dataType", ".", "isDomainType", "(", ")", ")", "{", "return", "dataType", ".", "userTypeModifier", ".", "getDefaultClause", "(", ")", ";"...
Returns default expression for the column.
[ "Returns", "default", "expression", "for", "the", "column", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java#L278-L289
train
VoltDB/voltdb
src/frontend/org/voltdb/SnapshotSaveAPI.java
SnapshotSaveAPI.createSnapshotCompletionNode
public static ZKUtil.StringCallback createSnapshotCompletionNode(String path, String pathType, String nonce, long...
java
public static ZKUtil.StringCallback createSnapshotCompletionNode(String path, String pathType, String nonce, long...
[ "public", "static", "ZKUtil", ".", "StringCallback", "createSnapshotCompletionNode", "(", "String", "path", ",", "String", "pathType", ",", "String", "nonce", ",", "long", "txnId", ",", "boolean", "isTruncation", ",", "String", "truncReqId", ")", "{", "if", "(",...
Create the completion node for the snapshot identified by the txnId. It assumes that all hosts will race to call this, so it doesn't fail if the node already exists. @param nonce Nonce of the snapshot @param txnId @param hostId The local host ID @param isTruncation Whether or not this is a truncation snapshot @param t...
[ "Create", "the", "completion", "node", "for", "the", "snapshot", "identified", "by", "the", "txnId", ".", "It", "assumes", "that", "all", "hosts", "will", "race", "to", "call", "this", "so", "it", "doesn", "t", "fail", "if", "the", "node", "already", "ex...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SnapshotSaveAPI.java#L394-L431
train
VoltDB/voltdb
src/frontend/org/voltdb/SnapshotSaveAPI.java
SnapshotSaveAPI.logParticipatingHostCount
public static void logParticipatingHostCount(long txnId, int participantCount) { ZooKeeper zk = VoltDB.instance().getHostMessenger().getZK(); final String snapshotPath = VoltZK.completed_snapshots + "/" + txnId; boolean success = false; while (!success) { Stat stat = new Sta...
java
public static void logParticipatingHostCount(long txnId, int participantCount) { ZooKeeper zk = VoltDB.instance().getHostMessenger().getZK(); final String snapshotPath = VoltZK.completed_snapshots + "/" + txnId; boolean success = false; while (!success) { Stat stat = new Sta...
[ "public", "static", "void", "logParticipatingHostCount", "(", "long", "txnId", ",", "int", "participantCount", ")", "{", "ZooKeeper", "zk", "=", "VoltDB", ".", "instance", "(", ")", ".", "getHostMessenger", "(", ")", ".", "getZK", "(", ")", ";", "final", "...
Once participating host count is set, SnapshotCompletionMonitor can check this ZK node to determine whether the snapshot has finished or not. This should only be called when all participants have responded. It is possible that some hosts finish taking snapshot before the coordinator logs the participating host count. ...
[ "Once", "participating", "host", "count", "is", "set", "SnapshotCompletionMonitor", "can", "check", "this", "ZK", "node", "to", "determine", "whether", "the", "snapshot", "has", "finished", "or", "not", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SnapshotSaveAPI.java#L446-L488
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/ManagedPoolDataSource.java
ManagedPoolDataSource.close
public synchronized void close() { this.isPoolClosed = true; while (this.connectionsInactive.size() > 0) { PooledConnection connection = dequeueFirstIfAny(); if (connection != null) { closePhysically( connection, "closing...
java
public synchronized void close() { this.isPoolClosed = true; while (this.connectionsInactive.size() > 0) { PooledConnection connection = dequeueFirstIfAny(); if (connection != null) { closePhysically( connection, "closing...
[ "public", "synchronized", "void", "close", "(", ")", "{", "this", ".", "isPoolClosed", "=", "true", ";", "while", "(", "this", ".", "connectionsInactive", ".", "size", "(", ")", ">", "0", ")", "{", "PooledConnection", "connection", "=", "dequeueFirstIfAny", ...
Closes this connection pool. No further connections can be obtained from it after this. All inactive connections are physically closed before the call returns. Active connections are not closed. There may still be active connections in use after this method returns. When these connections are closed and returned to the...
[ "Closes", "this", "connection", "pool", ".", "No", "further", "connections", "can", "be", "obtained", "from", "it", "after", "this", ".", "All", "inactive", "connections", "are", "physically", "closed", "before", "the", "call", "returns", ".", "Active", "conne...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/ManagedPoolDataSource.java#L798-L811
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/ManagedPoolDataSource.java
ManagedPoolDataSource.closeImmediatedly
public synchronized void closeImmediatedly() { close(); Iterator iterator = this.connectionsInUse.iterator(); while (iterator.hasNext()) { PooledConnection connection = (PooledConnection) iterator.next(); SessionConnectionWrapper sessionWrapper = (Sessi...
java
public synchronized void closeImmediatedly() { close(); Iterator iterator = this.connectionsInUse.iterator(); while (iterator.hasNext()) { PooledConnection connection = (PooledConnection) iterator.next(); SessionConnectionWrapper sessionWrapper = (Sessi...
[ "public", "synchronized", "void", "closeImmediatedly", "(", ")", "{", "close", "(", ")", ";", "Iterator", "iterator", "=", "this", ".", "connectionsInUse", ".", "iterator", "(", ")", ";", "while", "(", "iterator", ".", "hasNext", "(", ")", ")", "{", "Poo...
Closes this connection
[ "Closes", "this", "connection" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/ManagedPoolDataSource.java#L831-L847
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/ManagedPoolDataSource.java
ManagedPoolDataSource.setDriverClassName
public void setDriverClassName(String driverClassName) { if (driverClassName.equals(JDBCConnectionPoolDataSource.driver)) { return; } /** @todo: Use a HSQLDB RuntimeException subclass */ throw new RuntimeException("This class only supports JDBC driver '" ...
java
public void setDriverClassName(String driverClassName) { if (driverClassName.equals(JDBCConnectionPoolDataSource.driver)) { return; } /** @todo: Use a HSQLDB RuntimeException subclass */ throw new RuntimeException("This class only supports JDBC driver '" ...
[ "public", "void", "setDriverClassName", "(", "String", "driverClassName", ")", "{", "if", "(", "driverClassName", ".", "equals", "(", "JDBCConnectionPoolDataSource", ".", "driver", ")", ")", "{", "return", ";", "}", "/** @todo: Use a HSQLDB RuntimeException subclass */"...
For compatibility. @param driverClassName must be the main JDBC driver class name.
[ "For", "compatibility", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/ManagedPoolDataSource.java#L976-L986
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/WindowFunctionPlanNode.java
WindowFunctionPlanNode.toJSONString
@Override public void toJSONString(JSONStringer stringer) throws JSONException { super.toJSONString(stringer); stringer.key("AGGREGATE_COLUMNS") .array(); for (int ii = 0; ii < m_aggregateTypes.size(); ii++) { stringer.object(); stringer.keySymbolValue...
java
@Override public void toJSONString(JSONStringer stringer) throws JSONException { super.toJSONString(stringer); stringer.key("AGGREGATE_COLUMNS") .array(); for (int ii = 0; ii < m_aggregateTypes.size(); ii++) { stringer.object(); stringer.keySymbolValue...
[ "@", "Override", "public", "void", "toJSONString", "(", "JSONStringer", "stringer", ")", "throws", "JSONException", "{", "super", ".", "toJSONString", "(", "stringer", ")", ";", "stringer", ".", "key", "(", "\"AGGREGATE_COLUMNS\"", ")", ".", "array", "(", ")",...
Serialize to JSON. We only serialize the expressions, and not the directions. We won't need them in the executor. The directions will be in the order by plan node in any case.
[ "Serialize", "to", "JSON", ".", "We", "only", "serialize", "the", "expressions", "and", "not", "the", "directions", ".", "We", "won", "t", "need", "them", "in", "the", "executor", ".", "The", "directions", "will", "be", "in", "the", "order", "by", "plan"...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/WindowFunctionPlanNode.java#L125-L146
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/WindowFunctionPlanNode.java
WindowFunctionPlanNode.loadFromJSONObject
@Override public void loadFromJSONObject(JSONObject jobj, Database db) throws JSONException { helpLoadFromJSONObject(jobj, db); JSONArray jarray = jobj.getJSONArray( Members.AGGREGATE_COLUMNS.name() ); int size = jarray.length(); for (int i = 0; i < size; i++) { ...
java
@Override public void loadFromJSONObject(JSONObject jobj, Database db) throws JSONException { helpLoadFromJSONObject(jobj, db); JSONArray jarray = jobj.getJSONArray( Members.AGGREGATE_COLUMNS.name() ); int size = jarray.length(); for (int i = 0; i < size; i++) { ...
[ "@", "Override", "public", "void", "loadFromJSONObject", "(", "JSONObject", "jobj", ",", "Database", "db", ")", "throws", "JSONException", "{", "helpLoadFromJSONObject", "(", "jobj", ",", "db", ")", ";", "JSONArray", "jarray", "=", "jobj", ".", "getJSONArray", ...
Deserialize a PartitionByPlanNode from JSON. Since we don't need the sort directions, and we don't serialize them in toJSONString, then we can't in general get them here.
[ "Deserialize", "a", "PartitionByPlanNode", "from", "JSON", ".", "Since", "we", "don", "t", "need", "the", "sort", "directions", "and", "we", "don", "t", "serialize", "them", "in", "toJSONString", "then", "we", "can", "t", "in", "general", "get", "them", "h...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/WindowFunctionPlanNode.java#L153-L180
train
VoltDB/voltdb
src/frontend/org/voltcore/utils/LatencyWatchdog.java
LatencyWatchdog.run
@Override public void run() { Thread.currentThread().setName("Latency Watchdog"); LOG.info(String.format("Latency Watchdog enabled -- threshold:%d(ms) " + "wakeup_interval:%d(ms) min_log_interval:%d(ms)\n", WATCHDOG_THRESHOLD, WAKEUP_INTE...
java
@Override public void run() { Thread.currentThread().setName("Latency Watchdog"); LOG.info(String.format("Latency Watchdog enabled -- threshold:%d(ms) " + "wakeup_interval:%d(ms) min_log_interval:%d(ms)\n", WATCHDOG_THRESHOLD, WAKEUP_INTE...
[ "@", "Override", "public", "void", "run", "(", ")", "{", "Thread", ".", "currentThread", "(", ")", ".", "setName", "(", "\"Latency Watchdog\"", ")", ";", "LOG", ".", "info", "(", "String", ".", "format", "(", "\"Latency Watchdog enabled -- threshold:%d(ms) \"", ...
The watchdog thread will be invoked every WAKEUP_INTERVAL time, to check if any thread that be monitored has not updated its time stamp more than WATCHDOG_THRESHOLD millisecond. Same stack trace messages are rate limited by MIN_LOG_INTERVAL.
[ "The", "watchdog", "thread", "will", "be", "invoked", "every", "WAKEUP_INTERVAL", "time", "to", "check", "if", "any", "thread", "that", "be", "monitored", "has", "not", "updated", "its", "time", "stamp", "more", "than", "WATCHDOG_THRESHOLD", "millisecond", ".", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/LatencyWatchdog.java#L80-L107
train
VoltDB/voltdb
src/frontend/org/voltdb/ProcedurePartitionData.java
ProcedurePartitionData.fromPartitionInfoString
public static ProcedurePartitionData fromPartitionInfoString(String partitionInfoString) { if (partitionInfoString == null || partitionInfoString.trim().isEmpty()) { return new ProcedurePartitionData(); } String[] partitionInfoParts = new String[0]; partitionInfoParts = part...
java
public static ProcedurePartitionData fromPartitionInfoString(String partitionInfoString) { if (partitionInfoString == null || partitionInfoString.trim().isEmpty()) { return new ProcedurePartitionData(); } String[] partitionInfoParts = new String[0]; partitionInfoParts = part...
[ "public", "static", "ProcedurePartitionData", "fromPartitionInfoString", "(", "String", "partitionInfoString", ")", "{", "if", "(", "partitionInfoString", "==", "null", "||", "partitionInfoString", ".", "trim", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "return...
For Testing usage ONLY. From a partition information string to @ProcedurePartitionData string format: 1) String.format("%s.%s: %s", tableName, columnName, parameterNo) 1) String.format("%s.%s: %s, %s.%s: %s", tableName, columnName, parameterNo, tableName2, columnName2, parameterNo2) @return
[ "For", "Testing", "usage", "ONLY", ".", "From", "a", "partition", "information", "string", "to" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ProcedurePartitionData.java#L107-L141
train
VoltDB/voltdb
src/frontend/org/voltdb/PostGISBackend.java
PostGISBackend.runDDL
@Override public void runDDL(String ddl) { String modifiedDdl = transformDDL(ddl); printTransformedSql(ddl, modifiedDdl); super.runDDL(modifiedDdl, false); }
java
@Override public void runDDL(String ddl) { String modifiedDdl = transformDDL(ddl); printTransformedSql(ddl, modifiedDdl); super.runDDL(modifiedDdl, false); }
[ "@", "Override", "public", "void", "runDDL", "(", "String", "ddl", ")", "{", "String", "modifiedDdl", "=", "transformDDL", "(", "ddl", ")", ";", "printTransformedSql", "(", "ddl", ",", "modifiedDdl", ")", ";", "super", ".", "runDDL", "(", "modifiedDdl", ",...
Modifies DDL statements in such a way that PostGIS results will match VoltDB results, and then passes the remaining work to the base class version.
[ "Modifies", "DDL", "statements", "in", "such", "a", "way", "that", "PostGIS", "results", "will", "match", "VoltDB", "results", "and", "then", "passes", "the", "remaining", "work", "to", "the", "base", "class", "version", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/PostGISBackend.java#L325-L330
train
VoltDB/voltdb
src/frontend/org/voltdb/ProcedureRunnerNT.java
ProcedureRunnerNT.allHostNTProcedureCallback
public void allHostNTProcedureCallback(ClientResponse clientResponse) { synchronized(m_allHostCallbackLock) { int hostId = Integer.parseInt(clientResponse.getAppStatusString()); boolean removed = m_outstandingAllHostProcedureHostIds.remove(hostId); // log this for now... I do...
java
public void allHostNTProcedureCallback(ClientResponse clientResponse) { synchronized(m_allHostCallbackLock) { int hostId = Integer.parseInt(clientResponse.getAppStatusString()); boolean removed = m_outstandingAllHostProcedureHostIds.remove(hostId); // log this for now... I do...
[ "public", "void", "allHostNTProcedureCallback", "(", "ClientResponse", "clientResponse", ")", "{", "synchronized", "(", "m_allHostCallbackLock", ")", "{", "int", "hostId", "=", "Integer", ".", "parseInt", "(", "clientResponse", ".", "getAppStatusString", "(", ")", "...
This is called when an all-host proc responds from a particular node. It completes the future when all of the It uses a dumb hack that the hostid is stored in the appStatusString. Since this is just for sysprocs, VoltDB devs making sysprocs should know that string app status doesn't work.
[ "This", "is", "called", "when", "an", "all", "-", "host", "proc", "responds", "from", "a", "particular", "node", ".", "It", "completes", "the", "future", "when", "all", "of", "the" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ProcedureRunnerNT.java#L164-L183
train
VoltDB/voltdb
src/frontend/org/voltdb/ProcedureRunnerNT.java
ProcedureRunnerNT.callAllNodeNTProcedure
protected CompletableFuture<Map<Integer,ClientResponse>> callAllNodeNTProcedure(String procName, Object... params) { // only one of these at a time if (!m_outstandingAllHostProc.compareAndSet(false, true)) { throw new VoltAbortException(new IllegalStateException("Only one AllNodeNTProcedure ...
java
protected CompletableFuture<Map<Integer,ClientResponse>> callAllNodeNTProcedure(String procName, Object... params) { // only one of these at a time if (!m_outstandingAllHostProc.compareAndSet(false, true)) { throw new VoltAbortException(new IllegalStateException("Only one AllNodeNTProcedure ...
[ "protected", "CompletableFuture", "<", "Map", "<", "Integer", ",", "ClientResponse", ">", ">", "callAllNodeNTProcedure", "(", "String", "procName", ",", "Object", "...", "params", ")", "{", "// only one of these at a time", "if", "(", "!", "m_outstandingAllHostProc", ...
Send an invocation directly to each host's CI mailbox. This ONLY works for NT procedures. Track responses and complete the returned future when they're all accounted for.
[ "Send", "an", "invocation", "directly", "to", "each", "host", "s", "CI", "mailbox", ".", "This", "ONLY", "works", "for", "NT", "procedures", ".", "Track", "responses", "and", "complete", "the", "returned", "future", "when", "they", "re", "all", "accounted", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ProcedureRunnerNT.java#L261-L308
train
VoltDB/voltdb
src/frontend/org/voltdb/ProcedureRunnerNT.java
ProcedureRunnerNT.completeCall
private void completeCall(ClientResponseImpl response) { // if we're keeping track, calculate result size if (m_perCallStats.samplingProcedure()) { m_perCallStats.setResultSize(response.getResults()); } m_statsCollector.endProcedure(response.getStatus() == ClientResponse.USER...
java
private void completeCall(ClientResponseImpl response) { // if we're keeping track, calculate result size if (m_perCallStats.samplingProcedure()) { m_perCallStats.setResultSize(response.getResults()); } m_statsCollector.endProcedure(response.getStatus() == ClientResponse.USER...
[ "private", "void", "completeCall", "(", "ClientResponseImpl", "response", ")", "{", "// if we're keeping track, calculate result size", "if", "(", "m_perCallStats", ".", "samplingProcedure", "(", ")", ")", "{", "m_perCallStats", ".", "setResultSize", "(", "response", "....
Send a response back to the proc caller. Refactored out of coreCall for both regular and exceptional paths.
[ "Send", "a", "response", "back", "to", "the", "proc", "caller", ".", "Refactored", "out", "of", "coreCall", "for", "both", "regular", "and", "exceptional", "paths", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ProcedureRunnerNT.java#L366-L387
train
VoltDB/voltdb
src/frontend/org/voltdb/ProcedureRunnerNT.java
ProcedureRunnerNT.processAnyCallbacksFromFailedHosts
public void processAnyCallbacksFromFailedHosts(Set<Integer> failedHosts) { synchronized(m_allHostCallbackLock) { failedHosts.stream() .forEach(i -> { if (m_outstandingAllHostProcedureHostIds.contains(i)) { ClientResponseImpl cri = new Clien...
java
public void processAnyCallbacksFromFailedHosts(Set<Integer> failedHosts) { synchronized(m_allHostCallbackLock) { failedHosts.stream() .forEach(i -> { if (m_outstandingAllHostProcedureHostIds.contains(i)) { ClientResponseImpl cri = new Clien...
[ "public", "void", "processAnyCallbacksFromFailedHosts", "(", "Set", "<", "Integer", ">", "failedHosts", ")", "{", "synchronized", "(", "m_allHostCallbackLock", ")", "{", "failedHosts", ".", "stream", "(", ")", ".", "forEach", "(", "i", "->", "{", "if", "(", ...
For all-host NT procedures, use site failures to call callbacks for hosts that will obviously never respond. ICH and the other plumbing should handle regular, txn procs.
[ "For", "all", "-", "host", "NT", "procedures", "use", "site", "failures", "to", "call", "callbacks", "for", "hosts", "that", "will", "obviously", "never", "respond", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ProcedureRunnerNT.java#L549-L566
train
VoltDB/voltdb
src/frontend/org/voltdb/jni/EELoggers.java
EELoggers.log
public final static void log(int logger, int level, String statement) { if (logger < loggers.length) { switch (level) { case trace: loggers[logger].trace(statement); break; case debug: loggers[logger].debug(statement); ...
java
public final static void log(int logger, int level, String statement) { if (logger < loggers.length) { switch (level) { case trace: loggers[logger].trace(statement); break; case debug: loggers[logger].debug(statement); ...
[ "public", "final", "static", "void", "log", "(", "int", "logger", ",", "int", "level", ",", "String", "statement", ")", "{", "if", "(", "logger", "<", "loggers", ".", "length", ")", "{", "switch", "(", "level", ")", "{", "case", "trace", ":", "logger...
All EE loggers will call this static method from C and specify the logger and level they want to log to. The level will be checked again in Java. @param logger index of the logger in the loggers array this statement should be logged to @param level Level of the statement @param statement Statement to log
[ "All", "EE", "loggers", "will", "call", "this", "static", "method", "from", "C", "and", "specify", "the", "logger", "and", "level", "they", "want", "to", "log", "to", ".", "The", "level", "will", "be", "checked", "again", "in", "Java", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/EELoggers.java#L67-L94
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/RAShadowFile.java
RAShadowFile.restoreFile
public static void restoreFile(String sourceName, String destName) throws IOException { RandomAccessFile source = new RandomAccessFile(sourceName, "r"); RandomAccessFile dest = new RandomAccessFile(destName, "rw"); while (source.getFilePointer() != source.l...
java
public static void restoreFile(String sourceName, String destName) throws IOException { RandomAccessFile source = new RandomAccessFile(sourceName, "r"); RandomAccessFile dest = new RandomAccessFile(destName, "rw"); while (source.getFilePointer() != source.l...
[ "public", "static", "void", "restoreFile", "(", "String", "sourceName", ",", "String", "destName", ")", "throws", "IOException", "{", "RandomAccessFile", "source", "=", "new", "RandomAccessFile", "(", "sourceName", ",", "\"r\"", ")", ";", "RandomAccessFile", "dest...
buggy database files had size == position == 0 at the end
[ "buggy", "database", "files", "had", "size", "==", "position", "==", "0", "at", "the", "end" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/RAShadowFile.java#L172-L195
train
VoltDB/voltdb
src/frontend/org/voltdb/utils/HTTPAdminListener.java
HTTPAdminListener.getHTMLForAdminPage
String getHTMLForAdminPage(Map<String,String> params) { try { String template = m_htmlTemplates.get("admintemplate.html"); for (Entry<String, String> e : params.entrySet()) { String key = e.getKey().toUpperCase(); String value = e.getValue(); ...
java
String getHTMLForAdminPage(Map<String,String> params) { try { String template = m_htmlTemplates.get("admintemplate.html"); for (Entry<String, String> e : params.entrySet()) { String key = e.getKey().toUpperCase(); String value = e.getValue(); ...
[ "String", "getHTMLForAdminPage", "(", "Map", "<", "String", ",", "String", ">", "params", ")", "{", "try", "{", "String", "template", "=", "m_htmlTemplates", ".", "get", "(", "\"admintemplate.html\"", ")", ";", "for", "(", "Entry", "<", "String", ",", "Str...
Load a template for the admin page, fill it out and return the value. @param params The key-value set of variables to replace in the template. @return The completed template.
[ "Load", "a", "template", "for", "the", "admin", "page", "fill", "it", "out", "and", "return", "the", "value", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/HTTPAdminListener.java#L139-L155
train
VoltDB/voltdb
src/frontend/org/voltdb/iv2/InitiatorLeaderMonitor.java
InitiatorLeaderMonitor.start
public void start() throws InterruptedException, ExecutionException { Future<?> task = es.submit(handlePartitionChange); task.get(); }
java
public void start() throws InterruptedException, ExecutionException { Future<?> task = es.submit(handlePartitionChange); task.get(); }
[ "public", "void", "start", "(", ")", "throws", "InterruptedException", ",", "ExecutionException", "{", "Future", "<", "?", ">", "task", "=", "es", ".", "submit", "(", "handlePartitionChange", ")", ";", "task", ".", "get", "(", ")", ";", "}" ]
Start monitoring the leaders. This is a blocking operation. @throws InterruptedException @throws ExecutionException
[ "Start", "monitoring", "the", "leaders", ".", "This", "is", "a", "blocking", "operation", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/InitiatorLeaderMonitor.java#L123-L126
train
VoltDB/voltdb
src/frontend/org/voltcore/utils/EstTimeUpdater.java
EstTimeUpdater.update
public static Long update(final long now) { final long estNow = EstTime.m_now; if (estNow == now) { return null; } EstTime.m_now = now; /* * Check if updating the estimated time was especially tardy. * I am concerned that the thread responsible for...
java
public static Long update(final long now) { final long estNow = EstTime.m_now; if (estNow == now) { return null; } EstTime.m_now = now; /* * Check if updating the estimated time was especially tardy. * I am concerned that the thread responsible for...
[ "public", "static", "Long", "update", "(", "final", "long", "now", ")", "{", "final", "long", "estNow", "=", "EstTime", ".", "m_now", ";", "if", "(", "estNow", "==", "now", ")", "{", "return", "null", ";", "}", "EstTime", ".", "m_now", "=", "now", ...
Don't call this unless you have paused the updater and intend to update yourself @param now @return
[ "Don", "t", "call", "this", "unless", "you", "have", "paused", "the", "updater", "and", "intend", "to", "update", "yourself" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/EstTimeUpdater.java#L88-L116
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java
ParserDML.compileMigrateStatement
StatementDMQL compileMigrateStatement(RangeVariable[] outerRanges) { final Expression condition; assert token.tokenType == Tokens.MIGRATE; read(); readThis(Tokens.FROM); RangeVariable[] rangeVariables = { readSimpleRangeVariable(StatementTypes.MIGRATE_WHERE) }; Table ta...
java
StatementDMQL compileMigrateStatement(RangeVariable[] outerRanges) { final Expression condition; assert token.tokenType == Tokens.MIGRATE; read(); readThis(Tokens.FROM); RangeVariable[] rangeVariables = { readSimpleRangeVariable(StatementTypes.MIGRATE_WHERE) }; Table ta...
[ "StatementDMQL", "compileMigrateStatement", "(", "RangeVariable", "[", "]", "outerRanges", ")", "{", "final", "Expression", "condition", ";", "assert", "token", ".", "tokenType", "==", "Tokens", ".", "MIGRATE", ";", "read", "(", ")", ";", "readThis", "(", "Tok...
Creates a MIGRATE-type statement from this parser context (i.e. MIGRATE FROM tbl WHERE ... @param outerRanges @return compiled statement
[ "Creates", "a", "MIGRATE", "-", "type", "statement", "from", "this", "parser", "context", "(", "i", ".", "e", ".", "MIGRATE", "FROM", "tbl", "WHERE", "..." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java#L334-L377
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java
ParserDML.compileDeleteStatement
StatementDMQL compileDeleteStatement(RangeVariable[] outerRanges) { Expression condition = null; boolean truncate = false; boolean restartIdentity = false; switch (token.tokenType) { case Tokens.TRUNCATE : { read(); readTh...
java
StatementDMQL compileDeleteStatement(RangeVariable[] outerRanges) { Expression condition = null; boolean truncate = false; boolean restartIdentity = false; switch (token.tokenType) { case Tokens.TRUNCATE : { read(); readTh...
[ "StatementDMQL", "compileDeleteStatement", "(", "RangeVariable", "[", "]", "outerRanges", ")", "{", "Expression", "condition", "=", "null", ";", "boolean", "truncate", "=", "false", ";", "boolean", "restartIdentity", "=", "false", ";", "switch", "(", "token", "....
Creates a DELETE-type Statement from this parse context.
[ "Creates", "a", "DELETE", "-", "type", "Statement", "from", "this", "parse", "context", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java#L382-L514
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java
ParserDML.compileUpdateStatement
StatementDMQL compileUpdateStatement(RangeVariable[] outerRanges) { read(); Expression[] updateExpressions; int[] columnMap; boolean[] columnCheckList; OrderedHashSet colNames = new OrderedHashSet(); HsqlArrayList exprList = new HsqlArrayList(); ...
java
StatementDMQL compileUpdateStatement(RangeVariable[] outerRanges) { read(); Expression[] updateExpressions; int[] columnMap; boolean[] columnCheckList; OrderedHashSet colNames = new OrderedHashSet(); HsqlArrayList exprList = new HsqlArrayList(); ...
[ "StatementDMQL", "compileUpdateStatement", "(", "RangeVariable", "[", "]", "outerRanges", ")", "{", "read", "(", ")", ";", "Expression", "[", "]", "updateExpressions", ";", "int", "[", "]", "columnMap", ";", "boolean", "[", "]", "columnCheckList", ";", "Ordere...
Creates an UPDATE-type Statement from this parse context.
[ "Creates", "an", "UPDATE", "-", "type", "Statement", "from", "this", "parse", "context", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java#L519-L607
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java
ParserDML.readMergeWhen
private void readMergeWhen(OrderedHashSet insertColumnNames, OrderedHashSet updateColumnNames, HsqlArrayList insertExpressions, HsqlArrayList updateExpressions, RangeVariable[] targetRangeVars, ...
java
private void readMergeWhen(OrderedHashSet insertColumnNames, OrderedHashSet updateColumnNames, HsqlArrayList insertExpressions, HsqlArrayList updateExpressions, RangeVariable[] targetRangeVars, ...
[ "private", "void", "readMergeWhen", "(", "OrderedHashSet", "insertColumnNames", ",", "OrderedHashSet", "updateColumnNames", ",", "HsqlArrayList", "insertExpressions", ",", "HsqlArrayList", "updateExpressions", ",", "RangeVariable", "[", "]", "targetRangeVars", ",", "RangeVa...
Parses a WHEN clause from a MERGE statement. This can be either a WHEN MATCHED or WHEN NOT MATCHED clause, or both, and the appropriate values will be updated. If the var that is to hold the data is not null, then we already encountered this type of clause, which is only allowed once, and at least one is required.
[ "Parses", "a", "WHEN", "clause", "from", "a", "MERGE", "statement", ".", "This", "can", "be", "either", "a", "WHEN", "MATCHED", "or", "WHEN", "NOT", "MATCHED", "clause", "or", "both", "and", "the", "appropriate", "values", "will", "be", "updated", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java#L955-L1017
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java
ParserDML.compileCallStatement
StatementDMQL compileCallStatement(RangeVariable[] outerRanges, boolean isStrictlyProcedure) { read(); if (isIdentifier()) { checkValidCatalogName(token.namePrePrefix); RoutineSchema routineSchema = (RoutineSchema) databas...
java
StatementDMQL compileCallStatement(RangeVariable[] outerRanges, boolean isStrictlyProcedure) { read(); if (isIdentifier()) { checkValidCatalogName(token.namePrePrefix); RoutineSchema routineSchema = (RoutineSchema) databas...
[ "StatementDMQL", "compileCallStatement", "(", "RangeVariable", "[", "]", "outerRanges", ",", "boolean", "isStrictlyProcedure", ")", "{", "read", "(", ")", ";", "if", "(", "isIdentifier", "(", ")", ")", "{", "checkValidCatalogName", "(", "token", ".", "namePrePre...
to do call argument name and type resolution
[ "to", "do", "call", "argument", "name", "and", "type", "resolution" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java#L1024-L1124
train
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java
ParserDML.voltGetSortAndSliceForDelete
private SortAndSlice voltGetSortAndSliceForDelete(RangeVariable[] rangeVariables) { SortAndSlice sas = XreadOrderByExpression(); if (sas == null || sas == SortAndSlice.noSort) return SortAndSlice.noSort; // Resolve columns in the ORDER BY clause. This code modified // from ...
java
private SortAndSlice voltGetSortAndSliceForDelete(RangeVariable[] rangeVariables) { SortAndSlice sas = XreadOrderByExpression(); if (sas == null || sas == SortAndSlice.noSort) return SortAndSlice.noSort; // Resolve columns in the ORDER BY clause. This code modified // from ...
[ "private", "SortAndSlice", "voltGetSortAndSliceForDelete", "(", "RangeVariable", "[", "]", "rangeVariables", ")", "{", "SortAndSlice", "sas", "=", "XreadOrderByExpression", "(", ")", ";", "if", "(", "sas", "==", "null", "||", "sas", "==", "SortAndSlice", ".", "n...
This is a Volt extension to allow DELETE FROM tab ORDER BY c LIMIT 1 Adds a SortAndSlice object to the statement if the next tokens are ORDER BY, LIMIT or OFFSET. @param deleteStmt
[ "This", "is", "a", "Volt", "extension", "to", "allow", "DELETE", "FROM", "tab", "ORDER", "BY", "c", "LIMIT", "1", "Adds", "a", "SortAndSlice", "object", "to", "the", "statement", "if", "the", "next", "tokens", "are", "ORDER", "BY", "LIMIT", "or", "OFFSET...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java#L1135-L1155
train
VoltDB/voltdb
src/frontend/org/voltdb/compiler/ClassMatcher.java
ClassMatcher.addPattern
public ClassNameMatchStatus addPattern(String classNamePattern) { boolean matchFound = false; if (m_classList == null) { m_classList = getClasspathClassFileNames(); } String preppedName = classNamePattern.trim(); // include only full classes // for nested cl...
java
public ClassNameMatchStatus addPattern(String classNamePattern) { boolean matchFound = false; if (m_classList == null) { m_classList = getClasspathClassFileNames(); } String preppedName = classNamePattern.trim(); // include only full classes // for nested cl...
[ "public", "ClassNameMatchStatus", "addPattern", "(", "String", "classNamePattern", ")", "{", "boolean", "matchFound", "=", "false", ";", "if", "(", "m_classList", "==", "null", ")", "{", "m_classList", "=", "getClasspathClassFileNames", "(", ")", ";", "}", "Stri...
Add a pattern that matches classes from the classpath and add any matching classnames to m_classNameMatches. The pattern is of the form "org.voltdb.Foo" but can contain single and double asterisks in the style of ant wildcards, such as "org.voltdb.**" or "org.voltdb.*bar" or "org.volt**.Foo"
[ "Add", "a", "pattern", "that", "matches", "classes", "from", "the", "classpath", "and", "add", "any", "matching", "classnames", "to", "m_classNameMatches", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/ClassMatcher.java#L55-L108
train
VoltDB/voltdb
src/frontend/org/voltdb/compiler/ClassMatcher.java
ClassMatcher.processPathPart
private static void processPathPart(String path, Set<String> classes) { File rootFile = new File(path); if (rootFile.isDirectory() == false) { return; } File[] files = rootFile.listFiles(); for (File f : files) { // classes in the anonymous package ...
java
private static void processPathPart(String path, Set<String> classes) { File rootFile = new File(path); if (rootFile.isDirectory() == false) { return; } File[] files = rootFile.listFiles(); for (File f : files) { // classes in the anonymous package ...
[ "private", "static", "void", "processPathPart", "(", "String", "path", ",", "Set", "<", "String", ">", "classes", ")", "{", "File", "rootFile", "=", "new", "File", "(", "path", ")", ";", "if", "(", "rootFile", ".", "isDirectory", "(", ")", "==", "false...
For a given classpath root, scan it for packages and classes, adding all found classnames to the given "classes" param.
[ "For", "a", "given", "classpath", "root", "scan", "it", "for", "packages", "and", "classes", "adding", "all", "found", "classnames", "to", "the", "given", "classes", "param", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/ClassMatcher.java#L177-L197
train
VoltDB/voltdb
src/frontend/org/voltdb/compiler/ClassMatcher.java
ClassMatcher.getClasspathClassFileNames
static String getClasspathClassFileNames() { String classpath = System.getProperty("java.class.path"); String[] pathParts = classpath.split(File.pathSeparator); Set<String> classes = new TreeSet<String>(); for (String part : pathParts) { processPathPart(part, classes); ...
java
static String getClasspathClassFileNames() { String classpath = System.getProperty("java.class.path"); String[] pathParts = classpath.split(File.pathSeparator); Set<String> classes = new TreeSet<String>(); for (String part : pathParts) { processPathPart(part, classes); ...
[ "static", "String", "getClasspathClassFileNames", "(", ")", "{", "String", "classpath", "=", "System", ".", "getProperty", "(", "\"java.class.path\"", ")", ";", "String", "[", "]", "pathParts", "=", "classpath", ".", "split", "(", "File", ".", "pathSeparator", ...
Get a single string that contains all of the non-jar classfiles in the current classpath, separated by newlines. Classfiles are represented by their Java "dot" names, not filenames.
[ "Get", "a", "single", "string", "that", "contains", "all", "of", "the", "non", "-", "jar", "classfiles", "in", "the", "current", "classpath", "separated", "by", "newlines", ".", "Classfiles", "are", "represented", "by", "their", "Java", "dot", "names", "not"...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/ClassMatcher.java#L205-L221
train
VoltDB/voltdb
src/frontend/org/voltdb/HealthMonitor.java
HealthMonitor.getMemoryLimitSize
double getMemoryLimitSize(String sizeStr) { if (sizeStr==null || sizeStr.length()==0) { return 0; } try { if (sizeStr.charAt(sizeStr.length()-1)=='%') { // size as a percentage of total available memory int perc = Integer.parseInt(sizeStr.substring(0,...
java
double getMemoryLimitSize(String sizeStr) { if (sizeStr==null || sizeStr.length()==0) { return 0; } try { if (sizeStr.charAt(sizeStr.length()-1)=='%') { // size as a percentage of total available memory int perc = Integer.parseInt(sizeStr.substring(0,...
[ "double", "getMemoryLimitSize", "(", "String", "sizeStr", ")", "{", "if", "(", "sizeStr", "==", "null", "||", "sizeStr", ".", "length", "(", ")", "==", "0", ")", "{", "return", "0", ";", "}", "try", "{", "if", "(", "sizeStr", ".", "charAt", "(", "s...
package-private for junit
[ "package", "-", "private", "for", "junit" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/HealthMonitor.java#L282-L306
train
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/common/PathUtils.java
PathUtils.validatePath
public static void validatePath(String path) throws IllegalArgumentException { if (path == null) { throw new IllegalArgumentException("Path cannot be null"); } if (path.length() == 0) { throw new IllegalArgumentException("Path length must be > 0"); } ...
java
public static void validatePath(String path) throws IllegalArgumentException { if (path == null) { throw new IllegalArgumentException("Path cannot be null"); } if (path.length() == 0) { throw new IllegalArgumentException("Path length must be > 0"); } ...
[ "public", "static", "void", "validatePath", "(", "String", "path", ")", "throws", "IllegalArgumentException", "{", "if", "(", "path", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Path cannot be null\"", ")", ";", "}", "if", "(", ...
Validate the provided znode path string @param path znode path string @throws IllegalArgumentException if the path is invalid
[ "Validate", "the", "provided", "znode", "path", "string" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/common/PathUtils.java#L49-L106
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/AbstractPlanNode.java
AbstractPlanNode.produceCopyForTransformation
protected void produceCopyForTransformation(AbstractPlanNode copy) { copy.m_outputSchema = m_outputSchema; copy.m_hasSignificantOutputSchema = m_hasSignificantOutputSchema; copy.m_outputColumnHints = m_outputColumnHints; copy.m_estimatedOutputTupleCount = m_estimatedOutputTupleCount; ...
java
protected void produceCopyForTransformation(AbstractPlanNode copy) { copy.m_outputSchema = m_outputSchema; copy.m_hasSignificantOutputSchema = m_hasSignificantOutputSchema; copy.m_outputColumnHints = m_outputColumnHints; copy.m_estimatedOutputTupleCount = m_estimatedOutputTupleCount; ...
[ "protected", "void", "produceCopyForTransformation", "(", "AbstractPlanNode", "copy", ")", "{", "copy", ".", "m_outputSchema", "=", "m_outputSchema", ";", "copy", ".", "m_hasSignificantOutputSchema", "=", "m_hasSignificantOutputSchema", ";", "copy", ".", "m_outputColumnHi...
Create a PlanNode that clones the configuration information but is not inserted in the plan graph and has a unique plan node id.
[ "Create", "a", "PlanNode", "that", "clones", "the", "configuration", "information", "but", "is", "not", "inserted", "in", "the", "plan", "graph", "and", "has", "a", "unique", "plan", "node", "id", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L179-L193
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/AbstractPlanNode.java
AbstractPlanNode.generateOutputSchema
public void generateOutputSchema(Database db) { // default behavior: just copy the input schema // to the output schema assert(m_children.size() == 1); AbstractPlanNode childNode = m_children.get(0); childNode.generateOutputSchema(db); // Replace the expressions in ou...
java
public void generateOutputSchema(Database db) { // default behavior: just copy the input schema // to the output schema assert(m_children.size() == 1); AbstractPlanNode childNode = m_children.get(0); childNode.generateOutputSchema(db); // Replace the expressions in ou...
[ "public", "void", "generateOutputSchema", "(", "Database", "db", ")", "{", "// default behavior: just copy the input schema", "// to the output schema", "assert", "(", "m_children", ".", "size", "(", ")", "==", "1", ")", ";", "AbstractPlanNode", "childNode", "=", "m_c...
Generate the output schema for this node based on the output schemas of its children. The generated schema consists of the complete set of columns but is not yet ordered. Right now it's best to call this on every node after it gets added and linked to the top of the current plan graph. FIXME: "it's best to call this"...
[ "Generate", "the", "output", "schema", "for", "this", "node", "based", "on", "the", "output", "schemas", "of", "its", "children", ".", "The", "generated", "schema", "consists", "of", "the", "complete", "set", "of", "columns", "but", "is", "not", "yet", "or...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L223-L240
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/AbstractPlanNode.java
AbstractPlanNode.getTablesAndIndexes
public void getTablesAndIndexes(Map<String, StmtTargetTableScan> tablesRead, Collection<String> indexes) { for (AbstractPlanNode node : m_inlineNodes.values()) { node.getTablesAndIndexes(tablesRead, indexes); } for (AbstractPlanNode node : m_children) { no...
java
public void getTablesAndIndexes(Map<String, StmtTargetTableScan> tablesRead, Collection<String> indexes) { for (AbstractPlanNode node : m_inlineNodes.values()) { node.getTablesAndIndexes(tablesRead, indexes); } for (AbstractPlanNode node : m_children) { no...
[ "public", "void", "getTablesAndIndexes", "(", "Map", "<", "String", ",", "StmtTargetTableScan", ">", "tablesRead", ",", "Collection", "<", "String", ">", "indexes", ")", "{", "for", "(", "AbstractPlanNode", "node", ":", "m_inlineNodes", ".", "values", "(", ")"...
Recursively build sets of tables read and index names used. @param tablesRead Set of table aliases read potentially added to at each recursive level. @param indexes Set of index names used in the plan tree Only the current fragment is of interest.
[ "Recursively", "build", "sets", "of", "tables", "read", "and", "index", "names", "used", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L317-L327
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/AbstractPlanNode.java
AbstractPlanNode.getTablesAndIndexesFromSubqueries
protected void getTablesAndIndexesFromSubqueries(Map<String, StmtTargetTableScan> tablesRead, Collection<String> indexes) { for(AbstractExpression expr : findAllSubquerySubexpressions()) { assert(expr instanceof AbstractSubqueryExpression); AbstractSubqueryExpression subquery...
java
protected void getTablesAndIndexesFromSubqueries(Map<String, StmtTargetTableScan> tablesRead, Collection<String> indexes) { for(AbstractExpression expr : findAllSubquerySubexpressions()) { assert(expr instanceof AbstractSubqueryExpression); AbstractSubqueryExpression subquery...
[ "protected", "void", "getTablesAndIndexesFromSubqueries", "(", "Map", "<", "String", ",", "StmtTargetTableScan", ">", "tablesRead", ",", "Collection", "<", "String", ">", "indexes", ")", "{", "for", "(", "AbstractExpression", "expr", ":", "findAllSubquerySubexpression...
Collect read tables read and index names used in the current node subquery expressions. @param tablesRead Set of table aliases read potentially added to at each recursive level. @param indexes Set of index names used in the plan tree Only the current node is of interest.
[ "Collect", "read", "tables", "read", "and", "index", "names", "used", "in", "the", "current", "node", "subquery", "expressions", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L336-L345
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/AbstractPlanNode.java
AbstractPlanNode.isOutputOrdered
public boolean isOutputOrdered (List<AbstractExpression> sortExpressions, List<SortDirectionType> sortDirections) { assert(sortExpressions.size() == sortDirections.size()); if (m_children.size() == 1) { return m_children.get(0).isOutputOrdered(sortExpressions, sortDirections); } ...
java
public boolean isOutputOrdered (List<AbstractExpression> sortExpressions, List<SortDirectionType> sortDirections) { assert(sortExpressions.size() == sortDirections.size()); if (m_children.size() == 1) { return m_children.get(0).isOutputOrdered(sortExpressions, sortDirections); } ...
[ "public", "boolean", "isOutputOrdered", "(", "List", "<", "AbstractExpression", ">", "sortExpressions", ",", "List", "<", "SortDirectionType", ">", "sortDirections", ")", "{", "assert", "(", "sortExpressions", ".", "size", "(", ")", "==", "sortDirections", ".", ...
Does the plan guarantee a result sorted according to the required sort order. The default implementation delegates the question to its child if there is only one child. @param sortExpressions list of ordering columns expressions @param sortDirections list of corresponding sort orders @return TRUE if the node's output...
[ "Does", "the", "plan", "guarantee", "a", "result", "sorted", "according", "to", "the", "required", "sort", "order", ".", "The", "default", "implementation", "delegates", "the", "question", "to", "its", "child", "if", "there", "is", "only", "one", "child", "....
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L385-L391
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/AbstractPlanNode.java
AbstractPlanNode.getTrueOutputSchema
public final NodeSchema getTrueOutputSchema(boolean resetBack) throws PlanningErrorException { AbstractPlanNode child; NodeSchema answer = null; // // Note: This code is translated from the C++ code in // AbstractPlanNode::getOutputSchema. It's considerably // ...
java
public final NodeSchema getTrueOutputSchema(boolean resetBack) throws PlanningErrorException { AbstractPlanNode child; NodeSchema answer = null; // // Note: This code is translated from the C++ code in // AbstractPlanNode::getOutputSchema. It's considerably // ...
[ "public", "final", "NodeSchema", "getTrueOutputSchema", "(", "boolean", "resetBack", ")", "throws", "PlanningErrorException", "{", "AbstractPlanNode", "child", ";", "NodeSchema", "answer", "=", "null", ";", "//", "// Note: This code is translated from the C++ code in", "// ...
Find the true output schema. This may be in some child node. This seems to be the search order when constructing a plan node in the EE. There are several cases. 1.) If the child has an output schema, and if it is not a copy of one of its children's schemas, that's the one we want. We know it's a copy if m_hasSignif...
[ "Find", "the", "true", "output", "schema", ".", "This", "may", "be", "in", "some", "child", "node", ".", "This", "seems", "to", "be", "the", "search", "order", "when", "constructing", "a", "plan", "node", "in", "the", "EE", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L546-L620
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/AbstractPlanNode.java
AbstractPlanNode.addAndLinkChild
public void addAndLinkChild(AbstractPlanNode child) { assert(child != null); m_children.add(child); child.m_parents.add(this); }
java
public void addAndLinkChild(AbstractPlanNode child) { assert(child != null); m_children.add(child); child.m_parents.add(this); }
[ "public", "void", "addAndLinkChild", "(", "AbstractPlanNode", "child", ")", "{", "assert", "(", "child", "!=", "null", ")", ";", "m_children", ".", "add", "(", "child", ")", ";", "child", ".", "m_parents", ".", "add", "(", "this", ")", ";", "}" ]
Add a child and link this node child's parent. @param child The node to add.
[ "Add", "a", "child", "and", "link", "this", "node", "child", "s", "parent", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L626-L630
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/AbstractPlanNode.java
AbstractPlanNode.setAndLinkChild
public void setAndLinkChild(int index, AbstractPlanNode child) { assert(child != null); m_children.set(index, child); child.m_parents.add(this); }
java
public void setAndLinkChild(int index, AbstractPlanNode child) { assert(child != null); m_children.set(index, child); child.m_parents.add(this); }
[ "public", "void", "setAndLinkChild", "(", "int", "index", ",", "AbstractPlanNode", "child", ")", "{", "assert", "(", "child", "!=", "null", ")", ";", "m_children", ".", "set", "(", "index", ",", "child", ")", ";", "child", ".", "m_parents", ".", "add", ...
Used to re-link the child without changing the order. This is called by PushDownLimit and RemoveUnnecessaryProjectNodes. @param index @param child
[ "Used", "to", "re", "-", "link", "the", "child", "without", "changing", "the", "order", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L639-L643
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/AbstractPlanNode.java
AbstractPlanNode.unlinkChild
public void unlinkChild(AbstractPlanNode child) { assert(child != null); m_children.remove(child); child.m_parents.remove(this); }
java
public void unlinkChild(AbstractPlanNode child) { assert(child != null); m_children.remove(child); child.m_parents.remove(this); }
[ "public", "void", "unlinkChild", "(", "AbstractPlanNode", "child", ")", "{", "assert", "(", "child", "!=", "null", ")", ";", "m_children", ".", "remove", "(", "child", ")", ";", "child", ".", "m_parents", ".", "remove", "(", "this", ")", ";", "}" ]
Remove child from this node. @param child to remove.
[ "Remove", "child", "from", "this", "node", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L648-L652
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/AbstractPlanNode.java
AbstractPlanNode.replaceChild
public boolean replaceChild(AbstractPlanNode oldChild, AbstractPlanNode newChild) { assert(oldChild != null); assert(newChild != null); int idx = 0; for (AbstractPlanNode child : m_children) { if (child.equals(oldChild)) { oldChild.m_parents.clear(); ...
java
public boolean replaceChild(AbstractPlanNode oldChild, AbstractPlanNode newChild) { assert(oldChild != null); assert(newChild != null); int idx = 0; for (AbstractPlanNode child : m_children) { if (child.equals(oldChild)) { oldChild.m_parents.clear(); ...
[ "public", "boolean", "replaceChild", "(", "AbstractPlanNode", "oldChild", ",", "AbstractPlanNode", "newChild", ")", "{", "assert", "(", "oldChild", "!=", "null", ")", ";", "assert", "(", "newChild", "!=", "null", ")", ";", "int", "idx", "=", "0", ";", "for...
Replace an existing child with a new one preserving the child's position. @param oldChild The node to replace. @param newChild The new node. @return true if the child was replaced
[ "Replace", "an", "existing", "child", "with", "a", "new", "one", "preserving", "the", "child", "s", "position", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L660-L673
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/AbstractPlanNode.java
AbstractPlanNode.addIntermediary
public void addIntermediary(AbstractPlanNode node) { // transfer this node's children to node Iterator<AbstractPlanNode> it = m_children.iterator(); while (it.hasNext()) { AbstractPlanNode child = it.next(); it.remove(); // remove this.child from...
java
public void addIntermediary(AbstractPlanNode node) { // transfer this node's children to node Iterator<AbstractPlanNode> it = m_children.iterator(); while (it.hasNext()) { AbstractPlanNode child = it.next(); it.remove(); // remove this.child from...
[ "public", "void", "addIntermediary", "(", "AbstractPlanNode", "node", ")", "{", "// transfer this node's children to node", "Iterator", "<", "AbstractPlanNode", ">", "it", "=", "m_children", ".", "iterator", "(", ")", ";", "while", "(", "it", ".", "hasNext", "(", ...
Interject the provided node between this node and this node's current children
[ "Interject", "the", "provided", "node", "between", "this", "node", "and", "this", "node", "s", "current", "children" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L743-L758
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/AbstractPlanNode.java
AbstractPlanNode.hasInlinedIndexScanOfTable
public boolean hasInlinedIndexScanOfTable(String tableName) { for (int i = 0; i < getChildCount(); i++) { AbstractPlanNode child = getChild(i); if (child.hasInlinedIndexScanOfTable(tableName) == true) { return true; } } return false; }
java
public boolean hasInlinedIndexScanOfTable(String tableName) { for (int i = 0; i < getChildCount(); i++) { AbstractPlanNode child = getChild(i); if (child.hasInlinedIndexScanOfTable(tableName) == true) { return true; } } return false; }
[ "public", "boolean", "hasInlinedIndexScanOfTable", "(", "String", "tableName", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "getChildCount", "(", ")", ";", "i", "++", ")", "{", "AbstractPlanNode", "child", "=", "getChild", "(", "i", ")", ...
Refer to the override implementation on NestLoopIndexJoin node. @param tableName @return whether this node has an inlined index scan node or not.
[ "Refer", "to", "the", "override", "implementation", "on", "NestLoopIndexJoin", "node", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L831-L840
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/AbstractPlanNode.java
AbstractPlanNode.findAllExpressionsOfClass
protected void findAllExpressionsOfClass(Class< ? extends AbstractExpression> aeClass, Set<AbstractExpression> collected) { // Check the inlined plan nodes for (AbstractPlanNode inlineNode: getInlinePlanNodes().values()) { // For inline node we MUST go recursive to its children!!...
java
protected void findAllExpressionsOfClass(Class< ? extends AbstractExpression> aeClass, Set<AbstractExpression> collected) { // Check the inlined plan nodes for (AbstractPlanNode inlineNode: getInlinePlanNodes().values()) { // For inline node we MUST go recursive to its children!!...
[ "protected", "void", "findAllExpressionsOfClass", "(", "Class", "<", "?", "extends", "AbstractExpression", ">", "aeClass", ",", "Set", "<", "AbstractExpression", ">", "collected", ")", "{", "// Check the inlined plan nodes", "for", "(", "AbstractPlanNode", "inlineNode",...
Collect a unique list of expressions of a given type that this node has including its inlined nodes @param aeClass AbstractExpression class to search for @param collection set to populate with expressions that this node has
[ "Collect", "a", "unique", "list", "of", "expressions", "of", "a", "given", "type", "that", "this", "node", "has", "including", "its", "inlined", "nodes" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L945-L958
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/AbstractPlanNode.java
AbstractPlanNode.toDOTString
public String toDOTString() { StringBuilder sb = new StringBuilder(); // id [label=id: value-type <value-type-attributes>]; // id -> child_id; // id -> child_id; sb.append(m_id).append(" [label=\"").append(m_id).append(": ").append(getPlanNodeType()).append("\" "); sb.a...
java
public String toDOTString() { StringBuilder sb = new StringBuilder(); // id [label=id: value-type <value-type-attributes>]; // id -> child_id; // id -> child_id; sb.append(m_id).append(" [label=\"").append(m_id).append(": ").append(getPlanNodeType()).append("\" "); sb.a...
[ "public", "String", "toDOTString", "(", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "// id [label=id: value-type <value-type-attributes>];", "// id -> child_id;", "// id -> child_id;", "sb", ".", "append", "(", "m_id", ")", ".", "appen...
produce a file that can imported into graphviz for easier visualization
[ "produce", "a", "file", "that", "can", "imported", "into", "graphviz", "for", "easier", "visualization" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L1040-L1059
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/AbstractPlanNode.java
AbstractPlanNode.getValueTypeDotString
private String getValueTypeDotString() { PlanNodeType pnt = getPlanNodeType(); if (isInline()) { return "fontcolor=\"white\" style=\"filled\" fillcolor=\"red\""; } if (pnt == PlanNodeType.SEND || pnt == PlanNodeType.RECEIVE || pnt == PlanNodeType.MERGERECEIVE) { r...
java
private String getValueTypeDotString() { PlanNodeType pnt = getPlanNodeType(); if (isInline()) { return "fontcolor=\"white\" style=\"filled\" fillcolor=\"red\""; } if (pnt == PlanNodeType.SEND || pnt == PlanNodeType.RECEIVE || pnt == PlanNodeType.MERGERECEIVE) { r...
[ "private", "String", "getValueTypeDotString", "(", ")", "{", "PlanNodeType", "pnt", "=", "getPlanNodeType", "(", ")", ";", "if", "(", "isInline", "(", ")", ")", "{", "return", "\"fontcolor=\\\"white\\\" style=\\\"filled\\\" fillcolor=\\\"red\\\"\"", ";", "}", "if", ...
maybe not worth polluting
[ "maybe", "not", "worth", "polluting" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L1062-L1071
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/AbstractPlanNode.java
AbstractPlanNode.getScanNodeList_recurse
public void getScanNodeList_recurse(ArrayList<AbstractScanPlanNode> collected, HashSet<AbstractPlanNode> visited) { if (visited.contains(this)) { assert(false): "do not expect loops in plangraph."; return; } visited.add(this); for (AbstractPlanNode n :...
java
public void getScanNodeList_recurse(ArrayList<AbstractScanPlanNode> collected, HashSet<AbstractPlanNode> visited) { if (visited.contains(this)) { assert(false): "do not expect loops in plangraph."; return; } visited.add(this); for (AbstractPlanNode n :...
[ "public", "void", "getScanNodeList_recurse", "(", "ArrayList", "<", "AbstractScanPlanNode", ">", "collected", ",", "HashSet", "<", "AbstractPlanNode", ">", "visited", ")", "{", "if", "(", "visited", ".", "contains", "(", "this", ")", ")", "{", "assert", "(", ...
postorder adding scan nodes
[ "postorder", "adding", "scan", "nodes" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L1256-L1270
train
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/AbstractPlanNode.java
AbstractPlanNode.getPlanNodeList_recurse
public void getPlanNodeList_recurse(ArrayList<AbstractPlanNode> collected, HashSet<AbstractPlanNode> visited) { if (visited.contains(this)) { assert(false): "do not expect loops in plangraph."; return; } visited.add(this); for (AbstractPlanNode n : m_...
java
public void getPlanNodeList_recurse(ArrayList<AbstractPlanNode> collected, HashSet<AbstractPlanNode> visited) { if (visited.contains(this)) { assert(false): "do not expect loops in plangraph."; return; } visited.add(this); for (AbstractPlanNode n : m_...
[ "public", "void", "getPlanNodeList_recurse", "(", "ArrayList", "<", "AbstractPlanNode", ">", "collected", ",", "HashSet", "<", "AbstractPlanNode", ">", "visited", ")", "{", "if", "(", "visited", ".", "contains", "(", "this", ")", ")", "{", "assert", "(", "fa...
postorder add nodes
[ "postorder", "add", "nodes" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L1280-L1292
train
VoltDB/voltdb
src/frontend/org/voltdb/ParameterConverter.java
ParameterConverter.nullValueForType
private static Object nullValueForType(final Class<?> expectedClz) { if (expectedClz == long.class) { return VoltType.NULL_BIGINT; } else if (expectedClz == int.class) { return VoltType.NULL_INTEGER; } else if (expectedClz == short.class) { ...
java
private static Object nullValueForType(final Class<?> expectedClz) { if (expectedClz == long.class) { return VoltType.NULL_BIGINT; } else if (expectedClz == int.class) { return VoltType.NULL_INTEGER; } else if (expectedClz == short.class) { ...
[ "private", "static", "Object", "nullValueForType", "(", "final", "Class", "<", "?", ">", "expectedClz", ")", "{", "if", "(", "expectedClz", "==", "long", ".", "class", ")", "{", "return", "VoltType", ".", "NULL_BIGINT", ";", "}", "else", "if", "(", "expe...
Get the appropriate and compatible null value for a given parameter type.
[ "Get", "the", "appropriate", "and", "compatible", "null", "value", "for", "a", "given", "parameter", "type", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ParameterConverter.java#L57-L77
train
VoltDB/voltdb
src/frontend/org/voltdb/ParameterConverter.java
ParameterConverter.convertStringToPrimitiveOrPrimitiveWrapper
private static Object convertStringToPrimitiveOrPrimitiveWrapper(String value, final Class<?> expectedClz) throws VoltTypeException { value = value.trim(); // detect CSV null if (value.equals(Constants.CSV_NULL)) return nullValueForType(expectedClz); // Remove commas. Doing thi...
java
private static Object convertStringToPrimitiveOrPrimitiveWrapper(String value, final Class<?> expectedClz) throws VoltTypeException { value = value.trim(); // detect CSV null if (value.equals(Constants.CSV_NULL)) return nullValueForType(expectedClz); // Remove commas. Doing thi...
[ "private", "static", "Object", "convertStringToPrimitiveOrPrimitiveWrapper", "(", "String", "value", ",", "final", "Class", "<", "?", ">", "expectedClz", ")", "throws", "VoltTypeException", "{", "value", "=", "value", ".", "trim", "(", ")", ";", "// detect CSV nul...
Given a string, covert it to a primitive type or boxed type of the primitive type or return null. If the string value is a VARBINARY constant of the form X'00ABCD', and the expected class is one of byte, short, int or long, then we interpret the string as specifying bits of a 64-bit signed integer (padded with zeroes ...
[ "Given", "a", "string", "covert", "it", "to", "a", "primitive", "type", "or", "boxed", "type", "of", "the", "primitive", "type", "or", "return", "null", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ParameterConverter.java#L136-L190
train
VoltDB/voltdb
src/frontend/org/voltdb/ParameterConverter.java
ParameterConverter.tryToMakeCompatibleArray
private static Object tryToMakeCompatibleArray( final Class<?> expectedComponentClz, final Class<?> inputComponentClz, Object param) throws VoltTypeException { int inputLength = Array.getLength(param); if (inputComponentClz == expectedComponentClz) { ...
java
private static Object tryToMakeCompatibleArray( final Class<?> expectedComponentClz, final Class<?> inputComponentClz, Object param) throws VoltTypeException { int inputLength = Array.getLength(param); if (inputComponentClz == expectedComponentClz) { ...
[ "private", "static", "Object", "tryToMakeCompatibleArray", "(", "final", "Class", "<", "?", ">", "expectedComponentClz", ",", "final", "Class", "<", "?", ">", "inputComponentClz", ",", "Object", "param", ")", "throws", "VoltTypeException", "{", "int", "inputLength...
Factored out code to handle array parameter types. @throws Exception with a message describing why the types are incompatible.
[ "Factored", "out", "code", "to", "handle", "array", "parameter", "types", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ParameterConverter.java#L197-L257
train
VoltDB/voltdb
src/frontend/org/voltdb/ParameterConverter.java
ParameterConverter.getResultsFromRawResults
final static public VoltTable[] getResultsFromRawResults(String procedureName, Object result) throws InvocationTargetException { if (result == null) { return new VoltTable[0]; } if (result instanceof VoltTable[]) { VoltTable[] retval = (VoltTable[]) result; fo...
java
final static public VoltTable[] getResultsFromRawResults(String procedureName, Object result) throws InvocationTargetException { if (result == null) { return new VoltTable[0]; } if (result instanceof VoltTable[]) { VoltTable[] retval = (VoltTable[]) result; fo...
[ "final", "static", "public", "VoltTable", "[", "]", "getResultsFromRawResults", "(", "String", "procedureName", ",", "Object", "result", ")", "throws", "InvocationTargetException", "{", "if", "(", "result", "==", "null", ")", "{", "return", "new", "VoltTable", "...
Given the results of a procedure, convert it into a sensible array of VoltTables. @throws InvocationTargetException
[ "Given", "the", "results", "of", "a", "procedure", "convert", "it", "into", "a", "sensible", "array", "of", "VoltTables", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ParameterConverter.java#L643-L673
train
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/Version.java
Version.main
public static void main(String[] args) { if (args.length > 1) { printUsage(); } if (args.length == 0 || (args.length == 1 && args[0].equals("--full"))) { System.out.println(getFullVersion()); System.exit(0); } if (args[0].equals("--short")) ...
java
public static void main(String[] args) { if (args.length > 1) { printUsage(); } if (args.length == 0 || (args.length == 1 && args[0].equals("--full"))) { System.out.println(getFullVersion()); System.exit(0); } if (args[0].equals("--short")) ...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "{", "if", "(", "args", ".", "length", ">", "1", ")", "{", "printUsage", "(", ")", ";", "}", "if", "(", "args", ".", "length", "==", "0", "||", "(", "args", ".", "length"...
Prints the current version, revision and build date to the standard out. @param args <ul> <li>--short - prints a short version string "1.2.3" <li>--revision - prints a short version string with the SVN repository revision "1.2.3-94" <li>--full - prints the revision and the build date </ul>
[ "Prints", "the", "current", "version", "revision", "and", "build", "date", "to", "the", "standard", "out", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/Version.java#L62-L77
train
VoltDB/voltdb
src/frontend/org/voltdb/utils/PBDRegularSegment.java
PBDRegularSegment.setFinal
void setFinal(boolean isFinal) throws IOException { if (isFinal != m_isFinal) { if (PBDSegment.setFinal(m_file, isFinal)) { if (!isFinal) { // It is dangerous to leave final on a segment so make sure the metadata is flushed m_fc.force(true); ...
java
void setFinal(boolean isFinal) throws IOException { if (isFinal != m_isFinal) { if (PBDSegment.setFinal(m_file, isFinal)) { if (!isFinal) { // It is dangerous to leave final on a segment so make sure the metadata is flushed m_fc.force(true); ...
[ "void", "setFinal", "(", "boolean", "isFinal", ")", "throws", "IOException", "{", "if", "(", "isFinal", "!=", "m_isFinal", ")", "{", "if", "(", "PBDSegment", ".", "setFinal", "(", "m_file", ",", "isFinal", ")", ")", "{", "if", "(", "!", "isFinal", ")",...
Set or clear segment as 'final', i.e. whether segment is complete and logically immutable. NOTES: This is a best-effort feature: On any kind of I/O failure, the exception is swallowed and the operation is a no-op: this will be the case on filesystems that do no support extended file attributes. Also note that the {@c...
[ "Set", "or", "clear", "segment", "as", "final", "i", ".", "e", ".", "whether", "segment", "is", "complete", "and", "logically", "immutable", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/PBDRegularSegment.java#L472-L485
train
VoltDB/voltdb
src/frontend/org/voltcore/zk/LeaderElector.java
LeaderElector.createParticipantNode
public static String createParticipantNode(ZooKeeper zk, String dir, String prefix, byte[] data) throws KeeperException, InterruptedException { createRootIfNotExist(zk, dir); String node = zk.create(ZKUtil.joinZKPath(dir, prefix + "_"), data, Ids.OPEN_ACL_UNS...
java
public static String createParticipantNode(ZooKeeper zk, String dir, String prefix, byte[] data) throws KeeperException, InterruptedException { createRootIfNotExist(zk, dir); String node = zk.create(ZKUtil.joinZKPath(dir, prefix + "_"), data, Ids.OPEN_ACL_UNS...
[ "public", "static", "String", "createParticipantNode", "(", "ZooKeeper", "zk", ",", "String", "dir", ",", "String", "prefix", ",", "byte", "[", "]", "data", ")", "throws", "KeeperException", ",", "InterruptedException", "{", "createRootIfNotExist", "(", "zk", ",...
Provide a way for clients to create nodes which comply with the leader election format without participating in a leader election @throws InterruptedException @throws KeeperException
[ "Provide", "a", "way", "for", "clients", "to", "create", "nodes", "which", "comply", "with", "the", "leader", "election", "format", "without", "participating", "in", "a", "leader", "election" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/LeaderElector.java#L113-L125
train
VoltDB/voltdb
src/frontend/org/voltcore/zk/LeaderElector.java
LeaderElector.shutdown
synchronized public void shutdown() throws InterruptedException, KeeperException { m_shutdown = true; es.shutdown(); es.awaitTermination(365, TimeUnit.DAYS); }
java
synchronized public void shutdown() throws InterruptedException, KeeperException { m_shutdown = true; es.shutdown(); es.awaitTermination(365, TimeUnit.DAYS); }
[ "synchronized", "public", "void", "shutdown", "(", ")", "throws", "InterruptedException", ",", "KeeperException", "{", "m_shutdown", "=", "true", ";", "es", ".", "shutdown", "(", ")", ";", "es", ".", "awaitTermination", "(", "365", ",", "TimeUnit", ".", "DAY...
Deletes the ephemeral node. Make sure that no future watches will fire. @throws InterruptedException @throws KeeperException
[ "Deletes", "the", "ephemeral", "node", ".", "Make", "sure", "that", "no", "future", "watches", "will", "fire", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/LeaderElector.java#L174-L178
train