id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
61,500 | VoltDB/voltdb | src/frontend/org/voltdb/planner/AbstractParsedStmt.java | AbstractParsedStmt.addSubqueryToStmtCache | protected StmtSubqueryScan addSubqueryToStmtCache(
AbstractParsedStmt subquery, String tableAlias) {
assert(subquery != null);
// If there is no usable alias because the subquery is inside an expression,
// generate a unique one for internal use.
if (tableAlias == null) {
... | java | protected StmtSubqueryScan addSubqueryToStmtCache(
AbstractParsedStmt subquery, String tableAlias) {
assert(subquery != null);
// If there is no usable alias because the subquery is inside an expression,
// generate a unique one for internal use.
if (tableAlias == null) {
... | [
"protected",
"StmtSubqueryScan",
"addSubqueryToStmtCache",
"(",
"AbstractParsedStmt",
"subquery",
",",
"String",
"tableAlias",
")",
"{",
"assert",
"(",
"subquery",
"!=",
"null",
")",
";",
"// If there is no usable alias because the subquery is inside an expression,",
"// genera... | Add a sub-query to the statement cache.
@param subquery
@param tableAlias
@return the cache entry | [
"Add",
"a",
"sub",
"-",
"query",
"to",
"the",
"statement",
"cache",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L820-L833 |
61,501 | VoltDB/voltdb | src/frontend/org/voltdb/planner/AbstractParsedStmt.java | AbstractParsedStmt.addSimplifiedSubqueryToStmtCache | private StmtTargetTableScan addSimplifiedSubqueryToStmtCache(
StmtSubqueryScan subqueryScan, StmtTargetTableScan tableScan) {
String tableAlias = subqueryScan.getTableAlias();
assert(tableAlias != null);
// It is guaranteed by the canSimplifySubquery that there is
// one and ... | java | private StmtTargetTableScan addSimplifiedSubqueryToStmtCache(
StmtSubqueryScan subqueryScan, StmtTargetTableScan tableScan) {
String tableAlias = subqueryScan.getTableAlias();
assert(tableAlias != null);
// It is guaranteed by the canSimplifySubquery that there is
// one and ... | [
"private",
"StmtTargetTableScan",
"addSimplifiedSubqueryToStmtCache",
"(",
"StmtSubqueryScan",
"subqueryScan",
",",
"StmtTargetTableScan",
"tableScan",
")",
"{",
"String",
"tableAlias",
"=",
"subqueryScan",
".",
"getTableAlias",
"(",
")",
";",
"assert",
"(",
"tableAlias",... | Replace an existing subquery scan with its underlying table scan. The subquery
has already passed all the checks from the canSimplifySubquery method.
Subquery ORDER BY clause is ignored if such exists.
@param subqueryScan subquery scan to simplify
@param tableAlias
@return StmtTargetTableScan | [
"Replace",
"an",
"existing",
"subquery",
"scan",
"with",
"its",
"underlying",
"table",
"scan",
".",
"The",
"subquery",
"has",
"already",
"passed",
"all",
"the",
"checks",
"from",
"the",
"canSimplifySubquery",
"method",
".",
"Subquery",
"ORDER",
"BY",
"clause",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L894-L911 |
61,502 | VoltDB/voltdb | src/frontend/org/voltdb/planner/AbstractParsedStmt.java | AbstractParsedStmt.replaceExpressionsWithPve | protected AbstractExpression replaceExpressionsWithPve(AbstractExpression expr) {
assert(expr != null);
if (expr instanceof TupleValueExpression) {
int paramIdx = ParameterizationInfo.getNextParamIndex();
ParameterValueExpression pve = new ParameterValueExpression(paramIdx, expr)... | java | protected AbstractExpression replaceExpressionsWithPve(AbstractExpression expr) {
assert(expr != null);
if (expr instanceof TupleValueExpression) {
int paramIdx = ParameterizationInfo.getNextParamIndex();
ParameterValueExpression pve = new ParameterValueExpression(paramIdx, expr)... | [
"protected",
"AbstractExpression",
"replaceExpressionsWithPve",
"(",
"AbstractExpression",
"expr",
")",
"{",
"assert",
"(",
"expr",
"!=",
"null",
")",
";",
"if",
"(",
"expr",
"instanceof",
"TupleValueExpression",
")",
"{",
"int",
"paramIdx",
"=",
"ParameterizationIn... | Helper method to replace all TVEs and aggregated expressions with the corresponding PVEs.
The original expressions are placed into the map to be propagated to the EE.
The key to the map is the parameter index.
@param stmt - subquery statement
@param expr - expression with parent TVEs
@return Expression with parent TV... | [
"Helper",
"method",
"to",
"replace",
"all",
"TVEs",
"and",
"aggregated",
"expressions",
"with",
"the",
"corresponding",
"PVEs",
".",
"The",
"original",
"expressions",
"are",
"placed",
"into",
"the",
"map",
"to",
"be",
"propagated",
"to",
"the",
"EE",
".",
"T... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L1166-L1207 |
61,503 | VoltDB/voltdb | src/frontend/org/voltdb/planner/AbstractParsedStmt.java | AbstractParsedStmt.resolveCommonTableByName | private StmtCommonTableScan resolveCommonTableByName(String tableName, String tableAlias) {
StmtCommonTableScan answer = null;
StmtCommonTableScanShared scan = null;
for (AbstractParsedStmt scope = this; scope != null && scan == null; scope = scope.getParentStmt()) {
scan = scope.get... | java | private StmtCommonTableScan resolveCommonTableByName(String tableName, String tableAlias) {
StmtCommonTableScan answer = null;
StmtCommonTableScanShared scan = null;
for (AbstractParsedStmt scope = this; scope != null && scan == null; scope = scope.getParentStmt()) {
scan = scope.get... | [
"private",
"StmtCommonTableScan",
"resolveCommonTableByName",
"(",
"String",
"tableName",
",",
"String",
"tableAlias",
")",
"{",
"StmtCommonTableScan",
"answer",
"=",
"null",
";",
"StmtCommonTableScanShared",
"scan",
"=",
"null",
";",
"for",
"(",
"AbstractParsedStmt",
... | Look for a common table by name, possibly in parent scopes.
This is different from resolveStmtTableByAlias in that it
looks for common tables and only by name, not by alias. Of
course, a name and an alias are both strings, so this is kind
of a stylized distinction.
@param tableName
@return | [
"Look",
"for",
"a",
"common",
"table",
"by",
"name",
"possibly",
"in",
"parent",
"scopes",
".",
"This",
"is",
"different",
"from",
"resolveStmtTableByAlias",
"in",
"that",
"it",
"looks",
"for",
"common",
"tables",
"and",
"only",
"by",
"name",
"not",
"by",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L1482-L1492 |
61,504 | VoltDB/voltdb | src/frontend/org/voltdb/planner/AbstractParsedStmt.java | AbstractParsedStmt.parseParameters | protected void parseParameters(VoltXMLElement root) {
VoltXMLElement paramsNode = null;
for (VoltXMLElement node : root.children) {
if (node.name.equalsIgnoreCase("parameters")) {
paramsNode = node;
break;
}
}
if (paramsNode == null... | java | protected void parseParameters(VoltXMLElement root) {
VoltXMLElement paramsNode = null;
for (VoltXMLElement node : root.children) {
if (node.name.equalsIgnoreCase("parameters")) {
paramsNode = node;
break;
}
}
if (paramsNode == null... | [
"protected",
"void",
"parseParameters",
"(",
"VoltXMLElement",
"root",
")",
"{",
"VoltXMLElement",
"paramsNode",
"=",
"null",
";",
"for",
"(",
"VoltXMLElement",
"node",
":",
"root",
".",
"children",
")",
"{",
"if",
"(",
"node",
".",
"name",
".",
"equalsIgnor... | Populate the statement's paramList from the "parameters" element. Each
parameter has an id and an index, both of which are numeric. It also has
a type and an indication of whether it's a vector parameter. For each
parameter, we create a ParameterValueExpression, named pve, which holds
the type and vector parameter indi... | [
"Populate",
"the",
"statement",
"s",
"paramList",
"from",
"the",
"parameters",
"element",
".",
"Each",
"parameter",
"has",
"an",
"id",
"and",
"an",
"index",
"both",
"of",
"which",
"are",
"numeric",
".",
"It",
"also",
"has",
"a",
"type",
"and",
"an",
"ind... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L1567-L1601 |
61,505 | VoltDB/voltdb | src/frontend/org/voltdb/planner/AbstractParsedStmt.java | AbstractParsedStmt.promoteUnionParametersFromChild | protected void promoteUnionParametersFromChild(AbstractParsedStmt childStmt) {
getParamsByIndex().putAll(childStmt.getParamsByIndex());
m_parameterTveMap.putAll(childStmt.m_parameterTveMap);
} | java | protected void promoteUnionParametersFromChild(AbstractParsedStmt childStmt) {
getParamsByIndex().putAll(childStmt.getParamsByIndex());
m_parameterTveMap.putAll(childStmt.m_parameterTveMap);
} | [
"protected",
"void",
"promoteUnionParametersFromChild",
"(",
"AbstractParsedStmt",
"childStmt",
")",
"{",
"getParamsByIndex",
"(",
")",
".",
"putAll",
"(",
"childStmt",
".",
"getParamsByIndex",
"(",
")",
")",
";",
"m_parameterTveMap",
".",
"putAll",
"(",
"childStmt"... | in the EE. | [
"in",
"the",
"EE",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L1628-L1631 |
61,506 | VoltDB/voltdb | src/frontend/org/voltdb/planner/AbstractParsedStmt.java | AbstractParsedStmt.analyzeValueEquivalence | HashMap<AbstractExpression, Set<AbstractExpression>> analyzeValueEquivalence() {
// collect individual where/join expressions
m_joinTree.analyzeJoinExpressions(m_noTableSelectionList);
return m_joinTree.getAllEquivalenceFilters();
} | java | HashMap<AbstractExpression, Set<AbstractExpression>> analyzeValueEquivalence() {
// collect individual where/join expressions
m_joinTree.analyzeJoinExpressions(m_noTableSelectionList);
return m_joinTree.getAllEquivalenceFilters();
} | [
"HashMap",
"<",
"AbstractExpression",
",",
"Set",
"<",
"AbstractExpression",
">",
">",
"analyzeValueEquivalence",
"(",
")",
"{",
"// collect individual where/join expressions",
"m_joinTree",
".",
"analyzeJoinExpressions",
"(",
"m_noTableSelectionList",
")",
";",
"return",
... | Collect value equivalence expressions across the entire SQL statement
@return a map of tuple value expressions to the other expressions,
TupleValueExpressions, ConstantValueExpressions, or ParameterValueExpressions,
that they are constrained to equal. | [
"Collect",
"value",
"equivalence",
"expressions",
"across",
"the",
"entire",
"SQL",
"statement"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L1639-L1643 |
61,507 | VoltDB/voltdb | src/frontend/org/voltdb/planner/AbstractParsedStmt.java | AbstractParsedStmt.getTableFromDB | protected Table getTableFromDB(String tableName) {
Table table = m_db.getTables().getExact(tableName);
return table;
} | java | protected Table getTableFromDB(String tableName) {
Table table = m_db.getTables().getExact(tableName);
return table;
} | [
"protected",
"Table",
"getTableFromDB",
"(",
"String",
"tableName",
")",
"{",
"Table",
"table",
"=",
"m_db",
".",
"getTables",
"(",
")",
".",
"getExact",
"(",
"tableName",
")",
";",
"return",
"table",
";",
"}"
] | Look up a table by name. This table may be stored in the
local catalog or else the global catalog.
@param tableName
@return | [
"Look",
"up",
"a",
"table",
"by",
"name",
".",
"This",
"table",
"may",
"be",
"stored",
"in",
"the",
"local",
"catalog",
"or",
"else",
"the",
"global",
"catalog",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L1651-L1654 |
61,508 | VoltDB/voltdb | src/frontend/org/voltdb/planner/AbstractParsedStmt.java | AbstractParsedStmt.parseTableCondition | private AbstractExpression parseTableCondition(VoltXMLElement tableScan,
String joinOrWhere) {
AbstractExpression condExpr = null;
for (VoltXMLElement childNode : tableScan.children) {
if ( ! childNode.name.equalsIgnoreCase(joinOrWhere)) {
continue;
}
... | java | private AbstractExpression parseTableCondition(VoltXMLElement tableScan,
String joinOrWhere) {
AbstractExpression condExpr = null;
for (VoltXMLElement childNode : tableScan.children) {
if ( ! childNode.name.equalsIgnoreCase(joinOrWhere)) {
continue;
}
... | [
"private",
"AbstractExpression",
"parseTableCondition",
"(",
"VoltXMLElement",
"tableScan",
",",
"String",
"joinOrWhere",
")",
"{",
"AbstractExpression",
"condExpr",
"=",
"null",
";",
"for",
"(",
"VoltXMLElement",
"childNode",
":",
"tableScan",
".",
"children",
")",
... | Parse a where or join clause. This behavior is common to all kinds of statements. | [
"Parse",
"a",
"where",
"or",
"join",
"clause",
".",
"This",
"behavior",
"is",
"common",
"to",
"all",
"kinds",
"of",
"statements",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L1735-L1754 |
61,509 | VoltDB/voltdb | src/frontend/org/voltdb/planner/AbstractParsedStmt.java | AbstractParsedStmt.limitPlanNodeFromXml | LimitPlanNode limitPlanNodeFromXml(VoltXMLElement limitXml, VoltXMLElement offsetXml) {
if (limitXml == null && offsetXml == null) {
return null;
}
String node;
long limitParameterId = -1;
long offsetParameterId = -1;
long limit = -1;
long offset = 0... | java | LimitPlanNode limitPlanNodeFromXml(VoltXMLElement limitXml, VoltXMLElement offsetXml) {
if (limitXml == null && offsetXml == null) {
return null;
}
String node;
long limitParameterId = -1;
long offsetParameterId = -1;
long limit = -1;
long offset = 0... | [
"LimitPlanNode",
"limitPlanNodeFromXml",
"(",
"VoltXMLElement",
"limitXml",
",",
"VoltXMLElement",
"offsetXml",
")",
"{",
"if",
"(",
"limitXml",
"==",
"null",
"&&",
"offsetXml",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"String",
"node",
";",
"long",... | Produce a LimitPlanNode from the given XML
@param limitXml Volt XML for limit
@param offsetXml Volt XML for offset
@return An instance of LimitPlanNode for the given XML | [
"Produce",
"a",
"LimitPlanNode",
"from",
"the",
"given",
"XML"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L1848-L1909 |
61,510 | VoltDB/voltdb | src/frontend/org/voltdb/planner/AbstractParsedStmt.java | AbstractParsedStmt.orderByColumnsCoverUniqueKeys | protected boolean orderByColumnsCoverUniqueKeys() {
// In theory, if EVERY table in the query has a uniqueness constraint
// (primary key or other unique index) on columns that are all listed in the ORDER BY values,
// the result is deterministic.
// This holds regardless of whether the ... | java | protected boolean orderByColumnsCoverUniqueKeys() {
// In theory, if EVERY table in the query has a uniqueness constraint
// (primary key or other unique index) on columns that are all listed in the ORDER BY values,
// the result is deterministic.
// This holds regardless of whether the ... | [
"protected",
"boolean",
"orderByColumnsCoverUniqueKeys",
"(",
")",
"{",
"// In theory, if EVERY table in the query has a uniqueness constraint",
"// (primary key or other unique index) on columns that are all listed in the ORDER BY values,",
"// the result is deterministic.",
"// This holds regard... | Order by Columns or expressions has to operate on the display columns or expressions.
@return | [
"Order",
"by",
"Columns",
"or",
"expressions",
"has",
"to",
"operate",
"on",
"the",
"display",
"columns",
"or",
"expressions",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L1915-L2045 |
61,511 | VoltDB/voltdb | src/frontend/org/voltdb/planner/AbstractParsedStmt.java | AbstractParsedStmt.addHonoraryOrderByExpressions | protected void addHonoraryOrderByExpressions(
HashSet<AbstractExpression> orderByExprs,
List<ParsedColInfo> candidateColumns) {
// If there is not exactly one table scan we will not proceed.
// We don't really know how to make indices work with joins,
// and there is noth... | java | protected void addHonoraryOrderByExpressions(
HashSet<AbstractExpression> orderByExprs,
List<ParsedColInfo> candidateColumns) {
// If there is not exactly one table scan we will not proceed.
// We don't really know how to make indices work with joins,
// and there is noth... | [
"protected",
"void",
"addHonoraryOrderByExpressions",
"(",
"HashSet",
"<",
"AbstractExpression",
">",
"orderByExprs",
",",
"List",
"<",
"ParsedColInfo",
">",
"candidateColumns",
")",
"{",
"// If there is not exactly one table scan we will not proceed.",
"// We don't really know h... | Given a set of order-by expressions and a select list, which is a list of
columns, each with an expression and an alias, expand the order-by list
with new expressions which could be on the order-by list without changing
the sort order and which are otherwise helpful. | [
"Given",
"a",
"set",
"of",
"order",
"-",
"by",
"expressions",
"and",
"a",
"select",
"list",
"which",
"is",
"a",
"list",
"of",
"columns",
"each",
"with",
"an",
"expression",
"and",
"an",
"alias",
"expand",
"the",
"order",
"-",
"by",
"list",
"with",
"new... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L2053-L2157 |
61,512 | VoltDB/voltdb | src/frontend/org/voltdb/planner/AbstractParsedStmt.java | AbstractParsedStmt.producesOneRowOutput | protected boolean producesOneRowOutput () {
if (m_tableAliasMap.size() != 1) {
return false;
}
// Get the table. There's only one.
StmtTableScan scan = m_tableAliasMap.values().iterator().next();
Table table = getTableFromDB(scan.getTableName());
// May be s... | java | protected boolean producesOneRowOutput () {
if (m_tableAliasMap.size() != 1) {
return false;
}
// Get the table. There's only one.
StmtTableScan scan = m_tableAliasMap.values().iterator().next();
Table table = getTableFromDB(scan.getTableName());
// May be s... | [
"protected",
"boolean",
"producesOneRowOutput",
"(",
")",
"{",
"if",
"(",
"m_tableAliasMap",
".",
"size",
"(",
")",
"!=",
"1",
")",
"{",
"return",
"false",
";",
"}",
"// Get the table. There's only one.",
"StmtTableScan",
"scan",
"=",
"m_tableAliasMap",
".",
"v... | row else false | [
"row",
"else",
"false"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L2282-L2353 |
61,513 | VoltDB/voltdb | src/frontend/org/voltdb/planner/AbstractParsedStmt.java | AbstractParsedStmt.calculateUDFDependees | public Collection<String> calculateUDFDependees() {
List<String> answer = new ArrayList<>();
Collection<AbstractExpression> fCalls = findAllSubexpressionsOfClass(FunctionExpression.class);
for (AbstractExpression fCall : fCalls) {
FunctionExpression fexpr = (FunctionExpression)fCall;... | java | public Collection<String> calculateUDFDependees() {
List<String> answer = new ArrayList<>();
Collection<AbstractExpression> fCalls = findAllSubexpressionsOfClass(FunctionExpression.class);
for (AbstractExpression fCall : fCalls) {
FunctionExpression fexpr = (FunctionExpression)fCall;... | [
"public",
"Collection",
"<",
"String",
">",
"calculateUDFDependees",
"(",
")",
"{",
"List",
"<",
"String",
">",
"answer",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"Collection",
"<",
"AbstractExpression",
">",
"fCalls",
"=",
"findAllSubexpressionsOfClass",
... | Calculate the UDF dependees. These are the UDFs called in an expression
in this procedure.
@return The list of names of UDF dependees. These are function names, and
should all be in lower case. | [
"Calculate",
"the",
"UDF",
"dependees",
".",
"These",
"are",
"the",
"UDFs",
"called",
"in",
"an",
"expression",
"in",
"this",
"procedure",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L2382-L2392 |
61,514 | VoltDB/voltdb | src/frontend/org/voltdb/planner/CompiledPlan.java | CompiledPlan.statementGuaranteesDeterminism | public void statementGuaranteesDeterminism(boolean hasLimitOrOffset,
boolean order,
String contentDeterminismDetail) {
m_statementHasLimitOrOffset = hasLimitOrOffset;
m_statementIsOrderDeterministic = order;
... | java | public void statementGuaranteesDeterminism(boolean hasLimitOrOffset,
boolean order,
String contentDeterminismDetail) {
m_statementHasLimitOrOffset = hasLimitOrOffset;
m_statementIsOrderDeterministic = order;
... | [
"public",
"void",
"statementGuaranteesDeterminism",
"(",
"boolean",
"hasLimitOrOffset",
",",
"boolean",
"order",
",",
"String",
"contentDeterminismDetail",
")",
"{",
"m_statementHasLimitOrOffset",
"=",
"hasLimitOrOffset",
";",
"m_statementIsOrderDeterministic",
"=",
"order",
... | Mark the level of result determinism imposed by the statement, which can
save us from a difficult determination based on the plan graph. | [
"Mark",
"the",
"level",
"of",
"result",
"determinism",
"imposed",
"by",
"the",
"statement",
"which",
"can",
"save",
"us",
"from",
"a",
"difficult",
"determination",
"based",
"on",
"the",
"plan",
"graph",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/CompiledPlan.java#L133-L141 |
61,515 | VoltDB/voltdb | src/frontend/org/voltdb/planner/CompiledPlan.java | CompiledPlan.setParamIndexes | private static void setParamIndexes(BitSet ints, List<AbstractExpression> params) {
for(AbstractExpression ae : params) {
assert(ae instanceof ParameterValueExpression);
ParameterValueExpression pve = (ParameterValueExpression) ae;
int param = pve.getParameterIndex();
... | java | private static void setParamIndexes(BitSet ints, List<AbstractExpression> params) {
for(AbstractExpression ae : params) {
assert(ae instanceof ParameterValueExpression);
ParameterValueExpression pve = (ParameterValueExpression) ae;
int param = pve.getParameterIndex();
... | [
"private",
"static",
"void",
"setParamIndexes",
"(",
"BitSet",
"ints",
",",
"List",
"<",
"AbstractExpression",
">",
"params",
")",
"{",
"for",
"(",
"AbstractExpression",
"ae",
":",
"params",
")",
"{",
"assert",
"(",
"ae",
"instanceof",
"ParameterValueExpression"... | sources of bindings, IndexScans and IndexCounts. | [
"sources",
"of",
"bindings",
"IndexScans",
"and",
"IndexCounts",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/CompiledPlan.java#L230-L237 |
61,516 | VoltDB/voltdb | src/frontend/org/voltdb/planner/CompiledPlan.java | CompiledPlan.bitSetToIntVector | private static int[] bitSetToIntVector(BitSet ints) {
int intCount = ints.cardinality();
if (intCount == 0) {
return null;
}
int[] result = new int[intCount];
int nextBit = ints.nextSetBit(0);
for (int ii = 0; ii < intCount; ii++) {
assert(nextBit ... | java | private static int[] bitSetToIntVector(BitSet ints) {
int intCount = ints.cardinality();
if (intCount == 0) {
return null;
}
int[] result = new int[intCount];
int nextBit = ints.nextSetBit(0);
for (int ii = 0; ii < intCount; ii++) {
assert(nextBit ... | [
"private",
"static",
"int",
"[",
"]",
"bitSetToIntVector",
"(",
"BitSet",
"ints",
")",
"{",
"int",
"intCount",
"=",
"ints",
".",
"cardinality",
"(",
")",
";",
"if",
"(",
"intCount",
"==",
"0",
")",
"{",
"return",
"null",
";",
"}",
"int",
"[",
"]",
... | to convert the set bits to their integer indexes. | [
"to",
"convert",
"the",
"set",
"bits",
"to",
"their",
"integer",
"indexes",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/CompiledPlan.java#L241-L255 |
61,517 | VoltDB/voltdb | src/frontend/org/voltdb/planner/CompiledPlan.java | CompiledPlan.parameterTypes | public VoltType[] parameterTypes() {
if (m_parameterTypes == null) {
m_parameterTypes = new VoltType[getParameters().length];
int ii = 0;
for (ParameterValueExpression param : getParameters()) {
m_parameterTypes[ii++] = param.getValueType();
}
... | java | public VoltType[] parameterTypes() {
if (m_parameterTypes == null) {
m_parameterTypes = new VoltType[getParameters().length];
int ii = 0;
for (ParameterValueExpression param : getParameters()) {
m_parameterTypes[ii++] = param.getValueType();
}
... | [
"public",
"VoltType",
"[",
"]",
"parameterTypes",
"(",
")",
"{",
"if",
"(",
"m_parameterTypes",
"==",
"null",
")",
"{",
"m_parameterTypes",
"=",
"new",
"VoltType",
"[",
"getParameters",
"(",
")",
".",
"length",
"]",
";",
"int",
"ii",
"=",
"0",
";",
"fo... | This is assumed to be called only after parameters has been fully initialized. | [
"This",
"is",
"assumed",
"to",
"be",
"called",
"only",
"after",
"parameters",
"has",
"been",
"fully",
"initialized",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/CompiledPlan.java#L287-L296 |
61,518 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseManager.java | DatabaseManager.newSession | public static Session newSession(int dbID, String user, String password,
int timeZoneSeconds) {
Database db = (Database) databaseIDMap.get(dbID);
if (db == null) {
return null;
}
Session session = db.connect(user, password, timeZoneSeco... | java | public static Session newSession(int dbID, String user, String password,
int timeZoneSeconds) {
Database db = (Database) databaseIDMap.get(dbID);
if (db == null) {
return null;
}
Session session = db.connect(user, password, timeZoneSeco... | [
"public",
"static",
"Session",
"newSession",
"(",
"int",
"dbID",
",",
"String",
"user",
",",
"String",
"password",
",",
"int",
"timeZoneSeconds",
")",
"{",
"Database",
"db",
"=",
"(",
"Database",
")",
"databaseIDMap",
".",
"get",
"(",
"dbID",
")",
";",
"... | Used by server to open a new session | [
"Used",
"by",
"server",
"to",
"open",
"a",
"new",
"session"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseManager.java#L147-L161 |
61,519 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseManager.java | DatabaseManager.newSession | public static Session newSession(String type, String path, String user,
String password, HsqlProperties props,
int timeZoneSeconds) {
Database db = getDatabase(type, path, props);
if (db == null) {
return null;
... | java | public static Session newSession(String type, String path, String user,
String password, HsqlProperties props,
int timeZoneSeconds) {
Database db = getDatabase(type, path, props);
if (db == null) {
return null;
... | [
"public",
"static",
"Session",
"newSession",
"(",
"String",
"type",
",",
"String",
"path",
",",
"String",
"user",
",",
"String",
"password",
",",
"HsqlProperties",
"props",
",",
"int",
"timeZoneSeconds",
")",
"{",
"Database",
"db",
"=",
"getDatabase",
"(",
"... | Used by in-process connections and by Servlet | [
"Used",
"by",
"in",
"-",
"process",
"connections",
"and",
"by",
"Servlet"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseManager.java#L166-L177 |
61,520 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseManager.java | DatabaseManager.lookupDatabaseObject | public static synchronized Database lookupDatabaseObject(String type,
String path) {
// A VoltDB extension to work around ENG-6044
/* disabled 14 lines ...
Object key = path;
HashMap databaseMap;
if (type == DatabaseURL.S_FILE) {
databaseMap = fileDatab... | java | public static synchronized Database lookupDatabaseObject(String type,
String path) {
// A VoltDB extension to work around ENG-6044
/* disabled 14 lines ...
Object key = path;
HashMap databaseMap;
if (type == DatabaseURL.S_FILE) {
databaseMap = fileDatab... | [
"public",
"static",
"synchronized",
"Database",
"lookupDatabaseObject",
"(",
"String",
"type",
",",
"String",
"path",
")",
"{",
"// A VoltDB extension to work around ENG-6044",
"/* disabled 14 lines ...\n Object key = path;\n HashMap databaseMap;\n\n if (type == Dat... | Looks up database of a given type and path in the registry. Returns
null if there is none. | [
"Looks",
"up",
"database",
"of",
"a",
"given",
"type",
"and",
"path",
"in",
"the",
"registry",
".",
"Returns",
"null",
"if",
"there",
"is",
"none",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseManager.java#L321-L348 |
61,521 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseManager.java | DatabaseManager.addDatabaseObject | private static synchronized void addDatabaseObject(String type,
String path, Database db) {
// A VoltDB extension to work around ENG-6044
/* disable 15 lines ...
Object key = path;
HashMap databaseMap;
if (type == DatabaseURL.S_FILE) {
databaseMap = fi... | java | private static synchronized void addDatabaseObject(String type,
String path, Database db) {
// A VoltDB extension to work around ENG-6044
/* disable 15 lines ...
Object key = path;
HashMap databaseMap;
if (type == DatabaseURL.S_FILE) {
databaseMap = fi... | [
"private",
"static",
"synchronized",
"void",
"addDatabaseObject",
"(",
"String",
"type",
",",
"String",
"path",
",",
"Database",
"db",
")",
"{",
"// A VoltDB extension to work around ENG-6044",
"/* disable 15 lines ...\n Object key = path;\n\n HashMap databaseMap;\n\... | Adds a database to the registry. Returns
null if there is none. | [
"Adds",
"a",
"database",
"to",
"the",
"registry",
".",
"Returns",
"null",
"if",
"there",
"is",
"none",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseManager.java#L354-L383 |
61,522 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseManager.java | DatabaseManager.removeDatabase | static void removeDatabase(Database database) {
int dbID = database.databaseID;
String type = database.getType();
String path = database.getPath();
// A VoltDB extension to work around ENG-6044
/* disable 2 lines ...
Object key = path;
HashMap databaseMap... | java | static void removeDatabase(Database database) {
int dbID = database.databaseID;
String type = database.getType();
String path = database.getPath();
// A VoltDB extension to work around ENG-6044
/* disable 2 lines ...
Object key = path;
HashMap databaseMap... | [
"static",
"void",
"removeDatabase",
"(",
"Database",
"database",
")",
"{",
"int",
"dbID",
"=",
"database",
".",
"databaseID",
";",
"String",
"type",
"=",
"database",
".",
"getType",
"(",
")",
";",
"String",
"path",
"=",
"database",
".",
"getPath",
"(",
"... | Removes the database from registry. | [
"Removes",
"the",
"database",
"from",
"registry",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseManager.java#L388-L428 |
61,523 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseManager.java | DatabaseManager.deRegisterServer | private static void deRegisterServer(Server server, Database db) {
Iterator it = serverMap.values().iterator();
for (; it.hasNext(); ) {
HashSet databases = (HashSet) it.next();
databases.remove(db);
if (databases.isEmpty()) {
it.remove();
... | java | private static void deRegisterServer(Server server, Database db) {
Iterator it = serverMap.values().iterator();
for (; it.hasNext(); ) {
HashSet databases = (HashSet) it.next();
databases.remove(db);
if (databases.isEmpty()) {
it.remove();
... | [
"private",
"static",
"void",
"deRegisterServer",
"(",
"Server",
"server",
",",
"Database",
"db",
")",
"{",
"Iterator",
"it",
"=",
"serverMap",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"for",
"(",
";",
"it",
".",
"hasNext",
"(",
")",
"... | Deregisters a server as serving a given database. Not yet used. | [
"Deregisters",
"a",
"server",
"as",
"serving",
"a",
"given",
"database",
".",
"Not",
"yet",
"used",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseManager.java#L449-L462 |
61,524 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseManager.java | DatabaseManager.registerServer | private static void registerServer(Server server, Database db) {
if (!serverMap.containsKey(server)) {
serverMap.put(server, new HashSet());
}
HashSet databases = (HashSet) serverMap.get(server);
databases.add(db);
} | java | private static void registerServer(Server server, Database db) {
if (!serverMap.containsKey(server)) {
serverMap.put(server, new HashSet());
}
HashSet databases = (HashSet) serverMap.get(server);
databases.add(db);
} | [
"private",
"static",
"void",
"registerServer",
"(",
"Server",
"server",
",",
"Database",
"db",
")",
"{",
"if",
"(",
"!",
"serverMap",
".",
"containsKey",
"(",
"server",
")",
")",
"{",
"serverMap",
".",
"put",
"(",
"server",
",",
"new",
"HashSet",
"(",
... | Registers a server as serving a given database. | [
"Registers",
"a",
"server",
"as",
"serving",
"a",
"given",
"database",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseManager.java#L467-L476 |
61,525 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseManager.java | DatabaseManager.notifyServers | private static void notifyServers(Database db) {
Iterator it = serverMap.keySet().iterator();
for (; it.hasNext(); ) {
Server server = (Server) it.next();
HashSet databases = (HashSet) serverMap.get(server);
if (databases.contains(db)) {
// A VoltDB extension t... | java | private static void notifyServers(Database db) {
Iterator it = serverMap.keySet().iterator();
for (; it.hasNext(); ) {
Server server = (Server) it.next();
HashSet databases = (HashSet) serverMap.get(server);
if (databases.contains(db)) {
// A VoltDB extension t... | [
"private",
"static",
"void",
"notifyServers",
"(",
"Database",
"db",
")",
"{",
"Iterator",
"it",
"=",
"serverMap",
".",
"keySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"for",
"(",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Server",
"s... | Notifies all servers that serve the database that the database has been
shutdown. | [
"Notifies",
"all",
"servers",
"that",
"serve",
"the",
"database",
"that",
"the",
"database",
"has",
"been",
"shutdown",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseManager.java#L482-L499 |
61,526 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseManager.java | DatabaseManager.filePathToKey | private static String filePathToKey(String path) {
try {
return FileUtil.getDefaultInstance().canonicalPath(path);
} catch (Exception e) {
return path;
}
} | java | private static String filePathToKey(String path) {
try {
return FileUtil.getDefaultInstance().canonicalPath(path);
} catch (Exception e) {
return path;
}
} | [
"private",
"static",
"String",
"filePathToKey",
"(",
"String",
"path",
")",
"{",
"try",
"{",
"return",
"FileUtil",
".",
"getDefaultInstance",
"(",
")",
".",
"canonicalPath",
"(",
"path",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"return",
... | thrown exception to an HsqlException in the process | [
"thrown",
"exception",
"to",
"an",
"HsqlException",
"in",
"the",
"process"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/DatabaseManager.java#L526-L533 |
61,527 | VoltDB/voltdb | src/frontend/org/voltdb/parser/SQLLexer.java | SQLLexer.isComment | public static boolean isComment(String sql)
{
Matcher commentMatcher = PAT_SINGLE_LINE_COMMENT.matcher(sql);
return commentMatcher.matches();
} | java | public static boolean isComment(String sql)
{
Matcher commentMatcher = PAT_SINGLE_LINE_COMMENT.matcher(sql);
return commentMatcher.matches();
} | [
"public",
"static",
"boolean",
"isComment",
"(",
"String",
"sql",
")",
"{",
"Matcher",
"commentMatcher",
"=",
"PAT_SINGLE_LINE_COMMENT",
".",
"matcher",
"(",
"sql",
")",
";",
"return",
"commentMatcher",
".",
"matches",
"(",
")",
";",
"}"
] | Check if a SQL string is a comment.
@param sql SQL string
@return true if it's a comment | [
"Check",
"if",
"a",
"SQL",
"string",
"is",
"a",
"comment",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLLexer.java#L167-L171 |
61,528 | VoltDB/voltdb | src/frontend/org/voltdb/parser/SQLLexer.java | SQLLexer.extractDDLToken | public static String extractDDLToken(String sql)
{
String ddlToken = null;
Matcher ddlMatcher = PAT_ANY_DDL_FIRST_TOKEN.matcher(sql);
if (ddlMatcher.find()) {
ddlToken = ddlMatcher.group(1).toLowerCase();
}
return ddlToken;
} | java | public static String extractDDLToken(String sql)
{
String ddlToken = null;
Matcher ddlMatcher = PAT_ANY_DDL_FIRST_TOKEN.matcher(sql);
if (ddlMatcher.find()) {
ddlToken = ddlMatcher.group(1).toLowerCase();
}
return ddlToken;
} | [
"public",
"static",
"String",
"extractDDLToken",
"(",
"String",
"sql",
")",
"{",
"String",
"ddlToken",
"=",
"null",
";",
"Matcher",
"ddlMatcher",
"=",
"PAT_ANY_DDL_FIRST_TOKEN",
".",
"matcher",
"(",
"sql",
")",
";",
"if",
"(",
"ddlMatcher",
".",
"find",
"(",... | Get the DDL token, if any, at the start of this statement.
@return returns token, or null if it wasn't DDL | [
"Get",
"the",
"DDL",
"token",
"if",
"any",
"at",
"the",
"start",
"of",
"this",
"statement",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLLexer.java#L187-L195 |
61,529 | VoltDB/voltdb | src/frontend/org/voltdb/parser/SQLLexer.java | SQLLexer.extractDDLTableName | public static String extractDDLTableName(String sql)
{
Matcher matcher = PAT_TABLE_DDL_PREAMBLE.matcher(sql);
if (matcher.find()) {
return matcher.group(2).toLowerCase();
}
return null;
} | java | public static String extractDDLTableName(String sql)
{
Matcher matcher = PAT_TABLE_DDL_PREAMBLE.matcher(sql);
if (matcher.find()) {
return matcher.group(2).toLowerCase();
}
return null;
} | [
"public",
"static",
"String",
"extractDDLTableName",
"(",
"String",
"sql",
")",
"{",
"Matcher",
"matcher",
"=",
"PAT_TABLE_DDL_PREAMBLE",
".",
"matcher",
"(",
"sql",
")",
";",
"if",
"(",
"matcher",
".",
"find",
"(",
")",
")",
"{",
"return",
"matcher",
".",... | Get the table name for a CREATE or DROP DDL statement.
@return returns token, or null if the DDL isn't (CREATE|DROP) TABLE | [
"Get",
"the",
"table",
"name",
"for",
"a",
"CREATE",
"or",
"DROP",
"DDL",
"statement",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLLexer.java#L248-L255 |
61,530 | VoltDB/voltdb | src/frontend/org/voltdb/parser/SQLLexer.java | SQLLexer.checkPermitted | public static String checkPermitted(String sql)
{
/*
* IMPORTANT: Black-lists are checked first because they know more about
* what they don't like about a statement and can provide a better message.
* It requires that black-lists patterns be very selective and that they
... | java | public static String checkPermitted(String sql)
{
/*
* IMPORTANT: Black-lists are checked first because they know more about
* what they don't like about a statement and can provide a better message.
* It requires that black-lists patterns be very selective and that they
... | [
"public",
"static",
"String",
"checkPermitted",
"(",
"String",
"sql",
")",
"{",
"/*\n * IMPORTANT: Black-lists are checked first because they know more about\n * what they don't like about a statement and can provide a better message.\n * It requires that black-lists patte... | Naive filtering for stuff we haven't implemented yet.
Hopefully this gets whittled away and eventually disappears.
@param sql statement to check
@return rejection explanation string or null if accepted | [
"Naive",
"filtering",
"for",
"stuff",
"we",
"haven",
"t",
"implemented",
"yet",
".",
"Hopefully",
"this",
"gets",
"whittled",
"away",
"and",
"eventually",
"disappears",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLLexer.java#L264-L297 |
61,531 | VoltDB/voltdb | src/frontend/org/voltdb/parser/SQLLexer.java | SQLLexer.matchesStringAtIndex | static private boolean matchesStringAtIndex(char[] buf, int index, String str) {
int strLength = str.length();
if (index + strLength > buf.length) {
return false;
}
for (int i = 0; i < strLength; ++i) {
if (buf[index + i] != str.charAt(i)) {
retur... | java | static private boolean matchesStringAtIndex(char[] buf, int index, String str) {
int strLength = str.length();
if (index + strLength > buf.length) {
return false;
}
for (int i = 0; i < strLength; ++i) {
if (buf[index + i] != str.charAt(i)) {
retur... | [
"static",
"private",
"boolean",
"matchesStringAtIndex",
"(",
"char",
"[",
"]",
"buf",
",",
"int",
"index",
",",
"String",
"str",
")",
"{",
"int",
"strLength",
"=",
"str",
".",
"length",
"(",
")",
";",
"if",
"(",
"index",
"+",
"strLength",
">",
"buf",
... | Determine if a character buffer contains the specified string a the specified index.
Avoids an array index exception if the buffer is too short.
@param buf a character buffer
@param index an offset into the buffer
@param str the string to look for
@return true if the buffer contains the specified string | [
"Determine",
"if",
"a",
"character",
"buffer",
"contains",
"the",
"specified",
"string",
"a",
"the",
"specified",
"index",
".",
"Avoids",
"an",
"array",
"index",
"exception",
"if",
"the",
"buffer",
"is",
"too",
"short",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLLexer.java#L395-L408 |
61,532 | VoltDB/voltdb | src/frontend/org/voltdb/parser/SQLLexer.java | SQLLexer.removeCStyleComments | private static String removeCStyleComments(String ddl)
{
// Avoid Apache commons StringUtils.join() to minimize client dependencies.
StringBuilder sb = new StringBuilder();
for (String part : PAT_STRIP_CSTYLE_COMMENTS.split(ddl)) {
sb.append(part);
}
return sb.toS... | java | private static String removeCStyleComments(String ddl)
{
// Avoid Apache commons StringUtils.join() to minimize client dependencies.
StringBuilder sb = new StringBuilder();
for (String part : PAT_STRIP_CSTYLE_COMMENTS.split(ddl)) {
sb.append(part);
}
return sb.toS... | [
"private",
"static",
"String",
"removeCStyleComments",
"(",
"String",
"ddl",
")",
"{",
"// Avoid Apache commons StringUtils.join() to minimize client dependencies.",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"String",
"part",
":",
"P... | Remove c-style comments from a string aggressively | [
"Remove",
"c",
"-",
"style",
"comments",
"from",
"a",
"string",
"aggressively"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLLexer.java#L677-L685 |
61,533 | VoltDB/voltdb | src/frontend/org/voltdb/parser/SQLLexer.java | SQLLexer.findObjectToken | private static ObjectToken findObjectToken(String objectTypeName)
{
if (objectTypeName != null) {
for (ObjectToken ot : OBJECT_TOKENS) {
if (ot.token.equalsIgnoreCase(objectTypeName)) {
return ot;
}
}
}
return null;
... | java | private static ObjectToken findObjectToken(String objectTypeName)
{
if (objectTypeName != null) {
for (ObjectToken ot : OBJECT_TOKENS) {
if (ot.token.equalsIgnoreCase(objectTypeName)) {
return ot;
}
}
}
return null;
... | [
"private",
"static",
"ObjectToken",
"findObjectToken",
"(",
"String",
"objectTypeName",
")",
"{",
"if",
"(",
"objectTypeName",
"!=",
"null",
")",
"{",
"for",
"(",
"ObjectToken",
"ot",
":",
"OBJECT_TOKENS",
")",
"{",
"if",
"(",
"ot",
".",
"token",
".",
"equ... | Find information about an object type token, if it's a known object type.
@param objectTypeName object type name to look up
@return object token information or null if it wasn't found | [
"Find",
"information",
"about",
"an",
"object",
"type",
"token",
"if",
"it",
"s",
"a",
"known",
"object",
"type",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLLexer.java#L692-L702 |
61,534 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/TriggerDef.java | TriggerDef.pushPair | synchronized void pushPair(Session session, Object[] row1, Object[] row2) {
if (maxRowsQueued == 0) {
trigger.fire(triggerType, name.name, table.getName().name, row1,
row2);
return;
}
if (rowsQueued >= maxRowsQueued) {
if (nowait) {... | java | synchronized void pushPair(Session session, Object[] row1, Object[] row2) {
if (maxRowsQueued == 0) {
trigger.fire(triggerType, name.name, table.getName().name, row1,
row2);
return;
}
if (rowsQueued >= maxRowsQueued) {
if (nowait) {... | [
"synchronized",
"void",
"pushPair",
"(",
"Session",
"session",
",",
"Object",
"[",
"]",
"row1",
",",
"Object",
"[",
"]",
"row2",
")",
"{",
"if",
"(",
"maxRowsQueued",
"==",
"0",
")",
"{",
"trigger",
".",
"fire",
"(",
"triggerType",
",",
"name",
".",
... | The main thread tells the trigger thread to fire by this call.
If this Trigger is not threaded then the fire method is caled
immediately and executed by the main thread. Otherwise, the row
data objects are added to the queue to be used by the Trigger thread.
@param row1
@param row2 | [
"The",
"main",
"thread",
"tells",
"the",
"trigger",
"thread",
"to",
"fire",
"by",
"this",
"call",
".",
"If",
"this",
"Trigger",
"is",
"not",
"threaded",
"then",
"the",
"fire",
"method",
"is",
"caled",
"immediately",
"and",
"executed",
"by",
"the",
"main",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TriggerDef.java#L445-L473 |
61,535 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/PlannerTool.java | PlannerTool.planSqlCore | public synchronized CompiledPlan planSqlCore(String sql, StatementPartitioning partitioning) {
TrivialCostModel costModel = new TrivialCostModel();
DatabaseEstimates estimates = new DatabaseEstimates();
CompiledPlan plan = null;
// This try-with-resources block acquires a global lock on... | java | public synchronized CompiledPlan planSqlCore(String sql, StatementPartitioning partitioning) {
TrivialCostModel costModel = new TrivialCostModel();
DatabaseEstimates estimates = new DatabaseEstimates();
CompiledPlan plan = null;
// This try-with-resources block acquires a global lock on... | [
"public",
"synchronized",
"CompiledPlan",
"planSqlCore",
"(",
"String",
"sql",
",",
"StatementPartitioning",
"partitioning",
")",
"{",
"TrivialCostModel",
"costModel",
"=",
"new",
"TrivialCostModel",
"(",
")",
";",
"DatabaseEstimates",
"estimates",
"=",
"new",
"Databa... | Stripped down compile that is ONLY used to plan default procedures. | [
"Stripped",
"down",
"compile",
"that",
"is",
"ONLY",
"used",
"to",
"plan",
"default",
"procedures",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/PlannerTool.java#L147-L185 |
61,536 | VoltDB/voltdb | src/frontend/org/voltdb/StatsAgent.java | StatsAgent.isReadOnlyProcedure | private boolean isReadOnlyProcedure(String pname) {
final Boolean b = m_procedureInfo.get().get(pname);
if (b == null) {
return false;
}
return b;
} | java | private boolean isReadOnlyProcedure(String pname) {
final Boolean b = m_procedureInfo.get().get(pname);
if (b == null) {
return false;
}
return b;
} | [
"private",
"boolean",
"isReadOnlyProcedure",
"(",
"String",
"pname",
")",
"{",
"final",
"Boolean",
"b",
"=",
"m_procedureInfo",
".",
"get",
"(",
")",
".",
"get",
"(",
"pname",
")",
";",
"if",
"(",
"b",
"==",
"null",
")",
"{",
"return",
"false",
";",
... | Check if procedure is readonly?
@param pname
@return | [
"Check",
"if",
"procedure",
"is",
"readonly?"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/StatsAgent.java#L118-L124 |
61,537 | VoltDB/voltdb | src/frontend/org/voltdb/StatsAgent.java | StatsAgent.aggregateProcedureProfileStats | private VoltTable[] aggregateProcedureProfileStats(VoltTable[] baseStats)
{
if (baseStats == null || baseStats.length != 1) {
return baseStats;
}
StatsProcProfTable timeTable = new StatsProcProfTable();
baseStats[0].resetRowPosition();
while (baseStats[0].advance... | java | private VoltTable[] aggregateProcedureProfileStats(VoltTable[] baseStats)
{
if (baseStats == null || baseStats.length != 1) {
return baseStats;
}
StatsProcProfTable timeTable = new StatsProcProfTable();
baseStats[0].resetRowPosition();
while (baseStats[0].advance... | [
"private",
"VoltTable",
"[",
"]",
"aggregateProcedureProfileStats",
"(",
"VoltTable",
"[",
"]",
"baseStats",
")",
"{",
"if",
"(",
"baseStats",
"==",
"null",
"||",
"baseStats",
".",
"length",
"!=",
"1",
")",
"{",
"return",
"baseStats",
";",
"}",
"StatsProcPro... | Produce PROCEDUREPROFILE aggregation of PROCEDURE subselector | [
"Produce",
"PROCEDUREPROFILE",
"aggregation",
"of",
"PROCEDURE",
"subselector"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/StatsAgent.java#L189-L223 |
61,538 | VoltDB/voltdb | src/frontend/org/voltdb/StatsAgent.java | StatsAgent.aggregateProcedureInputStats | private VoltTable[] aggregateProcedureInputStats(VoltTable[] baseStats)
{
if (baseStats == null || baseStats.length != 1) {
return baseStats;
}
StatsProcInputTable timeTable = new StatsProcInputTable();
baseStats[0].resetRowPosition();
while (baseStats[0].advance... | java | private VoltTable[] aggregateProcedureInputStats(VoltTable[] baseStats)
{
if (baseStats == null || baseStats.length != 1) {
return baseStats;
}
StatsProcInputTable timeTable = new StatsProcInputTable();
baseStats[0].resetRowPosition();
while (baseStats[0].advance... | [
"private",
"VoltTable",
"[",
"]",
"aggregateProcedureInputStats",
"(",
"VoltTable",
"[",
"]",
"baseStats",
")",
"{",
"if",
"(",
"baseStats",
"==",
"null",
"||",
"baseStats",
".",
"length",
"!=",
"1",
")",
"{",
"return",
"baseStats",
";",
"}",
"StatsProcInput... | Produce PROCEDUREINPUT aggregation of PROCEDURE subselector | [
"Produce",
"PROCEDUREINPUT",
"aggregation",
"of",
"PROCEDURE",
"subselector"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/StatsAgent.java#L227-L259 |
61,539 | VoltDB/voltdb | src/frontend/org/voltdb/StatsAgent.java | StatsAgent.aggregateProcedureOutputStats | private VoltTable[] aggregateProcedureOutputStats(VoltTable[] baseStats)
{
if (baseStats == null || baseStats.length != 1) {
return baseStats;
}
StatsProcOutputTable timeTable = new StatsProcOutputTable();
baseStats[0].resetRowPosition();
while (baseStats[0].adva... | java | private VoltTable[] aggregateProcedureOutputStats(VoltTable[] baseStats)
{
if (baseStats == null || baseStats.length != 1) {
return baseStats;
}
StatsProcOutputTable timeTable = new StatsProcOutputTable();
baseStats[0].resetRowPosition();
while (baseStats[0].adva... | [
"private",
"VoltTable",
"[",
"]",
"aggregateProcedureOutputStats",
"(",
"VoltTable",
"[",
"]",
"baseStats",
")",
"{",
"if",
"(",
"baseStats",
"==",
"null",
"||",
"baseStats",
".",
"length",
"!=",
"1",
")",
"{",
"return",
"baseStats",
";",
"}",
"StatsProcOutp... | Produce PROCEDUREOUTPUT aggregation of PROCEDURE subselector | [
"Produce",
"PROCEDUREOUTPUT",
"aggregation",
"of",
"PROCEDURE",
"subselector"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/StatsAgent.java#L265-L297 |
61,540 | VoltDB/voltdb | src/frontend/org/voltdb/StatsAgent.java | StatsAgent.notifyOfCatalogUpdate | public void notifyOfCatalogUpdate() {
m_procedureInfo = getProcedureInformationfoSupplier();
m_registeredStatsSources.put(StatsSelector.PROCEDURE,
new NonBlockingHashMap<Long, NonBlockingHashSet<StatsSource>>());
} | java | public void notifyOfCatalogUpdate() {
m_procedureInfo = getProcedureInformationfoSupplier();
m_registeredStatsSources.put(StatsSelector.PROCEDURE,
new NonBlockingHashMap<Long, NonBlockingHashSet<StatsSource>>());
} | [
"public",
"void",
"notifyOfCatalogUpdate",
"(",
")",
"{",
"m_procedureInfo",
"=",
"getProcedureInformationfoSupplier",
"(",
")",
";",
"m_registeredStatsSources",
".",
"put",
"(",
"StatsSelector",
".",
"PROCEDURE",
",",
"new",
"NonBlockingHashMap",
"<",
"Long",
",",
... | Please be noted that this function will be called from Site thread, where
most other functions in the class are from StatsAgent thread.
Need to release references to catalog related stats sources
to avoid hoarding references to the catalog. | [
"Please",
"be",
"noted",
"that",
"this",
"function",
"will",
"be",
"called",
"from",
"Site",
"thread",
"where",
"most",
"other",
"functions",
"in",
"the",
"class",
"are",
"from",
"StatsAgent",
"thread",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/StatsAgent.java#L307-L311 |
61,541 | VoltDB/voltdb | src/frontend/org/voltcore/agreement/AgreementTxnIdSafetyState.java | AgreementTxnIdSafetyState.addState | public void addState(long agreementHSId) {
SiteState ss = m_stateBySite.get(agreementHSId);
if (ss != null) return;
ss = new SiteState();
ss.hsId = agreementHSId;
ss.newestConfirmedTxnId = m_newestConfirmedTxnId;
m_stateBySite.put(agreementHSId, ss);
} | java | public void addState(long agreementHSId) {
SiteState ss = m_stateBySite.get(agreementHSId);
if (ss != null) return;
ss = new SiteState();
ss.hsId = agreementHSId;
ss.newestConfirmedTxnId = m_newestConfirmedTxnId;
m_stateBySite.put(agreementHSId, ss);
} | [
"public",
"void",
"addState",
"(",
"long",
"agreementHSId",
")",
"{",
"SiteState",
"ss",
"=",
"m_stateBySite",
".",
"get",
"(",
"agreementHSId",
")",
";",
"if",
"(",
"ss",
"!=",
"null",
")",
"return",
";",
"ss",
"=",
"new",
"SiteState",
"(",
")",
";",
... | Once a failed node is rejoined, put it's sites back into
all of the data structures here.
@param executorSiteId
@param partitionId | [
"Once",
"a",
"failed",
"node",
"is",
"rejoined",
"put",
"it",
"s",
"sites",
"back",
"into",
"all",
"of",
"the",
"data",
"structures",
"here",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/AgreementTxnIdSafetyState.java#L107-L114 |
61,542 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/Scoreboard.java | Scoreboard.pollFirstCompletionTask | public Pair<CompleteTransactionTask, Boolean> pollFirstCompletionTask(CompletionCounter nextTaskCounter) {
// remove from the head
Pair<CompleteTransactionTask, Boolean> pair = m_compTasks.pollFirstEntry().getValue();
if (m_compTasks.isEmpty()) {
return pair;
}
// ch... | java | public Pair<CompleteTransactionTask, Boolean> pollFirstCompletionTask(CompletionCounter nextTaskCounter) {
// remove from the head
Pair<CompleteTransactionTask, Boolean> pair = m_compTasks.pollFirstEntry().getValue();
if (m_compTasks.isEmpty()) {
return pair;
}
// ch... | [
"public",
"Pair",
"<",
"CompleteTransactionTask",
",",
"Boolean",
">",
"pollFirstCompletionTask",
"(",
"CompletionCounter",
"nextTaskCounter",
")",
"{",
"// remove from the head",
"Pair",
"<",
"CompleteTransactionTask",
",",
"Boolean",
">",
"pair",
"=",
"m_compTasks",
"... | Remove the CompleteTransactionTask from the head and count the next CompleteTransactionTask
@param nextTaskCounter CompletionCounter
@return the removed CompleteTransactionTask | [
"Remove",
"the",
"CompleteTransactionTask",
"from",
"the",
"head",
"and",
"count",
"the",
"next",
"CompleteTransactionTask"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/Scoreboard.java#L75-L94 |
61,543 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/Scoreboard.java | Scoreboard.isComparable | private static boolean isComparable(CompleteTransactionTask c1, CompleteTransactionTask c2) {
return c1.getMsgTxnId() == c2.getMsgTxnId() &&
MpRestartSequenceGenerator.isForRestart(c1.getTimestamp()) ==
MpRestartSequenceGenerator.isForRestart(c2.getTimestamp());
} | java | private static boolean isComparable(CompleteTransactionTask c1, CompleteTransactionTask c2) {
return c1.getMsgTxnId() == c2.getMsgTxnId() &&
MpRestartSequenceGenerator.isForRestart(c1.getTimestamp()) ==
MpRestartSequenceGenerator.isForRestart(c2.getTimestamp());
} | [
"private",
"static",
"boolean",
"isComparable",
"(",
"CompleteTransactionTask",
"c1",
",",
"CompleteTransactionTask",
"c2",
")",
"{",
"return",
"c1",
".",
"getMsgTxnId",
"(",
")",
"==",
"c2",
".",
"getMsgTxnId",
"(",
")",
"&&",
"MpRestartSequenceGenerator",
".",
... | 4) restart completion and repair completion can't overwrite each other | [
"4",
")",
"restart",
"completion",
"and",
"repair",
"completion",
"can",
"t",
"overwrite",
"each",
"other"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/Scoreboard.java#L123-L127 |
61,544 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/Scoreboard.java | Scoreboard.matchCompleteTransactionTask | public boolean matchCompleteTransactionTask(long txnId, long timestamp) {
if (!m_compTasks.isEmpty()) {
long lowestTxnId = m_compTasks.firstKey();
if (txnId == lowestTxnId) {
Pair<CompleteTransactionTask, Boolean> pair = m_compTasks.get(lowestTxnId);
retur... | java | public boolean matchCompleteTransactionTask(long txnId, long timestamp) {
if (!m_compTasks.isEmpty()) {
long lowestTxnId = m_compTasks.firstKey();
if (txnId == lowestTxnId) {
Pair<CompleteTransactionTask, Boolean> pair = m_compTasks.get(lowestTxnId);
retur... | [
"public",
"boolean",
"matchCompleteTransactionTask",
"(",
"long",
"txnId",
",",
"long",
"timestamp",
")",
"{",
"if",
"(",
"!",
"m_compTasks",
".",
"isEmpty",
"(",
")",
")",
"{",
"long",
"lowestTxnId",
"=",
"m_compTasks",
".",
"firstKey",
"(",
")",
";",
"if... | Only match CompleteTransactionTask at head of the queue | [
"Only",
"match",
"CompleteTransactionTask",
"at",
"head",
"of",
"the",
"queue"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/Scoreboard.java#L144-L153 |
61,545 | VoltDB/voltdb | src/frontend/org/voltdb/DRRoleStats.java | DRRoleStats.aggregateStats | public static VoltTable aggregateStats(VoltTable stats) throws IllegalArgumentException
{
stats.resetRowPosition();
if (stats.getRowCount() == 0) {
return stats;
}
String role = null;
Map<Byte, State> states = new TreeMap<>();
while (stats.advanceRow()) {... | java | public static VoltTable aggregateStats(VoltTable stats) throws IllegalArgumentException
{
stats.resetRowPosition();
if (stats.getRowCount() == 0) {
return stats;
}
String role = null;
Map<Byte, State> states = new TreeMap<>();
while (stats.advanceRow()) {... | [
"public",
"static",
"VoltTable",
"aggregateStats",
"(",
"VoltTable",
"stats",
")",
"throws",
"IllegalArgumentException",
"{",
"stats",
".",
"resetRowPosition",
"(",
")",
";",
"if",
"(",
"stats",
".",
"getRowCount",
"(",
")",
"==",
"0",
")",
"{",
"return",
"s... | Aggregates DRROLE statistics reported by multiple nodes into a single
cluster-wide row. The role column should be the same across all
nodes. The state column may defer slightly and it uses the same logical
AND-ish operation to combine the states.
This method modifies the VoltTable in place.
@param stats Statistics fro... | [
"Aggregates",
"DRROLE",
"statistics",
"reported",
"by",
"multiple",
"nodes",
"into",
"a",
"single",
"cluster",
"-",
"wide",
"row",
".",
"The",
"role",
"column",
"should",
"be",
"the",
"same",
"across",
"all",
"nodes",
".",
"The",
"state",
"column",
"may",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/DRRoleStats.java#L169-L202 |
61,546 | VoltDB/voltdb | src/frontend/org/voltdb/jdbc/Resources.java | Resources.getString | public static String getString(String key)
{
if (RESOURCE_BUNDLE == null)
throw new RuntimeException("Localized messages from resource bundle '" + BUNDLE_NAME + "' not loaded during initialization of driver.");
try
{
if (key == null)
throw new Illegal... | java | public static String getString(String key)
{
if (RESOURCE_BUNDLE == null)
throw new RuntimeException("Localized messages from resource bundle '" + BUNDLE_NAME + "' not loaded during initialization of driver.");
try
{
if (key == null)
throw new Illegal... | [
"public",
"static",
"String",
"getString",
"(",
"String",
"key",
")",
"{",
"if",
"(",
"RESOURCE_BUNDLE",
"==",
"null",
")",
"throw",
"new",
"RuntimeException",
"(",
"\"Localized messages from resource bundle '\"",
"+",
"BUNDLE_NAME",
"+",
"\"' not loaded during initiali... | Returns the localized message for the given message key
@param key
the message key
@return The localized message for the key | [
"Returns",
"the",
"localized",
"message",
"for",
"the",
"given",
"message",
"key"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/Resources.java#L64-L84 |
61,547 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/SnapshotWritePlan.java | SnapshotWritePlan.createAllDevNullTargets | public void createAllDevNullTargets(Exception lastWriteException)
{
Map<Integer, SnapshotDataTarget> targets = Maps.newHashMap();
final AtomicInteger numTargets = new AtomicInteger();
for (Deque<SnapshotTableTask> tasksForSite : m_taskListsForHSIds.values()) {
for (SnapshotTable... | java | public void createAllDevNullTargets(Exception lastWriteException)
{
Map<Integer, SnapshotDataTarget> targets = Maps.newHashMap();
final AtomicInteger numTargets = new AtomicInteger();
for (Deque<SnapshotTableTask> tasksForSite : m_taskListsForHSIds.values()) {
for (SnapshotTable... | [
"public",
"void",
"createAllDevNullTargets",
"(",
"Exception",
"lastWriteException",
")",
"{",
"Map",
"<",
"Integer",
",",
"SnapshotDataTarget",
">",
"targets",
"=",
"Maps",
".",
"newHashMap",
"(",
")",
";",
"final",
"AtomicInteger",
"numTargets",
"=",
"new",
"A... | In case the deferred setup phase fails, some data targets may have not been created yet.
This method will close all existing data targets and replace all with DevNullDataTargets
so that snapshot can be drained. | [
"In",
"case",
"the",
"deferred",
"setup",
"phase",
"fails",
"some",
"data",
"targets",
"may",
"have",
"not",
"been",
"created",
"yet",
".",
"This",
"method",
"will",
"close",
"all",
"existing",
"data",
"targets",
"and",
"replace",
"all",
"with",
"DevNullData... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotWritePlan.java#L170-L203 |
61,548 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/UpdateCore.java | UpdateCore.collapseSets | private Map<String, Boolean> collapseSets(List<List<String>> allTableSets) {
Map<String, Boolean> answer = new TreeMap<>();
for (List<String> tables : allTableSets) {
for (String table : tables) {
answer.put(table, false);
}
}
return answer;
} | java | private Map<String, Boolean> collapseSets(List<List<String>> allTableSets) {
Map<String, Boolean> answer = new TreeMap<>();
for (List<String> tables : allTableSets) {
for (String table : tables) {
answer.put(table, false);
}
}
return answer;
} | [
"private",
"Map",
"<",
"String",
",",
"Boolean",
">",
"collapseSets",
"(",
"List",
"<",
"List",
"<",
"String",
">",
">",
"allTableSets",
")",
"{",
"Map",
"<",
"String",
",",
"Boolean",
">",
"answer",
"=",
"new",
"TreeMap",
"<>",
"(",
")",
";",
"for",... | Take a list of list of table names and collapse into a map
which maps all table names to false. We will set the correct
values later on. We just want to get the structure right now.
Note that tables may be named multiple time in the lists of
lists of tables. Everything gets mapped to false, so we don't
care.
@param... | [
"Take",
"a",
"list",
"of",
"list",
"of",
"table",
"names",
"and",
"collapse",
"into",
"a",
"map",
"which",
"maps",
"all",
"table",
"names",
"to",
"false",
".",
"We",
"will",
"set",
"the",
"correct",
"values",
"later",
"on",
".",
"We",
"just",
"want",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/UpdateCore.java#L183-L191 |
61,549 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/UpdateCore.java | UpdateCore.decodeTables | private List<List<String>> decodeTables(String[] tablesThatMustBeEmpty) {
List<List<String>> answer = new ArrayList<>();
for (String tableSet : tablesThatMustBeEmpty) {
String tableNames[] = tableSet.split("\\+");
answer.add(Arrays.asList(tableNames));
}
return an... | java | private List<List<String>> decodeTables(String[] tablesThatMustBeEmpty) {
List<List<String>> answer = new ArrayList<>();
for (String tableSet : tablesThatMustBeEmpty) {
String tableNames[] = tableSet.split("\\+");
answer.add(Arrays.asList(tableNames));
}
return an... | [
"private",
"List",
"<",
"List",
"<",
"String",
">",
">",
"decodeTables",
"(",
"String",
"[",
"]",
"tablesThatMustBeEmpty",
")",
"{",
"List",
"<",
"List",
"<",
"String",
">>",
"answer",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"String",... | Decode sets of names encoded as by concatenation with plus signs
into lists of lists of strings. Preserve the order, since we need
it to match to error messages later on.
@param tablesThatMustBeEmpty
@return The decoded lists. | [
"Decode",
"sets",
"of",
"names",
"encoded",
"as",
"by",
"concatenation",
"with",
"plus",
"signs",
"into",
"lists",
"of",
"lists",
"of",
"strings",
".",
"Preserve",
"the",
"order",
"since",
"we",
"need",
"it",
"to",
"match",
"to",
"error",
"messages",
"late... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/UpdateCore.java#L201-L208 |
61,550 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/Shutdown.java | Shutdown.run | public VoltTable[] run(SystemProcedureExecutionContext ctx) {
createAndExecuteSysProcPlan(SysProcFragmentId.PF_shutdownSync, SysProcFragmentId.PF_shutdownSyncDone);
SynthesizedPlanFragment pfs[] = new SynthesizedPlanFragment[] {
new SynthesizedPlanFragment(SysProcFragmentId.PF_shutdownC... | java | public VoltTable[] run(SystemProcedureExecutionContext ctx) {
createAndExecuteSysProcPlan(SysProcFragmentId.PF_shutdownSync, SysProcFragmentId.PF_shutdownSyncDone);
SynthesizedPlanFragment pfs[] = new SynthesizedPlanFragment[] {
new SynthesizedPlanFragment(SysProcFragmentId.PF_shutdownC... | [
"public",
"VoltTable",
"[",
"]",
"run",
"(",
"SystemProcedureExecutionContext",
"ctx",
")",
"{",
"createAndExecuteSysProcPlan",
"(",
"SysProcFragmentId",
".",
"PF_shutdownSync",
",",
"SysProcFragmentId",
".",
"PF_shutdownSyncDone",
")",
";",
"SynthesizedPlanFragment",
"pf... | Begin an un-graceful shutdown.
@param ctx Internal parameter not exposed to the end-user.
@return Never returned, no he never returned... | [
"Begin",
"an",
"un",
"-",
"graceful",
"shutdown",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/Shutdown.java#L126-L134 |
61,551 | VoltDB/voltdb | src/frontend/org/voltdb/jdbc/JDBC4ClientConnection.java | JDBC4ClientConnection.drain | public void drain() throws InterruptedException, IOException {
ClientImpl currentClient = this.getClient();
if (currentClient == null) {
throw new IOException("Client is unavailable for drain().");
}
currentClient.drain();
} | java | public void drain() throws InterruptedException, IOException {
ClientImpl currentClient = this.getClient();
if (currentClient == null) {
throw new IOException("Client is unavailable for drain().");
}
currentClient.drain();
} | [
"public",
"void",
"drain",
"(",
")",
"throws",
"InterruptedException",
",",
"IOException",
"{",
"ClientImpl",
"currentClient",
"=",
"this",
".",
"getClient",
"(",
")",
";",
"if",
"(",
"currentClient",
"==",
"null",
")",
"{",
"throw",
"new",
"IOException",
"(... | Block the current thread until all queued stored procedure invocations have received
responses or there are no more connections to the cluster
@throws InterruptedException
@throws IOException
@see Client#drain() | [
"Block",
"the",
"current",
"thread",
"until",
"all",
"queued",
"stored",
"procedure",
"invocations",
"have",
"received",
"responses",
"or",
"there",
"are",
"no",
"more",
"connections",
"to",
"the",
"cluster"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ClientConnection.java#L503-L509 |
61,552 | VoltDB/voltdb | src/frontend/org/voltdb/jdbc/JDBC4ClientConnection.java | JDBC4ClientConnection.backpressureBarrier | public void backpressureBarrier() throws InterruptedException, IOException {
ClientImpl currentClient = this.getClient();
if (currentClient == null) {
throw new IOException("Client is unavailable for backpressureBarrier().");
}
currentClient.backpressureBarrier();
} | java | public void backpressureBarrier() throws InterruptedException, IOException {
ClientImpl currentClient = this.getClient();
if (currentClient == null) {
throw new IOException("Client is unavailable for backpressureBarrier().");
}
currentClient.backpressureBarrier();
} | [
"public",
"void",
"backpressureBarrier",
"(",
")",
"throws",
"InterruptedException",
",",
"IOException",
"{",
"ClientImpl",
"currentClient",
"=",
"this",
".",
"getClient",
"(",
")",
";",
"if",
"(",
"currentClient",
"==",
"null",
")",
"{",
"throw",
"new",
"IOEx... | Blocks the current thread until there is no more backpressure or there are no more
connections to the database
@throws InterruptedException
@throws IOException | [
"Blocks",
"the",
"current",
"thread",
"until",
"there",
"is",
"no",
"more",
"backpressure",
"or",
"there",
"are",
"no",
"more",
"connections",
"to",
"the",
"database"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ClientConnection.java#L518-L524 |
61,553 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/navigator/RowSetNavigator.java | RowSetNavigator.absolute | public boolean absolute(int position) {
if (position < 0) {
position += size;
}
if (position < 0) {
beforeFirst();
return false;
}
if (position > size) {
afterLast();
return false;
}
if (size == 0) ... | java | public boolean absolute(int position) {
if (position < 0) {
position += size;
}
if (position < 0) {
beforeFirst();
return false;
}
if (position > size) {
afterLast();
return false;
}
if (size == 0) ... | [
"public",
"boolean",
"absolute",
"(",
"int",
"position",
")",
"{",
"if",
"(",
"position",
"<",
"0",
")",
"{",
"position",
"+=",
"size",
";",
"}",
"if",
"(",
"position",
"<",
"0",
")",
"{",
"beforeFirst",
"(",
")",
";",
"return",
"false",
";",
"}",
... | Uses similar semantics to java.sql.ResultSet except this is 0 based.
When position is 0 or positive, it is from the start; when negative,
it is from end | [
"Uses",
"similar",
"semantics",
"to",
"java",
".",
"sql",
".",
"ResultSet",
"except",
"this",
"is",
"0",
"based",
".",
"When",
"position",
"is",
"0",
"or",
"positive",
"it",
"is",
"from",
"the",
"start",
";",
"when",
"negative",
"it",
"is",
"from",
"en... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/navigator/RowSetNavigator.java#L215-L247 |
61,554 | VoltDB/voltdb | src/frontend/org/voltdb/client/exampleutils/AppHelper.java | AppHelper.printErrorAndQuit | private void printErrorAndQuit(String message)
{
System.out.println(message + "\n-------------------------------------------------------------------------------------\n");
printUsage();
System.exit(-1);
} | java | private void printErrorAndQuit(String message)
{
System.out.println(message + "\n-------------------------------------------------------------------------------------\n");
printUsage();
System.exit(-1);
} | [
"private",
"void",
"printErrorAndQuit",
"(",
"String",
"message",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"message",
"+",
"\"\\n-------------------------------------------------------------------------------------\\n\"",
")",
";",
"printUsage",
"(",
")",
";",... | Prints out an error message and the application usage print-out, then terminates the application. | [
"Prints",
"out",
"an",
"error",
"message",
"and",
"the",
"application",
"usage",
"print",
"-",
"out",
"then",
"terminates",
"the",
"application",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/exampleutils/AppHelper.java#L219-L224 |
61,555 | VoltDB/voltdb | src/frontend/org/voltdb/client/exampleutils/AppHelper.java | AppHelper.printActualUsage | public AppHelper printActualUsage()
{
System.out.println("-------------------------------------------------------------------------------------");
int maxLength = 24;
for(Argument a : Arguments)
if (maxLength < a.Name.length())
maxLength = a.Name.length();
... | java | public AppHelper printActualUsage()
{
System.out.println("-------------------------------------------------------------------------------------");
int maxLength = 24;
for(Argument a : Arguments)
if (maxLength < a.Name.length())
maxLength = a.Name.length();
... | [
"public",
"AppHelper",
"printActualUsage",
"(",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"-------------------------------------------------------------------------------------\"",
")",
";",
"int",
"maxLength",
"=",
"24",
";",
"for",
"(",
"Argument",
"a",
... | Prints a full list of actual arguments that will be used by the application after interpretation of defaults and actual argument values as passed by the user on the command line.
@return reference to this application helper, allowing command-chaining. | [
"Prints",
"a",
"full",
"list",
"of",
"actual",
"arguments",
"that",
"will",
"be",
"used",
"by",
"the",
"application",
"after",
"interpretation",
"of",
"defaults",
"and",
"actual",
"argument",
"values",
"as",
"passed",
"by",
"the",
"user",
"on",
"the",
"comma... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/exampleutils/AppHelper.java#L231-L246 |
61,556 | VoltDB/voltdb | src/frontend/org/voltdb/client/exampleutils/AppHelper.java | AppHelper.byteValue | public byte byteValue(String name)
{
try
{
return Byte.valueOf(this.getArgumentByName(name).Value);
}
catch(NullPointerException npe)
{
printErrorAndQuit(String.format("Argument '%s' was not provided.", name));
}
catch(Exception x)
... | java | public byte byteValue(String name)
{
try
{
return Byte.valueOf(this.getArgumentByName(name).Value);
}
catch(NullPointerException npe)
{
printErrorAndQuit(String.format("Argument '%s' was not provided.", name));
}
catch(Exception x)
... | [
"public",
"byte",
"byteValue",
"(",
"String",
"name",
")",
"{",
"try",
"{",
"return",
"Byte",
".",
"valueOf",
"(",
"this",
".",
"getArgumentByName",
"(",
"name",
")",
".",
"Value",
")",
";",
"}",
"catch",
"(",
"NullPointerException",
"npe",
")",
"{",
"... | Retrieves the value of an argument as a byte.
@param name the (case-sensitive) name of the argument to retrieve.
@return the value of the argument cast as a byte. Will terminate the application if a required argument is found missing or the casting call fails, printing out detailed usage. | [
"Retrieves",
"the",
"value",
"of",
"an",
"argument",
"as",
"a",
"byte",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/exampleutils/AppHelper.java#L330-L345 |
61,557 | VoltDB/voltdb | src/frontend/org/voltdb/client/exampleutils/AppHelper.java | AppHelper.shortValue | public short shortValue(String name)
{
try
{
return Short.valueOf(this.getArgumentByName(name).Value);
}
catch(NullPointerException npe)
{
printErrorAndQuit(String.format("Argument '%s' was not provided.", name));
}
catch(Exception x)
... | java | public short shortValue(String name)
{
try
{
return Short.valueOf(this.getArgumentByName(name).Value);
}
catch(NullPointerException npe)
{
printErrorAndQuit(String.format("Argument '%s' was not provided.", name));
}
catch(Exception x)
... | [
"public",
"short",
"shortValue",
"(",
"String",
"name",
")",
"{",
"try",
"{",
"return",
"Short",
".",
"valueOf",
"(",
"this",
".",
"getArgumentByName",
"(",
"name",
")",
".",
"Value",
")",
";",
"}",
"catch",
"(",
"NullPointerException",
"npe",
")",
"{",
... | Retrieves the value of an argument as a short.
@param name the (case-sensitive) name of the argument to retrieve.
@return the value of the argument cast as a short. Will terminate the application if a required argument is found missing or the casting call fails, printing out detailed usage. | [
"Retrieves",
"the",
"value",
"of",
"an",
"argument",
"as",
"a",
"short",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/exampleutils/AppHelper.java#L353-L368 |
61,558 | VoltDB/voltdb | src/frontend/org/voltdb/client/exampleutils/AppHelper.java | AppHelper.intValue | public int intValue(String name)
{
try
{
return Integer.valueOf(this.getArgumentByName(name).Value);
}
catch(NullPointerException npe)
{
printErrorAndQuit(String.format("Argument '%s' was not provided.", name));
}
catch(Exception x)
... | java | public int intValue(String name)
{
try
{
return Integer.valueOf(this.getArgumentByName(name).Value);
}
catch(NullPointerException npe)
{
printErrorAndQuit(String.format("Argument '%s' was not provided.", name));
}
catch(Exception x)
... | [
"public",
"int",
"intValue",
"(",
"String",
"name",
")",
"{",
"try",
"{",
"return",
"Integer",
".",
"valueOf",
"(",
"this",
".",
"getArgumentByName",
"(",
"name",
")",
".",
"Value",
")",
";",
"}",
"catch",
"(",
"NullPointerException",
"npe",
")",
"{",
... | Retrieves the value of an argument as a int.
@param name the (case-sensitive) name of the argument to retrieve.
@return the value of the argument cast as a int. Will terminate the application if a required argument is found missing or the casting call fails, printing out detailed usage. | [
"Retrieves",
"the",
"value",
"of",
"an",
"argument",
"as",
"a",
"int",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/exampleutils/AppHelper.java#L376-L391 |
61,559 | VoltDB/voltdb | src/frontend/org/voltdb/client/exampleutils/AppHelper.java | AppHelper.longValue | public long longValue(String name)
{
try
{
return Long.valueOf(this.getArgumentByName(name).Value);
}
catch(NullPointerException npe)
{
printErrorAndQuit(String.format("Argument '%s' was not provided.", name));
}
catch(Exception x)
... | java | public long longValue(String name)
{
try
{
return Long.valueOf(this.getArgumentByName(name).Value);
}
catch(NullPointerException npe)
{
printErrorAndQuit(String.format("Argument '%s' was not provided.", name));
}
catch(Exception x)
... | [
"public",
"long",
"longValue",
"(",
"String",
"name",
")",
"{",
"try",
"{",
"return",
"Long",
".",
"valueOf",
"(",
"this",
".",
"getArgumentByName",
"(",
"name",
")",
".",
"Value",
")",
";",
"}",
"catch",
"(",
"NullPointerException",
"npe",
")",
"{",
"... | Retrieves the value of an argument as a long.
@param name the (case-sensitive) name of the argument to retrieve.
@return the value of the argument cast as a long. Will terminate the application if a required argument is found missing or the casting call fails, printing out detailed usage. | [
"Retrieves",
"the",
"value",
"of",
"an",
"argument",
"as",
"a",
"long",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/exampleutils/AppHelper.java#L399-L414 |
61,560 | VoltDB/voltdb | src/frontend/org/voltdb/client/exampleutils/AppHelper.java | AppHelper.doubleValue | public double doubleValue(String name)
{
try
{
return Double.valueOf(this.getArgumentByName(name).Value);
}
catch(NullPointerException npe)
{
printErrorAndQuit(String.format("Argument '%s' was not provided.", name));
}
catch(Exception x... | java | public double doubleValue(String name)
{
try
{
return Double.valueOf(this.getArgumentByName(name).Value);
}
catch(NullPointerException npe)
{
printErrorAndQuit(String.format("Argument '%s' was not provided.", name));
}
catch(Exception x... | [
"public",
"double",
"doubleValue",
"(",
"String",
"name",
")",
"{",
"try",
"{",
"return",
"Double",
".",
"valueOf",
"(",
"this",
".",
"getArgumentByName",
"(",
"name",
")",
".",
"Value",
")",
";",
"}",
"catch",
"(",
"NullPointerException",
"npe",
")",
"{... | Retrieves the value of an argument as a double.
@param name the (case-sensitive) name of the argument to retrieve.
@return the value of the argument cast as a double. Will terminate the application if a required argument is found missing or the casting call fails, printing out detailed usage. | [
"Retrieves",
"the",
"value",
"of",
"an",
"argument",
"as",
"a",
"double",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/exampleutils/AppHelper.java#L422-L437 |
61,561 | VoltDB/voltdb | src/frontend/org/voltdb/client/exampleutils/AppHelper.java | AppHelper.stringValue | public String stringValue(String name)
{
try
{
return this.getArgumentByName(name).Value;
}
catch(Exception npe)
{
printErrorAndQuit(String.format("Argument '%s' was not provided.", name));
}
return null; // We will never get here: prin... | java | public String stringValue(String name)
{
try
{
return this.getArgumentByName(name).Value;
}
catch(Exception npe)
{
printErrorAndQuit(String.format("Argument '%s' was not provided.", name));
}
return null; // We will never get here: prin... | [
"public",
"String",
"stringValue",
"(",
"String",
"name",
")",
"{",
"try",
"{",
"return",
"this",
".",
"getArgumentByName",
"(",
"name",
")",
".",
"Value",
";",
"}",
"catch",
"(",
"Exception",
"npe",
")",
"{",
"printErrorAndQuit",
"(",
"String",
".",
"fo... | Retrieves the value of an argument as a string.
@param name the (case-sensitive) name of the argument to retrieve.
@return the value of the argument as a string (as passed on the command line). Will terminate the application if a required argument is found missing, printing out detailed usage. | [
"Retrieves",
"the",
"value",
"of",
"an",
"argument",
"as",
"a",
"string",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/exampleutils/AppHelper.java#L445-L456 |
61,562 | VoltDB/voltdb | src/frontend/org/voltdb/client/exampleutils/AppHelper.java | AppHelper.booleanValue | public boolean booleanValue(String name)
{
try
{
return Boolean.valueOf(this.getArgumentByName(name).Value);
}
catch(NullPointerException npe)
{
printErrorAndQuit(String.format("Argument '%s' was not provided.", name));
}
catch(Exceptio... | java | public boolean booleanValue(String name)
{
try
{
return Boolean.valueOf(this.getArgumentByName(name).Value);
}
catch(NullPointerException npe)
{
printErrorAndQuit(String.format("Argument '%s' was not provided.", name));
}
catch(Exceptio... | [
"public",
"boolean",
"booleanValue",
"(",
"String",
"name",
")",
"{",
"try",
"{",
"return",
"Boolean",
".",
"valueOf",
"(",
"this",
".",
"getArgumentByName",
"(",
"name",
")",
".",
"Value",
")",
";",
"}",
"catch",
"(",
"NullPointerException",
"npe",
")",
... | Retrieves the value of an argument as a boolean.
@param name the (case-sensitive) name of the argument to retrieve.
@return the value of the argument cast as a boolean. Will terminate the application if a required argument is found missing or the casting call fails, printing out detailed usage. | [
"Retrieves",
"the",
"value",
"of",
"an",
"argument",
"as",
"a",
"boolean",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/exampleutils/AppHelper.java#L464-L479 |
61,563 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/Tree.java | Tree.setBounds | public void setBounds(int x, int y, int w, int h) {
super.setBounds(x, y, w, h);
iSbHeight = sbHoriz.getPreferredSize().height;
iSbWidth = sbVert.getPreferredSize().width;
iHeight = h - iSbHeight;
iWidth = w - iSbWidth;
sbHoriz.setBounds(0, iHeight, iWidth, iSbHe... | java | public void setBounds(int x, int y, int w, int h) {
super.setBounds(x, y, w, h);
iSbHeight = sbHoriz.getPreferredSize().height;
iSbWidth = sbVert.getPreferredSize().width;
iHeight = h - iSbHeight;
iWidth = w - iSbWidth;
sbHoriz.setBounds(0, iHeight, iWidth, iSbHe... | [
"public",
"void",
"setBounds",
"(",
"int",
"x",
",",
"int",
"y",
",",
"int",
"w",
",",
"int",
"h",
")",
"{",
"super",
".",
"setBounds",
"(",
"x",
",",
"y",
",",
"w",
",",
"h",
")",
";",
"iSbHeight",
"=",
"sbHoriz",
".",
"getPreferredSize",
"(",
... | with additional replacement of deprecated methods | [
"with",
"additional",
"replacement",
"of",
"deprecated",
"methods"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/Tree.java#L167-L183 |
61,564 | VoltDB/voltdb | src/frontend/org/voltdb/utils/VoltTrace.java | VoltTrace.write | private String write(String logDir) throws IOException, ExecutionException, InterruptedException {
final File file = new File(logDir, "trace_" + System.currentTimeMillis() + ".json.gz");
if (file.exists()) {
throw new IOException("Trace file " + file.getAbsolutePath() + " already exists");
... | java | private String write(String logDir) throws IOException, ExecutionException, InterruptedException {
final File file = new File(logDir, "trace_" + System.currentTimeMillis() + ".json.gz");
if (file.exists()) {
throw new IOException("Trace file " + file.getAbsolutePath() + " already exists");
... | [
"private",
"String",
"write",
"(",
"String",
"logDir",
")",
"throws",
"IOException",
",",
"ExecutionException",
",",
"InterruptedException",
"{",
"final",
"File",
"file",
"=",
"new",
"File",
"(",
"logDir",
",",
"\"trace_\"",
"+",
"System",
".",
"currentTimeMilli... | Write the events in the queue to file.
@param logDir The directory to write the file to.
@return The file path if successfully written, or null if the there is
already a write in progress. | [
"Write",
"the",
"events",
"in",
"the",
"queue",
"to",
"file",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/VoltTrace.java#L394-L413 |
61,565 | VoltDB/voltdb | src/frontend/org/voltdb/utils/VoltTrace.java | VoltTrace.log | public static TraceEventBatch log(Category cat) {
final VoltTrace tracer = s_tracer;
if (tracer != null && tracer.isCategoryEnabled(cat)) {
final TraceEventBatch batch = new TraceEventBatch(cat);
tracer.queueEvent(batch);
return batch;
} else {
ret... | java | public static TraceEventBatch log(Category cat) {
final VoltTrace tracer = s_tracer;
if (tracer != null && tracer.isCategoryEnabled(cat)) {
final TraceEventBatch batch = new TraceEventBatch(cat);
tracer.queueEvent(batch);
return batch;
} else {
ret... | [
"public",
"static",
"TraceEventBatch",
"log",
"(",
"Category",
"cat",
")",
"{",
"final",
"VoltTrace",
"tracer",
"=",
"s_tracer",
";",
"if",
"(",
"tracer",
"!=",
"null",
"&&",
"tracer",
".",
"isCategoryEnabled",
"(",
"cat",
")",
")",
"{",
"final",
"TraceEve... | Create a trace event batch for the given category. The events that go
into this batch should all originate from the same thread.
@param cat The category to write the events to.
@return The batch object to add events to, or null if trace logging for
the category is not enabled. | [
"Create",
"a",
"trace",
"event",
"batch",
"for",
"the",
"given",
"category",
".",
"The",
"events",
"that",
"go",
"into",
"this",
"batch",
"should",
"all",
"originate",
"from",
"the",
"same",
"thread",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/VoltTrace.java#L443-L452 |
61,566 | VoltDB/voltdb | src/frontend/org/voltdb/utils/VoltTrace.java | VoltTrace.closeAllAndShutdown | public static String closeAllAndShutdown(String logDir, long timeOutMillis) throws IOException {
String path = null;
final VoltTrace tracer = s_tracer;
if (tracer != null) {
if (logDir != null) {
path = dump(logDir);
}
s_tracer = null;
... | java | public static String closeAllAndShutdown(String logDir, long timeOutMillis) throws IOException {
String path = null;
final VoltTrace tracer = s_tracer;
if (tracer != null) {
if (logDir != null) {
path = dump(logDir);
}
s_tracer = null;
... | [
"public",
"static",
"String",
"closeAllAndShutdown",
"(",
"String",
"logDir",
",",
"long",
"timeOutMillis",
")",
"throws",
"IOException",
"{",
"String",
"path",
"=",
"null",
";",
"final",
"VoltTrace",
"tracer",
"=",
"s_tracer",
";",
"if",
"(",
"tracer",
"!=",
... | Close all open files and wait for shutdown.
@param logDir The directory to write the trace events to, null to skip writing to file.
@param timeOutMillis Timeout in milliseconds. Negative to not wait
@return The path to the trace file if written, or null if a write is already in progress. | [
"Close",
"all",
"open",
"files",
"and",
"wait",
"for",
"shutdown",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/VoltTrace.java#L515-L538 |
61,567 | VoltDB/voltdb | src/frontend/org/voltdb/utils/VoltTrace.java | VoltTrace.start | private static synchronized void start() throws IOException {
if (s_tracer == null) {
final VoltTrace tracer = new VoltTrace();
final Thread thread = new Thread(tracer);
thread.setDaemon(true);
thread.start();
s_tracer = tracer;
}
} | java | private static synchronized void start() throws IOException {
if (s_tracer == null) {
final VoltTrace tracer = new VoltTrace();
final Thread thread = new Thread(tracer);
thread.setDaemon(true);
thread.start();
s_tracer = tracer;
}
} | [
"private",
"static",
"synchronized",
"void",
"start",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"s_tracer",
"==",
"null",
")",
"{",
"final",
"VoltTrace",
"tracer",
"=",
"new",
"VoltTrace",
"(",
")",
";",
"final",
"Thread",
"thread",
"=",
"new",
... | Creates and starts a new tracer. If one already exists, this is a
no-op. Synchronized to prevent multiple threads enabling it at the same
time. | [
"Creates",
"and",
"starts",
"a",
"new",
"tracer",
".",
"If",
"one",
"already",
"exists",
"this",
"is",
"a",
"no",
"-",
"op",
".",
"Synchronized",
"to",
"prevent",
"multiple",
"threads",
"enabling",
"it",
"at",
"the",
"same",
"time",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/VoltTrace.java#L545-L553 |
61,568 | VoltDB/voltdb | src/frontend/org/voltdb/utils/VoltTrace.java | VoltTrace.dump | public static String dump(String logDir) throws IOException {
String path = null;
final VoltTrace tracer = s_tracer;
if (tracer != null) {
final File dir = new File(logDir);
if (!dir.getParentFile().canWrite() || !dir.getParentFile().canExecute()) {
throw... | java | public static String dump(String logDir) throws IOException {
String path = null;
final VoltTrace tracer = s_tracer;
if (tracer != null) {
final File dir = new File(logDir);
if (!dir.getParentFile().canWrite() || !dir.getParentFile().canExecute()) {
throw... | [
"public",
"static",
"String",
"dump",
"(",
"String",
"logDir",
")",
"throws",
"IOException",
"{",
"String",
"path",
"=",
"null",
";",
"final",
"VoltTrace",
"tracer",
"=",
"s_tracer",
";",
"if",
"(",
"tracer",
"!=",
"null",
")",
"{",
"final",
"File",
"dir... | Write all trace events in the queue to file.
@return The file path if written successfully, or null if a write is already in progress. | [
"Write",
"all",
"trace",
"events",
"in",
"the",
"queue",
"to",
"file",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/VoltTrace.java#L559-L583 |
61,569 | VoltDB/voltdb | src/frontend/org/voltdb/utils/VoltTrace.java | VoltTrace.enableCategories | public static void enableCategories(Category... categories) throws IOException {
if (s_tracer == null) {
start();
}
final VoltTrace tracer = s_tracer;
assert tracer != null;
final ImmutableSet.Builder<Category> builder = ImmutableSet.builder();
builder.addAll... | java | public static void enableCategories(Category... categories) throws IOException {
if (s_tracer == null) {
start();
}
final VoltTrace tracer = s_tracer;
assert tracer != null;
final ImmutableSet.Builder<Category> builder = ImmutableSet.builder();
builder.addAll... | [
"public",
"static",
"void",
"enableCategories",
"(",
"Category",
"...",
"categories",
")",
"throws",
"IOException",
"{",
"if",
"(",
"s_tracer",
"==",
"null",
")",
"{",
"start",
"(",
")",
";",
"}",
"final",
"VoltTrace",
"tracer",
"=",
"s_tracer",
";",
"asse... | Enable the given categories. If the tracer is not running at the moment,
create a new one.
@param categories The categories to enable. If some of them are enabled
already, skip those.
@throws IOException | [
"Enable",
"the",
"given",
"categories",
".",
"If",
"the",
"tracer",
"is",
"not",
"running",
"at",
"the",
"moment",
"create",
"a",
"new",
"one",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/VoltTrace.java#L592-L603 |
61,570 | VoltDB/voltdb | src/frontend/org/voltdb/utils/VoltTrace.java | VoltTrace.disableCategories | public static void disableCategories(Category... categories) {
final VoltTrace tracer = s_tracer;
if (tracer == null) {
return;
}
final List<Category> toDisable = Arrays.asList(categories);
final ImmutableSet.Builder<Category> builder = ImmutableSet.builder();
... | java | public static void disableCategories(Category... categories) {
final VoltTrace tracer = s_tracer;
if (tracer == null) {
return;
}
final List<Category> toDisable = Arrays.asList(categories);
final ImmutableSet.Builder<Category> builder = ImmutableSet.builder();
... | [
"public",
"static",
"void",
"disableCategories",
"(",
"Category",
"...",
"categories",
")",
"{",
"final",
"VoltTrace",
"tracer",
"=",
"s_tracer",
";",
"if",
"(",
"tracer",
"==",
"null",
")",
"{",
"return",
";",
"}",
"final",
"List",
"<",
"Category",
">",
... | Disable the given categories. If the tracer has no enabled category after
this call, shutdown the tracer.
@param categories The categories to disable. If some of them are disabled
already, skip those. | [
"Disable",
"the",
"given",
"categories",
".",
"If",
"the",
"tracer",
"has",
"no",
"enabled",
"category",
"after",
"this",
"call",
"shutdown",
"the",
"tracer",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/VoltTrace.java#L611-L635 |
61,571 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlThreadFactory.java | HsqlThreadFactory.newThread | public Thread newThread(Runnable r) {
return factory == this ? new Thread(r)
: factory.newThread(r);
} | java | public Thread newThread(Runnable r) {
return factory == this ? new Thread(r)
: factory.newThread(r);
} | [
"public",
"Thread",
"newThread",
"(",
"Runnable",
"r",
")",
"{",
"return",
"factory",
"==",
"this",
"?",
"new",
"Thread",
"(",
"r",
")",
":",
"factory",
".",
"newThread",
"(",
"r",
")",
";",
"}"
] | Retreives a thread instance for running the specified Runnable
@param r The runnable that the retrieved thread handles
@return the requested thread inatance | [
"Retreives",
"a",
"thread",
"instance",
"for",
"running",
"the",
"specified",
"Runnable"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlThreadFactory.java#L76-L79 |
61,572 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlThreadFactory.java | HsqlThreadFactory.setImpl | public synchronized ThreadFactory setImpl(ThreadFactory f) {
ThreadFactory old;
old = factory;
factory = (f == null) ? this
: f;
return old;
} | java | public synchronized ThreadFactory setImpl(ThreadFactory f) {
ThreadFactory old;
old = factory;
factory = (f == null) ? this
: f;
return old;
} | [
"public",
"synchronized",
"ThreadFactory",
"setImpl",
"(",
"ThreadFactory",
"f",
")",
"{",
"ThreadFactory",
"old",
";",
"old",
"=",
"factory",
";",
"factory",
"=",
"(",
"f",
"==",
"null",
")",
"?",
"this",
":",
"f",
";",
"return",
"old",
";",
"}"
] | Sets the factory implementation that this factory will use to
produce threads. If the specified argument, f, is null, then
this factory uses itself as the implementation.
@param f the factory implementation that this factory will use
to produce threads
@return the previously installed factory implementation | [
"Sets",
"the",
"factory",
"implementation",
"that",
"this",
"factory",
"will",
"use",
"to",
"produce",
"threads",
".",
"If",
"the",
"specified",
"argument",
"f",
"is",
"null",
"then",
"this",
"factory",
"uses",
"itself",
"as",
"the",
"implementation",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlThreadFactory.java#L90-L99 |
61,573 | VoltDB/voltdb | src/frontend/org/voltdb/VoltTableRow.java | VoltTableRow.getRaw | final byte[] getRaw(int columnIndex) {
byte[] retval;
int pos = m_buffer.position();
int offset = getOffset(columnIndex);
VoltType type = getColumnType(columnIndex);
switch(type) {
case TINYINT:
case SMALLINT:
case INTEGER:
case BIGINT:
ca... | java | final byte[] getRaw(int columnIndex) {
byte[] retval;
int pos = m_buffer.position();
int offset = getOffset(columnIndex);
VoltType type = getColumnType(columnIndex);
switch(type) {
case TINYINT:
case SMALLINT:
case INTEGER:
case BIGINT:
ca... | [
"final",
"byte",
"[",
"]",
"getRaw",
"(",
"int",
"columnIndex",
")",
"{",
"byte",
"[",
"]",
"retval",
";",
"int",
"pos",
"=",
"m_buffer",
".",
"position",
"(",
")",
";",
"int",
"offset",
"=",
"getOffset",
"(",
"columnIndex",
")",
";",
"VoltType",
"ty... | A way to get a column value in raw byte form without doing any
expensive conversions, like date processing or string encoding.
Next optimization is to do this without an allocation (maybe).
@param columnIndex Index of the column
@return A byte string containing the raw byte value. | [
"A",
"way",
"to",
"get",
"a",
"column",
"value",
"in",
"raw",
"byte",
"form",
"without",
"doing",
"any",
"expensive",
"conversions",
"like",
"date",
"processing",
"or",
"string",
"encoding",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltTableRow.java#L424-L465 |
61,574 | VoltDB/voltdb | src/frontend/org/voltdb/VoltTableRow.java | VoltTableRow.validateColumnType | final void validateColumnType(int columnIndex, VoltType... types) {
if (m_position < 0)
throw new RuntimeException("VoltTableRow is in an invalid state. Consider calling advanceRow().");
if ((columnIndex >= getColumnCount()) || (columnIndex < 0)) {
throw new IndexOutOfBoundsExce... | java | final void validateColumnType(int columnIndex, VoltType... types) {
if (m_position < 0)
throw new RuntimeException("VoltTableRow is in an invalid state. Consider calling advanceRow().");
if ((columnIndex >= getColumnCount()) || (columnIndex < 0)) {
throw new IndexOutOfBoundsExce... | [
"final",
"void",
"validateColumnType",
"(",
"int",
"columnIndex",
",",
"VoltType",
"...",
"types",
")",
"{",
"if",
"(",
"m_position",
"<",
"0",
")",
"throw",
"new",
"RuntimeException",
"(",
"\"VoltTableRow is in an invalid state. Consider calling advanceRow().\"",
")",
... | Validates that type and columnIndex match and are valid. | [
"Validates",
"that",
"type",
"and",
"columnIndex",
"match",
"and",
"are",
"valid",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltTableRow.java#L1010-L1022 |
61,575 | VoltDB/voltdb | src/frontend/org/voltdb/VoltTableRow.java | VoltTableRow.readString | final String readString(int position, Charset encoding) {
// Sanity check the string size int position. Note that the eventual
// m_buffer.get() does check for underflow, getInt() does not.
if (STRING_LEN_SIZE > m_buffer.limit() - position) {
throw new RuntimeException(String.format(... | java | final String readString(int position, Charset encoding) {
// Sanity check the string size int position. Note that the eventual
// m_buffer.get() does check for underflow, getInt() does not.
if (STRING_LEN_SIZE > m_buffer.limit() - position) {
throw new RuntimeException(String.format(... | [
"final",
"String",
"readString",
"(",
"int",
"position",
",",
"Charset",
"encoding",
")",
"{",
"// Sanity check the string size int position. Note that the eventual",
"// m_buffer.get() does check for underflow, getInt() does not.",
"if",
"(",
"STRING_LEN_SIZE",
">",
"m_buffer",
... | Reads a string from a buffer with a specific encoding. | [
"Reads",
"a",
"string",
"from",
"a",
"buffer",
"with",
"a",
"specific",
"encoding",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltTableRow.java#L1025-L1062 |
61,576 | VoltDB/voltdb | src/frontend/org/voltdb/rejoin/RejoinTaskBuffer.java | RejoinTaskBuffer.appendTask | public int appendTask(long sourceHSId, TransactionInfoBaseMessage task) throws IOException {
Preconditions.checkState(compiledSize == 0, "buffer is already compiled");
final int msgSerializedSize = task.getSerializedSize();
ensureCapacity(taskHeaderSize() + msgSerializedSize);
ByteBuff... | java | public int appendTask(long sourceHSId, TransactionInfoBaseMessage task) throws IOException {
Preconditions.checkState(compiledSize == 0, "buffer is already compiled");
final int msgSerializedSize = task.getSerializedSize();
ensureCapacity(taskHeaderSize() + msgSerializedSize);
ByteBuff... | [
"public",
"int",
"appendTask",
"(",
"long",
"sourceHSId",
",",
"TransactionInfoBaseMessage",
"task",
")",
"throws",
"IOException",
"{",
"Preconditions",
".",
"checkState",
"(",
"compiledSize",
"==",
"0",
",",
"\"buffer is already compiled\"",
")",
";",
"final",
"int... | Appends a task message to the buffer.
@param sourceHSId
@param task
@throws IOException If the buffer is not of the type TASK
@return how many bytes are left in this buffer for adding a new task | [
"Appends",
"a",
"task",
"message",
"to",
"the",
"buffer",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/rejoin/RejoinTaskBuffer.java#L150-L173 |
61,577 | VoltDB/voltdb | src/frontend/org/voltdb/rejoin/RejoinTaskBuffer.java | RejoinTaskBuffer.nextTask | public TransactionInfoBaseMessage nextTask() throws IOException {
if (!hasMoreEntries()) {
return null;
}
ByteBuffer bb = m_container.b();
int position = bb.position();
int length = bb.getInt();
long sourceHSId = bb.getLong();
VoltDbMessageFactory fa... | java | public TransactionInfoBaseMessage nextTask() throws IOException {
if (!hasMoreEntries()) {
return null;
}
ByteBuffer bb = m_container.b();
int position = bb.position();
int length = bb.getInt();
long sourceHSId = bb.getLong();
VoltDbMessageFactory fa... | [
"public",
"TransactionInfoBaseMessage",
"nextTask",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"hasMoreEntries",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"ByteBuffer",
"bb",
"=",
"m_container",
".",
"b",
"(",
")",
";",
"int",
"position"... | Get the next task message in this buffer.
@return null if there is no more messages
@throws IOException
if message deserialization fails. | [
"Get",
"the",
"next",
"task",
"message",
"in",
"this",
"buffer",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/rejoin/RejoinTaskBuffer.java#L182-L205 |
61,578 | VoltDB/voltdb | src/frontend/org/voltdb/rejoin/RejoinTaskBuffer.java | RejoinTaskBuffer.compile | public void compile() {
if (compiledSize == 0) {
ByteBuffer bb = m_container.b();
compiledSize = bb.position();
bb.flip();
m_allocator.track(compiledSize);
}
if (log.isTraceEnabled()) {
StringBuilder sb = new StringBuilder("Compiling b... | java | public void compile() {
if (compiledSize == 0) {
ByteBuffer bb = m_container.b();
compiledSize = bb.position();
bb.flip();
m_allocator.track(compiledSize);
}
if (log.isTraceEnabled()) {
StringBuilder sb = new StringBuilder("Compiling b... | [
"public",
"void",
"compile",
"(",
")",
"{",
"if",
"(",
"compiledSize",
"==",
"0",
")",
"{",
"ByteBuffer",
"bb",
"=",
"m_container",
".",
"b",
"(",
")",
";",
"compiledSize",
"=",
"bb",
".",
"position",
"(",
")",
";",
"bb",
".",
"flip",
"(",
")",
"... | Generate the byte array in preparation of moving over a message bus.
Idempotent, but not thread-safe. Also changes state to immutable. | [
"Generate",
"the",
"byte",
"array",
"in",
"preparation",
"of",
"moving",
"over",
"a",
"message",
"bus",
".",
"Idempotent",
"but",
"not",
"thread",
"-",
"safe",
".",
"Also",
"changes",
"state",
"to",
"immutable",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/rejoin/RejoinTaskBuffer.java#L227-L243 |
61,579 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/MpRoSitePool.java | MpRoSitePool.updateCatalog | void updateCatalog(String diffCmds, CatalogContext context)
{
if (m_shuttingDown) {
return;
}
m_catalogContext = context;
// Wipe out all the idle sites with stale catalogs.
// Non-idle sites will get killed and replaced when they finish
// whatever they ... | java | void updateCatalog(String diffCmds, CatalogContext context)
{
if (m_shuttingDown) {
return;
}
m_catalogContext = context;
// Wipe out all the idle sites with stale catalogs.
// Non-idle sites will get killed and replaced when they finish
// whatever they ... | [
"void",
"updateCatalog",
"(",
"String",
"diffCmds",
",",
"CatalogContext",
"context",
")",
"{",
"if",
"(",
"m_shuttingDown",
")",
"{",
"return",
";",
"}",
"m_catalogContext",
"=",
"context",
";",
"// Wipe out all the idle sites with stale catalogs.",
"// Non-idle sites ... | Update the catalog | [
"Update",
"the",
"catalog"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpRoSitePool.java#L155-L175 |
61,580 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/MpRoSitePool.java | MpRoSitePool.doWork | boolean doWork(long txnId, TransactionTask task)
{
boolean retval = canAcceptWork();
if (!retval) {
return false;
}
MpRoSiteContext site;
// Repair case
if (m_busySites.containsKey(txnId)) {
site = m_busySites.get(txnId);
}
else... | java | boolean doWork(long txnId, TransactionTask task)
{
boolean retval = canAcceptWork();
if (!retval) {
return false;
}
MpRoSiteContext site;
// Repair case
if (m_busySites.containsKey(txnId)) {
site = m_busySites.get(txnId);
}
else... | [
"boolean",
"doWork",
"(",
"long",
"txnId",
",",
"TransactionTask",
"task",
")",
"{",
"boolean",
"retval",
"=",
"canAcceptWork",
"(",
")",
";",
"if",
"(",
"!",
"retval",
")",
"{",
"return",
"false",
";",
"}",
"MpRoSiteContext",
"site",
";",
"// Repair case"... | Attempt to start the transaction represented by the given task. Need the txn ID for future reference.
@return true if work was started successfully, false if not. | [
"Attempt",
"to",
"start",
"the",
"transaction",
"represented",
"by",
"the",
"given",
"task",
".",
"Need",
"the",
"txn",
"ID",
"for",
"future",
"reference",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpRoSitePool.java#L218-L245 |
61,581 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/MpRoSitePool.java | MpRoSitePool.completeWork | void completeWork(long txnId)
{
if (m_shuttingDown) {
return;
}
MpRoSiteContext site = m_busySites.remove(txnId);
if (site == null) {
throw new RuntimeException("No busy site for txnID: " + txnId + " found, shouldn't happen.");
}
// check the ... | java | void completeWork(long txnId)
{
if (m_shuttingDown) {
return;
}
MpRoSiteContext site = m_busySites.remove(txnId);
if (site == null) {
throw new RuntimeException("No busy site for txnID: " + txnId + " found, shouldn't happen.");
}
// check the ... | [
"void",
"completeWork",
"(",
"long",
"txnId",
")",
"{",
"if",
"(",
"m_shuttingDown",
")",
"{",
"return",
";",
"}",
"MpRoSiteContext",
"site",
"=",
"m_busySites",
".",
"remove",
"(",
"txnId",
")",
";",
"if",
"(",
"site",
"==",
"null",
")",
"{",
"throw",... | Inform the pool that the work associated with the given txnID is complete | [
"Inform",
"the",
"pool",
"that",
"the",
"work",
"associated",
"with",
"the",
"given",
"txnID",
"is",
"complete"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpRoSitePool.java#L250-L271 |
61,582 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/Quiesce.java | Quiesce.run | public VoltTable[] run(SystemProcedureExecutionContext ctx) {
VoltTable[] result = null;
try {
result = createAndExecuteSysProcPlan(SysProcFragmentId.PF_quiesce_sites,
SysProcFragmentId.PF_quiesce_processed_sites);
} catch (Exception ex) {
ex.printSta... | java | public VoltTable[] run(SystemProcedureExecutionContext ctx) {
VoltTable[] result = null;
try {
result = createAndExecuteSysProcPlan(SysProcFragmentId.PF_quiesce_sites,
SysProcFragmentId.PF_quiesce_processed_sites);
} catch (Exception ex) {
ex.printSta... | [
"public",
"VoltTable",
"[",
"]",
"run",
"(",
"SystemProcedureExecutionContext",
"ctx",
")",
"{",
"VoltTable",
"[",
"]",
"result",
"=",
"null",
";",
"try",
"{",
"result",
"=",
"createAndExecuteSysProcPlan",
"(",
"SysProcFragmentId",
".",
"PF_quiesce_sites",
",",
... | There are no user specified parameters.
@param ctx Internal parameter not visible the end-user.
@return {@link org.voltdb.VoltSystemProcedure#STATUS_SCHEMA} | [
"There",
"are",
"no",
"user",
"specified",
"parameters",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/Quiesce.java#L75-L85 |
61,583 | VoltDB/voltdb | src/frontend/org/voltdb/utils/BuildDirectoryUtils.java | BuildDirectoryUtils.writeFile | public static void writeFile(final String dir, final String filename, String content, boolean debug) {
// skip debug files when not in debug mode
if (debug && !VoltCompiler.DEBUG_MODE) {
return;
}
// cache the root of the folder for the debugoutput and the statement-plans fo... | java | public static void writeFile(final String dir, final String filename, String content, boolean debug) {
// skip debug files when not in debug mode
if (debug && !VoltCompiler.DEBUG_MODE) {
return;
}
// cache the root of the folder for the debugoutput and the statement-plans fo... | [
"public",
"static",
"void",
"writeFile",
"(",
"final",
"String",
"dir",
",",
"final",
"String",
"filename",
",",
"String",
"content",
",",
"boolean",
"debug",
")",
"{",
"// skip debug files when not in debug mode",
"if",
"(",
"debug",
"&&",
"!",
"VoltCompiler",
... | Write a file to disk during compilation that has some neato info generated during compilation.
If the debug flag is true, that means this file should only be written if the compiler is
running in debug mode. | [
"Write",
"a",
"file",
"to",
"disk",
"during",
"compilation",
"that",
"has",
"some",
"neato",
"info",
"generated",
"during",
"compilation",
".",
"If",
"the",
"debug",
"flag",
"is",
"true",
"that",
"means",
"this",
"file",
"should",
"only",
"be",
"written",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/BuildDirectoryUtils.java#L48-L95 |
61,584 | VoltDB/voltdb | src/frontend/org/voltdb/planner/parseinfo/JoinNode.java | JoinNode.getAllFilters | public AbstractExpression getAllFilters() {
ArrayDeque<JoinNode> joinNodes = new ArrayDeque<>();
ArrayDeque<AbstractExpression> in = new ArrayDeque<>();
ArrayDeque<AbstractExpression> out = new ArrayDeque<>();
// Iterate over the join nodes to collect their join and where expressions
... | java | public AbstractExpression getAllFilters() {
ArrayDeque<JoinNode> joinNodes = new ArrayDeque<>();
ArrayDeque<AbstractExpression> in = new ArrayDeque<>();
ArrayDeque<AbstractExpression> out = new ArrayDeque<>();
// Iterate over the join nodes to collect their join and where expressions
... | [
"public",
"AbstractExpression",
"getAllFilters",
"(",
")",
"{",
"ArrayDeque",
"<",
"JoinNode",
">",
"joinNodes",
"=",
"new",
"ArrayDeque",
"<>",
"(",
")",
";",
"ArrayDeque",
"<",
"AbstractExpression",
">",
"in",
"=",
"new",
"ArrayDeque",
"<>",
"(",
")",
";",... | Collect all JOIN and WHERE expressions combined with AND for the entire tree. | [
"Collect",
"all",
"JOIN",
"and",
"WHERE",
"expressions",
"combined",
"with",
"AND",
"for",
"the",
"entire",
"tree",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/JoinNode.java#L198-L228 |
61,585 | VoltDB/voltdb | src/frontend/org/voltdb/planner/parseinfo/JoinNode.java | JoinNode.getSimpleFilterExpression | public AbstractExpression getSimpleFilterExpression()
{
if (m_whereExpr != null) {
if (m_joinExpr != null) {
return ExpressionUtil.combine(m_whereExpr, m_joinExpr);
}
return m_whereExpr;
}
return m_joinExpr;
} | java | public AbstractExpression getSimpleFilterExpression()
{
if (m_whereExpr != null) {
if (m_joinExpr != null) {
return ExpressionUtil.combine(m_whereExpr, m_joinExpr);
}
return m_whereExpr;
}
return m_joinExpr;
} | [
"public",
"AbstractExpression",
"getSimpleFilterExpression",
"(",
")",
"{",
"if",
"(",
"m_whereExpr",
"!=",
"null",
")",
"{",
"if",
"(",
"m_joinExpr",
"!=",
"null",
")",
"{",
"return",
"ExpressionUtil",
".",
"combine",
"(",
"m_whereExpr",
",",
"m_joinExpr",
")... | Get the WHERE expression for a single-table statement. | [
"Get",
"the",
"WHERE",
"expression",
"for",
"a",
"single",
"-",
"table",
"statement",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/JoinNode.java#L235-L244 |
61,586 | VoltDB/voltdb | src/frontend/org/voltdb/planner/parseinfo/JoinNode.java | JoinNode.generateAllNodesJoinOrder | public List<JoinNode> generateAllNodesJoinOrder() {
ArrayList<JoinNode> nodes = new ArrayList<>();
listNodesJoinOrderRecursive(nodes, true);
return nodes;
} | java | public List<JoinNode> generateAllNodesJoinOrder() {
ArrayList<JoinNode> nodes = new ArrayList<>();
listNodesJoinOrderRecursive(nodes, true);
return nodes;
} | [
"public",
"List",
"<",
"JoinNode",
">",
"generateAllNodesJoinOrder",
"(",
")",
"{",
"ArrayList",
"<",
"JoinNode",
">",
"nodes",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"listNodesJoinOrderRecursive",
"(",
"nodes",
",",
"true",
")",
";",
"return",
"nodes... | Returns nodes in the order they are joined in the tree by iterating the tree depth-first | [
"Returns",
"nodes",
"in",
"the",
"order",
"they",
"are",
"joined",
"in",
"the",
"tree",
"by",
"iterating",
"the",
"tree",
"depth",
"-",
"first"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/JoinNode.java#L275-L279 |
61,587 | VoltDB/voltdb | src/frontend/org/voltdb/planner/parseinfo/JoinNode.java | JoinNode.extractSubTrees | public List<JoinNode> extractSubTrees() {
List<JoinNode> subTrees = new ArrayList<>();
// Extract the first sub-tree starting at the root
subTrees.add(this);
List<JoinNode> leafNodes = new ArrayList<>();
extractSubTree(leafNodes);
// Continue with the leafs
for (... | java | public List<JoinNode> extractSubTrees() {
List<JoinNode> subTrees = new ArrayList<>();
// Extract the first sub-tree starting at the root
subTrees.add(this);
List<JoinNode> leafNodes = new ArrayList<>();
extractSubTree(leafNodes);
// Continue with the leafs
for (... | [
"public",
"List",
"<",
"JoinNode",
">",
"extractSubTrees",
"(",
")",
"{",
"List",
"<",
"JoinNode",
">",
"subTrees",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"// Extract the first sub-tree starting at the root",
"subTrees",
".",
"add",
"(",
"this",
")",
";... | Split a join tree into one or more sub-trees. Each sub-tree has the same join type
for all join nodes. The root of the child tree in the parent tree is replaced with a 'dummy' node
which id is negated id of the child root node.
@param tree - The join tree
@return the list of sub-trees from the input tree | [
"Split",
"a",
"join",
"tree",
"into",
"one",
"or",
"more",
"sub",
"-",
"trees",
".",
"Each",
"sub",
"-",
"tree",
"has",
"the",
"same",
"join",
"type",
"for",
"all",
"join",
"nodes",
".",
"The",
"root",
"of",
"the",
"child",
"tree",
"in",
"the",
"pa... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/JoinNode.java#L304-L316 |
61,588 | VoltDB/voltdb | src/frontend/org/voltdb/planner/parseinfo/JoinNode.java | JoinNode.reconstructJoinTreeFromTableNodes | public static JoinNode reconstructJoinTreeFromTableNodes(List<JoinNode> tableNodes, JoinType joinType) {
JoinNode root = null;
for (JoinNode leafNode : tableNodes) {
JoinNode node = leafNode.cloneWithoutFilters();
if (root == null) {
root = node;
} els... | java | public static JoinNode reconstructJoinTreeFromTableNodes(List<JoinNode> tableNodes, JoinType joinType) {
JoinNode root = null;
for (JoinNode leafNode : tableNodes) {
JoinNode node = leafNode.cloneWithoutFilters();
if (root == null) {
root = node;
} els... | [
"public",
"static",
"JoinNode",
"reconstructJoinTreeFromTableNodes",
"(",
"List",
"<",
"JoinNode",
">",
"tableNodes",
",",
"JoinType",
"joinType",
")",
"{",
"JoinNode",
"root",
"=",
"null",
";",
"for",
"(",
"JoinNode",
"leafNode",
":",
"tableNodes",
")",
"{",
... | Reconstruct a join tree from the list of tables always appending the next node to the right.
@param tableNodes the list of tables to build the tree from.
@param JoinType the join type for all the joins
@return The reconstructed tree | [
"Reconstruct",
"a",
"join",
"tree",
"from",
"the",
"list",
"of",
"tables",
"always",
"appending",
"the",
"next",
"node",
"to",
"the",
"right",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/JoinNode.java#L335-L349 |
61,589 | VoltDB/voltdb | src/frontend/org/voltdb/planner/parseinfo/JoinNode.java | JoinNode.reconstructJoinTreeFromSubTrees | public static JoinNode reconstructJoinTreeFromSubTrees(List<JoinNode> subTrees) {
if (subTrees == null || subTrees.isEmpty()) {
return null;
}
// Reconstruct the tree. The first element is the first sub-tree and so on
JoinNode joinNode = subTrees.get(0);
for (int i = ... | java | public static JoinNode reconstructJoinTreeFromSubTrees(List<JoinNode> subTrees) {
if (subTrees == null || subTrees.isEmpty()) {
return null;
}
// Reconstruct the tree. The first element is the first sub-tree and so on
JoinNode joinNode = subTrees.get(0);
for (int i = ... | [
"public",
"static",
"JoinNode",
"reconstructJoinTreeFromSubTrees",
"(",
"List",
"<",
"JoinNode",
">",
"subTrees",
")",
"{",
"if",
"(",
"subTrees",
"==",
"null",
"||",
"subTrees",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"// Reconstruct... | Reconstruct a join tree from the list of sub-trees connecting the sub-trees in the order
they appear in the list. The list of sub-trees must be initially obtained by calling the extractSubTrees
method on the original tree.
@param subTrees the list of sub trees.
@return The reconstructed tree | [
"Reconstruct",
"a",
"join",
"tree",
"from",
"the",
"list",
"of",
"sub",
"-",
"trees",
"connecting",
"the",
"sub",
"-",
"trees",
"in",
"the",
"order",
"they",
"appear",
"in",
"the",
"list",
".",
"The",
"list",
"of",
"sub",
"-",
"trees",
"must",
"be",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/JoinNode.java#L362-L375 |
61,590 | VoltDB/voltdb | src/frontend/org/voltdb/planner/parseinfo/JoinNode.java | JoinNode.applyTransitiveEquivalence | protected static void applyTransitiveEquivalence(List<AbstractExpression> outerTableExprs,
List<AbstractExpression> innerTableExprs,
List<AbstractExpression> innerOuterTableExprs)
{
List<AbstractExpression> simplifiedOuterExprs = applyTransitiveEquivalence(innerTableExprs, innerOuter... | java | protected static void applyTransitiveEquivalence(List<AbstractExpression> outerTableExprs,
List<AbstractExpression> innerTableExprs,
List<AbstractExpression> innerOuterTableExprs)
{
List<AbstractExpression> simplifiedOuterExprs = applyTransitiveEquivalence(innerTableExprs, innerOuter... | [
"protected",
"static",
"void",
"applyTransitiveEquivalence",
"(",
"List",
"<",
"AbstractExpression",
">",
"outerTableExprs",
",",
"List",
"<",
"AbstractExpression",
">",
"innerTableExprs",
",",
"List",
"<",
"AbstractExpression",
">",
"innerOuterTableExprs",
")",
"{",
... | Apply implied transitive constant filter to join expressions
outer.partkey = ? and outer.partkey = inner.partkey is equivalent to
outer.partkey = ? and inner.partkey = ?
@param innerTableExprs inner table expressions
@param outerTableExprs outer table expressions
@param innerOuterTableExprs inner-outer tables expressio... | [
"Apply",
"implied",
"transitive",
"constant",
"filter",
"to",
"join",
"expressions",
"outer",
".",
"partkey",
"=",
"?",
"and",
"outer",
".",
"partkey",
"=",
"inner",
".",
"partkey",
"is",
"equivalent",
"to",
"outer",
".",
"partkey",
"=",
"?",
"and",
"inner... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/JoinNode.java#L396-L404 |
61,591 | VoltDB/voltdb | src/frontend/org/voltdb/planner/parseinfo/JoinNode.java | JoinNode.classifyJoinExpressions | protected static void classifyJoinExpressions(Collection<AbstractExpression> exprList,
Collection<String> outerTables, Collection<String> innerTables,
List<AbstractExpression> outerList, List<AbstractExpression> innerList,
List<AbstractExpression> innerOuterList, List<AbstractExpress... | java | protected static void classifyJoinExpressions(Collection<AbstractExpression> exprList,
Collection<String> outerTables, Collection<String> innerTables,
List<AbstractExpression> outerList, List<AbstractExpression> innerList,
List<AbstractExpression> innerOuterList, List<AbstractExpress... | [
"protected",
"static",
"void",
"classifyJoinExpressions",
"(",
"Collection",
"<",
"AbstractExpression",
">",
"exprList",
",",
"Collection",
"<",
"String",
">",
"outerTables",
",",
"Collection",
"<",
"String",
">",
"innerTables",
",",
"List",
"<",
"AbstractExpression... | Split the input expression list into the three categories
1. TVE expressions with outer tables only
2. TVE expressions with inner tables only
3. TVE expressions with inner and outer tables
The outer tables are the tables reachable from the outer node of the join
The inner tables are the tables reachable from the inner ... | [
"Split",
"the",
"input",
"expression",
"list",
"into",
"the",
"three",
"categories",
"1",
".",
"TVE",
"expressions",
"with",
"outer",
"tables",
"only",
"2",
".",
"TVE",
"expressions",
"with",
"inner",
"tables",
"only",
"3",
".",
"TVE",
"expressions",
"with",... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/parseinfo/JoinNode.java#L466-L499 |
61,592 | VoltDB/voltdb | src/frontend/org/voltdb/planner/ParameterizationInfo.java | ParameterizationInfo.getParamStateManager | public static HSQLInterface.ParameterStateManager getParamStateManager() {
return new ParameterStateManager() {
@Override
public int getNextParamIndex() {
return ParameterizationInfo.getNextParamIndex();
}
@Override
public void resetCu... | java | public static HSQLInterface.ParameterStateManager getParamStateManager() {
return new ParameterStateManager() {
@Override
public int getNextParamIndex() {
return ParameterizationInfo.getNextParamIndex();
}
@Override
public void resetCu... | [
"public",
"static",
"HSQLInterface",
".",
"ParameterStateManager",
"getParamStateManager",
"(",
")",
"{",
"return",
"new",
"ParameterStateManager",
"(",
")",
"{",
"@",
"Override",
"public",
"int",
"getNextParamIndex",
"(",
")",
"{",
"return",
"ParameterizationInfo",
... | This method produces a ParameterStateManager to pass to HSQL so that VoltDB
can track the parameters it created when parsing the current statement. | [
"This",
"method",
"produces",
"a",
"ParameterStateManager",
"to",
"pass",
"to",
"HSQL",
"so",
"that",
"VoltDB",
"can",
"track",
"the",
"parameters",
"it",
"created",
"when",
"parsing",
"the",
"current",
"statement",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParameterizationInfo.java#L93-L105 |
61,593 | VoltDB/voltdb | src/frontend/org/voltdb/exportclient/ExportRow.java | ExportRow.decodeNextColumn | private static Object decodeNextColumn(ByteBuffer bb, VoltType columnType)
throws IOException {
Object retval = null;
switch (columnType) {
case TINYINT:
retval = decodeTinyInt(bb);
break;
case SMALLINT:
retval = decodeSmallInt(bb);
... | java | private static Object decodeNextColumn(ByteBuffer bb, VoltType columnType)
throws IOException {
Object retval = null;
switch (columnType) {
case TINYINT:
retval = decodeTinyInt(bb);
break;
case SMALLINT:
retval = decodeSmallInt(bb);
... | [
"private",
"static",
"Object",
"decodeNextColumn",
"(",
"ByteBuffer",
"bb",
",",
"VoltType",
"columnType",
")",
"throws",
"IOException",
"{",
"Object",
"retval",
"=",
"null",
";",
"switch",
"(",
"columnType",
")",
"{",
"case",
"TINYINT",
":",
"retval",
"=",
... | Rather, it decodes the next non-null column in the FastDeserializer | [
"Rather",
"it",
"decodes",
"the",
"next",
"non",
"-",
"null",
"column",
"in",
"the",
"FastDeserializer"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/ExportRow.java#L224-L266 |
61,594 | VoltDB/voltdb | src/frontend/org/voltdb/exportclient/ExportRow.java | ExportRow.decodeDecimal | static public BigDecimal decodeDecimal(final ByteBuffer bb) {
final int scale = bb.get();
final int precisionBytes = bb.get();
final byte[] bytes = new byte[precisionBytes];
bb.get(bytes);
return new BigDecimal(new BigInteger(bytes), scale);
} | java | static public BigDecimal decodeDecimal(final ByteBuffer bb) {
final int scale = bb.get();
final int precisionBytes = bb.get();
final byte[] bytes = new byte[precisionBytes];
bb.get(bytes);
return new BigDecimal(new BigInteger(bytes), scale);
} | [
"static",
"public",
"BigDecimal",
"decodeDecimal",
"(",
"final",
"ByteBuffer",
"bb",
")",
"{",
"final",
"int",
"scale",
"=",
"bb",
".",
"get",
"(",
")",
";",
"final",
"int",
"precisionBytes",
"=",
"bb",
".",
"get",
"(",
")",
";",
"final",
"byte",
"[",
... | Read a decimal according to the Four Dot Four encoding specification.
@param bb
ByteBuffer containing Export stream data
@return decoded BigDecimal value | [
"Read",
"a",
"decimal",
"according",
"to",
"the",
"Four",
"Dot",
"Four",
"encoding",
"specification",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/ExportRow.java#L275-L281 |
61,595 | VoltDB/voltdb | src/frontend/org/voltdb/exportclient/ExportRow.java | ExportRow.decodeVarbinary | static public Object decodeVarbinary(final ByteBuffer bb) {
final int length = bb.getInt();
final byte[] data = new byte[length];
bb.get(data);
return data;
} | java | static public Object decodeVarbinary(final ByteBuffer bb) {
final int length = bb.getInt();
final byte[] data = new byte[length];
bb.get(data);
return data;
} | [
"static",
"public",
"Object",
"decodeVarbinary",
"(",
"final",
"ByteBuffer",
"bb",
")",
"{",
"final",
"int",
"length",
"=",
"bb",
".",
"getInt",
"(",
")",
";",
"final",
"byte",
"[",
"]",
"data",
"=",
"new",
"byte",
"[",
"length",
"]",
";",
"bb",
".",... | Read a varbinary according to the Export encoding specification
@param bb
@throws IOException | [
"Read",
"a",
"varbinary",
"according",
"to",
"the",
"Export",
"encoding",
"specification"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/ExportRow.java#L303-L308 |
61,596 | VoltDB/voltdb | src/frontend/org/voltdb/exportclient/ExportRow.java | ExportRow.decodeGeography | static public GeographyValue decodeGeography(final ByteBuffer bb) {
final int strLength = bb.getInt();
final int startPosition = bb.position();
GeographyValue gv = GeographyValue.unflattenFromBuffer(bb);
assert(bb.position() - startPosition == strLength);
return gv;
} | java | static public GeographyValue decodeGeography(final ByteBuffer bb) {
final int strLength = bb.getInt();
final int startPosition = bb.position();
GeographyValue gv = GeographyValue.unflattenFromBuffer(bb);
assert(bb.position() - startPosition == strLength);
return gv;
} | [
"static",
"public",
"GeographyValue",
"decodeGeography",
"(",
"final",
"ByteBuffer",
"bb",
")",
"{",
"final",
"int",
"strLength",
"=",
"bb",
".",
"getInt",
"(",
")",
";",
"final",
"int",
"startPosition",
"=",
"bb",
".",
"position",
"(",
")",
";",
"Geograph... | Read a geography according to the Four Dot Four Export encoding specification.
@param bb
@throws IOException | [
"Read",
"a",
"geography",
"according",
"to",
"the",
"Four",
"Dot",
"Four",
"Export",
"encoding",
"specification",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/ExportRow.java#L387-L393 |
61,597 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/collect/BinaryTreeTraverser.java | BinaryTreeTraverser.children | @Override
public final Iterable<T> children(final T root) {
checkNotNull(root);
return new FluentIterable<T>() {
@Override
public Iterator<T> iterator() {
return new AbstractIterator<T>() {
boolean doneLeft;
boolean doneRight;
@Override
protected T ... | java | @Override
public final Iterable<T> children(final T root) {
checkNotNull(root);
return new FluentIterable<T>() {
@Override
public Iterator<T> iterator() {
return new AbstractIterator<T>() {
boolean doneLeft;
boolean doneRight;
@Override
protected T ... | [
"@",
"Override",
"public",
"final",
"Iterable",
"<",
"T",
">",
"children",
"(",
"final",
"T",
"root",
")",
"{",
"checkNotNull",
"(",
"root",
")",
";",
"return",
"new",
"FluentIterable",
"<",
"T",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Iterator... | Returns the children of this node, in left-to-right order. | [
"Returns",
"the",
"children",
"of",
"this",
"node",
"in",
"left",
"-",
"to",
"-",
"right",
"order",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/BinaryTreeTraverser.java#L55-L86 |
61,598 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/ParserCommand.java | ParserCommand.processTrueOrFalse | private boolean processTrueOrFalse() {
if (token.tokenType == Tokens.TRUE) {
read();
return true;
} else if (token.tokenType == Tokens.FALSE) {
read();
return false;
} else {
throw unexpectedToken();
}
} | java | private boolean processTrueOrFalse() {
if (token.tokenType == Tokens.TRUE) {
read();
return true;
} else if (token.tokenType == Tokens.FALSE) {
read();
return false;
} else {
throw unexpectedToken();
}
} | [
"private",
"boolean",
"processTrueOrFalse",
"(",
")",
"{",
"if",
"(",
"token",
".",
"tokenType",
"==",
"Tokens",
".",
"TRUE",
")",
"{",
"read",
"(",
")",
";",
"return",
"true",
";",
"}",
"else",
"if",
"(",
"token",
".",
"tokenType",
"==",
"Tokens",
"... | Retrieves boolean value corresponding to the next token.
@return true if next token is "TRUE"; false if next token is "FALSE"
@throws HsqlException if the next token is neither "TRUE" or "FALSE" | [
"Retrieves",
"boolean",
"value",
"corresponding",
"to",
"the",
"next",
"token",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserCommand.java#L1078-L1091 |
61,599 | VoltDB/voltdb | src/frontend/org/voltdb/StatsProcProfTable.java | StatsProcProfTable.sortByAverage | public VoltTable sortByAverage(String tableName)
{
List<ProcProfRow> sorted = new ArrayList<ProcProfRow>(m_table);
Collections.sort(sorted, new Comparator<ProcProfRow>() {
@Override
public int compare(ProcProfRow lhs, ProcProfRow rhs) {
return compareByAvg(rhs... | java | public VoltTable sortByAverage(String tableName)
{
List<ProcProfRow> sorted = new ArrayList<ProcProfRow>(m_table);
Collections.sort(sorted, new Comparator<ProcProfRow>() {
@Override
public int compare(ProcProfRow lhs, ProcProfRow rhs) {
return compareByAvg(rhs... | [
"public",
"VoltTable",
"sortByAverage",
"(",
"String",
"tableName",
")",
"{",
"List",
"<",
"ProcProfRow",
">",
"sorted",
"=",
"new",
"ArrayList",
"<",
"ProcProfRow",
">",
"(",
"m_table",
")",
";",
"Collections",
".",
"sort",
"(",
"sorted",
",",
"new",
"Com... | Return table sorted by weighted avg | [
"Return",
"table",
"sorted",
"by",
"weighted",
"avg"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/StatsProcProfTable.java#L142-L166 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.